|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.dialogs.DialogPage
org.eclipse.jface.wizard.WizardPage
org.eclipse.datatools.connectivity.oda.design.internal.ui.DataSetWizardPageCore
org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage
org.eclipse.emf.oda.ecore.ui.impl.EcoreDataSetWizardPage
public class EcoreDataSetWizardPage
Implementation of an EMF ODA data set designer page for a user to create or edit a data set design instance.
Nested Class Summary | |
---|---|
protected class |
EcoreDataSetWizardPage.TypeLabelProvider
A provider of formatted labels for types. |
protected static class |
EcoreDataSetWizardPage.Variable
Representation of an expression variable. |
protected class |
EcoreDataSetWizardPage.VariableSpecificationDialog
A dialog which prompts the user to specify a name and select a type for an expression variable. |
Field Summary | |
---|---|
protected java.lang.Object[] |
classChoices
|
protected java.lang.Object[] |
classifierChoices
|
protected EClassifier |
contextType
|
protected Text |
contextTypeField
|
protected static java.lang.String |
DEFAULT_MESSAGE
|
protected Combo |
queryDelegateCombo
|
protected Composite |
queryTextViewerComposite
|
protected java.util.Map<java.lang.String,ITextViewer> |
queryTextViewers
|
protected StackLayout |
queryTextViewerStackLayout
|
protected EClassifier |
resultType
|
protected Text |
resultTypeField
|
protected java.util.List<EcoreDataSetWizardPage.Variable> |
variables
|
protected TableViewer |
variablesViewer
|
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider |
---|
ERROR, INFORMATION, NONE, WARNING |
Constructor Summary | |
---|---|
EcoreDataSetWizardPage(java.lang.String pageName)
|
|
EcoreDataSetWizardPage(java.lang.String pageName,
java.lang.String title,
ImageDescriptor titleImage)
|
Method Summary | |
---|---|
protected boolean |
canLeave()
|
protected void |
closeConnection(org.eclipse.datatools.connectivity.oda.IConnection connection)
Attempts to close the given ODA connection. |
protected org.eclipse.datatools.connectivity.oda.design.DataSetDesign |
collectDataSetDesign(org.eclipse.datatools.connectivity.oda.design.DataSetDesign design)
|
protected java.lang.String |
convertTypeToString(EClassifier type)
Converts the specified type to its string representation. |
protected java.util.Map<java.lang.String,EClassifier> |
convertVariablesToMap(java.util.List<EcoreDataSetWizardPage.Variable> variables)
Converts the specified expression variables to a map representation. |
protected java.lang.String |
convertVariablesToString(java.util.List<EcoreDataSetWizardPage.Variable> variables)
Converts the specified expression variables to a string representation. |
protected void |
createContextTypeControl(Composite parent)
Creates control for context type property. |
protected Control |
createPageControl(Composite parent)
Creates custom page control for user-defined queries. |
void |
createPageCustomControl(Composite parent)
|
protected void |
createQueryDelegateControl(Composite parent)
Creates control for query delegate property. |
protected void |
createQueryTextControl(Composite parent)
Creates control for query text. |
protected void |
createResultTypeControl(Composite parent)
Creates control for result type property. |
protected void |
createVariablesControl(Composite parent)
Creates control for expression variables property. |
protected java.lang.Object[] |
getClassChoices()
Returns an array of classes applicable for the data source. |
protected java.lang.Object[] |
getClassifierChoices()
Returns an array of classes and data types applicable for the data source. |
protected EClassifier |
getContextType()
Returns the value of the context type property. |
protected java.lang.String |
getQueryDelegate()
Returns the value of the query delegate property. |
protected java.lang.String |
getQueryText()
Returns the value of the query text. |
protected ITextViewer |
getQueryTextViewer()
|
protected EClassifier |
getResultType()
Returns the value of the result type property. |
protected EClassifier |
getTypeFromString(java.lang.String string)
Retrieves the type corresponding to the specified string representation. |
protected java.util.List<EcoreDataSetWizardPage.Variable> |
getVariables()
Returns the value of the expression variables property. |
protected java.util.List<EcoreDataSetWizardPage.Variable> |
getVariablesFromString(java.lang.String string)
Retrieves the expression variables corresponding to the specified string representation. |
protected boolean |
hasValidData()
Indicates whether the custom page has valid data to proceed with defining a data set. |
protected void |
initializeControl()
Initializes the page control with the last edited data set design. |
protected void |
promptForContextTypeSelection()
Opens a dialog prompting the user to select a context type. |
protected void |
promptForResultTypeSelection()
Opens a dialog prompting the user to select a result type. |
protected void |
savePage(org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign)
Saves the user-defined values in this page, and updates the specified data set design with the latest design definition. |
protected void |
setContextType(EClassifier contextType)
Sets the value of the context type property. |
protected void |
setResultType(EClassifier resultType)
Sets the value of the result type property. |
protected void |
updateDesign(org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign,
org.eclipse.datatools.connectivity.oda.IConnection connection,
java.lang.String queryText)
Updates the given data set design with the proeprties and derived metadata obtained from the ODA runtime connection. |
protected void |
updateParameterDesign(org.eclipse.datatools.connectivity.oda.IParameterMetaData parameterMetaData,
org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign)
Updates the specified data set design's parameter definition based on the specified runtime metadata. |
protected void |
updateResultSetDesign(org.eclipse.datatools.connectivity.oda.IResultSetMetaData resultSetMetaData,
org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign)
Updates the specified data set design's result set definition based on the specified runtime metadata. |
protected void |
validateData()
Validates that the user has specified values for the properties in the page control and sets page message accordingly. |
Methods inherited from class org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage |
---|
cleanup, collectResponseState, createControl, refresh |
Methods inherited from class org.eclipse.datatools.connectivity.oda.design.internal.ui.DataSetWizardPageCore |
---|
dispose, finishDataSetDesign, getEditingDesign, getEditingDesignerState, getEditorContainer, getHostResourceIdentifiers, getIconDescriptor, getIconFilePath, getInitializationDesign, getInitializationDesignerState, getInitializationLocale, getOdaWizard, isSessionEditable, performHelp, setErrorMessage, setHasInitialFocus, setIconFilePath, setMessage, setPagePath, setResponseDesignerState, setResponseSessionStatus |
Methods inherited from class org.eclipse.jface.wizard.WizardPage |
---|
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getNextPage, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setImageDescriptor, setPageComplete, setPreviousPage, setTitle, setWizard, toString |
Methods inherited from class org.eclipse.jface.dialogs.DialogPage |
---|
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, setButtonLayoutData, setControl, setMessage, setVisible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage |
---|
getControl, getDescription, getErrorMessage, getMessage, getTitle, setVisible |
Field Detail |
---|
protected static java.lang.String DEFAULT_MESSAGE
protected Combo queryDelegateCombo
protected java.util.Map<java.lang.String,ITextViewer> queryTextViewers
protected Composite queryTextViewerComposite
protected StackLayout queryTextViewerStackLayout
protected TableViewer variablesViewer
protected java.util.List<EcoreDataSetWizardPage.Variable> variables
protected Text contextTypeField
protected EClassifier contextType
protected Text resultTypeField
protected EClassifier resultType
protected java.lang.Object[] classChoices
protected java.lang.Object[] classifierChoices
Constructor Detail |
---|
public EcoreDataSetWizardPage(java.lang.String pageName)
public EcoreDataSetWizardPage(java.lang.String pageName, java.lang.String title, ImageDescriptor titleImage)
Method Detail |
---|
public void createPageCustomControl(Composite parent)
createPageCustomControl
in class org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage
protected Control createPageControl(Composite parent)
protected void createQueryDelegateControl(Composite parent)
protected void promptForContextTypeSelection()
protected void createContextTypeControl(Composite parent)
protected void createVariablesControl(Composite parent)
protected void createQueryTextControl(Composite parent)
protected void promptForResultTypeSelection()
protected void createResultTypeControl(Composite parent)
protected void initializeControl()
protected java.lang.Object[] getClassChoices()
protected java.lang.Object[] getClassifierChoices()
protected java.lang.String convertTypeToString(EClassifier type)
type
- the type
protected EClassifier getTypeFromString(java.lang.String string)
string
- the string representation
protected java.lang.String convertVariablesToString(java.util.List<EcoreDataSetWizardPage.Variable> variables)
variables
- the expression variables
protected java.util.Map<java.lang.String,EClassifier> convertVariablesToMap(java.util.List<EcoreDataSetWizardPage.Variable> variables)
variables
- the expression variables
protected java.util.List<EcoreDataSetWizardPage.Variable> getVariablesFromString(java.lang.String string)
string
- the string representation
protected java.lang.String getQueryDelegate()
protected java.util.List<EcoreDataSetWizardPage.Variable> getVariables()
protected ITextViewer getQueryTextViewer()
protected java.lang.String getQueryText()
protected EClassifier getContextType()
protected void setContextType(EClassifier contextType)
contextType
- the valueprotected EClassifier getResultType()
protected void setResultType(EClassifier resultType)
resultType
- the valueprotected org.eclipse.datatools.connectivity.oda.design.DataSetDesign collectDataSetDesign(org.eclipse.datatools.connectivity.oda.design.DataSetDesign design)
collectDataSetDesign
in class org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage
protected boolean canLeave()
canLeave
in class org.eclipse.datatools.connectivity.oda.design.ui.wizards.DataSetWizardPage
protected void validateData()
protected boolean hasValidData()
protected void savePage(org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign)
protected void updateDesign(org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign, org.eclipse.datatools.connectivity.oda.IConnection connection, java.lang.String queryText) throws org.eclipse.datatools.connectivity.oda.OdaException
org.eclipse.datatools.connectivity.oda.OdaException
protected void updateResultSetDesign(org.eclipse.datatools.connectivity.oda.IResultSetMetaData resultSetMetaData, org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign) throws org.eclipse.datatools.connectivity.oda.OdaException
resultSetMetaData
- runtime result set metadata instancedataSetDesign
- data set design instance to update
org.eclipse.datatools.connectivity.oda.OdaException
protected void updateParameterDesign(org.eclipse.datatools.connectivity.oda.IParameterMetaData parameterMetaData, org.eclipse.datatools.connectivity.oda.design.DataSetDesign dataSetDesign) throws org.eclipse.datatools.connectivity.oda.OdaException
parameterMetaData
- runtime parameter metadata instancedataSetDesign
- data set design instance to update
org.eclipse.datatools.connectivity.oda.OdaException
protected void closeConnection(org.eclipse.datatools.connectivity.oda.IConnection connection)
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |