Package org.apache.ivyde.internal.eclipse.cpcontainer

Examples of org.apache.ivyde.internal.eclipse.cpcontainer.IvyClasspathContainerImpl


        IFile file = ((IvyFileEditorInput) getEditorInput()).getFile();
        List/* <IvyClasspathContainer> */containers = IvyClasspathContainerHelper
                .getContainersFromIvySettings(file);
        Iterator/* <IvyClasspathContainer> */itContainers = containers.iterator();
        while (itContainers.hasNext()) {
            IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) itContainers.next();
            ivycp.launchResolve(false, null);
        }
    }
View Full Code Here


        // add clean cache
        if (!containers.isEmpty()) {
            if (totalSelected == 1 && containers.size() == 1
                    && ((Set) containers.values().iterator().next()).size() == 1) {
                // only one container
                IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) ((Set) containers.values()
                        .iterator().next()).iterator().next();
                Ivy ivy = ivycp.getState().getCachedIvy();
                if (ivy != null) {
                    addCleanableForSingleContainer(menuManager, items, ivy);
                }
            } else {
                addCleanableForManyContainers(menuManager, items, containers.values());
View Full Code Here

        }
    }

    private boolean collectContainer(Map/* <IProject, Set<IvyClasspathContainer>> */containers,
            ClassPathContainer element) {
        IvyClasspathContainerImpl ivycp = IvyClasspathUtil.jdt2IvyCPC(element);
        if (ivycp == null) {
            return false;
        }
        doCollectContainer(containers, ivycp);
        return true;
View Full Code Here

        Iterator itSet = containerSets.iterator();
        while (itSet.hasNext()) {
            Set set = (Set) itSet.next();
            Iterator itContainer = set.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) itContainer.next();
                Ivy ivy = ivycp.getState().getCachedIvy();
                if (ivy != null) {
                    addResolutionCleanable(allCleanables, ivy);
                    addResolutionCleanable(resolutionCleanables, ivy);

                    addRepositoryCleanable(allCleanables, ivy);
View Full Code Here

        containerPage.finish();
        IClasspathEntry newEntry = containerPage.getSelection();
        IPath path = newEntry.getPath();
        IJavaProject project = containerPage.getProject();
        try {
            IvyClasspathContainerImpl ivycp = new IvyClasspathContainerImpl(project, path,
                    new IClasspathEntry[0], new IClasspathAttribute[0]);
            JavaCore.setClasspathContainer(path, new IJavaProject[] {project},
                new IClasspathContainer[] {ivycp}, null);
            IClasspathEntry[] entries = project.getRawClasspath();
            List newEntries = new ArrayList(Arrays.asList(entries));
            newEntries.add(newEntry);
            entries = (IClasspathEntry[]) newEntries
                    .toArray(new IClasspathEntry[newEntries.size()]);
            project.setRawClasspath(entries, project.getOutputLocation(), null);
            ivycp.launchResolve(false, null);
        } catch (JavaModelException e) {
            IvyPlugin.log(e);
            return false;
        }
        return true;
View Full Code Here

                IAdaptable[] elements = ((IWorkingSet) element).getElements();
                for (int i = 0; i < elements.length; i++) {
                    addElement(projects, elements[i]);
                }
            } else if (element instanceof ClassPathContainer) {
                IvyClasspathContainerImpl ivycp = IvyClasspathUtil
                        .jdt2IvyCPC(((ClassPathContainer) element));
                IJavaProject javaProject = ivycp.getConf().getJavaProject();
                if (javaProject != null) {
                    Set/* <IvyClasspathContainer> */cplist = (Set) projects.get(javaProject
                            .getProject());
                    if (cplist == null) {
                        cplist = new HashSet();
View Full Code Here

            }
            List/* <IvyClasspathContainer> */containers = IvyClasspathContainerHelper
                    .getContainers(p);
            Iterator/* <IvyClasspathContainer> */itContainer = containers.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) itContainer.next();
                ModuleDescriptor md = ivycp.getState().getCachedModuleDescriptor();
                if (md == null) {
                    continue;
                }

                ModuleRevisionId candidateMrid = md.getModuleRevisionId();
View Full Code Here

        return computeDefaultContainerEntries(entry, project);
    }

    private IRuntimeClasspathEntry[] computeDefaultContainerEntries(IRuntimeClasspathEntry entry,
            IJavaProject project) throws JavaModelException, CoreException {
        IvyClasspathContainerImpl ivycp;

        if (project == null) {
            ivycp = new IvyClasspathContainerImpl(null, entry.getPath(), null, null);
        } else {
            IClasspathContainer container = JavaCore
                    .getClasspathContainer(entry.getPath(), project);
            if (container == null) {
                String message = "Could not resolve classpath container: "
View Full Code Here

        }

        for (int i = 0; i < projects.length; i++) {
            Iterator it = IvyClasspathContainerHelper.getContainers(projects[i]).iterator();
            while (it.hasNext()) {
                IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) it.next();
                ivycp.launchResolve(false, null);
            }
        }

        return null;
    }
View Full Code Here

    public boolean isLabelProperty(Object element, String property) {
        return true;
    }

    public String decorateText(String text, Object element) {
        IvyClasspathContainerImpl ivycp = IvyClasspathUtil.jdt2IvyCPC((ClassPathContainer) element);
        if (ivycp == null) {
            return null;
        }
        return text + " " + ivycp.getConf().getIvyXmlPath() + " " + ivycp.getConf().getConfs();
    }
View Full Code Here

TOP

Related Classes of org.apache.ivyde.internal.eclipse.cpcontainer.IvyClasspathContainerImpl

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.