1 package org.simantics.g3d.csg.wizard;
\r
3 import java.util.Deque;
\r
5 import org.eclipse.core.runtime.preferences.InstanceScope;
\r
6 import org.eclipse.jface.operation.IRunnableWithProgress;
\r
7 import org.eclipse.jface.preference.IPersistentPreferenceStore;
\r
8 import org.eclipse.ui.preferences.ScopedPreferenceStore;
\r
9 import org.simantics.g3d.csg.Activator;
\r
10 import org.simantics.g3d.wizard.ModelExportWizard;
\r
11 import org.simantics.g3d.wizard.ModelExportWizardPage;
\r
13 public class CSGBRepExportWizard extends ModelExportWizard<CSGExportModel> {
\r
15 public static final String RECENT_CSG_EXPORT_LOCATIONS = "RECENT_CSG_EXPORT_LOCATIONS";
\r
16 public static final String CSG_EXPORT_OVERWRITE = "CSG_EXPORT_OVERWRITE";
\r
18 public CSGBRepExportWizard() {
\r
19 setWindowTitle("Export CSG Model to Brep");
\r
20 setNeedsProgressMonitor(true);
\r
24 protected CSGExportModel createExportModel(Deque<String> recentExportPaths) {
\r
25 return new CSGExportModel(recentExportPaths);
\r
29 protected ModelExportWizardPage<CSGExportModel> createExportPage(CSGExportModel exportModel) {
\r
30 return new CSGExportPage(exportModel);
\r
34 protected IRunnableWithProgress createExportRunnable(CSGExportModel exportModel) {
\r
35 return new CSGBrepModelExporter(exportModel);
\r
39 protected String getExportLocationId() {
\r
40 return RECENT_CSG_EXPORT_LOCATIONS;
\r
44 protected String getExportOverwriteId() {
\r
45 return CSG_EXPORT_OVERWRITE;
\r
50 protected IPersistentPreferenceStore getPreferenceStore() {
\r
51 return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
\r