]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.workbench/src/org/simantics/workbench/internal/SimanticsWorkbenchApplication.java
Change default "Eclipse Launcher" shell title from workspace launcher
[simantics/platform.git] / bundles / org.simantics.workbench / src / org / simantics / workbench / internal / SimanticsWorkbenchApplication.java
index 8b0431f38e9cde7d6236b146ab5d239034eca37a..d31914fd00351c59d1c42f3f5e735f18cdefc712 100644 (file)
@@ -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;