Search in sources :

Example 41 with IFolder

use of com.archimatetool.model.IFolder in project archi-modelrepository-plugin by archi-contribs.

the class GraficoModelImporter method loadModel.

private IArchimateModel loadModel(File folder) throws IOException {
    IArchimateModel model = (IArchimateModel) loadElement(new File(folder, IGraficoConstants.FOLDER_XML));
    IFolder tmpFolder;
    List<FolderType> folderList = new ArrayList<FolderType>();
    folderList.add(FolderType.STRATEGY);
    folderList.add(FolderType.BUSINESS);
    folderList.add(FolderType.APPLICATION);
    folderList.add(FolderType.TECHNOLOGY);
    folderList.add(FolderType.MOTIVATION);
    folderList.add(FolderType.IMPLEMENTATION_MIGRATION);
    folderList.add(FolderType.OTHER);
    folderList.add(FolderType.RELATIONS);
    folderList.add(FolderType.DIAGRAMS);
    // Loop based on FolderType enumeration
    for (FolderType folderType : folderList) {
        if ((tmpFolder = loadFolder(new File(folder, folderType.toString()))) != null) {
            model.getFolders().add(tmpFolder);
        }
    }
    return model;
}
Also used : ArrayList(java.util.ArrayList) IArchimateModel(com.archimatetool.model.IArchimateModel) File(java.io.File) IFolder(com.archimatetool.model.IFolder) FolderType(com.archimatetool.model.FolderType)

Aggregations

IFolder (com.archimatetool.model.IFolder)41 Test (org.junit.Test)19 EObject (org.eclipse.emf.ecore.EObject)13 IArchimateElement (com.archimatetool.model.IArchimateElement)11 IArchimateModel (com.archimatetool.model.IArchimateModel)11 ArrayList (java.util.ArrayList)6 IArchimateModelObject (com.archimatetool.model.IArchimateModelObject)5 IDiagramModel (com.archimatetool.model.IDiagramModel)5 IArchimateRelationship (com.archimatetool.model.IArchimateRelationship)4 Command (org.eclipse.gef.commands.Command)4 CommandStack (org.eclipse.gef.commands.CommandStack)4 File (java.io.File)3 ICanvasModel (com.archimatetool.canvas.model.ICanvasModel)2 IArchiveManager (com.archimatetool.editor.model.IArchiveManager)2 IArchimateDiagramModel (com.archimatetool.model.IArchimateDiagramModel)2 IDiagramModelObject (com.archimatetool.model.IDiagramModelObject)2 CompoundCommand (org.eclipse.gef.commands.CompoundCommand)2 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)2 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)2 DropTargetEvent (org.eclipse.swt.dnd.DropTargetEvent)2