|
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; |