eclipse plugin - How to programmatically update the selected resource for link-with-editor functionality? -
my eclipse plugin provides editor contains list of files (as result of dependency search). when user selects file in list, file/resource should highlighted in package/resource explorer.
this done using link-with-editor functionality of explorer view if there call like: updateselectedresource(iresource)
call within editor explicity set active file. actual call?
your editor must become iselectionprovider. in eclipse faq complete example, important line registering selection provider getsite().setselectionprovider(viewer);
. afterwards selected file in list automatically told selection listeners, including package explorer.
if want big picture selection service (which responsible making views react on selections in other views), there eclipse article describing in detail.
and if find wanting interact more existing views, may want have @ iadaptable, described here, not necessary package explorer linking.
Comments
Post a Comment