Examples of IvyClasspathContainer


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

     */
    public void doSave(IProgressMonitor monitor) {
        xmlEditor.doSave(monitor);
        IFile file = ((IvyFileEditorInput) getEditorInput()).getFile();
        IJavaProject project = JavaCore.create(file.getProject());
        IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(project);
        if (cp != null
                && cp.getConf().getIvyXmlPath().equals(file.getProjectRelativePath().toString())) {
            cp.scheduleResolve();
        }
    }
View Full Code Here

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

                    return new Status(IStatus.ERROR, IvyPlugin.ID, IStatus.ERROR,
                            "Unable to get the list of available java projects", e);
                }
                List containers = new ArrayList();
                for (int i = 0; i < projects.length; i++) {
                    IvyClasspathContainer cp = IvyClasspathUtil
                            .getIvyClasspathContainer(projects[i]);
                    if (cp != null) {
                        containers.add(cp);
                    }
                }
                monitor.beginTask("Resolve all dependencies", containers.size());
                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

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

    }

    void prefStoreChanged() throws JavaModelException {
        IJavaProject[] projects = plugin.javaModel.getJavaProjects();
        for (int i = 0; i < projects.length; i++) {
            IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(projects[i]);
            if (cp != null && !cp.getConf().isSettingsProjectSpecific()) {
                cp.launchResolve(false, false, null);
            }
        }
    }
View Full Code Here

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

    public void setFocus() {
    }

    public void selectionChanged(IWorkbenchPart part, ISelection sel) {
        if (sel instanceof IStructuredSelection) {
            IvyClasspathContainer ivycp = IvyClasspathUtil
                    .getIvyClasspathContainer((IStructuredSelection) sel);
            if (ivycp != null) {
                browser.setUrl("");
                URL report;
                try {
                    report = ivycp.getReportUrl();
                } catch (IvyDEException e) {
                    e.log(IStatus.WARNING, "Impossible show the report for " + ivycp.getConf());
                    e.show(IStatus.WARNING, "Show Ivy report failure",
                        "Impossible show the report for " + ivycp.getConf());
                    return;
                }
                if (!browser.setUrl(report.toExternalForm())) {
                    browser.setUrl("");
                    Message.warn("impossible to set report view url to " + report.toExternalForm());
View Full Code Here

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

    }

    private void triggerResolve() {
        IFile file = ((IvyFileEditorInput) getEditorInput()).getFile();
        IJavaProject project = JavaCore.create(file.getProject());
        IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(project);
        if (cp != null
                && cp.getConf().getIvyXmlPath().equals(file.getProjectRelativePath().toString())) {
            cp.launchResolve(false, true, null);
        }
    }
View Full Code Here

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

     */
    public void doSave(IProgressMonitor monitor) {
        xmlEditor.doSave(monitor);
        IFile file = ((IvyFileEditorInput) getEditorInput()).getFile();
        IJavaProject project = JavaCore.create(file.getProject());
        IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(project);
        if (cp != null
                && cp.getConf().getInheritedIvySettingsPath().equals(
                    file.getProjectRelativePath().toString())) {
            cp.launchResolve(false, true, null);
        }
    }
View Full Code Here

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

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

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

public abstract class IvyDEContainerAction implements IActionDelegate {

    public void selectionChanged(IAction action, ISelection s) {
        if (s instanceof IStructuredSelection) {
            IStructuredSelection selection = (IStructuredSelection) s;
            IvyClasspathContainer cp = IvyClasspathUtil.getIvyClasspathContainer(selection);
            if (cp != null) {
                action.setEnabled(true);
                selectionChanged(action, cp);
                return;
            }
View Full Code Here

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

        // nothing to do
    }

    public void selectionChanged(IWorkbenchPart part, ISelection sel) {
        if (sel instanceof IStructuredSelection) {
            IvyClasspathContainer ivycp = IvyClasspathUtil
                    .getIvyClasspathContainer((IStructuredSelection) sel);
            if (ivycp != null) {
                browser.setUrl("");
                URL report;
                try {
                    report = ivycp.getReportUrl();
                } catch (IvyDEException e) {
                    e.log(IStatus.WARNING, "Impossible show the report for " + ivycp.getConf());
                    e.show(IStatus.WARNING, "Show Ivy report failure",
                        "Impossible show the report for " + ivycp.getConf());
                    return;
                }
                if (!browser.setUrl(report.toExternalForm())) {
                    browser.setUrl("");
                    Message.warn("impossible to set report view url to " + report.toExternalForm());
View Full Code Here

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

        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, true, null);
        } catch (JavaModelException e) {
            IvyPlugin.log(e);
            return false;
        }
        return true;
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.