/******************************************************************************* * 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.Deque; import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.jface.operation.IRunnableWithProgress; import org.eclipse.jface.preference.IPersistentPreferenceStore; import org.eclipse.ui.preferences.ScopedPreferenceStore; import org.simantics.g3d.csg.Activator; import org.simantics.g3d.wizard.ModelExportWizard; import org.simantics.g3d.wizard.ModelExportWizardPage; public class CSGBRepExportWizard extends ModelExportWizard { public static final String RECENT_CSG_EXPORT_LOCATIONS = "RECENT_CSG_EXPORT_LOCATIONS"; public static final String CSG_EXPORT_OVERWRITE = "CSG_EXPORT_OVERWRITE"; public CSGBRepExportWizard() { setWindowTitle("Export CSG Model to Brep"); setNeedsProgressMonitor(true); } @Override protected CSGExportModel createExportModel(Deque recentExportPaths) { return new CSGExportModel(recentExportPaths); } @Override protected ModelExportWizardPage createExportPage(CSGExportModel exportModel) { return new CSGExportPage(exportModel); } @Override protected IRunnableWithProgress createExportRunnable(CSGExportModel exportModel) { return new CSGBrepModelExporter(exportModel); } @Override protected String getExportLocationId() { return RECENT_CSG_EXPORT_LOCATIONS; } @Override protected String getExportOverwriteId() { return CSG_EXPORT_OVERWRITE; } @Override protected IPersistentPreferenceStore getPreferenceStore() { return new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID); } }