|
From: jistrawn <jis...@us...> - 2006-10-30 15:16:17
|
Update of /cvsroot/modelwizard/source/Model Wizard Plugin/src/net/sourceforge/modelWizard/wizards In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22838/src/net/sourceforge/modelWizard/wizards Modified Files: ModelExtractWizard.java Log Message: reformatted Index: ModelExtractWizard.java =================================================================== RCS file: /cvsroot/modelwizard/source/Model Wizard Plugin/src/net/sourceforge/modelWizard/wizards/ModelExtractWizard.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ModelExtractWizard.java 24 Oct 2006 23:13:00 -0000 1.4 --- ModelExtractWizard.java 30 Oct 2006 15:16:08 -0000 1.5 *************** *** 43,54 **** public class ModelExtractWizard extends Wizard { ! IStructuredSelection selection; ModelExtractWizardPage2 page2; private Iterator classes; public ModelExtractWizard(IContainer container, Iterator iterator) { super(); ! if (ModelAccess.INSTANCE.getNumberOfModelExporters()==0) { MessageBox mb = new MessageBox(new Shell(Display.getDefault()), SWT.ICON_INFORMATION | SWT.OK); mb.setMessage("There are no exporters configured for the current Model."); --- 43,56 ---- public class ModelExtractWizard extends Wizard { ! IStructuredSelection selection; + ModelExtractWizardPage2 page2; + private Iterator classes; public ModelExtractWizard(IContainer container, Iterator iterator) { super(); ! if (ModelAccess.INSTANCE.getNumberOfModelExporters() == 0) { MessageBox mb = new MessageBox(new Shell(Display.getDefault()), SWT.ICON_INFORMATION | SWT.OK); mb.setMessage("There are no exporters configured for the current Model."); *************** *** 70,81 **** public boolean performFinish() { ! IRunnableWithProgress op = new ExportOperation(page2.getFilePath(), page2.getModelAccessKey(), page2.getParameters(), classes, getContainer()); try { ! getContainer().run(false,true,op); } catch (InvocationTargetException e) { ! ExceptionDetailsDialog dialog = new ExceptionDetailsDialog( ! new Shell(Display.getDefault()), ! "Encountered error during export.", ! null, null, e); dialog.open(); ModelWizardPlugin.logError(e); --- 72,82 ---- public boolean performFinish() { ! IRunnableWithProgress op = new ExportOperation(page2.getFilePath(), page2.getModelAccessKey(), ! page2.getParameters(), classes, getContainer()); try { ! getContainer().run(false, true, op); } catch (InvocationTargetException e) { ! ExceptionDetailsDialog dialog = new ExceptionDetailsDialog(new Shell(Display.getDefault()), ! "Encountered error during export.", null, null, e); dialog.open(); ModelWizardPlugin.logError(e); *************** *** 87,100 **** } ! class ExportOperation extends WorkspaceModifyOperation{ private Map parameters; private IPath filePath; private IModelExporter exporter; private IModel model; private Iterator classes; IRunnableContext runnableContext; ! ! public ExportOperation(IPath path, int modelAccessKey, Map parameters, Iterator classes, IRunnableContext runnableContext) { super(); this.parameters = parameters; --- 88,107 ---- } ! class ExportOperation extends WorkspaceModifyOperation { private Map parameters; + private IPath filePath; + private IModelExporter exporter; + private IModel model; + private Iterator classes; + IRunnableContext runnableContext; ! ! public ExportOperation(IPath path, int modelAccessKey, Map parameters, ! Iterator classes, IRunnableContext runnableContext) { super(); this.parameters = parameters; *************** *** 103,117 **** this.runnableContext = runnableContext; exporter = ModelAccess.INSTANCE.getModelExporter(modelAccessKey); ! model = ModelAccess.INSTANCE.getCurrentModel(); } protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ! exporter.exportModel(model,classes,parameters,filePath,monitor,runnableContext); } catch (ModelTransformationException e) { throw new InvocationTargetException(e); } } ! } } --- 110,124 ---- this.runnableContext = runnableContext; exporter = ModelAccess.INSTANCE.getModelExporter(modelAccessKey); ! model = ModelAccess.INSTANCE.getCurrentModel(); } protected void execute(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { try { ! exporter.exportModel(model, classes, parameters, filePath, monitor, runnableContext); } catch (ModelTransformationException e) { throw new InvocationTargetException(e); } } ! } } |