From: jsimomaa Date: Tue, 18 Jul 2017 10:51:43 +0000 (+0300) Subject: Change default "Eclipse Launcher" shell title from workspace launcher X-Git-Tag: v1.31.0~266 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F22%2F722%2F2;p=simantics%2Fplatform.git Change default "Eclipse Launcher" shell title from workspace launcher refs #7358 Change-Id: I4919b533cb980dd6730fa7915507ddaac2cafab4 --- diff --git a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java index 8b0431f38..d31914fd0 100644 --- a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java +++ b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java @@ -33,6 +33,8 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osgi.service.datalocation.Location; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; @@ -373,6 +375,20 @@ public class SimanticsWorkbenchApplication implements IApplication, IExecutableE return args.containsKey("-pdelaunch"); //$NON-NLS-1$ } + private static class ChooseSimanticsWorkspaceDialog extends ChooseWorkspaceDialog { + + public ChooseSimanticsWorkspaceDialog(Shell parentShell, ChooseWorkspaceData launchData, boolean suppressAskAgain, boolean centerOnMonitor) { + super(parentShell, launchData, suppressAskAgain, centerOnMonitor); + } + + @Override + protected void configureShell(Shell shell) { + super.configureShell(shell); + // Use product name in shell title instead of generic "Eclipse Launcher" + shell.setText(getWindowTitle()); + } + } + /** * Open a workspace selection dialog on the argument shell, populating the * argument data with the user's selection. Perform first level validation @@ -392,7 +408,8 @@ public class SimanticsWorkbenchApplication implements IApplication, IExecutableE URL url = null; do { // okay to use the shell now - this is the splash shell - new ChooseWorkspaceDialog(shell, launchData, suppressAskAgain, true).prompt(force); + new ChooseSimanticsWorkspaceDialog(shell, launchData, suppressAskAgain, true).prompt(force); + String instancePath = launchData.getSelection(); if (instancePath == null) { return null;