X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=org.simantics.g3d.csg%2Fsrc%2Forg%2Fsimantics%2Fg3d%2Fcsg%2Fwizard%2FCSGExportPage.java;h=5e9dc85c48390aa17f2c4e01b5eb1a379842ad31;hb=refs%2Fchanges%2F29%2F3329%2F1;hp=c9354d374c12a27b8571659ae2f20565d2be64b4;hpb=87b3241ec277ba3d8e414b26186a032c9cdcaeed;p=simantics%2F3d.git diff --git a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/wizard/CSGExportPage.java b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/wizard/CSGExportPage.java index c9354d37..5e9dc85c 100644 --- a/org.simantics.g3d.csg/src/org/simantics/g3d/csg/wizard/CSGExportPage.java +++ b/org.simantics.g3d.csg/src/org/simantics/g3d/csg/wizard/CSGExportPage.java @@ -1,3 +1,14 @@ +/******************************************************************************* + * Copyright (c) 2012, 2013 Association for Decentralized Information Management in + * Industry THTH ry. + * 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.g3d.csg.wizard; import java.util.ArrayList; @@ -14,7 +25,7 @@ import org.simantics.layer0.Layer0; public class CSGExportPage extends ModelExportWizardPage { - + public CSGExportPage(CSGExportModel model) { super("Export CSG Model","Define Export Location",null,model); } @@ -34,18 +45,14 @@ public class CSGExportPage extends ModelExportWizardPage { protected List getSupportedModels(ReadGraph graph, Resource project) throws DatabaseException { List models = new ArrayList(); Layer0 L0 = Layer0.getInstance(graph); - CSG csg = CSG.getInstance(graph); - - for (Resource r : graph.getObjects(project, L0.ConsistsOf)) { - if (graph.isInstanceOf(r, csg.Model)) { - models.add(new NamedResource((String)graph.getRelatedValue(r, L0.HasName), r)); - } - } - return models; + CSG csg = CSG.getInstance(graph); + + for (Resource r : graph.getObjects(project, L0.ConsistsOf)) { + if (graph.isInstanceOf(r, csg.Model)) { + models.add(new NamedResource((String)graph.getRelatedValue(r, L0.HasName), r)); + } + } + return models; } - - - - }