public abstract class GenerateController extends TransferController
Modifier and Type | Field and Description |
---|---|
static int |
GENERATE_CMD_ID
Deprecated.
use
GENERATE_CMD instead |
UPDATE_FROM_ACTION_PERFORMED, UPDATE_FROM_ACTIVE_VIEW_CHANGED, UPDATE_FROM_UNDO, UPDATE_FROM_USER_EXTENSION, UPDATE_FROM_VIEW_SELECTION_CHANGED
Modifier | Constructor and Description |
---|---|
protected |
GenerateController() |
Modifier and Type | Method and Description |
---|---|
void |
cancel(ApplyEvent event) |
protected boolean |
canGenerate(Context context)
Called just before generation to give subclasses an opportunity to
bail out.
|
void |
checkCommit(ApplyEvent event) |
protected TransferDescriptor |
createDescriptor(java.lang.String qname,
java.lang.Class<? extends TransferTarget> target,
Context context)
Creates a new TransferDescriptor.
|
IdeAction |
createGenerateAction(java.lang.String connName,
java.lang.String qualifiedName) |
IdeAction |
createGenerateAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info) |
protected IdeAction |
createGenerateDBAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info) |
static javax.swing.JMenu |
createGenerateMenu(ContextMenu cm,
java.lang.String name,
GenerateController controller)
Creates a submenu for the given ContextMenu for all the registered generate
options.
|
int |
getCommandId()
Gets the id for the command this Controller is controlling.
|
protected java.lang.Class<? extends oracle.ideimpl.db.transfer.ProviderTransferTarget> |
getDBTarget()
Gets the ProviderTransferTarget implementation class to use for any
connection transfer target (i.e.
|
protected abstract java.lang.String |
getDefaultConnection(Context context)
Returns the default connection (if there is one) to use for the given
Context.
|
static IdeAction |
getGenerateAction()
The Generate Action is the IdeAction that bring up the full Generate
Wizard.
|
static IdeAction |
getGenerateOMBAction()
The Generate Action is the IdeAction that bring up the full Generate
Wizard.
|
static IdeAction |
getGenerateSQLAction() |
static IdeAction |
getGenerateSXMLAction()
Get the IDE Action for generating SXML objects
|
protected java.lang.String |
getSourceType(Context context)
Gets the type of the source provider from the given context.
|
protected java.lang.String |
getTitle(TransferDescriptor td) |
protected java.awt.Image |
getWizardLogo() |
boolean |
handleEvent(IdeAction action,
Context context)
This method is called when a user interaction with a
View
triggers the execution of a command. |
void |
invokeWizard(TransferDescriptor td,
Context context)
Invokes the appropriate wizard for the given descriptor and context.
|
protected boolean |
isGenerateEnabled(Context context)
Checks whether the generate action should be enabled because this
controller can handle the event for the given context.
|
void |
rollback(ApplyEvent event) |
protected abstract void |
setDescriptorObjects(TransferDescriptor desc,
Context context)
Given the Context sets the objects to be generated on the
TransferDescriptor.
|
protected void |
setupDescriptor(TransferDescriptor td,
Context context)
Sets up the TransferDescriptor ready for transfer.
|
boolean |
update(IdeAction action,
Context context)
Enables the generate action (
getGenerateAction() ) if there is
a provider source available in the given Context. |
createNamespace, doTransfer, getSourceIdentifier, getWizardCommitListener, getWizardTitle, invokeFullWizard
@Deprecated public static final int GENERATE_CMD_ID
GENERATE_CMD
insteadpublic int getCommandId()
getCommandId
in class TransferController
public boolean update(IdeAction action, Context context)
getGenerateAction()
) if there is
a provider source available in the given Context.action
- action whose command is to be executed.context
- the current contextprotected boolean isGenerateEnabled(Context context)
protected boolean canGenerate(Context context)
isGenerateEnabled(oracle.ide.Context)
context
- public boolean handleEvent(IdeAction action, Context context)
Controller
View
triggers the execution of a command.action
- action whose command is to be executed.public void invokeWizard(TransferDescriptor td, Context context)
TransferController.invokeFullWizard(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
GenerateTargetRegistry
- TransferController.doTransfer(oracle.ide.db.transfer.TransferDescriptor)
invokeTargettedWizard(oracle.ide.db.transfer.TransferDescriptor, java.util.List<oracle.ide.wizard.Step>, oracle.ide.Context)
td
- the TransferDescriptor for the transfercontext
- the current IDE Contextprotected java.awt.Image getWizardLogo()
getWizardLogo
in class oracle.ideimpl.db.transfer.AbstractTransferController
protected java.lang.String getSourceType(Context context)
protected final java.lang.Class<? extends oracle.ideimpl.db.transfer.ProviderTransferTarget> getDBTarget()
protected TransferDescriptor createDescriptor(java.lang.String qname, java.lang.Class<? extends TransferTarget> target, Context context)
qname
- qualified connection name (if no transfer target class)target
- transfer target to use in the descriptorcontext
- current contextsetupDescriptor(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
,
setDescriptorObjects(oracle.ide.db.transfer.TransferDescriptor, oracle.ide.Context)
protected void setupDescriptor(TransferDescriptor td, Context context)
protected abstract void setDescriptorObjects(TransferDescriptor desc, Context context)
protected java.lang.String getTitle(TransferDescriptor td)
getTitle
in class TransferController
protected abstract java.lang.String getDefaultConnection(Context context)
public void cancel(ApplyEvent event)
public void checkCommit(ApplyEvent event) throws TraversalException
TraversalException
public void rollback(ApplyEvent event)
public IdeAction createGenerateAction(java.lang.String connName, java.lang.String qualifiedName)
public IdeAction createGenerateAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info)
protected IdeAction createGenerateDBAction(oracle.ideimpl.db.transfer.extension.TransferHook.TransferTargetInfo info)
public static javax.swing.JMenu createGenerateMenu(ContextMenu cm, java.lang.String name, GenerateController controller)
cm
- context menu to create the submenu for (cannot be null).name
- the name of the new submenu option, if null "Generate To" is
usedcontroller
- the controller to use for the menu items (cannot be
null).public static final IdeAction getGenerateAction()
public static final IdeAction getGenerateOMBAction()
public static final IdeAction getGenerateSXMLAction()
public static IdeAction getGenerateSQLAction()