save project default properties

This commit is contained in:
bancika
2011-01-15 15:05:07 +00:00
parent b99d438eb8
commit f05c3ccc86
5 changed files with 29 additions and 29 deletions
@@ -829,8 +829,8 @@ public class Presenter implements IPlugInPort {
@SuppressWarnings("unchecked")
@Override
public void setDefaultPropertyValue(String propertyName, Object value) {
LOG.info(String.format("setDefaultPropertyValue(%s, %s)", propertyName, value));
public void setSelectionDefaultPropertyValue(String propertyName, Object value) {
LOG.info(String.format("setSelectionDefaultPropertyValue(%s, %s)", propertyName, value));
for (IDIYComponent component : selectedComponents) {
String className = component.getClass().getName();
LOG.debug("Default property value set for " + className + ":" + propertyName);
@@ -839,6 +839,14 @@ public class Presenter implements IPlugInPort {
}
}
@Override
public void setProjectDefaultPropertyValue(String propertyName, Object value) {
LOG.info(String.format("setProjectDefaultPropertyValue(%s, %s)", propertyName, value));
LOG.debug("Default property value set for " + Project.class.getName() + ":" + propertyName);
ConfigurationManager.getInstance().setConfigurationItem(
DEFAULTS_KEY + Project.class.getName() + ":" + propertyName, value);
}
@Override
public void setMetric(boolean isMetric) {
ConfigurationManager.getInstance().setConfigurationItem(Presenter.METRIC_KEY, isMetric);
@@ -1104,7 +1112,8 @@ public class Presenter implements IPlugInPort {
}
} catch (Exception e) {
LOG.error("Could not apply selection properties", e);
view.showMessage("Could not apply changes to the selection. Check the log for details.",
view.showMessage(
"Could not apply changes to the selection. Check the log for details.",
"Error", JOptionPane.ERROR_MESSAGE);
} finally {
// Notify the listeners.