Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums
-
Type resolution issue
https://www.eclipse.org/forums/index.php/mv/msg/175890/560349/#msg_560349
List[bpmn::NamedBpmnObject] dereferenceElement(bpmn::BpmnDiagram container, String reference):
if (reference.compareTo('') == 0) then
{container}
else
let splitString = reference.split('::') :
container.pools.select(pool|pool.name.matches (splitString.first())).findElementInPool(splitString.remove( splitString.first()).toList());
List[bpmn::NamedBpmnObject] findElementInPool(bpmn::Pool container, List[String] names):
if(names.size == 1) then
container.select(comp|comp.name.matches (name))
else
container.typeSelect(bpmn::Vertex).select(comp|comp.name.mat ches(names.first())).findElementInGraph(names.remove(names.f irst()).toList());
List[bpmn::NamedBpmnObject] findElementInGraph(bpmn::Vertex container, List[String] names):
if(names.size == 1) then
container.select(comp|comp.name.matches (name))
else
container.typeSelect(bpmn::Vertex).select(comp|comp.name.mat ches(names.first())).findElementInGraph(names.remove(names.f irst()).toList());
It was essentially copied and modified from AMPLE's VML4Arch project, in case anyone finds it familiar.
Anyway, the errors I get are that the "container" variable in both findElementIn extensions gives the error:
"Collection type expected! was : bpmn::Vertex"
Also, the "pool.name.matches (splitstring.first())" call gives the error:
"Couldn't find operation 'matches (String)' for type 'type::String'"
I'm using Eclipse 3.5, OAW 4.3.1, and if it matters, Epsilon 0.8.9
Thanks in Advance.]]>
Dominic Renaud
2010-07-19T18:08:00-00:00