use of com.android.tools.idea.gradle.editor.GradleEditorNotificationListener in project android by JetBrains.
the class GradleEditorCellComponentImpl method getValue.
@Override
@Nullable
public Object getValue(@NotNull Project project) {
GradleEditorEntityTableModel model = myTable.getModel();
if (myUis == null || myRow < 0 || myRow >= model.getRowCount()) {
return null;
}
final GradleEditorEntity entity = (GradleEditorEntity) model.getValueAt(myRow, 0);
GradleEditorNotificationListener publisher = project.getMessageBus().syncPublisher(GradleEditorNotificationListener.TOPIC);
publisher.beforeChange();
try {
WriteCommandAction.runWriteCommandAction(project, new Runnable() {
@SuppressWarnings("unchecked")
@Override
public void run() {
for (GradleEditorEntityUi ui : myUis) {
ui.flush(entity);
}
}
});
} finally {
publisher.afterChange();
}
return entity;
}
Aggregations