It's all about the answers!

Ask a question

How to find related WorkItemEditor for contributed button presentation ?


Gidi Gal (961838) | asked Jun 16 '14, 9:36 a.m.
edited Jul 08 '14, 1:46 p.m. by Tim Mok (6.6k38)
Hello to the forum members,

I contributed a button presentation using the information from this link:
https://jazz.net/wiki/bin/view/Main/ContributingAttributePresentations#Eclipse_UI

I would like to set enable\disable state of my button according to the dirty property of its parent WorkItemEditor. I'm looking for an API to find its parent WorkItemEditor. Looking on a more general Eclipse API, I found this link:
http://wiki.eclipse.org/FAQ_How_do_I_find_out_what_view_or_editor_is_selected%3F

However, following this workflow requires some extra work for storing a reference to the currently active editor, I'd be happy if it can be avoided. If you have other idea how to find the parent WorkItemEditor from the button, I'll be grateful if you could share.

Thanks,
Gidi

Be the first one to answer this question!


Register or to post your answer.