Examples of ICategoryNode


Examples of com.eclipserunner.model.ICategoryNode

    // setup
    runnerModel.addModelChangeListener(modelListenerMock);
    runnerModel.setLaunchConfigurationCategories(launchConfigurationSetMock);

    // test
    ICategoryNode testCategoryNode = new CategoryNode("test");
    runnerModel.addCategoryNode(testCategoryNode);

    verify(launchConfigurationSetMock).add(anyLaunchConfigurationCotegory());
    verify(modelListenerMock).modelChanged();
  }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    NodeList categoryNodeList = runnerNode.getElementsByTagName(CATEGORY_NODE_NAME);
    for (int categoryIndex = 0; categoryIndex < categoryNodeList.getLength(); categoryIndex++) {
      Element categoryElement = (Element) categoryNodeList.item(categoryIndex);
      String categoryNodeName = categoryElement.getAttribute(NAME_ATTR);

      ICategoryNode categoryNode = null;
      if (Message_uncategorized.equals(categoryNodeName)) {
        categoryNode = runnerModel.getDefaultCategoryNode();
      }
      else {
        categoryNode = new CategoryNode(categoryNodeName);
        runnerModel.addCategoryNode(categoryNode);
      }

      NodeList launchNodeList = categoryElement.getElementsByTagName(LAUNCH_NODE_NAME);
      for (int i = 0; i < launchNodeList.getLength(); i++) {
        Element launchElement = (Element) launchNodeList.item(i);
        ILaunchConfiguration launchConfiguration = findLaunchConfigurationByName(launchElement.getAttribute(NAME_ATTR));

        if (launchConfiguration != null) {
          boolean isBookmarked = Boolean.valueOf(launchElement.getAttribute(BOOKMARK_ATTR));

          categoryNode.add(
            createLaunchCategory(launchConfiguration, isBookmarked)
          );
        }
      }
    }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    return false;
  }

  @Override
  public boolean filterWhenActive(ICategoryNode categoryNode) {
    ICategoryNode defaultCategoryNode = runnerModel.getDefaultCategoryNode();
    if (defaultCategoryNode.equals(categoryNode)) {
      return true;
    }
    return false;
  }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

  public void dragStart(DragSourceEvent event) {
    ISelection selection = selectionProvider.getSelection();
    if (selection instanceof IStructuredSelection && !selection.isEmpty()) {

      currentSelection = (IStructuredSelection) selection;
      ICategoryNode categoryNode = getFirstSelectedItemByType(currentSelection, ICategoryNode.class);
      if (categoryNode != null) {
        event.doit = false;
      }
    } else {
      this.currentSelection = null;
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    return null;
  }

  public boolean hasChildren(Object parent) {
    if (parent instanceof ICategoryNode) {
      ICategoryNode categoryNode = (ICategoryNode) parent;
      return !categoryNode.getLaunchNodes().isEmpty();
    }
    else if (parent instanceof LaunchTypeNode) {
      return true;
    }
    return false;
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    }
    return null;
  }

  private Object[] getChildrenByLaunchTypeNode(ILaunchTypeNode launchTypeNode) {
    ICategoryNode categoryNode = launchTypeNode.getCategoryNode();

    List<ILaunchNode> launchNodes = new ArrayList<ILaunchNode>();
    for (ILaunchNode launchNode : categoryNode.getLaunchNodes()) {
      try {
        if (launchTypeNode.getLaunchConfigurationType().equals(launchNode.getLaunchConfiguration().getType())) {
          launchNodes.add(launchNode);
        }
      } catch (CoreException e) {
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    this.runnerModel = runnerModel;
  }

  public Object[] getChildren(Object object) {
    if (object instanceof ICategoryNode) {
      ICategoryNode categoryNode = (ICategoryNode) object;
      return categoryNode.getLaunchNodes().toArray();
    }
    return null;
  }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

    return null;
  }

  public boolean hasChildren(Object parent) {
    if (parent instanceof ICategoryNode) {
      ICategoryNode categoryNode = (ICategoryNode) parent;
      return !categoryNode.getLaunchNodes().isEmpty();
    }
    return false;
  }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

  @Override
  public void run() {
    InputDialog dialog = openInputDialog(Message_categoryDialogTitle, Message_categoryDialogMessage, INITIAL_CATEGORY_NAME, new CategoryNameValidator());
    if (dialog.getReturnCode() == Window.OK) {
      ICategoryNode categoryNode = new CategoryNode(dialog.getValue());
      runnerModel.addCategoryNode(categoryNode);
    }
  }
View Full Code Here

Examples of com.eclipserunner.model.ICategoryNode

  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof ICategoryNode) {
      ICategoryNode categoryNode = (ICategoryNode) obj;
      return getName().equals(categoryNode.getName());
    }
    return super.equals(obj);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.