Skip to main content



      Home
Home » Modeling » EMF » Omit type string in item provider getText
Omit type string in item provider getText [message #661379] Thu, 24 March 2011 09:02 Go to next message
Eclipse UserFriend
The item provide getText code is usually generated as:

String label = ((Foo)object).getName();
return label == null || label.length() == 0 ?
getString("_UI_Foo_type") :
getString("_UI_Foo_type") + " " + label;

that means the text is prefixed with the element's type in any case. Is
there any easy way to omit this type already at code generation time? I
did search various posts and blogs but could not find a suitable answer.
What about runtime, any chance to smoothly get rid of the prefix?

Thanks in advance
Jan
Re: Omit type string in item provider getText [message #661436 is a reply to message #661379] Thu, 24 March 2011 12:34 Go to previous messageGo to next message
Eclipse UserFriend
Jan,

No.


Jan Mauersberger wrote:
> The item provide getText code is usually generated as:
>
> String label = ((Foo)object).getName();
> return label == null || label.length() == 0 ?
> getString("_UI_Foo_type") :
> getString("_UI_Foo_type") + " " + label;
>
> that means the text is prefixed with the element's type in any case.
> Is there any easy way to omit this type already at code generation
> time? I did search various posts and blogs but could not find a
> suitable answer. What about runtime, any chance to smoothly get rid of
> the prefix?
>
> Thanks in advance
> Jan
Re: Omit type string in item provider getText [message #661447 is a reply to message #661436] Thu, 24 March 2011 13:18 Go to previous message
Eclipse UserFriend
Ed,

what a pity...

> Jan,
>
> No.
>
>
> Jan Mauersberger wrote:
>> The item provide getText code is usually generated as:
>>
>> String label = ((Foo)object).getName();
>> return label == null || label.length() == 0 ?
>> getString("_UI_Foo_type") :
>> getString("_UI_Foo_type") + " " + label;
>>
>> that means the text is prefixed with the element's type in any case.
>> Is there any easy way to omit this type already at code generation
>> time? I did search various posts and blogs but could not find a
>> suitable answer. What about runtime, any chance to smoothly get rid of
>> the prefix?
>>
>> Thanks in advance
>> Jan
Previous Topic:[EMF] ID-IDREF resolution
Next Topic:Export from GenModel to XSD missing lots of details
Goto Forum:
  


Current Time: Fri Jul 04 16:43:16 EDT 2025

Powered by FUDForum. Page generated in 0.03338 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top