Eclipse Spring preferences re-organization

This commit is contained in:
aboyko
2023-02-13 12:27:22 -05:00
parent 11e6a31ef3
commit fbbb6fbcfd
23 changed files with 203 additions and 460 deletions

View File

@@ -40,10 +40,10 @@
<extension
point="org.eclipse.ui.preferencePages">
<page
name="Java Editor"
category="org.springframework.ide.eclipse.boot.ui.preferences.BootPreferencePage"
class="org.springframework.ide.eclipse.boot.validation.preferences.BootValidationPreferencesPage"
id="org.springframework.ide.eclipse.boot.validation.preferences.BootValidationPreferencesPage">
name="Configuration Processing"
category="org.springframework.tooling.boot.validation"
class="org.springframework.ide.eclipse.boot.validation.preferences.ConfigProcessingPreferencesPage"
id="org.springframework.ide.eclipse.boot.validation.preferences.ConfigurationProcessingPreferencesPage">
</page>
</extension>

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012,2015 Spring IDE Developers
* Copyright (c) 2012, 2023 Spring IDE Developers
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,7 +30,7 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.springframework.ide.eclipse.boot.core.BootPropertyTester;
import org.springframework.ide.eclipse.boot.validation.BootValidationActivator;
import org.springframework.ide.eclipse.boot.validation.preferences.BootValidationPreferencesPage;
import org.springframework.ide.eclipse.boot.validation.preferences.ConfigProcessingPreferencesPage;
import org.springframework.ide.eclipse.boot.validation.rules.ValidationRuleDefinitions;
import org.springframework.ide.eclipse.editor.support.preferences.EditorType;
import org.springframework.ide.eclipse.editor.support.preferences.PreferencesBasedSeverityProvider;
@@ -112,7 +112,7 @@ public class SpringBootProjectBuilder extends IncrementalProjectBuilder {
}
private IValidationContext validationContext(IResource rsrc, IValidationRule rule) {
SeverityProvider severityProvider = new PreferencesBasedSeverityProvider(BootValidationPreferencesPage.util, rsrc.getProject(), BootValidationActivator.PLUGIN_ID, EditorType.JAVA);
SeverityProvider severityProvider = new PreferencesBasedSeverityProvider(ConfigProcessingPreferencesPage.util, rsrc.getProject(), BootValidationActivator.PLUGIN_ID, EditorType.JAVA);
return (IResource cu, ProblemType problemId, String msg, int offset, int end) -> {
ProblemSeverity severity = severityProvider.getSeverity(problemId);
if (severity==ProblemSeverity.IGNORE) {

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015 Pivotal, Inc.
* Copyright (c) 2015, 2023 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,7 +24,7 @@ import org.springframework.ide.eclipse.editor.support.reconcile.ProblemType;
public class BootValidationProjectPropertyPage extends AbstractProblemSeverityPreferencesPage {
public BootValidationProjectPropertyPage() {
super(BootValidationPreferencesPage.util);
super(ConfigProcessingPreferencesPage.util);
}
protected List<ProblemType> getProblemTypes() {
@@ -33,7 +33,7 @@ public class BootValidationProjectPropertyPage extends AbstractProblemSeverityPr
@Override
protected String getEnableProjectPreferencesKey() {
return BootValidationPreferencesPage.util.ENABLE_PROJECT_PREFERENCES(EditorType.JAVA);
return ConfigProcessingPreferencesPage.util.ENABLE_PROJECT_PREFERENCES(EditorType.JAVA);
}
@Override

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017 Spring IDE Developers
* Copyright (c) 2017, 2023 Spring IDE Developers
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -12,7 +12,6 @@ package org.springframework.ide.eclipse.boot.validation.preferences;
import java.util.List;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.springframework.ide.eclipse.boot.validation.BootValidationActivator;
import org.springframework.ide.eclipse.boot.validation.rules.BootValidationProblemType;
import org.springframework.ide.eclipse.editor.support.preferences.AbstractProblemSeverityPreferencesPage;
@@ -23,11 +22,11 @@ import org.springframework.ide.eclipse.editor.support.reconcile.ProblemType;
/**
* @author Kris De Volder
*/
public class BootValidationPreferencesPage extends AbstractProblemSeverityPreferencesPage {
public class ConfigProcessingPreferencesPage extends AbstractProblemSeverityPreferencesPage {
public static final ProblemSeverityPreferencesUtil util = new ProblemSeverityPreferencesUtil("boot.project.validation.builder.");
public BootValidationPreferencesPage() {
public ConfigProcessingPreferencesPage() {
super(util);
}