summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYura <yura@google.com>2015-04-24 15:06:52 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-24 15:06:52 +0000
commite2842433fa7fd6bc5592dcb8dc23a9a42149595a (patch)
tree79e651a9d6e7b3feb7d649c03b04693cec3249cb
parentb708cc12a0bb8677335869b1a1f0f086dc9fc44c (diff)
parentb57febfd86bc145daca480859c12b2a19d6aa2ab (diff)
downloadidea-e2842433fa7fd6bc5592dcb8dc23a9a42149595a.tar.gz
am b57febfd: Merge "Show change parent and change name rows in simple mode." into studio-1.3-dev automerge: a35f994 automerge: d4e47d5
* commit 'b57febfd86bc145daca480859c12b2a19d6aa2ab': Show change parent and change name rows in simple mode.
-rw-r--r--android/src/com/android/tools/idea/editors/theme/ThemeEditorComponent.java12
-rw-r--r--android/src/com/android/tools/idea/editors/theme/attributes/AttributesTableModel.java7
2 files changed, 15 insertions, 4 deletions
diff --git a/android/src/com/android/tools/idea/editors/theme/ThemeEditorComponent.java b/android/src/com/android/tools/idea/editors/theme/ThemeEditorComponent.java
index 5f09da77eb6..f3816697142 100644
--- a/android/src/com/android/tools/idea/editors/theme/ThemeEditorComponent.java
+++ b/android/src/com/android/tools/idea/editors/theme/ThemeEditorComponent.java
@@ -713,19 +713,23 @@ public class ThemeEditorComponent extends Splitter {
if (!myIsFilterEnabled) {
return true;
}
+ int row = entry.getIdentifier().intValue();
+ if (entry.getModel().isSpecialRow(row)) {
+ return true;
+ }
// We use the column 1 because it's the one that contains the ItemResourceValueWrapper.
- Object value = entry.getModel().getValueAt(entry.getIdentifier().intValue(), 1);
- String attributeName;
-
+ Object value = entry.getModel().getValueAt(row, 1);
if (value instanceof TableLabel) {
return false;
}
+
+ String attributeName;
if (value instanceof EditedStyleItem) {
attributeName = ((EditedStyleItem)value).getQualifiedName();
}
else {
- attributeName = value.toString();
+ attributeName = value.toString();
}
ThemeEditorStyle selectedTheme = getSelectedStyle();
diff --git a/android/src/com/android/tools/idea/editors/theme/attributes/AttributesTableModel.java b/android/src/com/android/tools/idea/editors/theme/attributes/AttributesTableModel.java
index 8edc34c4632..03fae504625 100644
--- a/android/src/com/android/tools/idea/editors/theme/attributes/AttributesTableModel.java
+++ b/android/src/com/android/tools/idea/editors/theme/attributes/AttributesTableModel.java
@@ -196,6 +196,13 @@ public class AttributesTableModel extends AbstractTableModel implements CellSpan
return new AttributeContents(rowIndex - offset);
}
+ /**
+ * returns true if this row is not a attribute or a label and is the Theme name or Theme parent.
+ */
+ public boolean isSpecialRow(int row) {
+ return row < mySpecialRows.size();
+ }
+
@Override
public int getRowCount() {
return myAttributes.size() + myLabels.size() + mySpecialRows.size();