Package org.eclipse.ui.preferences

Examples of org.eclipse.ui.preferences.ScopedPreferenceStore


        return true;
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {
        return new ScopedPreferenceStore(new ProjectScope(getProject()), Plugin.PLUGIN_ID);
    }
View Full Code Here


    @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);
        buildLog = new ArrayList<String>(5);
View Full Code Here

        // Check if compilation errors exist, and if so check the project
        // settings for what to do about that...
        Action buildAction = Action.build;
        if (hasBlockingErrors()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
            default :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until compilation problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to Java problem markers");
                return false;
            case build :
                buildAction = Action.build;
                break;
            case delete :
                buildAction = Action.delete;
                break;
            }
        } else if (!classpathErrors.isEmpty()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
            default :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until classpath resolution problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to classpath resolution problem markers");
                return false;
View Full Code Here

    @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);
        buildLog = new ArrayList<String>(5);
View Full Code Here

        // Check if compilation errors exist, and if so check the project
        // settings for what to do about that...
        Action buildAction = Action.build;
        if (hasBlockingErrors()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until compilation problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to Java problem markers");
                return false;
            case build :
                buildAction = Action.build;
                break;
            case delete :
                buildAction = Action.delete;
                break;
            }
        } else if (!classpathErrors.isEmpty()) {
            ScopedPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(getProject()), BndtoolsConstants.CORE_PLUGIN_ID);
            switch (CompileErrorAction.parse(store.getString(CompileErrorAction.PREFERENCE_KEY))) {
            case skip :
                addBuildMarkers(String.format("Will not build OSGi bundle(s) for project %s until classpath resolution problems are fixed.", model.getName()), IMarker.SEVERITY_ERROR);
                log(LOG_BASIC, "SKIPPING due to classpath resolution problem markers");
                return false;
            case build :
View Full Code Here

  }
 
  public IPreferenceStore getParentPreferenceStore() {
        // Create the preference store lazily.
        if (parentPreferenceStore == null) {
            parentPreferenceStore = new ScopedPreferenceStore(InstanceScope.INSTANCE, PEXAnalysisPlugin.getDefault().getBundle().getSymbolicName());

        }
        return parentPreferenceStore;
    }
View Full Code Here

  private IValidatorManager manager;

  @Override
  public void initializeDefaultPreferences() {
    init();
    ScopedPreferenceStore prefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID);
    prefs.setDefault(PreferenceConstants.ENABLED, true);
    for (Validator v : manager.getValidators()) {
      ScopedPreferenceStore vPrefs = new ScopedPreferenceStore(InstanceScope.INSTANCE, PEXAnalysisPlugin.VALIDATORS_PREFERENCES_NODE_ID + "/" + v.getId()); //$NON-NLS-1$
      for (Type t : v.getTypes()) {
        vPrefs.setDefault(t.getId(), t.getDefaultSeverity().toString());
      }
    }
  }
View Full Code Here

        super();
    }

    @Override
    protected IPreferenceStore doGetPreferenceStore() {
        final IPreferenceStore store = new ScopedPreferenceStore(new ProjectScope(
                getProject()), ErlangCore.PLUGIN_ID);
        return store;
    }
View Full Code Here

   * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
   */
  public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    store = new ScopedPreferenceStore(new InstanceScope(), Activator.PLUGIN_ID);
  }
View Full Code Here

  @Override
  protected void initialize() {
    super.initialize();
   
    // We want to store M2_REPO property into java classpath vars
    ScopedPreferenceStore store = new ScopedPreferenceStore(
        new InstanceScope(), "org.eclipse.jdt.core");
    m2Repo.setPreferenceStore(store);
    store.addPropertyChangeListener(new IPropertyChangeListener(){
      @Override
      public void propertyChange(PropertyChangeEvent event) {
        // We want to erase the value if the M2_REPO was deleted from the classpath variables ui...
        if( event.getProperty().equals(PreferencesConstants.M2_REPO)) {
          m2Repo.load();
View Full Code Here

TOP

Related Classes of org.eclipse.ui.preferences.ScopedPreferenceStore

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.