How to set the editor title? [message #498014] |
Fri, 13 November 2009 12:01  |
Eclipse User |
|
|
|
hi everybody,
I have a view and an editor. in the view is a tableviewer which shows all the data of my xmi-model. if i doubleclick on it, the editor will open with the description of the selected item.
So my problem is, i want to set the title with the name of the item. how can i implement it?
the default title of this editor can i set in the plugin.xml.
please help
greetz d.chau
|
|
|
|
|
|
|
|
Re: How to set the editor title? [message #498226 is a reply to message #498079] |
Sun, 15 November 2009 20:24  |
Eclipse User |
|
|
|
Originally posted by: wangqs_eclipse.yahoo.com
Chau wrote:
> hi eclipse user,
>
> i tried this, it works but if i want to do this dynamic for the selected
> item, how can i do this?
>
> because i implement and handler for the doubleclicking via extension
> points and the editor too.
>
> so if i click on the item in the tableviewer the HandlerService starts
> and call the method
>
> page.openEditor(input, MyEditor.ID);
>
> and it set the default name in the plugin.xml. how can I set on this
> place the selected item name?
>
Chau,
Well there's no guarantee, but at least AbstractTextEditor is using
input.getName as the title. Please try to return the description of the
item there in the getName() method if the input is written by you.
Q.S. Wang
http://www.myeclipsedev.com/
|
|
|
Powered by
FUDForum. Page generated in 0.04926 seconds