Use standard eclipse dialogs instead of Swing dialogs

- Swing dialog triggers freeze on Eclipse Luna on OSX 10.10

Change-Id: I9f59e884d19dd397502537286d2730be9eb0fec1
This commit is contained in:
Dustin Spicuzza
2014-11-21 01:01:17 -05:00
committed by Peter Johnson
parent 99dc3c90ed
commit 529f5b773f
2 changed files with 5 additions and 7 deletions

View File

@@ -8,8 +8,6 @@ import java.io.OutputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import javax.swing.JOptionPane;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -17,6 +15,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.jface.dialogs.MessageDialog;
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
@@ -117,7 +116,7 @@ public abstract class AbstractInstaller {
protected void install() throws InstallException {
if(installLocation.exists()) {
if(!removeFileHandler(installLocation, true)) {
JOptionPane.showMessageDialog(null,
MessageDialog.openError(null, "Error",
String.format("Could not update the old wpilib folder.%n"
+ "Please close any WPILib tools and restart Eclipse."));
}

View File

@@ -6,10 +6,9 @@ import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import javax.swing.JOptionPane;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.jface.dialogs.MessageDialog;
import edu.wpi.first.wpilib.plugins.core.WPILibCore;
@@ -21,8 +20,8 @@ public class SimulationNotification {
public static void showUnsupported() {
String title = "Simulation Unsupported";
String message = SIMULATION_UNSUPPORTED_MSG;
JOptionPane.showMessageDialog(null, message, title, JOptionPane.OK_OPTION);
String message = SIMULATION_UNSUPPORTED_MSG;
MessageDialog.openError(null, title, message);
try {
Desktop.getDesktop().browse(new URI(URL));
} catch (IOException e) {