* true: The update was sucessful<br>
* false: The update failed
*/
private boolean updateItem(Item originalItem, Item modifiedItem)
{
ModelConnector modelConnector = ModelConnector.getInstance();
try
{
if (originalItem instanceof Model)
{
modelConnector.updateModel((Model) modifiedItem);
}
else
{
String newName = modifiedItem.getName();
ModelQualifier destinationQualifier = new ModelQualifier(originalItem.getQualifier());
destinationQualifier.setItem(newName);
// Move the item if necessary
modelConnector.moveItem(modifiedItem, destinationQualifier);
modelConnector.updateItem(modifiedItem);
}
}
catch (ModelException e)
{
modelConnector.showExceptionDialog(e, originalItem);
return false;
}
return true;
}