| Summary: | UnassociatedEditorStrategyRegistry should not be static | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> |
| Component: | IDE | Assignee: | Mickael Istria <mistria> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.6 | ||
| Target Milestone: | 4.6 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/67745 https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7a96414a097129f863ff053184ab33a679467890 |
||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 90292 | ||
|
Description
Dani Megert
So we should create a WorkbenchPlugin.getDefault().getUnassociatedFilesStrategyRegistry() method ? (In reply to Mickael Istria from comment #1) > So we should create a > WorkbenchPlugin.getDefault().getUnassociatedFilesStrategyRegistry() method ? I would even think about putting the code into the existing editor registry. (In reply to Dani Megert from comment #2) > (In reply to Mickael Istria from comment #1) > > So we should create a > > WorkbenchPlugin.getDefault().getUnassociatedFilesStrategyRegistry() method ? > > I would even think about putting the code into the existing editor registry. I like this proposal. I'll try that. (In reply to Dani Megert from comment #2) > (In reply to Mickael Istria from comment #1) > > So we should create a > > WorkbenchPlugin.getDefault().getUnassociatedFilesStrategyRegistry() method ? > > I would even think about putting the code into the existing editor registry. Unassociated editor strategy is currently in org.eclipse.ui.ide (where the IDE.openEditor classes are), and EditorRegistry is currently in org.eclipse.ui.workbench. Should I move it and the extension point definition to org.eclipse.ui.workbench then? (In reply to Mickael Istria from comment #4) > (In reply to Dani Megert from comment #2) > > (In reply to Mickael Istria from comment #1) > > > So we should create a > > > WorkbenchPlugin.getDefault().getUnassociatedFilesStrategyRegistry() method ? > > > > I would even think about putting the code into the existing editor registry. > > Unassociated editor strategy is currently in org.eclipse.ui.ide (where the > IDE.openEditor classes are), and EditorRegistry is currently in > org.eclipse.ui.workbench. > > Should I move it and the extension point definition to > org.eclipse.ui.workbench then? Uh oh. No. In that case leave it where it is. What about accessing it as a (private static) field of the IDE class then? (In reply to Mickael Istria from comment #6) > What about accessing it as a (private static) field of the IDE class then? *it* == ? (In reply to Dani Megert from comment #7) > *it* == ? Sorry for the lack of context, let me try to state something more "stateless". What about adding a (private static) "unassociatedEditorRegistry" field to the IDE class, removing the "static" field on methods, and access them inside the IDE class by dereferencing the unassociatedEditorRegistry field? (In reply to Mickael Istria from comment #8) > (In reply to Dani Megert from comment #7) > > *it* == ? > Sorry for the lack of context, let me try to state something more > "stateless". > > What about adding a (private static) "unassociatedEditorRegistry" field to > the IDE class static is static ;-). The registry has to be an instance/field of the plug-in instance. New Gerrit change created: https://git.eclipse.org/r/67745 Gerrit change https://git.eclipse.org/r/67745 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=7a96414a097129f863ff053184ab33a679467890 |