Fix faulty cheat sheet editor ID constant#1947
Conversation
|
@HeikoKlare is it actually used? I'm wondering because it seem no one ever noticed the problem before? Is something not working here? |
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
The only official usage is the editor's ID getter: which in turn only seems to be used for storing dialog settings: Since there are no other (official) consumers, I guess it did not produce any problems so far and would also not produce issues in the future but just be a bit inconsistent. I only came across it because we actually use such editors but had no explicit reference/dependency to the bundle providing them (as we just replicate the editor ID) and I wanted to reference the (internal) constant instead to have an explicit dependency to the bundle, such that it gets properly auto-included. But that failed as the ID did not match actual editor ID. But since such references to internals are reasonably discouraged anyway, it's not an argument for actually doing this change. |
|
I was just curious, the change looks ok of course... and if you are aware of the consequences its also fine to reference internal code. In this case the compiler even likely will inline the constant anyways so you won't really reference it at runtime. Regarding the auto inclusion of such code, I think whenever we find something like this we should try to avoid creating fake references and instead using requirement+capability feature of OSGi, that's a bit more work to setup but often much more suitable on the long term. My plan is to enhance support for this in PDE. |
The constant does not match the actual editor ID (misses a dot).
c3a65fa to
8e983b0
Compare
The constant does not match the actual editor ID (misses a dot).