gmfmap error [message #473366] |
Thu, 06 March 2008 11:00  |
Eclipse User |
|
|
|
Originally posted by: Trep.gmail.com
Hello,
I use org.eclipse.uml2.diagram.def_0.7.100.v200801081543 with GMF21M4
and would like to see e.g. deployment diagram
if I generate e.g. deploymentdiagram.gmfgen from deploymentdiagram.gmfmap,
I get:
source feature must be owned ... error
(and this error is in the original deploymentdiagram.gmfgen too)
I rewrote something in the deploymentdiagram,
so I need to regenerate this,
but some LinkMapping in the original gmfmap file has no source/target
feature is set
Trep
|
|
|
|
|
Re: gmfmap error [message #473369 is a reply to message #473368] |
Fri, 07 March 2008 08:33   |
Eclipse User |
|
|
|
Hi Trep,
In cases when element should be created in a complex way generated code is
modificated. CommunicationPath is that case. CommunicationPath needs changes
in generated CommunicationPathCreateCommand. Look at our deploy diagram plugin.
'doDefaultElementCommand()' is changed and marked with 'generated NOT' tag:
/**
* @generated NOT
*/
protected EObject doDefaultElementCreation() {
Type sourceType = (Type) getSource();
Type targetType = (Type) getTarget();
Association path = CommunicationPathOperations.createCommunicationPath(//
targetType, false, AggregationKind.NONE_LITERAL, "src", 1, 1, //
sourceType, true, AggregationKind.NONE_LITERAL, "dst", 1, 1);
return path;
}
Such tagged fields and methods won't be touched during subsequent code generation.
I would recomment you to copy 'org.eclipse.uml2.diagram.deploy' plugin and
generate your code over it. Or, if it is impossible, look into fileds and
methods tags with 'generated NOT' tag and duplicate them in your plugin when
it is needed.
Best wishes,
Tatiana.
> Hello,
>
> I have done 'Generate diagram code' and/or 'Generate UML2Tools
> Diagram'
> from deploymentDiagram.gmfgen ignoring the validation errors.
> I deleted the deploy plugin from Eclipse with clean.
> I got the following in the log running a new Eclipse instance with
> deploymentDiagram.gmfgen's diagram:
>
> IRJS0007E Semantic refresh failed Error
> -java.lang.Error: Unresolved compilation problems:
> -The method getType() is undefined for the type CommunicationPath
> -The method getType() is undefined for the type CommunicationPath ...
> After some steps I got execute Error
>
> Trep
>
|
|
|
|
|
Re: gmfmap error [message #473372 is a reply to message #473371] |
Mon, 10 March 2008 10:05  |
Eclipse User |
|
|
|
Originally posted by: trep.gmail.com
Hi Tatiana,
The previous message totally answered my question, thank you very much.
Now I see that it would not be a good idea to change the structure of
gmfmap or uml2tools.
Regards,
Trep
|
|
|
Re: gmfmap error [message #618463 is a reply to message #473366] |
Thu, 06 March 2008 11:07  |
Eclipse User |
|
|
|
Hello Trep,
It's OK.
These error messages appear in cases of sophisticated mapping from a domain
model to diagram model. GMF doesn't support such mapping rules. Generated
code is partly changed with 'generated NOT' code in this case.
So, just ignore these errors.
Best wishes,
Tatiana.
> Hello,
>
> I use org.eclipse.uml2.diagram.def_0.7.100.v200801081543 with GMF21M4
> and would like to see e.g. deployment diagram
>
> if I generate e.g. deploymentdiagram.gmfgen from
> deploymentdiagram.gmfmap,
> I get:
> source feature must be owned ... error
> (and this error is in the original deploymentdiagram.gmfgen too)
> I rewrote something in the deploymentdiagram, so I need to regenerate
> this, but some LinkMapping in the original gmfmap file has no
> source/target feature is set
>
> Trep
>
|
|
|
Re: gmfmap error [message #618467 is a reply to message #473367] |
Fri, 07 March 2008 05:35  |
Eclipse User |
|
|
|
Originally posted by: trep.gmail.com
Hello,
I have done 'Generate diagram code' and/or 'Generate UML2Tools Diagram'
from deploymentDiagram.gmfgen ignoring the validation errors.
I deleted the deploy plugin from Eclipse with clean.
I got the following in the log running a new Eclipse instance with
deploymentDiagram.gmfgen's diagram:
IRJS0007E Semantic refresh failed Error
-java.lang.Error: Unresolved compilation problems:
-The method getType() is undefined for the type CommunicationPath
-The method getType() is undefined for the type CommunicationPath ...
After some steps I got execute Error
Trep
|
|
|
Re: gmfmap error [message #618469 is a reply to message #473368] |
Fri, 07 March 2008 08:33  |
Eclipse User |
|
|
|
Hi Trep,
In cases when element should be created in a complex way generated code is
modificated. CommunicationPath is that case. CommunicationPath needs changes
in generated CommunicationPathCreateCommand. Look at our deploy diagram plugin.
'doDefaultElementCommand()' is changed and marked with 'generated NOT' tag:
/**
* @generated NOT
*/
protected EObject doDefaultElementCreation() {
Type sourceType = (Type) getSource();
Type targetType = (Type) getTarget();
Association path = CommunicationPathOperations.createCommunicationPath(//
targetType, false, AggregationKind.NONE_LITERAL, "src", 1, 1, //
sourceType, true, AggregationKind.NONE_LITERAL, "dst", 1, 1);
return path;
}
Such tagged fields and methods won't be touched during subsequent code generation.
I would recomment you to copy 'org.eclipse.uml2.diagram.deploy' plugin and
generate your code over it. Or, if it is impossible, look into fileds and
methods tags with 'generated NOT' tag and duplicate them in your plugin when
it is needed.
Best wishes,
Tatiana.
> Hello,
>
> I have done 'Generate diagram code' and/or 'Generate UML2Tools
> Diagram'
> from deploymentDiagram.gmfgen ignoring the validation errors.
> I deleted the deploy plugin from Eclipse with clean.
> I got the following in the log running a new Eclipse instance with
> deploymentDiagram.gmfgen's diagram:
>
> IRJS0007E Semantic refresh failed Error
> -java.lang.Error: Unresolved compilation problems:
> -The method getType() is undefined for the type CommunicationPath
> -The method getType() is undefined for the type CommunicationPath ...
> After some steps I got execute Error
>
> Trep
>
|
|
|
Re: gmfmap error [message #618472 is a reply to message #473369] |
Fri, 07 March 2008 10:45  |
Eclipse User |
|
|
|
Originally posted by: Trep.gmail.com
Hello,
I generated diagram from componentDiagram.gmfgen and I rewrote the
generated code based on the sample. I seems to be good.
I do not understand why do we have to ignore validation errors and rewite
the code using big models. Should not GMF support it?
Regards,
Trep
|
|
|
Re: gmfmap error [message #618474 is a reply to message #473370] |
Mon, 10 March 2008 07:18  |
Eclipse User |
|
|
|
Hi Trep,
> I generated diagram from componentDiagram.gmfgen and I rewrote the
> generated code based on the sample. I seems to be good.
I'm glad that your diagram editor works good now.
> I do not understand why do we have to ignore validation errors and
> rewite the code using big models. Should not GMF support it?
There are so many ways how element can be created, so many conditions to
account during the consequent ElementCreateCommand generation. To cover all
the cases GMFMap metamodel should be very complicated. I suggest, that it
would become totally ununerstandable and unusable if it was changed so. On
the other hand, it's really easy to correct generated code so to suite requirement
of the specific domain. Did that answer your question?
Best wishes,
Tatiana.
|
|
|
Re: gmfmap error [message #618477 is a reply to message #473371] |
Mon, 10 March 2008 10:05  |
Eclipse User |
|
|
|
Originally posted by: trep.gmail.com
Hi Tatiana,
The previous message totally answered my question, thank you very much.
Now I see that it would not be a good idea to change the structure of
gmfmap or uml2tools.
Regards,
Trep
|
|
|
Powered by
FUDForum. Page generated in 0.29369 seconds