build - Update a view plugin from an action in text editor plugin -
i have 2 eclipse plugins(custom text editor plugin , view plugin 2 different projects). there action in text editor builds index of 'functions' of dependent source files. @ end of action show index(list of 'functions') in tableviewer of view plugin. best way achieve this? view not have listen editor. should updated when action editor plugin fires.
i exported package editor plugin , exported package view plug because text editor plugin needs reference view type populate tableviewer in view plugin, , view plugin needs reference editor type in tableviewer's contentprovider. getting build path error:
a cycle detected in build path of project
how can resolve this? or if bad approach, have better way?
thanks.
tk.
first of all, circular references between plug-ins not allowed. when need share information bidirectional between plug-ins, have refactor problem, have listener pattern 1 of directions.
in case, use same structure view used existing outline view. view should sub-class pagebookview
have rather simple protocol how participating editor can provide data view.
basically same done outline view, , let editor provide content of view via adaption. outline view tracking current editor, , whenever new editor "seen", outline view attempts adapt ieditorpart
icontentoutlinepage
. editor responsible swt widgets , listeners, etc needed in view page particular editor... have close @ javadoc contentoutline
- rather description of protocols involved.
if have multiple "open" editors, new view automatically show relevant information active editor , not "just" editor active last time executed action.
with scheme, action simply
- show (and activate) new view. can done via
iworkbenchpage.showview(...)
. - request provide page update view...
Comments
Post a Comment