use of org.eclipse.amalgam.discovery.ui.viewer.DiscoveryContentProvider in project gemoc-studio by eclipse.
the class GemocPackageDiscovery method openModelingDiscoveryWizard.
public static void openModelingDiscoveryWizard(IWorkbenchWindow window) {
final DiscoveryContentProvider provider = new GemocPackageDiscovery();
IWorkbench wb = PlatformUI.getWorkbench();
IProgressService ps = wb.getProgressService();
try {
ps.busyCursorWhile(new IRunnableWithProgress() {
public void run(IProgressMonitor pm) {
try {
provider.load(pm);
} catch (InterruptedException e) {
/*
* End user cancelled
*/
}
}
});
if (provider.getDiscovery() != null) {
DiscoveryWizard wizard = new DiscoveryWizard(provider);
WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
dialog.setMinimumPageSize(600, 400);
dialog.open();
}
} catch (InvocationTargetException e1) {
if (!(e1.getCause() instanceof OperationCanceledException)) {
Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, e1.getMessage(), e1));
}
} catch (InterruptedException e1) {
/*
* End user cancelled
*/
}
}
Aggregations