X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.proconf.g3d.shapeeditor%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fshapeeditor%2Fhandlers%2FCSGProjectType.java;fp=org.simantics.proconf.g3d.shapeeditor%2Fsrc%2Forg%2Fsimantics%2Fproconf%2Fg3d%2Fshapeeditor%2Fhandlers%2FCSGProjectType.java;h=0000000000000000000000000000000000000000;hb=8b42fcb0b43efb8caaca85dd722ae608b9a3a730;hp=7d12b5b5d9419fee2fb798be7052753d0c9e31a6;hpb=55702d303318f9d3dc0b5e20010cfc2c4ae0b88e;p=simantics%2F3d.git diff --git a/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectType.java b/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectType.java deleted file mode 100644 index 7d12b5b5..00000000 --- a/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectType.java +++ /dev/null @@ -1,57 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2007- VTT Technical Research Centre of Finland. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.proconf.g3d.shapeeditor.handlers; - -import java.util.ArrayList; -import java.util.Collection; - -import org.simantics.db.Builtins; -import org.simantics.db.Graph; -import org.simantics.db.Resource; -import org.simantics.layer0.utils.direct.GraphUtils; -import org.simantics.proconf.ui.projects.IProject; -import org.simantics.proconf.ui.projects.ProjectType; - -public class CSGProjectType extends ProjectType { - - public CSGProjectType(Graph graph, Resource projectTypeResource) { - super(graph, projectTypeResource); - } - - @Override - public Resource createProject(Graph g, String name) throws Exception { - Resource project = super.createProject(g, name); - Builtins b = g.getBuiltins(); - - { // Models - Resource modelLibrary = g.newResource(); - g.addStatement(modelLibrary, b.InstanceOf, b.ModelLibrary); - GraphUtils.addRelatedScalarString(g, modelLibrary, b.HasName, "Models"); - g.addStatement(project, b.ConsistsOf, modelLibrary); - } - - - - return project; - } - - @Override - public IProject loadProject(Graph g, Resource r) { - IProject project = super.loadProject(g, r); - project.set(DefaultPerspective, "org.simantics.proconf.shapeeditor.perspectives.csg"); - Collection perspectives = new ArrayList(); - perspectives.add("org.simantics.proconf.shapeeditor.perspectives.csg"); - project.set(Perspectives, perspectives); - - return project; - } - -}