Package org.apache.ivyde.eclipse.cpcontainer

Examples of org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer


                for (Iterator iter = containers.iterator(); iter.hasNext();) {
                    if (monitor.isCanceled()) {
                        return Status.CANCEL_STATUS;
                    }
                    SubProgressMonitor subMonitor = new SubProgressMonitor(monitor, 1);
                    IvyClasspathContainer cp = (IvyClasspathContainer) iter.next();
                    cp.launchResolve(false, true, subMonitor);
                }

                return Status.OK_STATUS;
            }
        };
View Full Code Here


            IJavaProject javaProject = JavaCore.create((IProject) resource);
            List/* <IvyClasspathContainer> */containers = IvyClasspathUtil
                    .getIvyClasspathContainers(javaProject);
            Iterator/* <IvyClasspathContainer> */itContainer = containers.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainer ivycp = (IvyClasspathContainer) itContainer.next();
                if (!ivycp.getConf().isInheritedResolveInWorkspace()) {
                    continue;
                }
                projects.add(resource);
            }
        }
View Full Code Here

            IJavaProject javaProject = projects[i];
            List/* <IvyClasspathContainer> */containers = IvyClasspathUtil
                    .getIvyClasspathContainers(javaProject);
            Iterator/* <IvyClasspathContainer> */itContainer = containers.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainer ivycp = (IvyClasspathContainer) itContainer.next();
                IClasspathEntry[] containerEntries = ivycp.getClasspathEntries();
                for (int j = 0; j < containerEntries.length; j++) {
                    IClasspathEntry containerEntry = containerEntries[j];
                    if (containerEntry == null
                            || containerEntry.getEntryKind() != IClasspathEntry.CPE_PROJECT
                            || !containerEntry.getPath().equals(projectPath)) {
                        continue;
                    }

                    SubProgressMonitor subMonitor = null;
                    if (monitor != null) {
                        if (monitor.isCanceled()) {
                            return;
                        }
                        subMonitor = new SubProgressMonitor(monitor, 1);
                    }
                    ivycp.launchResolve(false, isUser, subMonitor);
                    break;
                }
            }
        }
    }
View Full Code Here

            }
            List/* <IvyClasspathContainer> */containers = IvyClasspathUtil
                    .getIvyClasspathContainers(projects[i]);
            Iterator/* <IvyClasspathContainer> */itContainer = containers.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainer ivycp = (IvyClasspathContainer) itContainer.next();
                ivycp.launchResolve(false, isUser, subMonitor);
            }
        }
    }
View Full Code Here

            }
            List/* <IvyClasspathContainer> */containers = IvyClasspathUtil
                    .getIvyClasspathContainers(javaProject);
            Iterator/* <IvyClasspathContainer> */itContainer = containers.iterator();
            while (itContainer.hasNext()) {
                IvyClasspathContainer ivycp = (IvyClasspathContainer) itContainer.next();
                ModuleDescriptor md;
                try {
                    md = ivycp.getConf().getCachedModuleDescriptor();
                } catch (IvyDEException e) {
                    IvyPlugin.log(IStatus.WARNING, "Resolve in workspace for '"
                            + resolvingJavaProject.getElementName() + "' cannot depend on "
                            + ivycp.getDescription() + " [" + e.getMessage() + "]", null);
                    continue;
                }

                if (!md.getModuleRevisionId().getModuleId().equals(dependencyMrid.getModuleId())) {
                    // it doesn't match org#module
View Full Code Here

        viewer.addDoubleClickListener(new IDoubleClickListener() {
            public void doubleClick(DoubleClickEvent event) {
                IStructuredSelection selection = (IStructuredSelection) viewer.getSelection();
                Object element = selection.getFirstElement();
                if (element instanceof CPDependencyDescriptor) {
                    IvyClasspathContainer cp = ((CPDependencyDescriptor) element).container;
                    OpenIvyFileHandler.open(cp);
                }
            }
        });
View Full Code Here

        getSite().getPage().removeSelectionListener(this);
    }

    public void selectionChanged(IWorkbenchPart part, ISelection sel) {
        if (sel instanceof IStructuredSelection) {
            IvyClasspathContainer ivycp = IvyClasspathUtil
                    .getIvyClasspathContainer((IStructuredSelection) sel);
            if (ivycp != null) {
                browser.setUrl("");
                URL report = ivycp.getReportUrl();
                if (report == null || !browser.setUrl(report.toExternalForm())) {
                    browser.setUrl("");
                    Message.warn("impossible to set report view url to " + report.toExternalForm());
                }
            }
View Full Code Here

public class ClasspathContainerSelectionDialog extends ElementListSelectionDialog {
    public ClasspathContainerSelectionDialog(Shell parentShell) {
        super(parentShell, new LabelProvider() {
            public String getText(Object element) {
                IvyClasspathContainer container = (IvyClasspathContainer) element;
                return container.getConf().getJavaProject().getProject().getName() + " -> "
                        + container.getDescription();
            }
        });
        setTitle("Ivy Classpath Containers");
        setMessage("Select a container to view in the resolve visualizer.");
View Full Code Here

    }

    private void makeActions() {
        refreshAction = new Action() {
            public void run() {
                final IvyClasspathContainer container = currentContainer;

                if (container == null) {
                    // nothing as been actually selected
                    return;
                }

                ResolveReport report = container.getResolveReport();
                if (report == null) {
                    // TODO we might want to launch some resolve here
                    // or at least open a popup inviting the end user to launch one
                    return;
                }
View Full Code Here

        containerPage.finish();
        IClasspathEntry newEntry = containerPage.getSelection();
        IPath path = newEntry.getPath();
        IJavaProject project = containerPage.getProject();
        try {
            IvyClasspathContainer ivycp = new IvyClasspathContainer(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

TOP

Related Classes of org.apache.ivyde.eclipse.cpcontainer.IvyClasspathContainer

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.