public JaspiraEventHandlerCode plugin_propertybrowser_executesave(PropertyBrowserSaveEvent oee)
{
if (!(oee.original instanceof ProcessObject))
return EVENT_IGNORED;
ProcessObject orig = (ProcessObject) oee.original;
if (!modeler.getProcessQualifier().equals(orig.getProcess().getQualifier()))
{
return EVENT_IGNORED;
}
modeler.startUndo("Edit Properties");
try
{
orig.copyFrom(oee.getObject(), ModelObject.COPY_SHALLOW);
}
catch (CloneNotSupportedException e)
{
ExceptionUtil.printTrace(e);
return EVENT_CONSUMED;
}
// Make sure all subordinate objects refer to this object
orig.maintainReferences(0);
if (orig instanceof MultiSocketNode)
{
MultiSocketNode node = (MultiSocketNode) orig;
// If we edit an action node and the configuration bean contains default values only, we remove it
// so it won't be persisted to the XML file.
if (node.getConfigurationBean() != null && node.getConfigurationBean().hasDefaultValues())
{
node.setConfigurationBean(null);
}
}
modeler.getDrawing().updateFigure();
Object o = orig.getRepresentation();
if (o instanceof Figure)
{
((Figure) o).invalidate();
modeler.getDrawingView().checkDamage();
}