mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
[DBE-1038] Allow to edit queries with join in data editor
Merge-request: IJ-MR-162228 Merged-by: Anvar Ramazanov <anvar.ramazanov@jetbrains.com> GitOrigin-RevId: 5338825fa05ee1e4d02a9c3b3e913ccc37417d26
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3b27d4eff1
commit
32baa6786f
@@ -55,6 +55,7 @@ public interface GridDataHookUp<Row, Column> extends MutationSupport<Row, Column
|
||||
|
||||
boolean isReadOnly();
|
||||
|
||||
default boolean isForSingleSource() { return true; }
|
||||
|
||||
void addRequestListener(@NotNull RequestListener<Row, Column> listener, @NotNull Disposable disposable);
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ public class AddRowAction extends DumbAwareAction implements GridAction {
|
||||
boolean canAddRow = grid != null &&
|
||||
grid.isEditable() &&
|
||||
grid.isReady() &&
|
||||
grid.getDataHookup().isForSingleSource() &&
|
||||
grid.getDataSupport().hasRowMutator() &&
|
||||
grid.getDataModel(DataAccessType.DATA_WITH_MUTATIONS).getColumnCount() != 0;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class DeleteRowsAction extends DeleteActionBase {
|
||||
@Override
|
||||
protected boolean isEnabled(@NotNull DataGrid grid) {
|
||||
GridDataSupport support = grid.getDataSupport();
|
||||
return !support.isDeletedRows(grid.getSelectionModel().getSelectedRows()) && grid.isEditable();
|
||||
return !support.isDeletedRows(grid.getSelectionModel().getSelectedRows()) && grid.isEditable() && grid.getDataHookup().isForSingleSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user