Package org.teavm.eclipse

Examples of org.teavm.eclipse.TeaVMProfile


                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 {
View Full Code Here


        if (profilesTable.getSelectionCount() != 1) {
            removeProfileButton.setEnabled(false);
            return;
        }
        TableItem item = profilesTable.getSelection()[0];
        TeaVMProfile profile = (TeaVMProfile)item.getData();
        removeProfileButton.setEnabled(profile.getExternalToolId().isEmpty());
    }
View Full Code Here

        updateItem(item);
        return item;
    }

    private void updateItem(TableItem item) {
        TeaVMProfile profile = (TeaVMProfile)item.getData();
        item.setText(0, profile.getName());
        item.setText(1, profile.getTargetDirectory());
        item.setText(2, profile.getTargetFileName());
        item.setChecked(profile.isEnabled());
    }
View Full Code Here

        item.setText(2, profile.getTargetFileName());
        item.setChecked(profile.isEnabled());
    }

    private void storeItem(TableItem item) {
        TeaVMProfile profile = (TeaVMProfile)item.getData();
        profile.setEnabled(item.getChecked());
    }
View Full Code Here

        profile.setEnabled(item.getChecked());
    }

    private void addProfile() {
        try {
            TeaVMProfile profile = settings.createProfile();
            TableItem item = createItemForProfile(profile);
            storeItem(item);
            TeaVMProfileDialog dialog = new TeaVMProfileDialog(getShell(), settings, profile);
            dialog.setProject(project);
            dialog.open();
View Full Code Here

        if (profilesTable.getSelectionCount() != 1) {
            return;
        }
        try {
            TableItem item = profilesTable.getSelection()[0];
            TeaVMProfile profile = (TeaVMProfile)item.getData();
            storeItem(item);
            TeaVMProfileDialog dialog = new TeaVMProfileDialog(getShell(), settings, profile);
            dialog.setProject(project);
            dialog.open();
            updateItem(item);
View Full Code Here

    private void deleteProfile() {
        if (profilesTable.getSelectionCount() != 1) {
            return;
        }
        TableItem item = profilesTable.getSelection()[0];
        TeaVMProfile profile = (TeaVMProfile)item.getData();
        if (!profile.getExternalToolId().isEmpty()) {
            return;
        }
        boolean confirmed = MessageDialog.openConfirm(getShell(), "Deletion confirmation",
                "Are you sure to delete profile " + item.getText(0) + "?");
        if (!confirmed) {
View Full Code Here

        }
    }

    private boolean save() {
        String name = nameField.getText().trim();
        TeaVMProfile existingProfile = settings.getProfile(name);
        if (existingProfile != null && existingProfile != profile) {
            return false;
        }
        profile.setName(name);
        String mainClass = mainClassField.getText().trim();
View Full Code Here

TOP

Related Classes of org.teavm.eclipse.TeaVMProfile

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.