return null;
}
@Override
public void launch(final ILaunchConfiguration configuration, String mode, final ILaunch launch, IProgressMonitor monitor) throws CoreException {
SubMonitor progress = SubMonitor.convert(monitor, 2);
try {
boolean dynamic = configuration.getAttribute(LaunchConstants.ATTR_DYNAMIC_BUNDLES, LaunchConstants.DEFAULT_DYNAMIC_BUNDLES);
if (dynamic)
registerLaunchPropertiesRegenerator(model, launch);
} catch (Exception e) {
throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error obtaining OSGi project launcher.", e));
}
display = Workbench.getInstance().getDisplay();
display.syncExec(new Runnable() {
@Override
public void run() {
dialog = new PopupDialog(new Shell(display), PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, false, true, true, true, false, "Errors in running OSGi Framework", "") {
@Override
protected Control createDialogArea(Composite parent) {
textArea = new Text(parent, SWT.LEAD | SWT.READ_ONLY | SWT.WRAP);
return textArea;
}
@Override
protected Point getDefaultSize() {
Point p = getShell().getSize();
p.x = Math.max(400, p.x / 2);
p.y = Math.max(200, p.y / 2);
return p;
}
@Override
protected Point getInitialLocation(Point initialSize) {
Rectangle r = getShell().getBounds();
return new Point(r.x + r.width - initialSize.x, r.y + r.height - initialSize.y);
}
@Override
public boolean close() {
if (textArea != null) {
textArea.setText("");
}
return super.close();
}
};
}
});
super.launch(configuration, mode, launch, progress.newChild(1, SubMonitor.SUPPRESS_NONE));
}