if (targetItemId instanceof WidgetsDefinitionElement) { //the can be only one! ... root element2
location = VerticalDropLocation.MIDDLE;
}
if (!moveNode(sourceItemId, targetItemId, location)) {
if (newItemId != null) {
container.removeItem(newItemId);
}
} else {
refreshRawXmlAndPreview();
}
}