Package org.mevenide.repository

Examples of org.mevenide.repository.RepoPathElement


                                                  boolean expanded,
                                                  boolean leaf,
                                                  int row,
                                                  boolean hasFocus) {
        if (value instanceof RepoTreeNode) {
            final RepoPathElement desc = ((RepoTreeNode) value).getPathElement();
            switch (desc.getLevel()) {
                case RepoPathElement.LEVEL_GROUP:
                    setOpenIcon(Icons.REPO_GROUP_OPEN);
                    setClosedIcon(Icons.REPO_GROUP_CLOSED);
                    break;
View Full Code Here


        if (value instanceof MessageNode)
            return ((MessageNode) value).getMessage();

        else if (value instanceof RepoTreeNode) {
            final RepoTreeNode node = (RepoTreeNode) value;
            final RepoPathElement pathElement = node.getPathElement();
            return getTextForPathElement(pathElement);
        }
        else
            return value == null ? "" : value.toString();
    }
View Full Code Here

                          final Artifact pArtifact) throws IOException {
        if (pArtifact.isComplete())
            download(pPomUrl, pRemoteRepo, pArtifact.getRelativePath(true));
        else {
            final ChildrenFetchService service = ChildrenFetchService.getInstance();
            final RepoPathElement elt = pArtifact.toRepoPathElement(pRemoteRepo);

            final ProgressIndicator prg = IDEUtils.getProgressIndicator();
            if (prg != null) {
                if (prg.isCanceled())
                    return;
                prg.setText2("Searching for children of '" + elt.getRelativeURIPath() + "'...");
            }
            final Future<RepoPathElement[]> result = service.fetch(elt);

            try {
                final RepoPathElement[] elements = result.get(30, TimeUnit.SECONDS);
                if (prg != null)
                    prg.setText2("Found " + elements.length + " artifacts under '" + elt.getRelativeURIPath() + "', downloading...");
                for (int i = 0; i < elements.length; i++) {
                    RepoPathElement element = elements[i];
                    if (prg != null) {
                        if (prg.isCanceled())
                            return;
                        prg.setText2("Download artifact " + (i + 1) + " out of " + elements.length + " for " + elt.getRelativeURIPath());
                    }
View Full Code Here

    public String getRelativePath(final boolean pGuessMissingItems) {
        return convertToRelativePath(this, pGuessMissingItems);
    }

    public RepoPathElement toRepoPathElement(final IRepositoryReader pRepo) {
        return new RepoPathElement(pRepo,
                                   null,
                                   groupId,
                                   type,
                                   version,
                                   artifactId,
View Full Code Here

            final RepoTreeModel model = (RepoTreeModel) treeModel;
            final RepoTreeNode root = model.getRoot();
            if (root == null)
                continue;

            final RepoPathElement pathElement = root.getPathElement();
            if (pathElement == null)
                continue;

            final IRepositoryReader repo = pathElement.getReader();
            if (currentRepo.equals(repo))
                return tree;
        }

        return null;
View Full Code Here

    private final EventListenerList listenerList = new EventListenerList();

    private final RepoTreeNode root;

    public RepoTreeModel(final IRepositoryReader pRepo) {
        final RepoPathElement rootPathElement = new RepoPathElement(pRepo);
        root = new RepoTreeNode(null, rootPathElement);
    }
View Full Code Here

        }
    }

    private class NodeComparator implements Comparator<RepoTreeNode> {
        public int compare(final RepoTreeNode o1, final RepoTreeNode o2) {
            final RepoPathElement e1 = o1.getPathElement();
            final RepoPathElement e2 = o2.getPathElement();

            return e1.getRelativeURIPath().compareTo(e2.getRelativeURIPath());
        }
View Full Code Here

                final Object value = path.getLastPathComponent();
                if (!(value instanceof RepoTreeNode))
                    return false;

                final RepoTreeNode node = (RepoTreeNode) value;
                final RepoPathElement desc = node.getPathElement();
                switch (desc.getLevel()) {
                    case RepoPathElement.LEVEL_GROUP:
                        if (!allowingGroups)
                            return false;
                        break;
                    case RepoPathElement.LEVEL_ROOT:
View Full Code Here

TOP

Related Classes of org.mevenide.repository.RepoPathElement

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.