Merge remote-tracking branch 'origin/GP-2173-dragonmacher-undo-closes-editor--SQUASHED'

This commit is contained in:
Ryan Kurtz
2022-10-05 11:52:21 -04:00
@@ -358,6 +358,12 @@ public class DataTypeEditorManager
DataTypeManager dataTypeManager = editor.getDataTypeManager(); DataTypeManager dataTypeManager = editor.getDataTypeManager();
DataTypeManager programDataTypeManager = domainObject.getDataTypeManager(); DataTypeManager programDataTypeManager = domainObject.getDataTypeManager();
if (dataTypeManager == programDataTypeManager) { if (dataTypeManager == programDataTypeManager) {
/*
It is not clear why this check was added. It seem reasonable to always let the
editor know about the event. With this code enabled, editors with new, unsaved
types will be closed.
DataTypePath dtPath = editor.getDtPath(); DataTypePath dtPath = editor.getDtPath();
CategoryPath categoryPath = dtPath.getCategoryPath(); CategoryPath categoryPath = dtPath.getCategoryPath();
String name = dtPath.getDataTypeName(); String name = dtPath.getDataTypeName();
@@ -366,6 +372,7 @@ public class DataTypeEditorManager
dismissEditor(editor); dismissEditor(editor);
continue; continue;
} }
*/
editor.domainObjectRestored(domainObject); editor.domainObjectRestored(domainObject);
} }
} }
@@ -519,8 +526,8 @@ public class DataTypeEditorManager
PluginTool tool = plugin.getTool(); PluginTool tool = plugin.getTool();
DTMEditFunctionSignatureDialog editSigDialog = new DTMEditFunctionSignatureDialog( DTMEditFunctionSignatureDialog editSigDialog = new DTMEditFunctionSignatureDialog(
plugin.getTool(), "Edit Function Signature", category, functionDefinition); plugin.getTool(), "Edit Function Signature", category, functionDefinition);
editSigDialog.setHelpLocation( editSigDialog
new HelpLocation("DataTypeManagerPlugin", "Function_Definition")); .setHelpLocation(new HelpLocation("DataTypeManagerPlugin", "Function_Definition"));
tool.showDialog(editSigDialog); tool.showDialog(editSigDialog);
} }