@Override
  public void onStart(ExtensionManager extensionManager) throws Exception {
    mUserInterface = (UserInterface) extensionManager.get(UserInterface.class);
    mProjectExplorer = (ProjectExplorer) extensionManager.get(ProjectExplorer.class);

    mUserInterface
        .getMainMenu()
        .newItem("Model/Probabilities Annotator/Equitably")
        .setWeight(Integer.MAX_VALUE)
        .setAction(
            () -> {
              if (mProjectExplorer.getSelectedComponents().size() != 1) {
                throw new RuntimeException("Select exactly ONE components!");
              }
              Component a = mProjectExplorer.getSelectedComponents().get(0);

              ProbabilitiesAnnotatorAlgorithm.Equitably(a);
            })
        .create();

    mUserInterface
        .getMainMenu()
        .newItem("Model/Probabilities Annotator/Random")
        .setWeight(Integer.MAX_VALUE)
        .setAction(
            () -> {
              if (mProjectExplorer.getSelectedComponents().size() != 1) {
                throw new RuntimeException("Select exactly ONE components!");
              }
              Component a = mProjectExplorer.getSelectedComponents().get(0);

              ProbabilitiesAnnotatorAlgorithm.Random(a);
            })
        .create();
  }
 @Override
 public void onStart(ExtensionManager extensionManager) throws Exception {
   mDialogsHelper = extensionManager.get(DialogsHelper.class);
 }