From e83cece3c66fb983a0712e724ec7991b200fdb32 Mon Sep 17 00:00:00 2001 From: Alexander Lobas Date: Thu, 6 Dec 2012 11:53:36 +0400 Subject: [PATCH] Update needRefreshPropertyList api --- .../src/com/intellij/designer/model/Property.java | 4 ++++ .../com/intellij/designer/propertyTable/PropertyTable.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 b3fc008eb3f4..adca9404d721 100644 --- a/platform/platform-impl/src/com/intellij/designer/model/Property.java +++ b/platform/platform-impl/src/com/intellij/designer/model/Property.java @@ -112,6 +112,10 @@ public abstract class Property { return true; } + public boolean needRefreshPropertyList(@NotNull T container, @Nullable Object value) throws Exception { + return false; + } + public boolean needRefreshPropertyList() { return false; } 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 6b6cadbb0170..7fd4eb43c24b 100644 --- a/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java +++ b/platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java @@ -811,6 +811,7 @@ public abstract class PropertyTable extends JBTable { } boolean isSetValue = true; + final boolean[] needRefresh = new boolean[1]; if (isNewValue) { isSetValue = doSetValue(new ThrowableRunnable() { @@ -818,13 +819,14 @@ public abstract class PropertyTable extends JBTable { public void run() throws Exception { for (PropertiesContainer component : myContainers) { property.setValue(component, newValue); + needRefresh[0] |= property.needRefreshPropertyList(component, newValue); } } }); } if (isSetValue) { - if (property.needRefreshPropertyList()) { + if (property.needRefreshPropertyList() || needRefresh[0]) { update(); } else {