Bug 13758 - [Contributions] Can't get to editor's status line without down casting
Summary: [Contributions] Can't get to editor's status line without down casting
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Simon Arsenault CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2002-04-14 15:42 EDT by Erich Gamma CLA
Modified: 2003-02-18 11:32 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erich Gamma CLA 2002-04-14 15:42:05 EDT
To get to an editor's status line you have to write the following code:

IEditorActionBarContributor contributor= 
     editor.getEditorSite().getActionBarContributor();
     if (contributor instanceof EditorActionBarContributor) 
	 return ((EditorActionBarContributor) contributor).
             getActionBars().getStatusLineManager();

That is you can't get to the ActionBars via the IEditorActionBarContributor you 
have to downcast to EditorActionBarContributor.
Comment 1 Erich Gamma CLA 2002-04-14 16:10:48 EDT
I think I've complained about this earlier and may be there were good reason to 
not change it (->API stability)
Comment 2 Simon Arsenault CLA 2003-02-18 11:32:30 EST
I've added a new API method to IEditorSite to return the IActionBars - just 
like you can do with IViewSite.