Extending IfStatement

I have a language which extends BaseLanguage.
I want to extend IfStatement so that the user will get a different editor and alias.
If I create a new concept with extends IfStatement, it does not appear as a menu option (in the sandbox), although my root concept children definition is:
statements : StatementList[1]

If I change my new if concept to extend Statement directly (instead of IfStatement), then it does appear as a menu option.

I've ruled out the editor's fault, as I've changed it to be just the alias.
My new "if" concept contains nothing else except the alias, and its editor presents this alias. This new concept has nothing else (no Behavior, Constraint, etc.)
Why doesn't it appear on the menu (although IfStatment extends Statement)?
Comment actions Permalink
IfStatement implements IDontSubstituteByDefault therefore your IfStatement won't substitute. Add a new node substitute actions.
node substitute actions SubstituteMyIfStatement 
substituted node: Statement  // <no description>
  condition :     
  common initializer :           
    <no common variables>        
     <no supplemental initializer>              
  actions :       
    add concept MyIfStatement    
Then you can use it like a normal IfStatement.
Comment actions Permalink
Thank you! Your answer clarified and solved my issue :)

Please sign in to leave a comment.