Skip to content

Commit 117649f

Browse files
committed
Place Edge browser userdata directory in metadata space of workspace
The userdata directory for the Edge browser is currently placed as an immediate child of the workspace directory (if existing), thus mixing up with actual projects in the workspace. With this change, the directory is placed in the metadata folder of the SWT bundle within the workspace.
1 parent 1170414 commit 117649f

File tree

1 file changed

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

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
import org.eclipse.osgi.util.NLS;
148148
import org.eclipse.swt.SWT;
149149
import org.eclipse.swt.SWTException;
150+
import org.eclipse.swt.browser.Browser;
150151
import org.eclipse.swt.custom.BusyIndicator;
151152
import org.eclipse.swt.graphics.DeviceData;
152153
import org.eclipse.swt.graphics.FontData;
@@ -525,9 +526,10 @@ private static void setEdgeDataDirectory(Display display) {
525526
return;
526527
}
527528
try {
528-
URI workspaceLocationURI = workspaceLocation.getURL().toURI();
529-
display.setData(EDGE_USER_DATA_FOLDER, Paths.get(workspaceLocationURI).toString());
530-
} catch (URISyntaxException e) {
529+
URI swtMetadataLocationURI = workspaceLocation
530+
.getDataArea(FrameworkUtil.getBundle(Browser.class).getSymbolicName()).toURI();
531+
display.setData(EDGE_USER_DATA_FOLDER, Paths.get(swtMetadataLocationURI).toString());
532+
} catch (URISyntaxException | IOException e) {
531533
WorkbenchPlugin.log("Invalid workspace location to be set for Edge browser.", e); //$NON-NLS-1$
532534
}
533535
}

0 commit comments

Comments
 (0)