-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Workspace directory for usedata directory #1548
base: master
Are you sure you want to change the base?
Use Workspace directory for usedata directory #1548
Conversation
I'm not sure if workspace is the right place for user data of Edge browser that can be used on workspace free RCP applications. |
Test Results 483 files ±0 483 suites ±0 8m 25s ⏱️ -26s For more details on these failures, see this check. Results for commit f232fd7. ± Comparison against base commit b8ec749. ♻️ This comment has been updated with latest results. |
I would rather propose to use the workspace directory whenever there is such a directory and in other cases use a different one (probably the ordinary user-data folder as used now). In addition, SWT should not depend on the concept of a "workspace URL". There should rather be some "custom edge data folder", "display-specific edge data folder" or the like instead. Also, we cannot replace the usage of the existing system property, because people may still want to use that opportunity (in particular in plain SWT applicationS). So what about using these values in decreasing preference:
|
I'm not sure what the edge user data directory is actually storing, but from OSGi perspective there is |
SWT should stay usable in non-OSGi environment too. |
1ff728a
to
864b5d0
Compare
With this contribution, Edge browser uses the workspace directory for the userdata directory for the separation of the usage of userdata directory per workspace by the webview2Environment. contributes to eclipse-platform#1013
864b5d0
to
f232fd7
Compare
if (dataDir == null) { | ||
dataDir = (String) browser.getDisplay().getData(DISPLAY_USER_DATA_FOLDER); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract the logic to calculate dataDir
to its own method: getDataDir(...)
.
Also, why use both browser.getDisplay()
and Display.getCurrent()
as the displays when fetching the data? (see lines below too)
With this contribution, Edge browser uses the workspace directory for the userdata directory for the separation of the usage of userdata directory per workspace by the webview2Environment.
Depends on eclipse-platform/eclipse.platform.ui#2434
contributes to #1013