1 /*******************************************************************************
\r
2 * Copyright (c) 2012, 2013 Association for Decentralized Information Management in
\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
10 * VTT Technical Research Centre of Finland - initial API and implementation
\r
11 *******************************************************************************/
\r
12 package org.simantics.g3d.csg.wizard;
\r
14 import java.util.Deque;
\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
24 public class CSGBRepExportWizard extends ModelExportWizard<CSGExportModel> {
\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
29 public CSGBRepExportWizard() {
\r
30 setWindowTitle("Export CSG Model to Brep");
\r
31 setNeedsProgressMonitor(true);
\r
35 protected CSGExportModel createExportModel(Deque<String> recentExportPaths) {
\r
36 return new CSGExportModel(recentExportPaths);
\r
40 protected ModelExportWizardPage<CSGExportModel> createExportPage(CSGExportModel exportModel) {
\r
41 return new CSGExportPage(exportModel);
\r
45 protected IRunnableWithProgress createExportRunnable(CSGExportModel exportModel) {
\r
46 return new CSGBrepModelExporter(exportModel);
\r
50 protected String getExportLocationId() {
\r
51 return RECENT_CSG_EXPORT_LOCATIONS;
\r
55 protected String getExportOverwriteId() {
\r
56 return CSG_EXPORT_OVERWRITE;
\r
61 protected IPersistentPreferenceStore getPreferenceStore() {
\r
62 return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID);
\r