|
Lines 74-79
Link Here
|
| 74 |
import org.eclipse.ui.actions.WorkspaceModifyOperation; |
74 |
import org.eclipse.ui.actions.WorkspaceModifyOperation; |
| 75 |
|
75 |
|
| 76 |
import org.eclipse.ui.dialogs.WizardNewFileCreationPage; |
76 |
import org.eclipse.ui.dialogs.WizardNewFileCreationPage; |
|
|
77 |
import org.eclipse.ui.ide.IDE; |
| 77 |
|
78 |
|
| 78 |
import org.eclipse.ui.part.FileEditorInput; |
79 |
import org.eclipse.ui.part.FileEditorInput; |
| 79 |
import org.eclipse.ui.part.ISetSelectionTarget; |
80 |
import org.eclipse.ui.part.ISetSelectionTarget; |
|
Lines 83-88
Link Here
|
| 83 |
import org.eclipse.uml2.uml.edit.UMLEditPlugin; |
84 |
import org.eclipse.uml2.uml.edit.UMLEditPlugin; |
| 84 |
|
85 |
|
| 85 |
import org.eclipse.core.runtime.Path; |
86 |
import org.eclipse.core.runtime.Path; |
|
|
87 |
import org.eclipse.core.runtime.content.IContentType; |
| 86 |
|
88 |
|
| 87 |
import org.eclipse.jface.viewers.ISelection; |
89 |
import org.eclipse.jface.viewers.ISelection; |
| 88 |
import org.eclipse.jface.viewers.StructuredSelection; |
90 |
import org.eclipse.jface.viewers.StructuredSelection; |
|
Lines 321-329
Link Here
|
| 321 |
// Open an editor on the new file. |
323 |
// Open an editor on the new file. |
| 322 |
// |
324 |
// |
| 323 |
try { |
325 |
try { |
|
|
326 |
IContentType modelContentType = IDE.getContentType(modelFile); |
| 324 |
page.openEditor(new FileEditorInput(modelFile), workbench |
327 |
page.openEditor(new FileEditorInput(modelFile), workbench |
| 325 |
.getEditorRegistry().getDefaultEditor( |
328 |
.getEditorRegistry().getDefaultEditor( |
| 326 |
modelFile.getFullPath().toString()).getId()); |
329 |
modelFile.getFullPath().toString(), modelContentType).getId()); |
| 327 |
} catch (PartInitException exception) { |
330 |
} catch (PartInitException exception) { |
| 328 |
MessageDialog |
331 |
MessageDialog |
| 329 |
.openError( |
332 |
.openError( |