Package org.apache.ivyde.eclipse.retrieve

Examples of org.apache.ivyde.eclipse.retrieve.RetrieveSetup


        this.setup = retrieveSetup;
        ivyResolveJob = IvyPlugin.getDefault().getIvyResolveJob();
    }

    public void run() {
        RetrieveSetup retrieveSetup = setup.getRetrieveSetup();
        List confs = IvyClasspathUtil.split(retrieveSetup.getRetrieveConfs());
        IvyResolver resolver = new IvyResolver(setup.getIvyXmlPath(), confs, setup.getProject());
        resolver.setRetrievePattern(retrieveSetup.getRetrievePattern());
        resolver.setRetrieveSync(retrieveSetup.isRetrieveSync());
        resolver.setRetrieveTypes(retrieveSetup.getRetrieveTypes());
        ResolveRequest request = new ResolveRequest(resolver, setup.getState());
        ivyResolveJob.addRequest(request);
    }
View Full Code Here


        setup.setResolveInWorkspace(prefStore.getBoolean(PreferenceConstants.RESOLVE_IN_WORKSPACE));
        setup.setAcceptedTypes(IvyClasspathUtil.split(prefStore
                .getString(PreferenceConstants.ACCEPTED_TYPES)));
        setup.setAlphaOrder(prefStore.getBoolean(PreferenceConstants.ALPHABETICAL_ORDER));
        setup.setRetrievedClasspath(prefStore.getBoolean(PreferenceConstants.RETRIEVED_CLASSPATH));
        RetrieveSetup retrieveSetup = new RetrieveSetup();
        retrieveSetup.setRetrievePattern(prefStore
                .getString(PreferenceConstants.RETRIEVED_CLASSPATH_PATTERN));
        retrieveSetup.setRetrieveSync(prefStore
                .getBoolean(PreferenceConstants.RETRIEVED_CLASSPATH_SYNC));
        retrieveSetup.setRetrieveTypes(prefStore
                .getString(PreferenceConstants.RETRIEVED_CLASSPATH_TYPES));
        return setup;
    }
View Full Code Here

        prefStore.setValue(PreferenceConstants.RESOLVE_IN_WORKSPACE, setup.isResolveInWorkspace());
        prefStore.setValue(PreferenceConstants.ACCEPTED_TYPES,
            IvyClasspathUtil.concat(setup.getAcceptedTypes()));
        prefStore.setValue(PreferenceConstants.ALPHABETICAL_ORDER, setup.isAlphaOrder());
        prefStore.setValue(PreferenceConstants.RETRIEVED_CLASSPATH, setup.isRetrievedClasspath());
        RetrieveSetup retrieveSetup = setup.getRetrieveSetup();
        prefStore.setValue(PreferenceConstants.RETRIEVED_CLASSPATH_PATTERN,
            retrieveSetup.getRetrievePattern());
        prefStore.setValue(PreferenceConstants.RETRIEVED_CLASSPATH_SYNC,
            retrieveSetup.isRetrieveSync());
        prefStore.setValue(PreferenceConstants.RETRIEVED_CLASSPATH_TYPES,
            retrieveSetup.getRetrieveTypes());
    }
View Full Code Here

        typesText.setToolTipText(TOOLTIP_RETRIEVE_TYPES);

    }

    public RetrieveSetup getRetrieveSetup() {
        RetrieveSetup setup = new RetrieveSetup();
        setup.setRetrieveSync(retrieveSyncButton.getSelection());
        setup.setRetrievePattern(retrievePatternText.getText());
        if (confsText != null) {
            setup.setRetrieveConfs(confsText.getText());
        }
        setup.setRetrieveTypes(typesText.getText());
        return setup;
    }
View Full Code Here

                .getJavaProject() == null ? null : ivycp.getConf().getJavaProject().getProject());
        this.conf = ivycp.getConf();
        setUsePreviousResolveIfExist(ivycp.getConf().getInheritedAdvancedSetup().isUseExtendedResolveId());
        setUsePreviousResolveIfExist(usePreviousResolveIfExist);
        if (conf.getInheritedClasspathSetup().isRetrievedClasspath()) {
            RetrieveSetup setup = conf.getInheritedClasspathSetup().getRetrieveSetup();
            setRetrievePattern(setup.getRetrievePattern());
            setRetrieveSync(setup.isRetrieveSync());
            setRetrieveTypes(setup.getRetrieveTypes());
        }
    }
View Full Code Here

        conf.setSettingsProjectSpecific(false);

        String ivyXmlPath = "ivy.xml";
        boolean doStandaloneRetrieve = false;
        boolean isRetrieveProjectSpecific = false;
        RetrieveSetup standaloneRetrieveSetup = new RetrieveSetup();

        for (int i = 0; i < parameters.length; i++) {
            String[] parameter = parameters[i].split("=");
            if (parameter == null || parameter.length == 0) {
                continue;
            }
            String value;
            try {
                value = parameter.length > 1 ? URLDecoder.decode(parameter[1], "UTF-8") : "";
            } catch (UnsupportedEncodingException e) {
                // this should never never happen
                IvyPlugin.log(IStatus.ERROR, UTF8_ERROR, e);
                throw new RuntimeException(UTF8_ERROR, e);
            }
            if (parameter[0].equals("project")) {
                if (conf.getJavaProject() == null && value.trim().length() != 0) {
                    IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
                    IProject project = root.getProject(value.trim());
                    IJavaProject javaProject = JavaCore.create(project);
                    conf.setProject(javaProject);
                }
            } else if (parameter[0].equals("ivyXmlPath")) {
                ivyXmlPath = value;
                conf.setIvyXmlPath(value);
            } else if (parameter[0].equals("confs")) {
                List confs = IvyClasspathUtil.split(value);
                if (confs.isEmpty()) {
                    confs = Collections.singletonList("*");
                }
                conf.setConfs(confs);
            } else if (parameter[0].equals("ivySettingsPath")) {
                settingsSetup.setIvySettingsPath(readOldSettings(conf, value));
                conf.setSettingsProjectSpecific(true);
            } else if (parameter[0].equals("loadSettingsOnDemand")) {
                settingsSetup.setLoadSettingsOnDemand(Boolean.valueOf(value).booleanValue());
                conf.setSettingsProjectSpecific(true);
            } else if (parameter[0].equals("propertyFiles")) {
                settingsSetup.setPropertyFiles(IvyClasspathUtil.split(value));
                conf.setSettingsProjectSpecific(true);
            } else if (parameter[0].equals("acceptedTypes")) {
                classpathSetup.setAcceptedTypes(IvyClasspathUtil.split(value));
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("sourceTypes")) {
                mappingSetup.setSourceTypes(IvyClasspathUtil.split(value));
                conf.setMappingProjectSpecific(true);
            } else if (parameter[0].equals("javadocTypes")) {
                mappingSetup.setJavadocTypes(IvyClasspathUtil.split(value));
                conf.setMappingProjectSpecific(true);
            } else if (parameter[0].equals("sourceSuffixes")) {
                mappingSetup.setSourceSuffixes(IvyClasspathUtil.split(value));
                conf.setMappingProjectSpecific(true);
            } else if (parameter[0].equals("javadocSuffixes")) {
                mappingSetup.setJavadocSuffixes(IvyClasspathUtil.split(value));
                conf.setMappingProjectSpecific(true);
            } else if (parameter[0].equals("alphaOrder")) {
                // if the value is not actually "true" or "false", the Boolean class ensure to
                // return false, so it is fine
                classpathSetup.setAlphaOrder(Boolean.valueOf(value).booleanValue());
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("resolveInWorkspace")) {
                classpathSetup.setResolveInWorkspace(Boolean.valueOf(value).booleanValue());
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("resolveBeforeLaunch")) {
                advancedSetup.setResolveBeforeLaunch(Boolean.valueOf(value).booleanValue());
                conf.setAdvancedProjectSpecific(true);
            } else if (parameter[0].equals("retrievedClasspath")) {
                classpathSetup.setRetrievedClasspath(Boolean.valueOf(value).booleanValue());
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("retrievedClasspathPattern")) {
                classpathSetup.getRetrieveSetup().setRetrievePattern(value);
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("retrievedClasspathSync")) {
                classpathSetup.getRetrieveSetup().setRetrieveSync(
                    Boolean.valueOf(value).booleanValue());
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("retrievedClasspathTypes")) {
                classpathSetup.getRetrieveSetup().setRetrieveTypes(value);
                conf.setClassthProjectSpecific(true);
            } else if (parameter[0].equals("mapIfOnlyOneSource")) {
                mappingSetup.setMapIfOnlyOneSource(Boolean.valueOf(value).booleanValue());
                conf.setMappingProjectSpecific(true);
            } else if (parameter[0].equals("mapIfOnlyOneJavadoc")) {
                mappingSetup.setMapIfOnlyOneJavadoc(Boolean.valueOf(value).booleanValue());
                conf.setMappingProjectSpecific(true);

                // the following is the retrieve conf pre -IVYDE-56
                // from this conf should be build StandaloneRetrieveSetup

            } else if (parameter[0].equals("doRetrieve")) {
                // if the value is not actually "true" or "false", the Boolean class ensure to
                // return false, so it is fine
                doStandaloneRetrieve = Boolean.valueOf(value).booleanValue();
                isRetrieveProjectSpecific = true;
            } else if (parameter[0].equals("retrievePattern")) {
                standaloneRetrieveSetup.setRetrievePattern(value);
                isRetrieveProjectSpecific = true;
            } else if (parameter[0].equals("retrieveSync")) {
                standaloneRetrieveSetup.setRetrieveSync(Boolean.valueOf(value).booleanValue());
                isRetrieveProjectSpecific = true;
            } else if (parameter[0].equals("retrieveConfs")) {
                standaloneRetrieveSetup.setRetrieveConfs(value);
                isRetrieveProjectSpecific = true;
            } else if (parameter[0].equals("retrieveTypes")) {
                standaloneRetrieveSetup.setRetrieveTypes(value);
                isRetrieveProjectSpecific = true;
            } else if (parameter[0].equals("useExtendedResolveId")) {
                advancedSetup.setUseExtendedResolveId(Boolean.valueOf(value).booleanValue());
                conf.setAdvancedProjectSpecific(true);
            }
View Full Code Here

            }
        } else {
            if (!prefStore.getBoolean(PreferenceConstants.DO_RETRIEVE)) {
                return;
            }
            retrieveSetup = new RetrieveSetup();
            retrieveSetup.setRetrieveConfs(prefStore.getString(PreferenceConstants.RETRIEVE_CONFS));
            retrieveSetup.setRetrievePattern(prefStore
                    .getString(PreferenceConstants.RETRIEVE_PATTERN));
            retrieveSetup.setRetrieveSync(prefStore.getBoolean(PreferenceConstants.RETRIEVE_SYNC));
            retrieveSetup.setRetrieveTypes(prefStore.getString(PreferenceConstants.RETRIEVE_TYPES));
View Full Code Here

                append(path, "acceptedTypes", setup.getAcceptedTypes());
                append(path, "alphaOrder", setup.isAlphaOrder());
                append(path, "resolveInWorkspace", setup.isResolveInWorkspace());
                append(path, "retrievedClasspath", setup.isRetrievedClasspath());
                if (setup.isRetrievedClasspath()) {
                    RetrieveSetup retrieveSetup = setup.getRetrieveSetup();
                    append(path, "retrievedClasspathPattern", retrieveSetup.getRetrievePattern());
                    append(path, "retrievedClasspathSync", retrieveSetup.isRetrieveSync());
                    append(path, "retrievedClasspathTypes", retrieveSetup.getRetrieveTypes());
                }
            }
            if (conf.isMappingProjectSpecific()) {
                MappingSetup setup = conf.getMappingSetup();
                append(path, "sourceTypes", setup.getSourceTypes());
View Full Code Here

TOP

Related Classes of org.apache.ivyde.eclipse.retrieve.RetrieveSetup

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.