mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Update needRefreshPropertyList api
This commit is contained in:
@@ -112,6 +112,10 @@ public abstract class Property<T extends PropertiesContainer> {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean needRefreshPropertyList(@NotNull T container, @Nullable Object value) throws Exception {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean needRefreshPropertyList() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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<Exception>() {
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user