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

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


  protected ProfileNode getSelectedProfileNode() {
    Object first = Selections.getFirstSelection(getViewer());
    if (first instanceof ProfileStatusDTO) {
      ProfileStatusDTO status = (ProfileStatusDTO) first;
      String id = status.getProfile();
      VersionNode version = getFabric().getDefaultVersionNode();
      if (version != null) {
        return version.getProfileNode(id);
      }
    }
    return null;
  }
View Full Code Here


        }
        return null;
    }

  protected void updateActionStatus() {
    VersionNode versionNode = getSelectedVersionNode();
    getCreateVersionAction().setFabric(fabric);
        getCreateVersionAction().setVersioNode(versionNode);
  }
View Full Code Here

  public VersionNode getAgentVersion() {
    return getVersionNode();
  }

  public void setAgentVersion(VersionNode version) {
    VersionNode oldVersion = this.versionNode;
    this.versionNode = version;
    if (version != null) {
      setProfilesViewerInput(version);
      firePropertyChange(AGENT_VERSION_PROPERTY, oldVersion, this.versionNode);
    }
View Full Code Here

   */
  protected void loadPreference() {
    if (versionCombo != null) {
      this.versionCombo.setInput(getFabric().getVersionsNode());
    }
    VersionNode v = this.versionNode;
    // we have to clear the selected version node because otherwise the
    // validator does not recognize the changed selection and therefore
    // the version has to be reselected even if its already selected to
    // get the validation done
    setAgentVersion(null);
View Full Code Here

      ContainerNode node = (ContainerNode) element;
      ContainerDTO agent = node.getContainer();
      return agent.getProfiles().toArray();
    }
    if (element instanceof VersionNode) {
      VersionNode version = (VersionNode) element;
      return getProfileChildren(version);
    }
    ProfileNode node = Profiles.toProfileNode(element);
    if (node != null) {
      return getProfileChildren(node);
View Full Code Here

  public void setCheckedProfiles(List<ProfileDTO> selected) {
    // now lets find the selected ProfileNodes
    List<ProfileNode> selectedProfiles = new ArrayList<ProfileNode>();
    Object input = profilesViewer.getInput();
    if (input instanceof VersionNode) {
      VersionNode node = (VersionNode) input;
      for (ProfileDTO profile : selected) {
        ProfileNode profileNode = node.getProfileNode(profile);
        if (profileNode != null) {
          selectedProfiles.add(profileNode);
        }
      }
    }
View Full Code Here

    protected ProfileNode getSelectedProfileNode() {
        Object first = Selections.getFirstSelection(getViewer());
        if (first instanceof ProfileStatusDTO) {
            ProfileStatusDTO status = (ProfileStatusDTO) first;
            String id = status.getProfile();
            VersionNode version = current == null ? null : current.getDefaultVersionNode();
            if (version != null) {
                return version.getProfileNode(id);
            }
        }
        return null;
    }
View Full Code Here

                if (nav != null && current != null) {
                    Object oSel = Selections.getFirstSelection(event.getSelection());
                    if (oSel != null && oSel instanceof VersionDTO) {
                        VersionDTO s = asVersionDTO(oSel);
                        String versionId = s.getId();
                        VersionNode versionNode = searchVersion(nav, versionId);
                        if (versionNode != null)
                            nav.selectReveal(new StructuredSelection(versionNode));
                    }
                }
            }
View Full Code Here

      }
      return result;
    }
   
    private VersionNode searchVersion(FabricNavigator nav, String versionId) {
        VersionNode result = null;
      for (Node node : current.getVersionsNode().getChildrenList()) {
        VersionNode vNode = VersionNode.toVersionNode(node);
        if (vNode != null && vNode.getVersionId().equals(versionId)) {
          result = vNode;
          break;
        }
      }
        return result;
View Full Code Here

      }
        return new CreateVersionAction(version);
    }
   
    protected void updateActionStatus() {
      VersionNode versionNode = getSelectedVersionNode();
      getCreateVersionAction().setFabric(current);
        getCreateVersionAction().setVersioNode(versionNode);
    }
View Full Code Here

TOP

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

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.