]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - dev/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectAdapter.java
latest release (0.41)
[simantics/3d.git] / dev / org.simantics.proconf.g3d.shapeeditor / src / org / simantics / proconf / g3d / shapeeditor / handlers / CSGProjectAdapter.java
diff --git a/dev/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectAdapter.java b/dev/org.simantics.proconf.g3d.shapeeditor/src/org/simantics/proconf/g3d/shapeeditor/handlers/CSGProjectAdapter.java
new file mode 100644 (file)
index 0000000..5c0835d
--- /dev/null
@@ -0,0 +1,26 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.proconf.g3d.shapeeditor.handlers;\r
+\r
+import org.simantics.db.Graph;\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.adaption.AdaptionException;\r
+import org.simantics.db.adaption.ResourceAdapter;\r
+\r
+\r
+public class CSGProjectAdapter implements ResourceAdapter {\r
+       @SuppressWarnings("unchecked")\r
+       @Override\r
+       public <T> T adapt(Graph graph, Resource resource, Resource mia) throws AdaptionException {\r
+               return (T) new CSGProjectType(graph, resource);\r
+\r
+       }\r
+}\r