Create Addon Tutorial Difficulties

When trying to follow the Create Addons tutorial (
https://github.com/eclipse/capella/wiki/Create-Addons), the building of the add-on is straight forward (enough) through the Extension Points; when it comes to implementing the Command Handler, it is either so vague as to make it easy to mess up (which I may have done) or it is broken. When implementing the two classes in CommandHandler.java and Command1Hanlder.java files respectively there are a number of errors inherently.
In the CommandHandler class:

  1. org.eclipse.core.expressions.IEvaluationContext so shouldnt need to be imported
    In the Command1Handler class:
  2. The overridden createCommand method extended from CommandHandler doesnt implement the same inputs, and as written is also not abstract as in CommandHandler.
  3. ICommand, IProgressMonitor, AbstractReadWriteCommand, EObject, and more are undefined
    ^ It seems that the way I did it just didnt grab the necessary resources for the above definitions which could be my bad, however, I would recommend more clarity on the second half of the tutorial to at least make the quality of the first half.

Hi,
Indeed, Tutorials have been updated accordingly
What was misleading:

  • In the plugin.xml menu section, there was an icon that doesn’t exist yet, that was preventing the menu to appears
  • In the CommandHandler, there was some useless imports that was raising errors
  • In the Command1Handler, there was no imports at the top of the file
  • The Command1Handler shall be referenced into the ‘handler’ section of your command in the plugin.xml.
    Thanks
    Regards
    Philippe.
1 Like