]> gerrit.simantics Code Review - simantics/3d.git/blob - org.simantics.g3d.csg/src/org/simantics/g3d/csg/wizard/CSGBRepExportWizard.java
White space clean-up
[simantics/3d.git] / org.simantics.g3d.csg / src / org / simantics / g3d / csg / wizard / CSGBRepExportWizard.java
1 /*******************************************************************************\r
2  * Copyright (c) 2012, 2013 Association for Decentralized Information Management in\r
3  * Industry THTH ry.\r
4  * All rights reserved. This program and the accompanying materials\r
5  * are made available under the terms of the Eclipse Public License v1.0\r
6  * which accompanies this distribution, and is available at\r
7  * http://www.eclipse.org/legal/epl-v10.html\r
8  *\r
9  * Contributors:\r
10  *     VTT Technical Research Centre of Finland - initial API and implementation\r
11  *******************************************************************************/\r
12 package org.simantics.g3d.csg.wizard;\r
13 \r
14 import java.util.Deque;\r
15 \r
16 import org.eclipse.core.runtime.preferences.InstanceScope;\r
17 import org.eclipse.jface.operation.IRunnableWithProgress;\r
18 import org.eclipse.jface.preference.IPersistentPreferenceStore;\r
19 import org.eclipse.ui.preferences.ScopedPreferenceStore;\r
20 import org.simantics.g3d.csg.Activator;\r
21 import org.simantics.g3d.wizard.ModelExportWizard;\r
22 import org.simantics.g3d.wizard.ModelExportWizardPage;\r
23 \r
24 public class CSGBRepExportWizard extends ModelExportWizard<CSGExportModel> {\r
25 \r
26         public static final String RECENT_CSG_EXPORT_LOCATIONS = "RECENT_CSG_EXPORT_LOCATIONS";\r
27         public static final String CSG_EXPORT_OVERWRITE = "CSG_EXPORT_OVERWRITE";\r
28         \r
29         public CSGBRepExportWizard() {\r
30                 setWindowTitle("Export CSG Model to Brep");\r
31                 setNeedsProgressMonitor(true);\r
32         }\r
33         \r
34         @Override\r
35         protected CSGExportModel createExportModel(Deque<String> recentExportPaths) {\r
36                 return new CSGExportModel(recentExportPaths);\r
37         }\r
38         \r
39         @Override\r
40         protected ModelExportWizardPage<CSGExportModel> createExportPage(CSGExportModel exportModel) {\r
41                 return new CSGExportPage(exportModel);\r
42         }\r
43         \r
44         @Override\r
45         protected IRunnableWithProgress createExportRunnable(CSGExportModel exportModel) {\r
46                 return new CSGBrepModelExporter(exportModel);\r
47         }\r
48         \r
49         @Override\r
50         protected String getExportLocationId() {\r
51                 return RECENT_CSG_EXPORT_LOCATIONS;\r
52         }\r
53         \r
54         @Override\r
55         protected String getExportOverwriteId() {\r
56                 return CSG_EXPORT_OVERWRITE;\r
57         }\r
58         \r
59 \r
60         @Override\r
61         protected IPersistentPreferenceStore getPreferenceStore() {\r
62                 return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);\r
63         }\r
64         \r
65 \r
66 \r
67 }\r