Skip to content
Snippets Groups Projects
Commit 2a41a316 authored by Fabian Wiesner's avatar Fabian Wiesner
Browse files

Model loads correct now.

TODO: load model into Diagram

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@12783 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent 0f723881
No related branches found
No related tags found
No related merge requests found
- please Read "Move 'plugin.xml' here and README.txt"
\ No newline at end of file
......@@ -97,6 +97,10 @@ public class InitCreateDiagramWizard implements IObjectActionDelegate {
*/
TreeIterator<EObject> it = diagramRoot.eAllContents();
Repository model = null;
if (diagramRoot instanceof Repository) {
model = (Repository) diagramRoot;
}
//TODO: If >1 Repository exists: present them to choose one
while (it.hasNext()) {
EObject possibleRepo = it.next();
if (possibleRepo instanceof Repository) {
......@@ -145,8 +149,9 @@ public class InitCreateDiagramWizard implements IObjectActionDelegate {
action.setEnabled(true);
return;
}
this.selection = (IStructuredSelection) selection;
IFile file = (IFile) this.selection.getFirstElement();
// this.selection = (IStructuredSelection) selection;
// IFile file = (IFile) this.selection.getFirstElement();
IFile file = (IFile) ((IStructuredSelection) selection).getFirstElement();
this.fileName = file.getName().replaceAll(".repository", "");
this.domainModelURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
action.setEnabled(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment