mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
- to make workspace/project override of properties work, change to store indiviual checkers id in properties
This commit is contained in:
parent
3ccd43f5ed
commit
59cf9d5fad
7 changed files with 173 additions and 117 deletions
|
@ -16,4 +16,5 @@ package org.eclipse.cdt.codan.core;
|
||||||
public class PreferenceConstants {
|
public class PreferenceConstants {
|
||||||
public static final String P_RUN_ON_BUILD = "booleanPreference";
|
public static final String P_RUN_ON_BUILD = "booleanPreference";
|
||||||
public static final String P_PROBLEMS = "problems";
|
public static final String P_PROBLEMS = "problems";
|
||||||
|
public static final String P_USE_PARENT = "useParentScope";
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,21 +10,17 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.codan.core.builder;
|
package org.eclipse.cdt.codan.core.builder;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.eclipse.cdt.codan.core.model.CodanProblem;
|
import org.eclipse.cdt.codan.core.model.CodanProblem;
|
||||||
import org.eclipse.cdt.codan.core.model.CodanSeverity;
|
import org.eclipse.cdt.codan.core.model.CodanSeverity;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblem;
|
import org.eclipse.cdt.codan.core.model.IProblem;
|
||||||
import org.eclipse.cdt.codan.core.model.IProblemProfile;
|
import org.eclipse.cdt.codan.core.model.IProblemProfile;
|
||||||
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Alena
|
* @author Alena
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class CodanPreferencesLoader {
|
public class CodanPreferencesLoader {
|
||||||
private static String LIST_SEP = ",";
|
|
||||||
private IProblemProfile baseModel;
|
private IProblemProfile baseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -45,101 +41,79 @@ public class CodanPreferencesLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stored as element=true|false,...
|
|
||||||
*
|
|
||||||
* @param stringList
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public Object modelFromString(String stringList) {
|
public IProblem[] getProblems() {
|
||||||
String[] arr = stringList.split(LIST_SEP);
|
IProblem[] problems = baseModel.getProblems();
|
||||||
for (int i = 0; i < arr.length; i++) {
|
return problems;
|
||||||
String elem = arr[i];
|
|
||||||
String[] pair = elem.split("=", 2);
|
|
||||||
if (pair.length == 0)
|
|
||||||
continue;
|
|
||||||
String id = pair[0];
|
|
||||||
IProblem p = problemFromString(id);
|
|
||||||
if (p == null) {
|
|
||||||
System.err.println("cannot find '" + id + "'");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (pair.length == 1) {
|
|
||||||
((CodanProblem) p).setEnabled(true);
|
|
||||||
} else {
|
|
||||||
String check = pair[1];
|
|
||||||
Boolean c = Boolean.valueOf(check);
|
|
||||||
((CodanProblem) p).setEnabled(c);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return baseModel;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String problemToString(Object element) {
|
/**
|
||||||
IProblem p = ((IProblem) element);
|
* @param id
|
||||||
return p.getId() + ":" + p.getSeverity();
|
* @param s
|
||||||
}
|
*/
|
||||||
|
public void setProperty(String id, String s) {
|
||||||
protected IProblem problemFromString(String string) {
|
IProblem prob = baseModel.findProblem(id);
|
||||||
String[] pair = string.split(":");
|
if (!(prob instanceof CodanProblem))
|
||||||
if (pair.length == 0)
|
return;
|
||||||
return null;
|
String sevs = s;
|
||||||
String id = pair[0];
|
boolean enabled = true;
|
||||||
String arg = "";
|
if (sevs.startsWith("-")) {
|
||||||
if (pair.length > 1) {
|
sevs = sevs.substring(1);
|
||||||
arg = pair[1];
|
enabled = false;
|
||||||
}
|
}
|
||||||
|
((CodanProblem) prob).setEnabled(enabled);
|
||||||
CodanSeverity sev;
|
CodanSeverity sev;
|
||||||
try {
|
try {
|
||||||
sev = CodanSeverity.valueOf(arg);
|
sev = CodanSeverity.valueOf(sevs);
|
||||||
} catch (RuntimeException e) {
|
} catch (RuntimeException e) {
|
||||||
sev = CodanSeverity.Warning;
|
sev = CodanSeverity.Warning;
|
||||||
}
|
}
|
||||||
IProblem prob = baseModel.findProblem(id);
|
((CodanProblem) prob).setSeverity(sev);
|
||||||
if (prob instanceof CodanProblem) {
|
|
||||||
((CodanProblem) prob).setSeverity(sev);
|
|
||||||
}
|
|
||||||
return prob;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/*
|
||||||
* Combines the given list of items into a single string. This method is the
|
* (non-Javadoc)
|
||||||
* converse of <code>parseString</code>.
|
|
||||||
* <p>
|
|
||||||
* Subclasses may implement this method.
|
|
||||||
* </p>
|
|
||||||
*
|
*
|
||||||
* @return the combined string
|
* @see java.lang.Object#toString()
|
||||||
* @see #parseString
|
|
||||||
*/
|
*/
|
||||||
public String modelToString(Object model) {
|
@Override
|
||||||
StringBuffer buf = new StringBuffer();
|
public String toString() {
|
||||||
Map<Object, Boolean> map = fillChecked(model,
|
return getInput().toString();
|
||||||
new HashMap<Object, Boolean>());
|
|
||||||
for (Iterator iterator = map.keySet().iterator(); iterator.hasNext();) {
|
|
||||||
Object element = iterator.next();
|
|
||||||
buf.append(problemToString(element));
|
|
||||||
buf.append('=');
|
|
||||||
buf.append(map.get(element));
|
|
||||||
if (iterator.hasNext())
|
|
||||||
buf.append(LIST_SEP);
|
|
||||||
}
|
|
||||||
return buf.toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param input
|
|
||||||
* @param hashMap
|
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Map<Object, Boolean> fillChecked(Object element,
|
public IProblemProfile getInput() {
|
||||||
HashMap<Object, Boolean> hashMap) {
|
return baseModel;
|
||||||
if (element instanceof IProblemProfile) {
|
}
|
||||||
IProblemProfile profile = (IProblemProfile) element;
|
|
||||||
IProblem[] problems = profile.getProblems();
|
/**
|
||||||
for (IProblem iProblem : problems) {
|
* @param id
|
||||||
hashMap.put(iProblem, iProblem.isEnabled());
|
* @return
|
||||||
|
*/
|
||||||
|
public String getProperty(String id) {
|
||||||
|
IProblem prob = baseModel.findProblem(id);
|
||||||
|
if (!(prob instanceof CodanProblem))
|
||||||
|
return null;
|
||||||
|
String enabled = prob.isEnabled() ? "" : "-";
|
||||||
|
String severity = prob.getSeverity().toString();
|
||||||
|
String res = enabled + severity;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param storePreferences
|
||||||
|
*/
|
||||||
|
public void load(IEclipsePreferences storePreferences) {
|
||||||
|
IProblem[] probs = getProblems();
|
||||||
|
for (int i = 0; i < probs.length; i++) {
|
||||||
|
String id = probs[i].getId();
|
||||||
|
String s = storePreferences.get(id, null);
|
||||||
|
if (s != null) {
|
||||||
|
setProperty(id, s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return hashMap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,9 +192,7 @@ public class CheckersRegisry implements Iterable<IChecker> {
|
||||||
wp = (IProblemProfile) getDefaultProfile().clone();
|
wp = (IProblemProfile) getDefaultProfile().clone();
|
||||||
// load default values
|
// load default values
|
||||||
CodanPreferencesLoader loader = new CodanPreferencesLoader(wp);
|
CodanPreferencesLoader loader = new CodanPreferencesLoader(wp);
|
||||||
String s = CodanCorePlugin.getDefault().getStorePreferences()
|
loader.load(CodanCorePlugin.getDefault().getStorePreferences());
|
||||||
.get(PreferenceConstants.P_PROBLEMS, "");
|
|
||||||
loader.modelFromString(s);
|
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
wp = getDefaultProfile();
|
wp = getDefaultProfile();
|
||||||
}
|
}
|
||||||
|
@ -202,6 +200,13 @@ public class CheckersRegisry implements Iterable<IChecker> {
|
||||||
return wp;
|
return wp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateProfile(IResource element, IProblemProfile profile) {
|
||||||
|
if (profile == null)
|
||||||
|
profiles.remove(element);
|
||||||
|
else
|
||||||
|
profiles.put(element, profile);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param element
|
* @param element
|
||||||
* @return
|
* @return
|
||||||
|
@ -218,8 +223,12 @@ public class CheckersRegisry implements Iterable<IChecker> {
|
||||||
IEclipsePreferences node = new ProjectScope(
|
IEclipsePreferences node = new ProjectScope(
|
||||||
(IProject) element)
|
(IProject) element)
|
||||||
.getNode(CodanCorePlugin.PLUGIN_ID);
|
.getNode(CodanCorePlugin.PLUGIN_ID);
|
||||||
String s = node.get(PreferenceConstants.P_PROBLEMS, "");
|
boolean useWorkspace = node.getBoolean(
|
||||||
loader.modelFromString(s);
|
PreferenceConstants.P_USE_PARENT, false);
|
||||||
|
if (!useWorkspace) {
|
||||||
|
loader.load(node);
|
||||||
|
}
|
||||||
|
updateProfile(element, prof);
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
// cant
|
// cant
|
||||||
}
|
}
|
||||||
|
@ -228,7 +237,30 @@ public class CheckersRegisry implements Iterable<IChecker> {
|
||||||
} else {
|
} else {
|
||||||
prof = getResourceProfile(element.getProject());
|
prof = getResourceProfile(element.getProject());
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
}
|
}
|
||||||
return prof;
|
return prof;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param element
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public IProblemProfile getResourceProfileWorkingCopy(IResource element) {
|
||||||
|
if (element instanceof IProject) {
|
||||||
|
try {
|
||||||
|
IProblemProfile prof = (IProblemProfile) getWorkspaceProfile()
|
||||||
|
.clone();
|
||||||
|
// load default values
|
||||||
|
CodanPreferencesLoader loader = new CodanPreferencesLoader(prof);
|
||||||
|
IEclipsePreferences node = new ProjectScope((IProject) element)
|
||||||
|
.getNode(CodanCorePlugin.PLUGIN_ID);
|
||||||
|
loader.load(node);
|
||||||
|
return prof;
|
||||||
|
} catch (CloneNotSupportedException e) {
|
||||||
|
// cant
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,6 @@ public abstract class CheckedTreeEditor extends FieldEditor implements
|
||||||
*/
|
*/
|
||||||
protected void doLoadDefault() {
|
protected void doLoadDefault() {
|
||||||
if (getTreeControl() != null) {
|
if (getTreeControl() != null) {
|
||||||
treeViewer.refresh();
|
|
||||||
String s = getPreferenceStore().getDefaultString(
|
String s = getPreferenceStore().getDefaultString(
|
||||||
getPreferenceName());
|
getPreferenceName());
|
||||||
getViewer().setInput(modelFromString(s));
|
getViewer().setInput(modelFromString(s));
|
||||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.codan.internal.ui.preferences;
|
||||||
|
|
||||||
import org.eclipse.cdt.codan.core.CodanCorePlugin;
|
import org.eclipse.cdt.codan.core.CodanCorePlugin;
|
||||||
import org.eclipse.cdt.codan.core.model.CheckersRegisry;
|
import org.eclipse.cdt.codan.core.model.CheckersRegisry;
|
||||||
|
import org.eclipse.cdt.codan.core.model.IProblemProfile;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
import org.eclipse.ui.IWorkbench;
|
import org.eclipse.ui.IWorkbench;
|
||||||
|
@ -30,6 +31,8 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
*/
|
*/
|
||||||
public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
IWorkbenchPreferencePage {
|
IWorkbenchPreferencePage {
|
||||||
|
private IProblemProfile profile;
|
||||||
|
|
||||||
public CodanPreferencePage() {
|
public CodanPreferencePage() {
|
||||||
super(GRID);
|
super(GRID);
|
||||||
setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(),
|
setPreferenceStore(new ScopedPreferenceStore(new InstanceScope(),
|
||||||
|
@ -47,14 +50,27 @@ public class CodanPreferencePage extends FieldEditorOverlayPage implements
|
||||||
* editor knows how to save and restore itself.
|
* editor knows how to save and restore itself.
|
||||||
*/
|
*/
|
||||||
public void createFieldEditors() {
|
public void createFieldEditors() {
|
||||||
|
profile = isPropertyPage() ? CheckersRegisry.getInstance()
|
||||||
|
.getResourceProfileWorkingCopy((IResource) getElement())
|
||||||
|
: CheckersRegisry.getInstance().getWorkspaceProfile();
|
||||||
CheckedTreeEditor checkedTreeEditor = new ProblemsTreeEditor(
|
CheckedTreeEditor checkedTreeEditor = new ProblemsTreeEditor(
|
||||||
getFieldEditorParent(), isPropertyPage() ? CheckersRegisry
|
getFieldEditorParent(), profile);
|
||||||
.getInstance().getResourceProfile(
|
|
||||||
(IResource) getElement()) : CheckersRegisry
|
|
||||||
.getInstance().getWorkspaceProfile());
|
|
||||||
addField(checkedTreeEditor);
|
addField(checkedTreeEditor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see org.eclipse.jface.preference.PreferencePage#performApply()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean performOk() {
|
||||||
|
if (isPropertyPage())
|
||||||
|
CheckersRegisry.getInstance().updateProfile(
|
||||||
|
(IResource) getElement(), null);
|
||||||
|
return super.performOk();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
|
|
@ -15,12 +15,10 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.eclipse.cdt.codan.core.CodanCorePlugin;
|
import org.eclipse.cdt.codan.core.CodanCorePlugin;
|
||||||
|
import org.eclipse.cdt.codan.core.PreferenceConstants;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
|
||||||
import org.eclipse.core.resources.ProjectScope;
|
import org.eclipse.core.resources.ProjectScope;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
|
||||||
import org.eclipse.core.runtime.IAdaptable;
|
import org.eclipse.core.runtime.IAdaptable;
|
||||||
import org.eclipse.core.runtime.QualifiedName;
|
|
||||||
import org.eclipse.core.runtime.preferences.IScopeContext;
|
import org.eclipse.core.runtime.preferences.IScopeContext;
|
||||||
import org.eclipse.core.runtime.preferences.InstanceScope;
|
import org.eclipse.core.runtime.preferences.InstanceScope;
|
||||||
import org.eclipse.jface.preference.FieldEditor;
|
import org.eclipse.jface.preference.FieldEditor;
|
||||||
|
@ -49,13 +47,6 @@ import org.eclipse.ui.preferences.ScopedPreferenceStore;
|
||||||
*/
|
*/
|
||||||
public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage
|
public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage
|
||||||
implements IWorkbenchPropertyPage {
|
implements IWorkbenchPropertyPage {
|
||||||
/***
|
|
||||||
* Name of resource property for the selection of workbench or project
|
|
||||||
* settings
|
|
||||||
***/
|
|
||||||
public static final String USEPROJECTSETTINGS = "useProjectSettings"; //$NON-NLS-1$
|
|
||||||
private static final String FALSE = "false"; //$NON-NLS-1$
|
|
||||||
private static final String TRUE = "true"; //$NON-NLS-1$
|
|
||||||
// Stores all created field editors
|
// Stores all created field editors
|
||||||
private List editors = new ArrayList();
|
private List editors = new ArrayList();
|
||||||
// Stores owning element of properties
|
// Stores owning element of properties
|
||||||
|
@ -223,15 +214,15 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage
|
||||||
});
|
});
|
||||||
// Set workspace/project radio buttons
|
// Set workspace/project radio buttons
|
||||||
try {
|
try {
|
||||||
String use = ((IResource) getElement())
|
Boolean useWorkspace = getPreferenceStore().getBoolean(
|
||||||
.getPersistentProperty(new QualifiedName(pageId,
|
PreferenceConstants.P_USE_PARENT);
|
||||||
USEPROJECTSETTINGS));
|
if (useWorkspace) {
|
||||||
if (TRUE.equals(use)) {
|
useWorkspaceSettingsButton.setSelection(true);
|
||||||
|
} else {
|
||||||
useProjectSettingsButton.setSelection(true);
|
useProjectSettingsButton.setSelection(true);
|
||||||
configureButton.setEnabled(false);
|
configureButton.setEnabled(false);
|
||||||
} else
|
}
|
||||||
useWorkspaceSettingsButton.setSelection(true);
|
} catch (Exception e) {
|
||||||
} catch (CoreException e) {
|
|
||||||
useWorkspaceSettingsButton.setSelection(true);
|
useWorkspaceSettingsButton.setSelection(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -306,14 +297,8 @@ public abstract class FieldEditorOverlayPage extends FieldEditorPreferencePage
|
||||||
boolean result = super.performOk();
|
boolean result = super.performOk();
|
||||||
if (result && isPropertyPage()) {
|
if (result && isPropertyPage()) {
|
||||||
// Save state of radiobuttons in project properties
|
// Save state of radiobuttons in project properties
|
||||||
IResource resource = (IResource) getElement();
|
getPreferenceStore().setValue(PreferenceConstants.P_USE_PARENT,
|
||||||
try {
|
!useProjectSettingsButton.getSelection());
|
||||||
String value = (useProjectSettingsButton.getSelection()) ? TRUE
|
|
||||||
: FALSE;
|
|
||||||
resource.setPersistentProperty(new QualifiedName(pageId,
|
|
||||||
USEPROJECTSETTINGS), value);
|
|
||||||
} catch (CoreException e) {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,6 +183,55 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
|
||||||
getViewer().setInput(profile);
|
getViewer().setInput(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* org.eclipse.cdt.codan.internal.ui.preferences.CheckedTreeEditor#doLoad()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void doLoad() {
|
||||||
|
if (getTreeControl() != null) {
|
||||||
|
IProblem[] probs = codanPreferencesLoader.getProblems();
|
||||||
|
for (int i = 0; i < probs.length; i++) {
|
||||||
|
String id = probs[i].getId();
|
||||||
|
String s = getPreferenceStore().getString(id);
|
||||||
|
codanPreferencesLoader.setProperty(id, s);
|
||||||
|
}
|
||||||
|
getViewer().setInput(codanPreferencesLoader.getInput());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void doLoadDefault() {
|
||||||
|
if (getTreeControl() != null) {
|
||||||
|
IProblem[] probs = codanPreferencesLoader.getProblems();
|
||||||
|
for (int i = 0; i < probs.length; i++) {
|
||||||
|
String id = probs[i].getId();
|
||||||
|
String s = getPreferenceStore().getDefaultString(id);
|
||||||
|
codanPreferencesLoader.setProperty(id, s);
|
||||||
|
}
|
||||||
|
getViewer().setInput(codanPreferencesLoader.getInput());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
*
|
||||||
|
* @see
|
||||||
|
* org.eclipse.cdt.codan.internal.ui.preferences.CheckedTreeEditor#doStore()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void doStore() {
|
||||||
|
codanPreferencesLoader.setInput(getViewer().getInput());
|
||||||
|
IProblem[] probs = codanPreferencesLoader.getProblems();
|
||||||
|
for (int i = 0; i < probs.length; i++) {
|
||||||
|
String id = probs[i].getId();
|
||||||
|
String s = codanPreferencesLoader.getProperty(id);
|
||||||
|
getPreferenceStore().setValue(id, s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* (non-Javadoc)
|
* (non-Javadoc)
|
||||||
*
|
*
|
||||||
|
@ -191,7 +240,7 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected Object modelFromString(String s) {
|
protected Object modelFromString(String s) {
|
||||||
return codanPreferencesLoader.modelFromString(s);
|
return codanPreferencesLoader.getInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -203,6 +252,6 @@ public class ProblemsTreeEditor extends CheckedTreeEditor {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
protected String modelToString(Object model) {
|
protected String modelToString(Object model) {
|
||||||
return codanPreferencesLoader.modelToString(model);
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue