89 |
|
|
90 |
private boolean savePreviouslyNeeded; |
private boolean savePreviouslyNeeded; |
91 |
|
|
92 |
private Diagram diagram = new Diagram(); |
private Diagram diagram; |
93 |
|
|
94 |
public DiagramEditor() |
public DiagramEditor() |
95 |
{ |
{ |
96 |
|
diagram = new Diagram(); |
97 |
// an EditDomain is a "session" of editing which contains things |
// an EditDomain is a "session" of editing which contains things |
98 |
// like the CommandStack |
// like the CommandStack |
99 |
setEditDomain(new DefaultEditDomain(this)); |
setEditDomain(new DefaultEditDomain(this)); |
100 |
|
System.out.println("Diagram Editor created"); |
101 |
} |
} |
102 |
|
|
103 |
public Diagram getDiagram() |
public Diagram getDiagram() |
213 |
try |
try |
214 |
{ |
{ |
215 |
IFile file = ((IFileEditorInput) getEditorInput()).getFile(); |
IFile file = ((IFileEditorInput) getEditorInput()).getFile(); |
216 |
|
//file.setContents(this.diagram.getAsStream(), true, false, monitor); |
217 |
file.setContents(this.diagram.getAsStream(), true, false, monitor); |
file.setContents(this.diagram.getAsStream(), true, false, monitor); |
218 |
getCommandStack().markSaveLocation(); |
getCommandStack().markSaveLocation(); |
219 |
} |
} |