Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 284447 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/ui/internal/ide/application/IDEWorkbenchAdvisor.java (-1 / +2 lines)
Lines 7-12 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - bug 284447: Prepend showlocation in title
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.ui.internal.ide.application;
12
package org.eclipse.ui.internal.ide.application;
12
13
Lines 179-185 Link Here
179
				if (cmdLineArgs.length > i + 1) {
180
				if (cmdLineArgs.length > i + 1) {
180
					name = cmdLineArgs[i + 1];
181
					name = cmdLineArgs[i + 1];
181
				}
182
				}
182
				if (name != null && name.indexOf("-") == -1) { //$NON-NLS-1$
183
				if (name != null) {
183
					workspaceLocation = name;
184
					workspaceLocation = name;
184
				} else {
185
				} else {
185
					workspaceLocation = Platform.getLocation().toOSString();
186
					workspaceLocation = Platform.getLocation().toOSString();
(-)src/org/eclipse/ui/internal/ide/application/IDEWorkbenchWindowAdvisor.java (-3 / +13 lines)
Lines 7-15 Link Here
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - bug 284447: Prepend showlocation in title
10
 *******************************************************************************/
11
 *******************************************************************************/
11
package org.eclipse.ui.internal.ide.application;
12
package org.eclipse.ui.internal.ide.application;
12
13
14
import java.io.File;
13
import java.net.URL;
15
import java.net.URL;
14
import java.util.ArrayList;
16
import java.util.ArrayList;
15
import java.util.Iterator;
17
import java.util.Iterator;
Lines 299-305 Link Here
299
				});
301
				});
300
	}
302
	}
301
303
302
	private String computeTitle() {
304
	protected String computeTitle() {
303
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
305
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
304
		IWorkbenchPage currentPage = configurer.getWindow().getActivePage();
306
		IWorkbenchPage currentPage = configurer.getWindow().getActivePage();
305
		IEditorPart activeEditor = null;
307
		IEditorPart activeEditor = null;
Lines 341-348 Link Here
341
343
342
		String workspaceLocation = wbAdvisor.getWorkspaceLocation();
344
		String workspaceLocation = wbAdvisor.getWorkspaceLocation();
343
		if (workspaceLocation != null) {
345
		if (workspaceLocation != null) {
344
			title = NLS.bind(IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
346
			//Bug 284447: Prepend workspace name set by -showlocation
345
					title, workspaceLocation);
347
			if (new File(workspaceLocation).isAbsolute()) {
348
				//a real workspace location -- append at the end
349
				title = NLS.bind(IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
350
						title, workspaceLocation);
351
			} else {
352
				//a name set by -showlocation -- prepend at the start
353
				title = NLS.bind(IDEWorkbenchMessages.WorkbenchWindow_shellTitle,
354
						workspaceLocation, title);
355
			}
346
		}
356
		}
347
357
348
		return title;
358
		return title;

Return to bug 284447