Home » Modeling » Epsilon » Error when trying generated ecore file
| |
Re: Error when trying generated ecore file [message #1746457 is a reply to message #1746456] |
Sat, 29 October 2016 15:33 |
C. Santos Messages: 32 Registered: September 2015 |
Member |
|
|
Hi,
with this .emf I get the same error:
@namespace(uri="filesystem", prefix="filesystem")
@gmf
package filesystem;
@gmf.diagram
class Filesystem {
val Drive[*] drives;
val Sync[*] syncs;
}
class Drive extends Folder {
}
class Folder extends File {
@gmf.compartment
val File[*] contents;
}
class Shortcut extends File {
@gmf.link(target.decoration="arrow", style="dash")
ref File target;
}
@gmf.link(source="source", target="target", style="dot", width="2")
class Sync {
ref File source;
ref File target;
}
@gmf.node(label = "name")
class File {
attr String name;
}
And this is my .emf file:
@namespace(uri="crystal", prefix="crystal")
package crystal;
@gmf.diagram(foo="bar", rcp="false", onefile="true", diagram.extension="crystal")
class Crystal {
val Transition[*] transitions;
val Procedure[*] procedures;
val Function[*] functions;
val AnonymousBlock[*] blocks;
}
//Subprograms
@gmf.node(figure="rectangle", border.width="1", label.readOnly = "true")
abstract class Subprograms{
attr String name;
}
@gmf.node(label="name", label.text="Procedure", border.color="255,13,13") //vermelho
class Procedure extends Subprograms {
@gmf.compartment
val Parameters[*] declarativePart;
@gmf.compartment
val Parameters[*] parameters;
@gmf.compartment
val Statements[*] executablePart;
}
@gmf.node(label="name", label.text="Function", border.color="25,191,108") //azul
class Function extends Subprograms {
@gmf.compartment
val Parameters[*] declarativePart;
@gmf.compartment
val Parameters[*] parameters;
@gmf.compartment
val Parameters[1] returnPart;
@gmf.compartment
val Statements[*] executablePart;
}
@gmf.node(label="name", label.text="Anonymous Block", border.color="43,106,215", border.style="dash") //verde
class AnonymousBlock extends Subprograms {
@gmf.compartment
val Parameters[*] declarativePart;
@gmf.compartment
val Statements[*] executablePart;
}
//Parameters
@gmf.node(label="name", figure="rectangle", border.width="1", label.icon="true",label.readOnly = "true", label.placement="internal")
abstract class Parameters{
attr String name;
attr ParameterType type;
}
@gmf.node(label.text="Data Type")
class DataType extends Parameters{
attr String className ="DataType";
attr DataTypeOptions options;
attr int precision = 1;
attr int scale = 0;
}
@gmf.node(label.text="Collection")
class Collections extends Parameters{
attr String className ="Collection";
attr String code = "TYPE name IS TABLE OF NUMBER INDEX BY VARCHAR2(20)";
attr String typeName = "collectionTypeName";
}
@gmf.node(label.text="Record")
class Records extends Parameters{
attr String className ="Record";
attr String code = "TYPE recordType IS RECORD (id number(5), name varchar2(25), lastName tableA.last_name%type)";
attr String typeName = "recordTypeName";
}
@gmf.node(label.text="Cursor")
class Cursor extends Parameters {
attr String className ="Cursor";
attr String cursorQuery = "selectStatement";
}
//Statements
@gmf.node(label="description", label.icon="true", label.placement="internal")
abstract class Statements{
attr String description = "Description";
attr boolean isStart;
}
@gmf.node(figure="rectangle")
class Exception extends Statements{
attr String className ="Exception";
attr String code = "EXCEPTION WHEN no_data_found THEN DBMS_OUTPUT.PUT_LINE('There aren't data registred')";
}
@gmf.node(figure="rectangle")
class If extends Statements{
attr String className ="If";
attr String condition = "Type the IF condition";
@gmf.compartment
val Statements[*] if;
@gmf.compartment
val Statements[*] else;
}
@gmf.node(figure="rectangle")
class Case extends Statements{
attr String className ="Case";
@gmf.compartment
val Selector[*] cases;
}
@gmf.node(figure="rectangle", label="description", label.icon="true", label.placement="internal")
class Selector {
attr String className = "Selector";
attr String condition = "Type the condition for this Selector";
attr String description = "Description";
@gmf.compartment
val Statements[*] caseStatements;
}
@gmf.node(figure="rectangle")
class Insert extends Statements{
attr String className ="Insert";
attr String code = "INSERT INTO tableA (id, name) VALUES (1, 'example')";
}
@gmf.node(figure="rectangle")
class Update extends Statements{
attr String className ="Update";
attr String code = "UPDATE tableA SET name = 'example' WHERE id = 1";
}
@gmf.node(figure="rectangle")
class Delete extends Statements{
attr String className ="Delete";
attr String code = "DELETE FROM tableA WHERE ID = 1";
}
@gmf.node(figure="rectangle")
class Select extends Statements{
attr String className ="Select";
attr String code = "SELECT * FROM tableA WHERE id = 1";
}
@gmf.node(figure="rectangle")
class While extends Statements{
attr String className ="While";
attr String condition = "Type the WHILE condition";
@gmf.compartment
val Statements[*] whileStatements;
}
@gmf.node(figure="rectangle")
class For extends Statements{
attr String className ="For";
attr String counter = "Type the name of the FOR counter";
attr ForCounter typeCounter;
attr int lowestNumber = 0;
attr int highestNumber = 0;
@gmf.compartment
val Statements[*] forStatements;
}
@gmf.node(figure="rectangle")
class Loop extends Statements{
attr String className ="Loop";
attr String breakCondition = "Type the break condition for LOOP";
@gmf.compartment
val Statements[*] loopStatements;
}
@gmf.node(figure="rectangle")
class Open extends Statements{
attr String className ="Open";
attr String cursorName = "cursorName";
}
@gmf.node(figure="rectangle")
class Fetch extends Statements{
attr String className ="Fetch";
attr String code = "FETCH cursorName INTO variableCursor";
}
@gmf.node(figure="rectangle")
class Close extends Statements{
attr String className ="Close";
attr String cursorName = "cursorName";
}
@gmf.node(figure="rectangle")
class CallProcedure extends Statements{
attr String className ="CallProcedure";
attr String nameSubroutine;
}
@gmf.node(figure="rectangle")
class CallFunction extends Statements{
attr String className ="CallFunction";
attr String nameSubroutine;
}
@gmf.link(source="source", target="target", incoming="true", target.decoration="arrow", color="0,0,0", width="1")
class Transition{
attr String name = "Connection";
ref Statements source;
ref Statements target;
}
enum ParameterType {
IN = 0;
OUT = 1;
IN_OUT = 2;
}
enum ForCounter {
NORMAL = 0;
REVERSE = 1;
}
enum DataTypeOptions {
CHAR = 0;
NCHAR = 1;
NVARCHAR2 = 2;
VARCHAR2 = 3;
LONG = 4;
RAW = 5;
LONG_RAW = 6;
NUMBER = 7; //can modify the precision and scale
NUMERIC = 8; //can modify the precision and scale
FLOAT = 9;
DEC = 10; //can modify the precision and scale
DECIMAL = 11; //can modify the precision and scale
INTEGER = 12;
INT = 13;
SMALLINT = 14;
REAL = 15;
DOUBLE = 16;
DATE = 17;
TIMESTAMP_WITH_TIME_ZONE = 18;
TIMESTAMP_WITH_LOCAL_TIME_ZONE = 19;
INTERVAL_YEAR_TO_MONTH = 20;
INTERVAL_DAY_TO_SECOND = 21;
BFILE = 22;
BLOB = 23;
CLOB = 24;
NCLOB = 25;
ROWID = 26;
UROWID = 27;
}
|
|
|
Re: Error when trying generated ecore file [message #1746459 is a reply to message #1746457] |
Sat, 29 October 2016 15:55 |
Eclipse User |
|
|
|
Hmm, I have tried with both metamodels. They both work (In case you need it quickly, I put it in the attachment) in my IDE (Windows, Version: Mars.2 Release (4.5.2)). So, the problem should be something related to your Eclipse configuration.
Can we somehow get more detailed description of the error?
|
|
| | | | | | | |
Goto Forum:
Current Time: Tue Sep 24 10:44:35 GMT 2024
Powered by FUDForum. Page generated in 0.04917 seconds
|