Skip to content
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

add support for softlinked workspace files #175

Merged
merged 1 commit into from
Oct 9, 2020
Merged

Conversation

plaird
Copy link
Contributor

@plaird plaird commented Oct 9, 2020

This is a worrisome solution for #164. I am not totally comfortable with the solution, but the system Open dialog's behavior does not seem to be configurable. If the WORKSPACE file is a softlink, the Open dialog resolves the soft link to the canonical path. So to support this use case we need to detect that we are in a non-root directory of the Bazel workspace. This could get nasty as Bazel supports nested workspaces, but the solution seems to be ok since it makes sure the found WORKSPACE soft link is pointing to the canonical file identified by the user.

I also added a pref to disable this feature, just in case there is trouble with it. A follow on PR will clean up the prefs stuff, it is a little rough.

@@ -55,6 +55,11 @@ public void initializeDefaultPreferences() {
IPreferenceStore store = BazelPluginActivator.getInstance().getPreferenceStore();
Properties globalPrefs = loadGlobalPreferences();

// TODO Instead of doing this manual mapping of global prefs into prefs, which requires an entry
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gets cleaned up in the next PR

@plaird plaird merged commit ac8d64b into master Oct 9, 2020
@plaird plaird deleted the plaird/softlink branch October 9, 2020 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant