I'm using Exeed annotations (on Emfatic) to create icons and labels on my model tree. EOL statements have been pretty useful so far, however I would like to use extended properties (operations) and external EOL files so I don't have to repeat the same block of code multiple times, this is a sample class:
@exeed(label="var label : String;
if(self.name <> null and self.name <> '') {
label = self.name;
}
else if(self.umlArtifact.isDefined()) {
label = self.umlArtifact.Name;
}
return label + ' (Copy > ' + self.type().name + ')';"
, classIcon="link")
abstract class CopyArtifact extends SourceArtifact {
attr String copyPath;
}
As you can see, to get the label I have several sentences and it is growing with some logic I want to add. Is it possible to have an extended property (operation) like this, whether it is on the same Emfatic file, the ecore generated meta-model or an external EOL file?:
operation Artifact label() : String
{
var label : String;
if(self.name <> null and self.name <> '') {
label = self.name;
}
else if(self.umlArtifact.isDefined()) {
label = self.umlArtifact.Name;
}
return label;
}
Thanks.