Commit 382df19e authored by Robert Smith's avatar Robert Smith
Browse files

Fixed IPSReader error dialogs



Fixed a bug with the IPSReader's opening of dialogs.
Signed-off-by: Robert Smith's avatarRobert Smith <smithrw@ornl.gov>
parent 23ba4596
......@@ -17,4 +17,5 @@ Import-Package: org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.jface.dialogs,
org.eclipse.swt.widgets,
org.eclipse.ui,
org.slf4j
......@@ -35,6 +35,7 @@ import org.eclipse.ice.io.serializable.IReader;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -641,13 +642,23 @@ public class IPSReader implements IReader {
* Open an error dialog to alert the user that a problem occurred while reading the file.
*/
private void createErrorDialog(){
ErrorDialog.openError(new Shell(Display.getCurrent()),
"Error Reading VIBE File", "File import failed.",
//Open the error dialog
PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
ErrorDialog.openError(new Shell(Display.getDefault()),
"Error Reading VIBE Input File",
"File import failed.",
new Status(IStatus.ERROR,
"org.eclipse.ice.io",
"Reached an unexpected end of file while parsing input."));
return;
}
});
return;
}
/**
* Load the Time Loop Data from the INI file and return the data as a
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment