public abstract class AbstractSchemaExportCommandHandler
extends org.eclipse.core.commands.AbstractHandler
Constructor and Description |
---|
AbstractSchemaExportCommandHandler() |
Modifier and Type | Method and Description |
---|---|
Object |
execute(org.eclipse.core.commands.ExecutionEvent event)
This implementation uses the
getViews(ExecutionEvent)
and openWizard(Collection, ExecutionEvent, Shell) methods to open an export wizard. |
protected abstract GenerationController |
getGenerationController()
Returns the
GenerationController which shall be used to generate the files. |
protected abstract GenerationExporter |
getGenerationExporter()
Returns the
GenerationExporter responsible for creating the files generated by the
GenerationController . |
protected org.eclipse.emf.common.util.URI |
getLocationProposal(org.eclipse.core.commands.ExecutionEvent event)
Returns a proposal for the export location.
|
protected abstract Collection<VView> |
getViews(org.eclipse.core.commands.ExecutionEvent event)
Returns the views which shall be exported.
|
protected void |
handleRuntimeException(RuntimeException e)
Is called if a RuntimeException occurs during execution.
|
protected int |
openWizard(Collection<VView> views,
org.eclipse.core.commands.ExecutionEvent event,
org.eclipse.swt.widgets.Shell shell)
The default implementation opens the
ExportSchemaWizard using the generation handlers returned by
getGenerationController() and getGenerationExporter() . |
addHandlerListener, dispose, fireHandlerChanged, hasListeners, isEnabled, isHandled, removeHandlerListener, setBaseEnabled, setEnabled
public Object execute(org.eclipse.core.commands.ExecutionEvent event) throws org.eclipse.core.commands.ExecutionException
getViews(ExecutionEvent)
and openWizard(Collection, ExecutionEvent, Shell)
methods to open an export wizard.event
- org.eclipse.core.commands.ExecutionException
protected void handleRuntimeException(RuntimeException e) throws org.eclipse.core.commands.ExecutionException
e
- the RuntimeException
.org.eclipse.core.commands.ExecutionException
- Wraps the given RuntimeException and throws it.protected int openWizard(Collection<VView> views, org.eclipse.core.commands.ExecutionEvent event, org.eclipse.swt.widgets.Shell shell)
ExportSchemaWizard
using the generation handlers returned by
getGenerationController()
and getGenerationExporter()
.views
- The views which shall be exported.event
- The ExecutionEvent
which is given by the execute(ExecutionEvent)
method.shell
- The shell for the wizard.WizardDialog
.protected org.eclipse.emf.common.util.URI getLocationProposal(org.eclipse.core.commands.ExecutionEvent event)
event
- The ExecutionEvent
which is given by the execute(ExecutionEvent)
method.null
if no proposal could be determined.protected abstract Collection<VView> getViews(org.eclipse.core.commands.ExecutionEvent event)
event
- The ExecutionEvent
which is given by the execute(ExecutionEvent)
method.protected abstract GenerationController getGenerationController()
GenerationController
which shall be used to generate the files.GenerationController
which shall be used.protected abstract GenerationExporter getGenerationExporter()
GenerationExporter
responsible for creating the files generated by the
GenerationController
.GenerationExporter
which shall be used.Copyright © 2019. All rights reserved.