Class GenerateJavaCodeAction
- java.lang.Object
-
- org.eclipse.emfforms.internal.editor.genmodel.toolbaractions.GenerateJavaCodeAction
-
- All Implemented Interfaces:
IToolbarAction
- Direct Known Subclasses:
GenerateEcoreEditorJavaCodeAction
public class GenerateJavaCodeAction extends java.lang.Object implements IToolbarAction
The ToolbarAction allowing the User to generate Java code for the currently visible Genmodel.- Author:
- Clemens Elflein
-
-
Constructor Summary
Constructors Constructor Description GenerateJavaCodeAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExecute(java.lang.Object object)
org.eclipse.jface.action.Action
getAction(java.lang.Object currentObject, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Returns the action to add to the toolbar.protected org.eclipse.emf.codegen.ecore.genmodel.GenModel
getGenModel(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Returns the firstGenModel
object found in the first of the givenResourceSet
.
-
-
-
Method Detail
-
getAction
public org.eclipse.jface.action.Action getAction(java.lang.Object currentObject, org.eclipse.jface.viewers.ISelectionProvider selectionProvider)
Description copied from interface:IToolbarAction
Returns the action to add to the toolbar.- Specified by:
getAction
in interfaceIToolbarAction
- Parameters:
currentObject
- the currently edited object of the editorselectionProvider
- the selection provider- Returns:
- the action
-
getGenModel
protected org.eclipse.emf.codegen.ecore.genmodel.GenModel getGenModel(org.eclipse.emf.ecore.resource.ResourceSet resourceSet)
Returns the firstGenModel
object found in the first of the givenResourceSet
.- Parameters:
resourceSet
- theResourceSet
to check- Returns:
- the
GenModel
ornull
if none was found
-
canExecute
public boolean canExecute(java.lang.Object object)
- Specified by:
canExecute
in interfaceIToolbarAction
- Parameters:
object
- the currently edited object of the editor- Returns:
- true, if the Action can be executed for the provided input
-
-