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

"Paul Webster" <pwebster@xxxxxxxxxx> 写入消息 news:fn7ksj$ft5$3@xxxxxxxxxxxxxxxxxxxx
Your handler should get the current selection from
HandlerUtil.getCurrentSelection(event).  Does that not work?

I was wondering how to access the selection object (here is a marker instance) in an applicationContext instance, and HandlerUtil.getCurrentSelection(event) is exactly what I need.
AFAIK the problems view is not exposed in API at all ... but for most
views you can find its selection using
getSite().getSelectionProvider().getSelection()

yeap, I should have realized the common way, that is selection service.

Thanks Paul!

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