| [EuGENia | EOL] delete creation tool [message #483784] |
Wed, 02 September 2009 20:20  |
Mihir Messages: 83 Registered: July 2009 |
Member |
|
|
Hello,
I'm trying to delete some creation tools so that they don't appear on
the tools palette.
I've tried experimenting different ways but if I delete any tool then in
gmfmap the tool property in node mapping selects some other tool
available. I want it to map to no tool. I tried deleting from gmftool
anf gmfmap as well. But no luck. Please help me with this.
var rule = ECore!EClass.all.selectOne(o|o.name = 'Rule');
ruleTool = GmfTool!CreationTool.selectOne(t|t.title = 'Rule');
var nodeMapping =
GmfMap!NodeMapping.all.selectOne(nm|nm.domainMetaElement = rule);
--delete nodeMapping.tool;
nodeMapping.tool = ruleTool;
-- even though I do this it does not maps the same tool instead some
other tool is mapped
var r = ECore!EClass.all.selectOne(o|o.name = 'OclExp');
var nodeMapping =
GmfMap!NodeMapping.all.selectOne(nm|nm.domainMetaElement = r);
delete nodeMapping.tool;
--this deletes the tool but in gmfmap some other random tool is selected.
Thanks,
Mihir
|
|
|
|
|
|
|
|
|
| Re: [EuGENia | EOL] delete creation tool [message #758317 is a reply to message #758312] |
Tue, 22 November 2011 12:22   |
Snakebyte Missing name Messages: 130 Registered: November 2011 |
Senior Member |
|
|
Take this example again :
@namespace(uri="argumentmodel", prefix="argumentmodel")
@gmf(foo="bar")
package argumentmodel;
@gmf.diagram(onefile="false")
class ArgumentModel {
val Claim[*] claims;
val Assumption[*] assumptions;
}
@gmf.node(label="name")
class Claim {
attr String name;
attr String description;
@gmf.link(incoming="true")
val ArgumentStrategy[*] ConnectArg;
}
@gmf.node(label="name",phantom="true")
class ArgumentStrategy {
attr String description;
attr String name;
@gmf.link(incoming="true")
ref Assumption [*] assumptions;
}
@gmf.node(label="name")
class Assumption {
attr String description;
attr String name;
}
now i tried to add the following in the ECore2GMF.eol:
var tool = GmfTool!CreationTool.all.selectOne(t|t.title = 'assumptions');
var nodeMapping = GmfMap!NodeMapping.all.selectOne(nm|nm.tool = tool);
delete tool;
nodeMapping.unset('tool');
nodeMapping.tool.println();
operation Any unset(feature:String) {
var sf = self.eClass().eAllStructuralFeatures.
selectOne(sf|sf.name = feature);
self.eUnset(sf);
}
What i want to achieve is, that i dont want to see the relation "assumptions" in the connections palette.
and i get the error:
Method 'eClass' not found.
what im doing wrong ?
[Updated on: Tue, 22 November 2011 14:16] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03988 seconds