Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313088 - API Usage: SnapshotDetailsView illegally extends ContentOutline
Summary: API Usage: SnapshotDetailsView illegally extends ContentOutline
Status: RESOLVED WONTFIX
Alias: None
Product: MAT
Classification: Tools
Component: GUI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 313085
  Show dependency tree
 
Reported: 2010-05-17 05:24 EDT by Krum Tsvetkov CLA
Modified: 2015-06-26 03:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krum Tsvetkov CLA 2010-05-17 05:24:54 EDT
As revealed in the API report to bug 313085 the class
org.eclipse.mat.ui.internal.views.SnapshotDetailsView extends org.eclipse.ui.views.contentoutline.ContentOutline, which is marked with @noextend
Comment 1 Andrew Johnson CLA 2013-05-17 08:47:13 EDT
The reason for this class is to override isImportant, which for ContentOutline just returns 
return (part instanceof IEditorPart);

whereas SnapshotDetailsView returns
 (part instanceof MultiPaneEditor) || (part instanceof SnapshotHistoryView)
 
i.e. the outline page should be used for our heap editor or for the history view, which as a view, not an editor, wouldn't be noticed by ContentOutline. Without this override clicking on the history view will not bring up details of the selected dump.

One idea would be to make the history view an editor, but this might have the side effect that the inspector view etc. would change when the history view/editor was active.

Another would be to make SnapshotHistoryView also implement IEditorPart (to pass the test in ContentOutline), but leave it instantiated as a view.
Comment 2 Krum Tsvetkov CLA 2015-06-26 03:10:47 EDT
I think we can leave things as they are.