Examples of PsiDependencies


Examples of org.mevenide.idea.psi.project.PsiDependencies

        //
        final PsiProject psi = PomModelManager.getInstance(pProject).getPsiProject(pPomUrl);
        if(psi == null)
            return false;

        final PsiDependencies deps = psi.getDependencies();

        //
        //iterate the pom dependencies and collect the artifacts that go in the classpath
        //ignoring everything that has a type that differs from "jar" (empty type is
        //ok, since the default is "jar")
        //
        final Artifact fullArtifact = pArtifact.getCompleteArtifact();
        for (int row = 0; row < deps.getRowCount(); row++) {
            final Artifact artifact = new Artifact();
            artifact.setGroupId(deps.getGroupId(row));
            artifact.setArtifactId(deps.getArtifactId(row));
            artifact.setType(deps.getType(row));
            artifact.setVersion(deps.getVersion(row));
            artifact.setExtension(deps.getExtension(row));
            if (artifact.getCompleteArtifact().equals(fullArtifact))
                return true;
        }

        //
View Full Code Here

Examples of org.mevenide.idea.psi.project.PsiDependencies

        //get the pom PSI model
        //
        final PsiProject psi = PomModelManager.getInstance(pProject).getPsiProject(pPomUrl);
        if (psi == null)
            return new Artifact[0];
        final PsiDependencies deps = psi.getDependencies();

        //
        //iterate the pom dependencies and collect the artifacts that go in the classpath
        //ignoring everything that has a type that differs from "jar" (empty type is
        //ok, since the default is "jar")
        //
        final Set<Artifact> artifacts = new HashSet<Artifact>(deps.getRowCount());
        for (int row = 0; row < deps.getRowCount(); row++) {
            final String type = deps.getType(row);
            if (type != null && !"jar".equalsIgnoreCase(type))
                continue;

            final Artifact artifact = new Artifact();
            artifact.setGroupId(deps.getGroupId(row));
            artifact.setArtifactId(deps.getArtifactId(row));
            artifact.setType(type);
            artifact.setVersion(deps.getVersion(row));
            artifact.setExtension(deps.getExtension(row));
            artifacts.add(artifact);
        }

        //
        //if the pom extends another pom, aggregate it as well
View Full Code Here

Examples of org.mevenide.idea.psi.project.PsiDependencies

        final PomModelManager modelMgr = PomModelManager.getInstance(project);
        final PsiProject psi = modelMgr.getPsiProject(problem.getPomUrl());
        if(psi == null)
            return;
       
        final PsiDependencies deps = psi.getDependencies();
        final int row = deps.findRow(problem.getArtifact());
        if (row >= 0)
            deps.deleteRows(row);
    }
View Full Code Here

Examples of org.mevenide.idea.psi.project.PsiDependencies

        final PomModelManager modelMgr = PomModelManager.getInstance(problem.getProject());
        final PsiProject psi = modelMgr.getPsiProject(problem.getPomUrl());
        if(psi == null)
            return;
       
        final PsiDependencies deps = psi.getDependencies();
        final int row = deps.appendRow();
        deps.setGroupId(row, groupId);
        deps.setArtifactId(row, artifactId);
        deps.setType(row, type);
        deps.setVersion(row, version);
        deps.setExtension(row, extension);
    }
View Full Code Here

Examples of org.mevenide.idea.psi.project.PsiDependencies

        if (pomUrl == null || pomUrl.trim().length() == 0)
            return;

        final PomModelManager modelMgr = PomModelManager.getInstance(project);
        final PsiProject psi = modelMgr.getPsiProject(pomUrl);
        final PsiDependencies deps = psi.getDependencies();
        final RepoPathElement[] artifacts = getSelectedItems(RepoPathElement.LEVEL_VERSION);
        for (RepoPathElement pathElement : artifacts) {
            final int row = deps.appendRow();
            deps.setGroupId(row, pathElement.getGroupId());
            deps.setArtifactId(row, pathElement.getArtifactId());
            deps.setType(row, pathElement.getType());
            deps.setVersion(row, pathElement.getVersion());
        }
    }
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.