Package org.teavm.eclipse

Examples of org.teavm.eclipse.TeaVMProjectSettings


        int sz = executions.size();
        if (!hasNature) {
            ++sz;
        }
        monitor.beginTask("Configuring TeaVM builder", sz * 1000);
        TeaVMProjectSettings settings = teaVMPlugin.getSettings(project);
        try {
            if (!hasNature) {
                teaVMPlugin.addNature(new SubProgressMonitor(monitor, 1000), project);
            }
            settings.load();
            Set<String> coveredProfiles = new HashSet<>();
            for (MojoExecution execution : executions) {
                if (monitor.isCanceled()) {
                    return;
                }
                String profileId = getIdForProfile(execution);
                coveredProfiles.add(profileId);
                TeaVMProfile profile = settings.getProfile(profileId);
                if (profile == null) {
                    profile = settings.createProfile();
                    profile.setName(profileId);
                }
                profile.setExternalToolId(TOOL_ID);
                configureProfile(execution, profile, new SubProgressMonitor(monitor, 1000));
                if (monitor.isCanceled()) {
                    return;
                }
            }
            for (TeaVMProfile profile : settings.getProfiles()) {
                if (!coveredProfiles.contains(profile.getName()) && profile.getExternalToolId().equals(TOOL_ID)) {
                    settings.deleteProfile(profile);
                }
            }
            settings.save();
        } finally {
            monitor.done();
        }
    }
View Full Code Here

TOP

Related Classes of org.teavm.eclipse.TeaVMProjectSettings

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.