- Timestamp:
- 06/20/11 20:35:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modelicaml/org.openmodelica.modelicaml.common/src/org/openmodelica/modelicaml/common/instantiation/ModificationManager.java
r765 r829 41 41 import org.eclipse.emf.common.command.Command; 42 42 import org.eclipse.emf.common.command.CompoundCommand; 43 import org.eclipse.emf.common.util.BasicEList; 43 44 import org.eclipse.emf.transaction.RecordingCommand; 44 45 import org.eclipse.emf.transaction.TransactionalEditingDomain; … … 127 128 128 129 //component.eNotify(new NotificationImpl(PapyrusNotification.SET, null, null)); // notify Papyrus 130 } 131 132 } 133 134 135 public static void deleteAllComponentModifications( final Element element){ 136 final Stereotype stereotype = getElementStereotype(element); 137 if (stereotype != null) { 138 //########## storing start 139 TransactionalEditingDomain editingDomain = EditorUtils.getTransactionalEditingDomain(); 140 CompoundCommand cc = new CompoundCommand(); 141 Command command = new RecordingCommand(editingDomain) { 142 @Override 143 protected void doExecute() { 144 element.setValue(stereotype, Constants.propertyName_modification, new ArrayList<String>()); // set the value 145 } 146 }; 147 cc.append(command); 148 editingDomain.getCommandStack().execute(cc); 149 //########## storing end 129 150 } 130 151
Note: See TracChangeset
for help on using the changeset viewer.