Ignore:
Timestamp:
02/28/12 17:16:41 (13 years ago)
Author:
wschamai
Message:

Improved: get the the Shell from PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() when opening dialogs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modelicaml/org.openmodelica.modelicaml.gen.modelica/src/org/openmodelica/modelicaml/gen/modelica/cg/helpers/OMCClassValidator.java

    r1366 r1372  
    6464import org.eclipse.swt.widgets.Display;
    6565import org.eclipse.swt.widgets.Shell;
     66import org.eclipse.ui.PlatformUI;
    6667import org.eclipse.uml2.uml.Class;
    6768import org.eclipse.uml2.uml.Classifier;
     
    220221        }
    221222        else {
    222             MessageDialog.openError(new Shell(), "Model Valdation with OMC", "The select element must be a UML Class! ");
     223            MessageDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Model Valdation with OMC", "The select element must be a UML Class! ");
    223224        }
    224225    }
     
    255256        Display.getDefault().asyncExec(new Runnable() {
    256257            public void run() {
    257                 DialogMessage dialog = new DialogMessage(new Shell(), "Check Model in OMC", "Validation result for '"+dotPath_classToBeValidated+"': ", getLog());
     258                DialogMessage dialog = new DialogMessage(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Check Model in OMC", "Validation result for '"+dotPath_classToBeValidated+"': ", getLog());
    258259                dialog.open();
    259260            }
Note: See TracChangeset for help on using the changeset viewer.