|Opening a view when an EMF Generated editor opens [message #550335]
||Thu, 29 July 2010 23:21
| Jon Svede
Registered: July 2009
I posted the following in the EMF forum and was advised to post it here (and in the RCP forum but I'll wait to post there).|
I have an RCP app using Galileo that leverages an EMF model . When the user selects File >> Open and selects a serialized model, the standard generated editor opens, as expected. However, I want to have a view that will display a subset of the data in the model.
Currently my view is opened by default in the perspective. The view has a TableViewer to display the data. Ideally I want this TableViewer to reflect the number of columns to display based on the model (it can vary). Currently, I can't seem to figure out how to make it change the number of columns or label text (the column labels are years, and the user will have some ability to change the years in the model). It seems that after the TableViewer is constructed I am stuck with the columns. I have read that one way people deal with this is by hiding columns - and I haven't really seen any other strategies for this.
So that is my first question: is that right? or is there a way to tell the Viewer to change the number and labels for the columns?
My second question is: instead of dealing with things the way I am as explained above, would it be better to launch this Viewer when the file is opened rather than have it already open ahead of the editor? If the answer there is yes, how do I do that? Right now my editor is being launched by it's registered extension (rather than through a Command/DefaultHandler of my own creation). Is the proper way to write my own command/handler, or is the something I can listen in on and react to?
Thanks for any guidance!
Powered by FUDForum
. Page generated in 0.02003 seconds