Getting node<> from node<AbstractConceptDeclaration>

Hi all,

I have a model holding node<ConceptIdRefExpression> which points to a concept, As I checked, node<ConceptIdRefExpression> has  reference to node<ConceptDeclaration>. The node<ConceptDeclaration> has the name of the node which I want to create as property. My question is, how can I create a new node that thenode<ConceptDeclaration> has as property name ?

 

3 comments
Comment actions Permalink

Hi,

I don't actually understand what you want to accomplish. Do you want to refer to a concept only with its name, e.g. "BaseMethodDeclaration" instead of "concept/BaseMethodDeclaration"? If you want to do so, just inherit ConceptIDRefExpression and alter the editor. Perhaps you need to copy the generator code from the original ConceptIDRefExpression.

Or do you want to create a new node of the referenced concept? If so, then just invoke myconcept.new instance()

 

Best regards

Moritz Fey

0
Comment actions Permalink

Hello Fey,

I guess I were not clear in my last post sadly. I have a node<ConceptIdRefExpression> holding an AbstractConceptDeclaration  as reference. The node<AbstractConceptDeclaration> holds the name 'x' and conceptID 'y' of a concept .  I have not found any method yet that can create a new node of the concept 'x' and conceptID 'y'.

0
Comment actions Permalink

Hi all,

 

Actually i have solved the problem now in quite a crude way, by searching through the language repository and then searching through the concepts and checking name and ids. 

0

Please sign in to leave a comment.