|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Could not find any exported element of type 'FamilyDeclaration' -> Slot 'familyDeclaration' i [message #1727424 is a reply to message #1727313] |
Wed, 23 March 2016 00:17 |
salha salha Messages: 97 Registered: February 2016 |
Member |
|
|
i change it but i have the same problem !!
Quote:
import org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider;
import org.xtext.example.mydsl.myDsl.FamilyDeclaration;
public class MyDslQNP extends DefaultDeclarativeQualifiedNameProvider {
public String getQualifiedName(FamilyDeclaration unit) {
return unit.getNomFamily();
}
}
Quote:
import org.eclipse.xtext.naming.IQualifiedNameProvider;
/**
* Use this class to register components to be used at runtime / without the Equinox extension registry.
*/
public class MyDslRuntimeModule extends org.xtext.example.mydsl.AbstractMyDslRuntimeModule {
@Override
public Class<? extends IQualifiedNameProvider> bindIQualifiedNameProvider() {
return MyDslQNP.class;
}
}
[Updated on: Wed, 23 March 2016 00:26] Report message to a moderator
|
|
|
|
Re: Could not find any exported element of type 'FamilyDeclaration' -> Slot 'familyDeclaration' i [message #1727426 is a reply to message #1727425] |
Wed, 23 March 2016 00:21 |
salha salha Messages: 97 Registered: February 2016 |
Member |
|
|
this is a part of DSL:
FamilyDeclaration:{FamilyDeclaration}
'Family' nomFamily=ID '='('{')? familyBody=FamilyBody ('}')?(';')?;
FamilyBody: {FamilyBody}
(typeDeclaration+=TypeDeclaration)*;
TypeDeclaration:{TypeDeclaration}
elementTypeDeclaration=ElementTypeDeclaration | propertyTypeDeclaration=PropertyTypeDeclaration
;
......
and this an exemple of model :
Family PipeFilterFam = {
Component Type FilterT = {
Ports { stdin ; stdout; };
Property throughput : int;
};
Component Type UnixFilterT extends FilterT with {
Port stderr ;
Property implementationFile : String;
};
Connector Type PipeT = {
Roles { source; sink; };
Property bufferSize : int ;
};
Property Type StringMsgFormatT = Record [ size:int; msg:String; ];
Invariant Forall c in self .Connectors | HasType(c, PipeT);
}
}
[Updated on: Wed, 23 March 2016 00:37] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03306 seconds