Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » [Eugenia] Problem generating the Diagram.
[Eugenia] Problem generating the Diagram. [message #590645] Thu, 15 July 2010 09:30
Toñi Reina is currently offline Toñi ReinaFriend
Messages: 209
Registered: July 2009
Senior Member
Hi all,

once I've tested the Eugenia tutorials successfully ;-), I've started
to create my own editor.

During the process, everything is OK, but the last step, the
diagram generation from the gmfgen file, produces an error. The problem
is in the Java generated, concretely in the method
protected boolean provides(CreateNodeViewOperation op) that belongs to
the class MyDSLViewProvider.

This is the generated method, and the problem is in the last return.
There is a variable or a value missing.

* @generated
protected boolean provides(CreateNodeViewOperation op) {
if (op.getContainerView() == null) {
return false;
IElementType elementType = getSemanticElementType(op
EObject domainElement = getSemanticElement(op.getSemanticAdapter());
int visualID;
if (op.getSemanticHint() == null) {
// Semantic hint is not specified. Can be a result of call from
// In this situation there should be NO elementType, visualID will be
// by VisualIDRegistry.getNodeVisualID() for domainElement.
if (elementType != null || domainElement == null) {
return false;
visualID = GuaranaVisualIDRegistry.getNodeVisualID(op
.getContainerView(), domainElement);
} else {
visualID = GuaranaVisualIDRegistry
if (elementType != null) {
if (!GuaranaElementTypes.isKnownElementType(elementType)
|| (!(elementType instanceof IHintedType))) {
return false; // foreign element type
String elementTypeHint = ((IHintedType) elementType)
if (!op.getSemanticHint().equals(elementTypeHint)) {
return false; // if semantic hint is specified it should be the
same as in element type
if (domainElement != null
&& visualID != GuaranaVisualIDRegistry.getNodeVisualID(
op.getContainerView(), domainElement)) {
return false; // visual id for node EClass should match visual id
from element type
} else {
if (!SolutionEditPart.MODEL_ID.equals(GuaranaVisualIDRegistry
.getModelID(op.getContainerView()))) {
return false; // foreign diagram
switch (visualID) {
return false;
return ;
Previous Topic:[Eugenia] Newbie question. Problems in the generated editor with the Folder Item.
Next Topic:[Eugenia] Problem with annotation detail by using different metamodel
Goto Forum:

Current Time: Mon Nov 30 00:58:36 GMT 2015

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

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