]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Change default "Eclipse Launcher" shell title from workspace launcher 22/722/2
authorjsimomaa <jani.simomaa@gmail.com>
Tue, 18 Jul 2017 10:51:43 +0000 (13:51 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 20 Jul 2017 17:20:03 +0000 (20:20 +0300)
refs #7358

Change-Id: I4919b533cb980dd6730fa7915507ddaac2cafab4

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;