Compare MPS nodes<>

Is there a possibility to make custom compares to MPS nodes<> ? In Java I would overwrite the equals() method..

This is a good use case:

sequence<node<MyConcept>> seq = MyConcept_nlist.ofType<node<MyConcept>>;
sequence<node<MyConcept>> distinctConcepts = seq.distinct;
prettyPrint();
I've seen a feature like this here, but I want it programmatically:
https://confluence.jetbrains.com/display/MPS/What%27s+new+in+MPS+3.3#What%27snewinMPS3.3-CompareTwoNodes

Regards
msch95
1 comment
EDIT: tried it this way, but I need a custom node comparer (e.q. override equals() in java)

set<node<MyConcept>> myConceptsSet = new linked_hashset<node<IMyConcept>>; 
myConceptsSet.addAll(myConceptsList); 
myConceptsList.clear(); 
myConceptsList.addAll(myConceptsSet);
prettyPrint();
0

Please sign in to leave a comment.