[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: how to contribute to problems view

Nick Tan wrote:
> Hi, Paul:
> 
> The link list is very useful, Thanks!
> 
> But, unfortunately my contributed handler can't access the current 
> selected marker because Problem view does not expose useful public 
> accessors, such as "getSelection()", it only supplies a "setSelection()" 
> public method, hoho~~~
> 
> And I believe that there are other views that do not supply useful 
> public accessors, because that they haven't considered the new menu 
> contribution situation.

Your handler should get the current selection from
HandlerUtil.getCurrentSelection(event).  Does that not work?

AFAIK the problems view is not exposed in API at all ... but for most
views you can find its selection using
getSite().getSelectionProvider().getSelection()

Later,
PW

-- 
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/workbench.htm