Package bndtools.preferences

Examples of bndtools.preferences.BndPreferences


            ErrorDialog.openError(getManagedForm().getForm().getShell(), "Error", null, new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error finding source package for exported 1packages.", e));
            missingPkgInfoDirs = Collections.emptyMap();
        }
        Collection<File> generatePkgInfoDirs = new ArrayList<File>(missingPkgInfoDirs.size());

        BndPreferences prefs = new BndPreferences();
        boolean noAskPackageInfo = prefs.getNoAskPackageInfo();

        if (noAskPackageInfo || missingPkgInfoDirs.isEmpty()) {
            generatePkgInfoDirs.addAll(missingPkgInfoDirs.values());
        } else {
            PackageInfoDialog dlg = new PackageInfoDialog(getSection().getShell(), missingPkgInfoDirs);
            if (dlg.open() == Window.CANCEL)
                return;
            prefs.setNoAskPackageInfo(dlg.isDontAsk());
            generatePkgInfoDirs.addAll(dlg.getSelectedPackageDirs());
        }

        try {
            generatePackageInfos(generatePkgInfoDirs);
View Full Code Here


    void showHighestPriorityPage() {
        int selectedPrio = Integer.MIN_VALUE;
        String selected = null;

        BndPreferences prefs = new BndPreferences();
        if (prefs.getEditorOpenSourceTab()) {
            selected = SOURCE_PAGE;
            selectedPrio = 0;
        }

        for (Object pageObj : pages) {
View Full Code Here

            logger.logError("Unable to refresh Bnd workspace", e);
        }

        /* Version control ignores */
        VersionControlIgnoresPluginTracker versionControlIgnoresPluginTracker = Plugin.getDefault().getVersionControlIgnoresPluginTracker();
        Set<String> enabledIgnorePlugins = new BndPreferences().getVersionControlIgnoresPluginsEnabled(versionControlIgnoresPluginTracker, cnfJavaProject, null);
        versionControlIgnoresPluginTracker.createProjectIgnores(enabledIgnorePlugins, cnfJavaProject, ProjectPaths.get(ProjectLayout.BND));
        String templateIgnores = null;
        try {
            templateIgnores = templateConfig.getAttribute("ignores");
        } catch (Exception e) {
            logger.logError("Could not retrieve the 'ignores' property from the cnf template " + bsn, e);
        }
        if (templateIgnores != null && !templateIgnores.isEmpty()) {
            versionControlIgnoresPluginTracker.addIgnores(enabledIgnorePlugins, cnfJavaProject.getProject().getLocation().toFile(), templateIgnores);
        }

        /* Headless build files */
        HeadlessBuildPluginTracker headlessBuildPluginTracker = Plugin.getDefault().getHeadlessBuildPluginTracker();
        Set<String> enabledPlugins = new BndPreferences().getHeadlessBuildPluginsEnabled(headlessBuildPluginTracker, null);
        headlessBuildPluginTracker.setup(enabledPlugins, true, cnfJavaProject.getProject().getLocation().toFile(), true, enabledIgnorePlugins);

        /* refresh the project; files were created outside of Eclipse API */
        cnfProject.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
    }
View Full Code Here

    private int logLevel = LOG_NONE;
    private ScopedPreferenceStore projectPrefs;

    @Override
    protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
        BndPreferences prefs = new BndPreferences();
        logLevel = prefs.getBuildLogging();
        projectPrefs = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);

        // Prepare validations
        classpathErrors = new LinkedList<String>();
        validationResults = new MultiStatus(PLUGIN_ID, 0, "Validation errors in bnd project", null);
View Full Code Here

        return composite;
    }

    @Override
    public boolean performOk() {
        BndPreferences prefs = new BndPreferences();
        prefs.setEnableSubBundles(enableSubs);
        prefs.setNoAskPackageInfo(noAskPackageInfo);
        prefs.setHideInitCnfWizard(noCheckCnf);
        prefs.setWarnExistingLaunch(warnExistingLaunch);
        prefs.setBuildLogging(buildLogging);
        prefs.setEditorOpenSourceTab(editorOpenSourceTab);
        prefs.setHeadlessBuildCreate(headlessBuildCreate);
        Collection<NamedPlugin> pluginsInformation = headlessBuildPluginTracker.getAllPluginsInformation();
        if (pluginsInformation.size() > 0) {
            prefs.setHeadlessBuildPlugins(headlessBuildPlugins);
        }
        prefs.setVersionControlIgnoresCreate(versionControlIgnoresCreate);
        pluginsInformation = versionControlIgnoresTracker.getAllPluginsInformation();
        if (pluginsInformation.size() > 0) {
            prefs.setVersionControlIgnoresPlugins(versionControlIgnoresPlugins);
        }

        return true;
    }
View Full Code Here

        return true;
    }

    private static boolean isDisabled() {
        return new BndPreferences().getHideInitCnfWizard();
    }
View Full Code Here

    private static boolean isDisabled() {
        return new BndPreferences().getHideInitCnfWizard();
    }

    private static void setDisabled(boolean disabled) {
        new BndPreferences().setHideInitCnfWizard(disabled);
    }
View Full Code Here

        }
        return false;
    }

    private boolean confirmNever() {
        BndPreferences prefs = new BndPreferences();
        boolean hideWarning = prefs.getHideInitCnfAdvice();
        if (hideWarning)
            return true;

        MessageDialogWithToggle dialog = MessageDialogWithToggle.openOkCancelConfirm(getShell(), Messages.CnfSetupNeverWarningTitle, Messages.CnfSetupNeverWarning, Messages.DontShowMessageAgain, false, null, null);

        if (dialog.getToggleState()) {
            prefs.setHideInitCnfAdvice(true);
        }
        return dialog.getReturnCode() == MessageDialogWithToggle.OK;
    }
View Full Code Here

    private int nrFilesBuilt = 0;

    @Override
    protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor) throws CoreException {
        BndPreferences prefs = new BndPreferences();
        logLevel = prefs.getBuildLogging();
        projectPrefs = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);

        // Prepare validations
        classpathErrors = new LinkedList<String>();
        validationResults = new MultiStatus(PLUGIN_ID, 0, "Validation errors in bnd project", null);
View Full Code Here

            bndBndFile.create(bndInput, false, progress.newChild(1));
        }

        /* Version control ignores */
        VersionControlIgnoresPluginTracker versionControlIgnoresPluginTracker = Plugin.getDefault().getVersionControlIgnoresPluginTracker();
        Set<String> enabledIgnorePlugins = new BndPreferences().getVersionControlIgnoresPluginsEnabled(versionControlIgnoresPluginTracker, project, null);
        versionControlIgnoresPluginTracker.createProjectIgnores(enabledIgnorePlugins, project, projectPaths);

        /* Headless build files */
        HeadlessBuildPluginTracker headlessBuildPluginTracker = Plugin.getDefault().getHeadlessBuildPluginTracker();
        Set<String> enabledPlugins = new BndPreferences().getHeadlessBuildPluginsEnabled(headlessBuildPluginTracker, null);
        headlessBuildPluginTracker.setup(enabledPlugins, false, project.getProject().getLocation().toFile(), true, enabledIgnorePlugins);

        /* refresh the project; files were created outside of Eclipse API */
        project.getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
    }
View Full Code Here

TOP

Related Classes of bndtools.preferences.BndPreferences

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.