Bug 233055 - decouple from platform internals and remove reflective calls
Summary: decouple from platform internals and remove reflective calls
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 116084
Blocks:
  Show dependency tree
 
Reported: 2008-05-20 15:54 EDT by Mik Kersten CLA
Modified: 2011-04-04 11:09 EDT (History)
2 users (show)

See Also:


Attachments
AbstractFocusMarkerViewAction patch v1 (3.63 KB, patch)
2009-05-28 14:05 EDT, Remy Suen CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mik Kersten CLA 2008-05-20 15:54:38 EDT
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.
Comment 1 Steffen Pingel CLA 2009-01-22 03:11:00 EST
This is a Galileo requirement (bug 253500).
Comment 2 Mik Kersten CLA 2009-01-27 17:15:07 EST

*** This bug has been marked as a duplicate of bug 253500 ***
Comment 3 Steffen Pingel CLA 2009-05-06 01:39:00 EDT
In addition to removing reflective calls we need to file a request against Platform when internals are used (bug 253500).
Comment 4 Steffen Pingel CLA 2009-05-06 02:22:06 EDT
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
Comment 5 Mik Kersten CLA 2009-05-27 00:53:07 EDT
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
Comment 6 Mik Kersten CLA 2009-05-27 16:43:49 EDT
Remy: CC'ing you just fyi, since you provided help in removing the reflection from Java.
Comment 7 Remy Suen CLA 2009-05-27 19:31:40 EDT
(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.
Comment 8 Remy Suen CLA 2009-05-28 14:05:55 EDT
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.
Comment 9 Remy Suen CLA 2009-05-28 14:12:00 EDT
(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?
Comment 10 Steffen Pingel CLA 2009-08-17 19:48:08 EDT
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
Comment 11 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
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