public boolean postOperation(CdmBase objectAffectedByOperation) {
boolean result = super.postOperation(objectAffectedByOperation);
- if(objectAffectedByOperation != null){
-
- if(objectAffectedByOperation instanceof DescriptionElementBase){
- DescriptionElementBase descriptionElement = (DescriptionElementBase) objectAffectedByOperation;
- FeatureNodeContainer container = getFeatureNodeContainerForDescriptionElement(descriptionElement);
- viewer.expandToLevel(container, 1);
- }
-
- StructuredSelection selection = new StructuredSelection(objectAffectedByOperation);
- viewer.setSelection(selection, true);
- }
+// if(objectAffectedByOperation != null){
+//
+// if(objectAffectedByOperation instanceof DescriptionElementBase){
+// DescriptionElementBase descriptionElement = (DescriptionElementBase) objectAffectedByOperation;
+// FeatureNodeContainer featureNodeContainerBranch = featureNodeContainerCache.get(descriptionElement.getInDescription());
+// FeatureNodeContainer featureNodeContainer = featureNodeContainerBranch.processDescriptionElement(descriptionElement);
+//// viewer.refresh(featureNodeContainer, true);
+// viewer.expandToLevel(featureNodeContainer, 1);
+// }
+//
+// StructuredSelection selection = new StructuredSelection(objectAffectedByOperation);
+// viewer.setSelection(selection, true);
+// }else{
+//// viewer.refresh();
+// }
return result;
}
-
- /**
- *
- * @param descriptionElement
- * @return
- */
- private FeatureNodeContainer getFeatureNodeContainerForDescriptionElement(
- DescriptionElementBase descriptionElement) {
- FeatureNodeContainer featureNodeContainerBranch = featureNodeContainerCache.get(descriptionElement.getInDescription());
- FeatureNodeContainer featureNodeContainer = featureNodeContainerBranch.getFeatureNodeContainerForDescriptionElement(descriptionElement);
- return featureNodeContainer;
- }
/** {@inheritDoc} */
@Override
public void changed(Object object) {
-// viewer.refresh(true);
-// viewer.update(object, null);
- viewer.refresh(object, true);
+ if(object instanceof DescriptionElementBase){
+ DescriptionElementBase descriptionElement = (DescriptionElementBase) object;
+ FeatureNodeContainer featureNodeContainerBranch = featureNodeContainerCache.get(descriptionElement.getInDescription());
+ FeatureNodeContainer featureNodeContainer = featureNodeContainerBranch.processDescriptionElement(descriptionElement);
+ viewer.refresh(featureNodeContainer, true);
+ viewer.expandToLevel(featureNodeContainer, 1);
+
+ }else{
+ viewer.refresh(true);
+ }
+
+ if(object != null){
+ StructuredSelection selection = new StructuredSelection(object);
+ viewer.setSelection(selection, true);
+ }
+
super.changed(object);
}