Package org.fusesource.ide.fabric8.ui.navigator

Examples of org.fusesource.ide.fabric8.ui.navigator.ContainerNode


  }

  @Override
  public Object[] getElements(Object element) {
    if (element instanceof ContainerNode) {
      ContainerNode node = (ContainerNode) element;
      ContainerDTO agent = node.getContainer();
      return agent.getProfiles().toArray();
    }
    if (element instanceof VersionNode) {
      VersionNode version = (VersionNode) element;
      return getProfileChildren(version);
View Full Code Here


        this.profileNode = profileNode;
    }

    @Override
    public void run() {
        ContainerNode node = containerNode;
        if (node == null) {
            // we are invoked from another node so lets find it...
            if (fabric != null) {
                List<ContainerNode> roots = fabric.getRootContainers();
                if (roots.size() > 0) {
                    node = roots.get(0);
                }
            }
        }
        if (node == null) {
            FabricPlugin.getLogger().warning("No Roto container node available for fabric: " + fabric);
        } else {
            CreateChildContainerDialog dialog = new CreateChildContainerDialog(node, node.getFabric().getNewAgentName());
            if (profileNode != null) {
                CreateChildContainerForm childContainerForm = dialog.getChildContainerForm();
                if (childContainerForm != null) {
                    childContainerForm.setInitialProfileSelections(Arrays.asList(profileNode.getProfile()));
                }
View Full Code Here

    }

    public static void addIfSingleRootContainer(IMenuManager menu, Fabric fabric) {
        List<ContainerNode> roots = fabric.getRootContainers();
        if (roots.size() == 1) {
            ContainerNode root = roots.get(0);
            menu.add(new CreateChildContainerAction(root));
        }
    }
View Full Code Here

        ContainersNode containersNode = fabric.getContainersNode();
        if (containersNode != null) {
          List<ContainerDTO> selectedContainers = getSelectedContainers();
          if (!selectedContainers.isEmpty()) {
            ContainerDTO container = selectedContainers.get(0);
            ContainerNode containerNode = containersNode.getContainerNode(container.getId());
            if (containerNode != null) {
              Selections.setSingleSelection(fabric.getRefreshableUI(), containerNode);
            }
          }
        }
View Full Code Here

    IStructuredSelection selection = getSelection();
    if (selection != null) {
      boolean changed = false;
      Iterator iterator = selection.iterator();
      while (iterator.hasNext()) {
        ContainerNode agentNode = ContainerNode.toContainerNode(iterator.next());
        if (agentNode != null) {
          if (!agentNode.matches(version)) {
            agentNode.getContainer().setVersion(version);
            changed = true;
          }
        }
      }
View Full Code Here


  protected void updateActionStatus() {
    List<ContainerDTO> selectedContainers = getSelectedContainers();

    ContainerNode containerNode = getSingleSelectedRootContainerNode(selectedContainers);
    getCreateChildContainerAction().setContainerNode(containerNode);
    getCreateChildContainerAction().updateEnabled();

    int selectedContainerSize = selectedContainers.size();
    openTerminalAction.setEnabled(selectedContainerSize > 0);
View Full Code Here

        return node == null ? Collections.emptyList() : ((ProfileNode) node).getPropertySourceList();
    }

    @Override
    protected CreateJCloudsContainerAction createCloudContainerAction(Object current) {
        final ProfileNode node = (ProfileNode) current;
        return new CreateJCloudsContainerAction(node.getVersionNode(), null, node);
    }
View Full Code Here

        return new CreateJCloudsContainerAction(node.getVersionNode(), null, node);
    }

    @Override
    protected CreateSshContainerAction createSshContainerAction(Object current) {
        final ProfileNode node = (ProfileNode) current;
        return new CreateSshContainerAction(node.getVersionNode(), null, node);
    }
View Full Code Here

        return new CreateSshContainerAction(node.getVersionNode(), null, node);
    }

    @Override
    protected CreateChildContainerAction createChildContainerAction(Object current) {
        final ProfileNode node = (ProfileNode) current;
        return new CreateChildContainerAction(node);
    }
View Full Code Here

    createProfileForm(profile, inner);

    createLabel(inner, Messages.profileParentsLabel);
    parentsForm.createColumnsViewer(inner);
    parentsForm.setProfilesViewerInput(node.getVersionNode());
    parentsForm.getProfilesViewer().setContentProvider(new ProfileParentsContentProvider(node));

    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 2;
    parentsForm.getProfilesViewer().getTree().setLayoutData(gridData);
    List<ProfileDTO> parents = profile.getParents();
View Full Code Here

TOP

Related Classes of org.fusesource.ide.fabric8.ui.navigator.ContainerNode

Copyright © 2018 www.massapicom. 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.