The imports and package don't work in the generated diagram source code [message #182711] |
Fri, 11 April 2008 14:45  |
Eclipse User |
|
|
|
Hi,
I'm a newbie with GMF and I have some difficulties to generate the
diagram editor source file of my .gmfgen file correctly.
I tryed some tutorial examples (mindmap, coffeeshop, ...) and didn't
have any problem to generate the editor source code but when I repeat
the same steps for my own model I always end with the same bad generated
editor source files.
Here is a simplified description of my ecore model:
Package: TargetNetwork
Class : TargetNetwork
Reference: Networks (Type: Target 0..*)
Attribute: Name (Type: EString)
Class : Target
Attribute: Name (Type: EString)
I followed the GMF Cheat Sheets steps to generate the:
- Domain Gen Model : .genmodel + src files + edit src files
- Graphical Def Model : .gmfgraph
- Tooling Def Model : .gmftool
- Mapping Model : .gmfmap
- Diagram Editor Gen Model .gmfgen
After theses steps, I didn't have any warning or any error in the
generated files. Note that the gmfgen file is also correct.
But when I generate the diagram editor source code, I got a lot of
warning and error related to import and package.
Example of error 1:
In my TargetCreateCommand class of the
TargetNetwork.diagram.edit.commands package, I have a conflict between
packages on the import command
import com.opalrt.emfproject.TargetNetwork;
// Error : Only a type can be imported.
// com.opalrt.emfproject.TargetNetwork resolves to a package.
Example of error 2:
In my TargetEditHelper class of the
com.opalrt.emfproject.TargetNetwork.diagram.edit.helpers package, I also
have a conflict between pacakge on the import command.
import com.opalrt.emfproject.TargetNetwork;
public class TargetEditHelper extends
TargetNetwork.diagram.edit.helpers.TargetNetworkBaseEditHelp er {
}
Normally, I looked in the mindmap example, the code should normally look
like:
public class TargetEditHelper extends TargetNetworkBaseEditHelper {
}
I have a lot of import and package problem like these one. I can
manually fix these problem but I'm wondering if I make a mistake
somewhere during generation of any part of the code / gmf file
Thanks.
Vincent
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.24683 seconds