project property page for folding#1979
Conversation
72d1a89 to
5a502f8
Compare
5a502f8 to
1d581ad
Compare
1d581ad to
365530f
Compare
8346a67 to
9703be4
Compare
|
^ I added a missing import (might have happened in the last rebase) and then rebased my changes onto master). |
9703be4 to
432e69b
Compare
|
I'm seeing funky things happening with the extended folding preferences. It seems to be toggling instead of looking at the enabled/disabled state. When I try settting in the project settings, it doesn't turn on after Apply and Close. If I set the Workspace preferences and hit apply, it works right away. If I try turning it off and hitting apply again, it doesn't do anything. If I then turn on again in workspace, it turns off in the file. The project settings should take over entirely and the workspae should be ignored if set. |
432e69b to
7461848
Compare
The issue here was that enabling/disabling these preferences required restarting the editor. One thing that's still left is completely enabling/disabling folding and switching the folding provider. Doing that cannot be handled by the folding provider and is handled by the I am not sure about the toggling behavior you are seeing but I think that comes from there as well. |
|
Ok the issue above is that |
bdada93 to
f72cc05
Compare
|
I fixed the issues. I also ensured that the properties are set in a way that the listener there "sees" it and I changed the folding provider selection such that it is only available in the workspace preferences since having different folding providers for different projects would require more API changes. However, it is possible to configure any folding provider per-project, it is not just possible to use different folding providers for different projects in the same workspace. |
f72cc05 to
6a30275
Compare
jjohnstn
left a comment
There was a problem hiding this comment.
LGTM and new version fixes the wonkiness I was seeing.
|
Thanks @danthe1st If you are willing, please add a N&N entry for the new functionality. |
|
@jjohnstn Should I create it for the property page only or also for the custom folding regions feature? |
|
I decided to just create a PR for both. |


What it does
This PR introduces a project properties page for Java editor folding as suggested in #1825 (comment)
This was originally part of #1825 but I split it into two PRs.
How to test
Preferences>Java>Editor>Folding.Project>Properties>Java Editor>FoldingIf "Enable project specific settings" is checked, the settings from the project properties page should be used. Otherwise, the workspace preferences are used.
Author checklist
#1562 accessesJavaPlugin.getDefault().getPreferenceStore()in a few places. This will need to be updated when either PR is merged.