From 9b1a2bc2036423b45b46c143ec8f73bfc13ba256 Mon Sep 17 00:00:00 2001 From: Anton Makeev Date: Thu, 2 Aug 2012 14:37:36 +0200 Subject: [PATCH] AppCode:Build Settings: build settings per configuration --- .../designer/model/PropertiesContainer.java | 4 ++-- .../src/com/intellij/designer/model/Property.java | 10 +++++----- .../designer/propertyTable/PropertyTable.java | 2 +- .../model/layout/relative/CenterProperty.java | 8 ++++---- .../model/layout/relative/CompoundProperty.java | 2 +- .../designer/propertyTable/AttributeProperty.java | 8 ++++---- .../AttributePropertyWithDefault.java | 4 ++-- .../designer/propertyTable/CompoundProperty.java | 6 +++--- .../designer/propertyTable/CustomViewProperty.java | 8 ++++---- .../designer/propertyTable/FlagProperty.java | 14 +++++++------- .../designer/propertyTable/FragmentProperty.java | 8 ++++---- .../designer/propertyTable/GravityProperty.java | 10 +++++----- .../android/designer/propertyTable/IdProperty.java | 2 +- .../propertyTable/IncludeLayoutProperty.java | 4 ++-- .../designer/propertyTable/StyleProperty.java | 8 ++++---- 15 files changed, 49 insertions(+), 49 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/designer/model/PropertiesContainer.java b/platform/platform-impl/src/com/intellij/designer/model/PropertiesContainer.java index c2474b917b11..0ae7fce1a894 100644 --- a/platform/platform-impl/src/com/intellij/designer/model/PropertiesContainer.java +++ b/platform/platform-impl/src/com/intellij/designer/model/PropertiesContainer.java @@ -17,6 +17,6 @@ package com.intellij.designer.model; import java.util.List; -public abstract class PropertiesContainer { - public abstract List getProperties(); +public abstract class PropertiesContainer { + public abstract List getProperties(); } diff --git a/platform/platform-impl/src/com/intellij/designer/model/Property.java b/platform/platform-impl/src/com/intellij/designer/model/Property.java index d7f98762ad5a..7f8756e94dc1 100644 --- a/platform/platform-impl/src/com/intellij/designer/model/Property.java +++ b/platform/platform-impl/src/com/intellij/designer/model/Property.java @@ -61,7 +61,7 @@ public abstract class Property { } @NotNull - public List> getChildren(@Nullable T component) { + public List> getChildren(@Nullable T container) { return Collections.emptyList(); } @@ -83,18 +83,18 @@ public abstract class Property { ////////////////////////////////////////////////////////////////////////////////////////// @Nullable - public Object getValue(T component) throws Exception { + public Object getValue(@NotNull T container) throws Exception { return null; } - public void setValue(T component, @Nullable Object value) throws Exception { + public void setValue(@NotNull T container, @Nullable Object value) throws Exception { } - public boolean isDefaultValue(T component) throws Exception { + public boolean isDefaultValue(@NotNull T container) throws Exception { return false; } - public void setDefaultValue(T component) throws Exception { + public void setDefaultValue(@NotNull T container) throws Exception { } public boolean availableFor(List components) { diff --git a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java index cb602b16a2aa..e6c20ff5e038 100644 --- a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java +++ b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java @@ -327,7 +327,7 @@ public abstract class PropertyTable extends JBTable { } } - private void fillProperties(PropertiesContainer component, List properties) { + private void fillProperties(PropertiesContainer component, List properties) { for (Property property : component.getProperties()) { addProperty(property, properties); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java index 424c2e96a4d8..b6a9aa9d86c5 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CenterProperty.java @@ -50,7 +50,7 @@ public class CenterProperty extends Property implements IXmlAt } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { XmlTag tag = component.getTag(); boolean[] values = new boolean[3]; for (int i = 0; i < ATTR_ITEMS.length; i++) { @@ -69,7 +69,7 @@ public class CenterProperty extends Property implements IXmlAt } @Override - public void setValue(final RadViewComponent component, Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, Object value) throws Exception { final int index = ArrayUtil.indexOf(COMBO_ITEMS, value); ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override @@ -88,7 +88,7 @@ public class CenterProperty extends Property implements IXmlAt } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { XmlTag tag = component.getTag(); for (String attribute : ATTR_ITEMS) { if (tag.getAttribute(attribute, SdkConstants.NS_RESOURCES) != null) { @@ -99,7 +99,7 @@ public class CenterProperty extends Property implements IXmlAt } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { setValue(component, null); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CompoundProperty.java b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CompoundProperty.java index 00a7784c9c96..93b90a851a8a 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CompoundProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/model/layout/relative/CompoundProperty.java @@ -32,7 +32,7 @@ public class CompoundProperty extends com.intellij.android.designer.propertyTabl } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { StringBuilder value = new StringBuilder("["); int index = 0; for (Property child : getChildren(component)) { diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributeProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributeProperty.java index 6cd40b41389a..10d7e3aa1207 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributeProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributeProperty.java @@ -104,7 +104,7 @@ public class AttributeProperty extends Property implements IXm } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { Object value = null; XmlAttribute attribute = getAttribute(component); @@ -116,7 +116,7 @@ public class AttributeProperty extends Property implements IXm } @Override - public void setValue(final RadViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, final Object value) throws Exception { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { @@ -134,12 +134,12 @@ public class AttributeProperty extends Property implements IXm } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return getAttribute(component) == null; } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { if (getAttribute(component) != null) { setValue(component, null); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributePropertyWithDefault.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributePropertyWithDefault.java index 889d9b4619ea..50c00570f77f 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributePropertyWithDefault.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/AttributePropertyWithDefault.java @@ -46,12 +46,12 @@ public class AttributePropertyWithDefault extends AttributeProperty { } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return myDefaultValue.equals(getValue(component)); } @Override - public void setValue(RadViewComponent component, Object value) throws Exception { + public void setValue(@NotNull RadViewComponent component, Object value) throws Exception { if (StringUtil.isEmpty((String)value)) { value = myDefaultValue; } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CompoundProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CompoundProperty.java index 8cf986d3e1c7..6b52c3ee2ffd 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CompoundProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CompoundProperty.java @@ -70,7 +70,7 @@ public class CompoundProperty extends Property implements IPro } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { StringBuilder value = new StringBuilder(); int index = 0; int empty = 0; @@ -94,7 +94,7 @@ public class CompoundProperty extends Property implements IPro } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { for (Property childProperty : myChildren) { if (!childProperty.isDefaultValue(component)) { return false; @@ -104,7 +104,7 @@ public class CompoundProperty extends Property implements IPro } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { for (Property childProperty : myChildren) { childProperty.setDefaultValue(component); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CustomViewProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CustomViewProperty.java index bea2b944f906..0c43cabd243c 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CustomViewProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/CustomViewProperty.java @@ -62,13 +62,13 @@ public class CustomViewProperty extends Property impleme } @Override - public Object getValue(RadCustomViewComponent component) throws Exception { + public Object getValue(@NotNull RadCustomViewComponent component) throws Exception { String viewClass = component.getViewClass(); return viewClass == null ? "" : viewClass; } @Override - public void setValue(final RadCustomViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadCustomViewComponent component, final Object value) throws Exception { if (StringUtil.isEmpty((String)value)) { return; } @@ -94,12 +94,12 @@ public class CustomViewProperty extends Property impleme } @Override - public boolean isDefaultValue(RadCustomViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadCustomViewComponent component) throws Exception { return false; } @Override - public void setDefaultValue(RadCustomViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadCustomViewComponent component) throws Exception { } @Override diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java index 46d1214abca4..ede5a7243b6a 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FlagProperty.java @@ -72,7 +72,7 @@ public class FlagProperty extends Property implements IPropert } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { StringBuilder value = new StringBuilder("["); Set options = getOptions(component); int index = 0; @@ -88,12 +88,12 @@ public class FlagProperty extends Property implements IPropert } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return getAttribute(component) == null; } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { final XmlAttribute attribute = getAttribute(component); if (attribute != null) { ApplicationManager.getApplication().runWriteAction(new Runnable() { @@ -206,22 +206,22 @@ public class FlagProperty extends Property implements IPropert } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { return isOption(component, myValueName); } @Override - public void setValue(RadViewComponent component, Object value) throws Exception { + public void setValue(@NotNull RadViewComponent component, Object value) throws Exception { setOption(component, myValueName, (Boolean)value); } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return !isOption(component, myValueName); } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { setValue(component, Boolean.FALSE); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FragmentProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FragmentProperty.java index d433652165ec..811f3f536098 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FragmentProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/FragmentProperty.java @@ -54,13 +54,13 @@ public class FragmentProperty extends Property implements IXml } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { String value = component.getTag().getAttributeValue(myAttribute, SdkConstants.NS_RESOURCES); return value == null ? "" : value; } @Override - public void setValue(final RadViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, final Object value) throws Exception { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { @@ -75,12 +75,12 @@ public class FragmentProperty extends Property implements IXml } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return component.getTag().getAttribute(myAttribute, SdkConstants.NS_RESOURCES) == null; } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { if (component.getTag().getAttribute(myAttribute, SdkConstants.NS_RESOURCES) != null) { setValue(component, null); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/GravityProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/GravityProperty.java index 5162f25a5b57..597113c361f5 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/GravityProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/GravityProperty.java @@ -109,7 +109,7 @@ public class GravityProperty extends FlagProperty { } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { StringBuilder value = new StringBuilder("["); Set options = getOptions(component); int index = 0; @@ -188,7 +188,7 @@ public class GravityProperty extends FlagProperty { } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { Set options = getOptions(component); int lastIndex = -1; for (int i = 0; i < myValues.length; i++) { @@ -200,7 +200,7 @@ public class GravityProperty extends FlagProperty { } @Override - public void setValue(RadViewComponent component, Object value) throws Exception { + public void setValue(@NotNull RadViewComponent component, Object value) throws Exception { int index = ArrayUtil.indexOf(COMBO_ITEMS, value); if (index == -1) { setOptions(component, null, myValues); @@ -213,7 +213,7 @@ public class GravityProperty extends FlagProperty { protected abstract void setValue(RadViewComponent component, int index) throws Exception; @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { Set options = getOptions(component); for (String value : myValues) { if (options.contains(value)) { @@ -224,7 +224,7 @@ public class GravityProperty extends FlagProperty { } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { setValue(component, null); } diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IdProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IdProperty.java index 2da628f93561..bd5feda2cb94 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IdProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IdProperty.java @@ -54,7 +54,7 @@ public class IdProperty extends AttributeProperty { } @Override - public void setValue(final RadViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, final Object value) throws Exception { IdManager idManager = IdManager.get(component); final String oldId = component.getId(); diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IncludeLayoutProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IncludeLayoutProperty.java index af04587fd01b..18d01bc89ed5 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IncludeLayoutProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/IncludeLayoutProperty.java @@ -59,13 +59,13 @@ public class IncludeLayoutProperty extends Property implements } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { String layout = component.getTag().getAttributeValue("layout"); return layout == null ? "" : layout; } @Override - public void setValue(final RadViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, final Object value) throws Exception { if (!StringUtil.isEmpty((String)value)) { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override diff --git a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/StyleProperty.java b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/StyleProperty.java index cbbd38b9fbe5..074d263c754c 100644 --- a/plugins/android-designer/src/com/intellij/android/designer/propertyTable/StyleProperty.java +++ b/plugins/android-designer/src/com/intellij/android/designer/propertyTable/StyleProperty.java @@ -63,7 +63,7 @@ public class StyleProperty extends Property implements IXmlAtt } @Override - public Object getValue(RadViewComponent component) throws Exception { + public Object getValue(@NotNull RadViewComponent component) throws Exception { Object value = null; XmlAttribute attribute = getAttribute(component); @@ -75,7 +75,7 @@ public class StyleProperty extends Property implements IXmlAtt } @Override - public void setValue(final RadViewComponent component, final Object value) throws Exception { + public void setValue(@NotNull final RadViewComponent component, final Object value) throws Exception { ApplicationManager.getApplication().runWriteAction(new Runnable() { @Override public void run() { @@ -93,12 +93,12 @@ public class StyleProperty extends Property implements IXmlAtt } @Override - public boolean isDefaultValue(RadViewComponent component) throws Exception { + public boolean isDefaultValue(@NotNull RadViewComponent component) throws Exception { return getAttribute(component) == null; } @Override - public void setDefaultValue(RadViewComponent component) throws Exception { + public void setDefaultValue(@NotNull RadViewComponent component) throws Exception { if (getAttribute(component) != null) { setValue(component, null); }