|
|
|
@ -596,6 +596,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
int[] rows = tableDataTree.getSelectionRows(); |
|
|
|
|
tableDataTree.refreshChildByName(tdName); |
|
|
|
|
tableDataTree.setSelectionRows(rows); |
|
|
|
|
FineLoggerFactory.getLogger().info("add table data succeeded for {}", tdName); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -1057,7 +1058,11 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
TableDataTreeSearchManager.getInstance().outOfSearchMode(); |
|
|
|
|
} |
|
|
|
|
for (Object toRemove : selectedValues) { |
|
|
|
|
doRemove((NameObject) toRemove); |
|
|
|
|
try { |
|
|
|
|
doRemove((String) toRemove); |
|
|
|
|
} catch (Exception e) { |
|
|
|
|
FineLoggerFactory.getLogger().error(e, "remove table data failed for {}", toRemove); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1069,9 +1074,9 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
basicDialog.setVisible(true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void doRemove(NameObject selectedNO) { |
|
|
|
|
private void doRemove(String toRemove) throws Exception { |
|
|
|
|
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
|
|
|
|
|
op.removeAction(selectedNO.getName()); |
|
|
|
|
op.removeAction(toRemove); |
|
|
|
|
tableDataTree.refresh(); |
|
|
|
|
// Richie:默认最后一行获得焦点.
|
|
|
|
|
tableDataTree.requestFocus(); |
|
|
|
@ -1080,14 +1085,15 @@ public class TableDataTreePane extends BasicTableDataTreePane {
|
|
|
|
|
checkButtonEnabled(); |
|
|
|
|
|
|
|
|
|
//删掉缓存配置
|
|
|
|
|
StrategyConfigAttrUtils.removeStrategyConfig(selectedNO.getName()); |
|
|
|
|
StrategyConfigAttrUtils.removeStrategyConfig(toRemove); |
|
|
|
|
|
|
|
|
|
// 如果一个模版是平台开启,这个数据集的配置不会存xml,预览模版时直接从全局配置copy,这样
|
|
|
|
|
// 导致删除的时候StrategyConfigsAttrSavedHook没有通过前后配置比较感知数据集被删除,因此不会发出事件让其失效
|
|
|
|
|
// 这里额外发出一次数据集修改事件
|
|
|
|
|
StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(selectedNO.getName()))); |
|
|
|
|
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName()); |
|
|
|
|
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName()); |
|
|
|
|
StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(toRemove))); |
|
|
|
|
DesignTableDataManager.removeSelectedColumnNames(toRemove); |
|
|
|
|
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(toRemove); |
|
|
|
|
FineLoggerFactory.getLogger().info("remove table data succeeded for {}", toRemove); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|