Examples of SettingsSetup


Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

     *
     * @param path
     *            the path of the container
     */
    private static void loadV1(IvyClasspathContainerConfiguration conf, IPath path) {
        SettingsSetup settingsSetup = conf.getIvySettingsSetup();
        ClasspathSetup classpathSetup = conf.getClasspathSetup();
        MappingSetup mappingSetup = conf.getMappingSetup();
        AdvancedSetup advancedSetup = conf.getAdvancedSetup();

        String url = path.segment(1).substring(1);
        String[] parameters = url.split("&");
        conf.setAdvancedProjectSpecific(false);
        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.logError(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("ivyUserDir")) {
                settingsSetup.setIvyUserDir(value);
                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")) {
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

    private static void checkNonNullConf(IvyClasspathContainerConfiguration conf) {
        ClasspathSetup classpathSetup = conf.getClasspathSetup();
        ClasspathSetup prefStoreClasspathSetup = IvyPlugin.getPreferenceStoreHelper()
                .getClasspathSetup();
        MappingSetup mappingSetup = conf.getMappingSetup();
        SettingsSetup settingsSetup = conf.getIvySettingsSetup();
        MappingSetup prefStoreMappingSetup = IvyPlugin.getPreferenceStoreHelper().getMappingSetup();
        if (settingsSetup.getRawIvyUserDir() == null) {
            settingsSetup.setIvyUserDir(IvyPlugin.getPreferenceStoreHelper().getSettingsSetup()
                    .getRawIvyUserDir());
        }
        if (settingsSetup.getRawPropertyFiles() == null) {
            settingsSetup.setPropertyFiles(IvyPlugin.getPreferenceStoreHelper().getSettingsSetup()
                    .getRawPropertyFiles());
        }
        if (classpathSetup.getAcceptedTypes() == null) {
            classpathSetup.setAcceptedTypes(prefStoreClasspathSetup.getAcceptedTypes());
        }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

            }
            path.append("&ivyXmlPath=");
            path.append(URLEncoder.encode(conf.getIvyXmlPath(), "UTF-8"));
            append(path, "confs", conf.getConfs());
            if (conf.isSettingsProjectSpecific()) {
                SettingsSetup setup = conf.getIvySettingsSetup();
                append(path, "ivySettingsPath", setup.getRawIvySettingsPath());
                append(path, "loadSettingsOnDemand", setup.isLoadSettingsOnDemand());
                append(path, "ivyUserDir", setup.getRawIvyUserDir());
                append(path, "propertyFiles", setup.getRawPropertyFiles());
            }
            if (conf.isClassthProjectSpecific()) {
                ClasspathSetup setup = conf.getClasspathSetup();
                append(path, "acceptedTypes", setup.getAcceptedTypes());
                append(path, "alphaOrder", setup.isAlphaOrder());
                append(path, "resolveInWorkspace", setup.isResolveInWorkspace());
                append(path, "transitiveResolve", setup.isTransitiveResolve());
                append(path, "readOSGiMetadata", setup.isReadOSGiMetadata());
                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());
                append(path, "javadocTypes", setup.getJavadocTypes());
                append(path, "sourceSuffixes", setup.getSourceSuffixes());
                append(path, "javadocSuffixes", setup.getJavadocSuffixes());
                append(path, "mapIfOnlyOneSource", setup.isMapIfOnlyOneSource());
                append(path, "mapIfOnlyOneJavadoc", setup.isMapIfOnlyOneJavadoc());
            }
            if (conf.isAdvancedProjectSpecific()) {
                AdvancedSetup setup = conf.getAdvancedSetup();
                append(path, "resolveBeforeLaunch", setup.isResolveBeforeLaunch());
                append(path, "useExtendedResolveId", setup.isUseExtendedResolveId());
            }
        } catch (UnsupportedEncodingException e) {
            IvyPlugin.logError(UTF8_ERROR, e);
            throw new RuntimeException(UTF8_ERROR, e);
        }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

    public void setIvyOrgUrl(String url) {
        prefStore.setValue(PreferenceConstants.ORGANISATION_URL, url);
    }

    public SettingsSetup getSettingsSetup() {
        SettingsSetup setup = new SettingsSetup();
        setup.setIvySettingsPath(prefStore.getString(PreferenceConstants.IVYSETTINGS_PATH));
        setup.setLoadSettingsOnDemand(prefStore
                .getBoolean(PreferenceConstants.LOAD_SETTINGS_ON_DEMAND));
        setup.setIvyUserDir(prefStore.getString(PreferenceConstants.IVY_USER_DIR));
        setup.setPropertyFiles(IvyClasspathUtil.split(prefStore
                .getString(PreferenceConstants.PROPERTY_FILES)));
        return setup;
    }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

        };
        propFilesEditor.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
    }

    public SettingsSetup getIvySettingsSetup() {
        SettingsSetup setup = new SettingsSetup();
        setup.setIvySettingsPath(settingsEditor.getText().getText());
        setup.setLoadSettingsOnDemand(loadOnDemandButton.getSelection());
        setup.setIvyUserDir(ivyUserDirEditor.getText().getText());
        setup.setPropertyFiles(propFilesEditor.getFiles());
        return setup;
    }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

        }
    }

    void settingsUpdated() {
        synchronized (listeners) {
            SettingsSetup setup = getIvySettingsSetup();
            Iterator it = listeners.iterator();
            while (it.hasNext()) {
                ((SettingsEditorListener) it.next()).settingsEditorUpdated(setup);
            }
        }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

                NodeList children = node.getChildNodes();
                for (int j = 0; j < children.getLength(); j++) {
                    Node item = children.item(j);
                    if (item.getNodeName().equals(IVYSETTINGS)) {
                        SettingsSetup settingsSetup = readSettingsSetup(item);
                        setup.setSettingsSetup(settingsSetup);
                        setup.setSettingsProjectSpecific(true);
                    } else if (item.getNodeName().equals(IVYXML)) {
                        String ivyXmlPath = readIvyXmlPath(item);
                        setup.setIvyXmlPath(ivyXmlPath);
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

    }

    private SettingsSetup readSettingsSetup(Node node) throws SAXException {
        NamedNodeMap attributes = node.getAttributes();

        SettingsSetup settingsSetup = new SettingsSetup();

        String path = getAttribute(attributes, IVYSETTING_PATH);
        settingsSetup.setIvySettingsPath(path);

        String loadOnDemand = getAttribute(attributes, IVYSETTING_LOADONDEMAND);
        settingsSetup.setLoadSettingsOnDemand(Boolean.valueOf(loadOnDemand).booleanValue());

        String ivyUserDir = getAttribute(attributes, IVY_USER_DIR);
        settingsSetup.setIvyUserDir(ivyUserDir);

        List/* <String> */propertyFiles = new ArrayList();

        NodeList children = node.getChildNodes();
        for (int j = 0; j != children.getLength(); j++) {
            Node item = children.item(j);
            if (item.getNodeName().equals(PROPERTYFILE)) {
                attributes = item.getAttributes();

                path = getAttribute(attributes, PROPERTYFILE_PATH);
                propertyFiles.add(path);
            }
        }

        settingsSetup.setPropertyFiles(propertyFiles);

        return settingsSetup;
    }
View Full Code Here

Examples of org.apache.ivyde.eclipse.cp.SettingsSetup

        // to use it
        if (project != null) {
            IResource settings = project.getProject().findMember(new Path("ivysettings.xml"));
            if (settings != null) {
                conf.setSettingsProjectSpecific(true);
                SettingsSetup setup = new SettingsSetup();
                setup.setIvySettingsPath("ivysettings.xml");
                conf.setIvySettingsSetup(setup);
            }
        }
        state = new IvyClasspathContainerState(conf);
    }
View Full Code Here

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

                NodeList children = node.getChildNodes();
                for (int j = 0; j < children.getLength(); j++) {
                    Node item = children.item(j);
                    if (item.getNodeName().equals(IVYSETTINGS)) {
                        SettingsSetup settingsSetup = readSettingsSetup(item);
                        setup.setSettingsSetup(settingsSetup);
                        setup.setSettingsProjectSpecific(true);
                    } else if (item.getNodeName().equals(IVYXML)) {
                        String ivyXmlPath = readIvyXmlPath(item);
                        setup.setIvyXmlPath(ivyXmlPath);
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.