File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
com.vogella.e4.model.persistence/src/com/vogella/e4/model/persistence/handlers Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -24,15 +24,17 @@ public void execute(EModelService modelService, MWindow window) {
2424 E4XMIResourceFactory e4xmiResourceFactory = new E4XMIResourceFactory ();
2525 Resource resource = e4xmiResourceFactory .createResource (null );
2626
27- // You must clone the perspective as snippet, otherwise the running application would break
27+ // You must clone the perspective as snippet, otherwise the running
28+ // application would break, because the saving process of the resource
29+ // removes the element from the running application model
2830 MUIElement clonedPerspective = modelService .cloneElement (activePerspective , window );
29-
31+
3032 // add the cloned model element to the resource so that it may be stored
3133 resource .getContents ().add ((EObject ) clonedPerspective );
32-
34+
3335 FileOutputStream outputStream = null ;
3436 try {
35-
37+
3638 // Use a stream to save the model element
3739 outputStream = new FileOutputStream ("/home/simon/simon.xmi" );
3840
You can’t perform that action at this time.
0 commit comments