Skip to content

Commit 3373da8

Browse files
committed
Add Workspace Address to Display data
This contributes to adding the workspace address to the display data on the initilization of the workbench. This contribution allows further SWT components to utilize this information. Contributes to eclipse-platform/eclipse.platform.swt#1013
1 parent d6a50a4 commit 3373da8

File tree

1 file changed

+5
-0
lines changed
  • bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal

1 file changed

+5
-0
lines changed

bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import java.net.URI;
3838
import java.net.URISyntaxException;
3939
import java.net.URL;
40+
import java.nio.file.Paths;
4041
import java.util.ArrayList;
4142
import java.util.Arrays;
4243
import java.util.Collection;
@@ -292,6 +293,8 @@ public final class Workbench extends EventManager implements IWorkbench, org.ecl
292293
public static final String PROP_EXIT_CODE = "eclipse.exitcode"; //$NON-NLS-1$
293294
private static final String CMD_DATA = "-data"; //$NON-NLS-1$
294295

296+
private static final String DISPLAY_USER_DATA_FOLDER = "displayUserDataFolder"; //$NON-NLS-1$
297+
295298
private static final class StartupProgressBundleListener implements ServiceListener {
296299

297300
private final SubMonitor subMonitor;
@@ -451,6 +454,8 @@ public void serviceChanged(ServiceEvent event) {
451454
private Workbench(Display display, final WorkbenchAdvisor advisor, MApplication app, IEclipseContext appContext) {
452455
this.advisor = Objects.requireNonNull(advisor);
453456
this.display = Objects.requireNonNull(display);
457+
this.display.setData(DISPLAY_USER_DATA_FOLDER,
458+
Paths.get(URI.create(Platform.getInstanceLocation().getURL().toString())).toString());
454459
application = app;
455460
e4Context = appContext;
456461

0 commit comments

Comments
 (0)