ParserProvider - any examples ? [message #134948] |
Tue, 12 June 2007 06:48  |
Eclipse User |
|
|
|
Originally posted by: awm_abu.yahoo.com
Hello all,
We are working on a product with multiple GMF diagrams.
I noticed that all the providers (icon, editPart, parser) were getting
called for each diagram type
when opening all diagrams.
I was able to fix this for icon and editPart using object and context
properties.
However the parser is not as clear.
Also I can't find any examples of its use except in the simple cases.
I have tried geoshapes, logic etc
Has anybody done this or possibly be able to point me to a good example ?
Thanks.
|
|
|
Re: ParserProvider - any examples ? [message #135269 is a reply to message #134948] |
Tue, 12 June 2007 11:52   |
Eclipse User |
|
|
|
Alan wrote:
> Hello all,
>
> We are working on a product with multiple GMF diagrams.
> I noticed that all the providers (icon, editPart, parser) were getting
> called for each diagram type
> when opening all diagrams.
>
>
> I was able to fix this for icon and editPart using object and context
> properties.
> However the parser is not as clear.
> Also I can't find any examples of its use except in the simple cases.
> I have tried geoshapes, logic etc
>
> Has anybody done this or possibly be able to point me to a good example ?
>
> Thanks.
>
>
Hello Alan
In my current project I override the generated ParserProvider to be able to parse several labels. I had to do this
because the features associated with the labels are not trivial, so I have to call some external parser service to cope
with user input and then set the resulting complex object in the model.
From your post it is not clear what exactly you wanna know or what your problem with ParserProvider is, so I'll just
explain what I understand of the mechanics and hope it helps...
For every label in your mapping, code is generated to be able to format/parse the labels text. What kind of parser this
is, depends on the label properties you set in the mapping. The default is a MessageFormatParser, where you may specify
some pattern to build the displayed string using the features. These properties show up for feature labels, but not for
simple labels, but the ParserProvider generates these parser mappings none the less.
htah
Norbert Schöpke
|
|
|
|
Re: ParserProvider - any examples ? [message #136081 is a reply to message #134948] |
Thu, 14 June 2007 10:32  |
Eclipse User |
|
|
|
Hi Alan,
Check out https://bugs.eclipse.org/bugs/show_bug.cgi?id=191488
Cheers...
Anthony
"Alan" <awm_abu@yahoo.com> wrote in message
news:f4ltmd$sba$1@build.eclipse.org...
> Hello all,
>
> We are working on a product with multiple GMF diagrams.
> I noticed that all the providers (icon, editPart, parser) were getting
> called for each diagram type
> when opening all diagrams.
>
>
> I was able to fix this for icon and editPart using object and context
> properties.
> However the parser is not as clear.
> Also I can't find any examples of its use except in the simple cases.
> I have tried geoshapes, logic etc
>
> Has anybody done this or possibly be able to point me to a good example ?
>
> Thanks.
>
|
|
|
Powered by
FUDForum. Page generated in 0.06164 seconds