|
|
|
Re: How to set the editor title? [message #498062 is a reply to message #498014] |
Sat, 14 November 2009 00:21 |
Eclipse User |
|
|
|
Originally posted by: wangqs_eclipse.yahoo.com
This is a multi-part message in MIME format.
--------------010006090108020402030403
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Try this method.
EditorPart:setPartName(String partName)
Q.S. Wang
Chau wrote:
> 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
--------------010006090108020402030403
Content-Type: text/x-vcard; charset=utf-8;
name="wangqs_eclipse.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="wangqs_eclipse.vcf"
YmVnaW46dmNhcmQNCmVtYWlsO2ludGVybmV0Ondhbmdxc19lY2xpcHNlQHlh aG9vLmNvbQ0K
dXJsOmh0dHA6Ly93d3cubXllY2xpcHNlZGV2LmNvbQ0KdmVyc2lvbjoyLjEN CmVuZDp2Y2Fy
ZA0KDQo=
--------------010006090108020402030403--
|
|
|
|
|
Re: How to set the editor title? [message #498226 is a reply to message #498079] |
Mon, 16 November 2009 01: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.03259 seconds