Community
Participate
Working Groups
For each place that we use reflection we should file a bug against Platform/SDK and consider providing a patch if the fix is not trivial.
This is a Galileo requirement (bug 253500).
*** This bug has been marked as a duplicate of bug 253500 ***
In addition to removing reflective calls we need to file a request against Platform when internals are used (bug 253500).
Usage of reflection: * CommonsFonts: FontData.lfStrikeOut to enable strikeout on Windows * CommonFormUtil: ExpandableComposite.programmaticToggleState() to enable event handling when programatically expanding a section * ContextEditorFormPage: PackageExplorerContentProvider.setIsFlatLayout() to enable a flat presentation * FocusedViewerManager: AbstractTreeViewer.internalGetWidgetToSelect() to verify if node expansion was successful * AntUiBrider: ContentOutlinePage.getTreeViewer() to access the structured viewer * AbstractFocusMarkerViewAction: ExtendedMarkersView.viewer to access the structured viewer * MarkerInterestFilter: MarkerCategory.getChildren() to access the content structure of the markers view * JavaUiBridge: JavaOutlinePage.fOutlineViewer to access the structured viewer * PdeUiBride: SourceOutlinePage.viewer to access the structured viewer * TasksUiPlugin: Workspace.crashed to determine if the previous shutdown was successful
JavaUiBridge is done thanks to Remy's patch (bug 256071). So we're down to the following. Raising priority in backlog so that we file bugs against Platform on this. * CommonsFonts: FontData.lfStrikeOut to enable strikeout on Windows * CommonFormUtil: ExpandableComposite.programmaticToggleState() to enable event handling when programatically expanding a section * ContextEditorFormPage: PackageExplorerContentProvider.setIsFlatLayout() to enable a flat presentation * FocusedViewerManager: AbstractTreeViewer.internalGetWidgetToSelect() to verify if node expansion was successful * AntUiBrider: ContentOutlinePage.getTreeViewer() to access the structured viewer * AbstractFocusMarkerViewAction: ExtendedMarkersView.viewer to access the structured viewer * MarkerInterestFilter: MarkerCategory.getChildren() to access the content structure of the markers view * PdeUiBride: SourceOutlinePage.viewer to access the structured viewer * TasksUiPlugin: Workspace.crashed to determine if the previous shutdown was successful
Remy: CC'ing you just fyi, since you provided help in removing the reflection from Java.
(In reply to comment #5) Will analyze these when I get a chance. We can probably reuse the code from bug 256071 for some of the StructuredViewer cases.
Created attachment 137529 [details] AbstractFocusMarkerViewAction patch v1 First cut to remove reflection from AbstractFocusMarkerViewAction. I tried the same thing with AntUiBridge but it didn't work. In fact, the Ant filtering didn't work, period (even without my changes). I kept flicking the focus on and off but the 'Outline' view either showed everything or nothing at all despite my attempts to make changes in the Ant file to try to get it to add it to my context. One other thing that's missing from comment 5 is that the AUB class casts to Workspace directly in the open(IInteractionElement) method... ((Workspace) ResourcesPlugin.getWorkspace()).newResource(path, IResource.FILE); ...this should be changed to... ResourcesPlugin.getWorkspace().getRoot().getFile(path); ...but this seems too easy. I have checked that invoking equals(Object) does return true. Was it just an oversight that API was not used or is there some other reason? If it is the latter then I would suggest inlining some comments around that block of code.
(In reply to comment #8) > I tried the same thing with AntUiBridge but it didn't work. In fact, the Ant > filtering didn't work, period (even without my changes). I kept flicking the > focus on and off but the 'Outline' view either showed everything or nothing at > all despite my attempts to make changes in the Ant file to try to get it to add > it to my context. Haha, don't I feel dumb. The same thing happens with the 'Problems' view actually. Except that it _always_ shows everything. What could be wrong with my setup?
Current usage of internals: * CommonsFonts: FontData.lfStrikeOut to enable strikeout on Windows * CommonFormUtil: ExpandableComposite.programmaticToggleState() to enable event handling when programatically expanding a section * ContextEditorFormPage: PackageExplorerContentProvider.setIsFlatLayout() to enable a flat presentation * FocusedViewerManager: AbstractTreeViewer.internalGetWidgetToSelect() to verify if node expansion was successful * AntUiBrider: ContentOutlinePage.getTreeViewer() to access the structured viewer * AbstractFocusMarkerViewAction: ExtendedMarkersView.viewer to access the structured viewer * MarkerInterestFilter: MarkerCategory.getChildren() to access the content structure of the markers view * PdeUiBride: SourceOutlinePage.viewer to access the structured viewer * TasksUiPlugin: Workspace.crashed to determine if the previous shutdown was successful * DiscoveryCore, DiscoveryUi: P2 internals to drive installation of extensions
Mylyn has been restructured, and our issue tracking has moved to GitHub [1]. We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub. [1] https://github.com/orgs/eclipse-mylyn