org.eclipse.datatools.sqltools.routineeditor.ui
Class ProcEditorInput

java.lang.Object
  extended by org.eclipse.datatools.sqltools.sqleditor.SQLEditorStorageEditorInput
      extended by org.eclipse.datatools.sqltools.routineeditor.ui.ProcEditorInput
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, ISQLEditorInput, org.eclipse.ui.IEditorInput, org.eclipse.ui.IPersistable, org.eclipse.ui.IPersistableElement, org.eclipse.ui.IStorageEditorInput

public class ProcEditorInput
extends SQLEditorStorageEditorInput

The editor input object for routine editor.

Author:
Yang Liu

Constructor Summary
ProcEditorInput(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 boolean exists()
          Gets whether the editor input exists.
 java.lang.Object getAdapter(java.lang.Class adapter)
          Gets an object which is an instance of the given class associated with this object.
 java.lang.String getId()
          Returns the unique identifier that distinguishes this editor input
 org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
          Gets the image descriptor for this input.
 java.lang.String getName()
          Gets the name of this editor input for display purposes.
 org.eclipse.ui.IPersistableElement getPersistable()
          Gets an object that can be used to save the state of this editor input.
 org.eclipse.datatools.sqltools.core.ProcIdentifier getProcIdentifier()
           
 java.lang.String getSourceCode()
          Convenience method for ((SQLEditorStorage)getStorage()).getContentsString()
 java.lang.String getToolTipText()
          Gets the tool tip text for this editor input.
 boolean isConnectionRequired()
          Returns whether database connection is required for this editor input to exist.
 boolean isEditable()
          Judges whether this IEditorInput is editable
 void setEditable(boolean isEditable)
          Set isEditable status
 void setSourceCode(java.lang.String code)
          Convenience method for setStorage(new SQLEditorStorage(_procIdentifier.getDisplayString(), code))
 
Methods inherited from class org.eclipse.datatools.sqltools.sqleditor.SQLEditorStorageEditorInput
getConnectionInfo, getFactoryId, getStorage, saveState, setConnectionInfo, setName, setStorage
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcEditorInput

public ProcEditorInput(org.eclipse.datatools.sqltools.core.ProcIdentifier procid)
Method Detail

getProcIdentifier

public org.eclipse.datatools.sqltools.core.ProcIdentifier getProcIdentifier()

isEditable

public boolean isEditable()
Judges whether this IEditorInput is editable

Returns:
_isEditable

setEditable

public void setEditable(boolean isEditable)
Set isEditable status

Parameters:
isEditable -

exists

public boolean exists()
Description copied from class: SQLEditorStorageEditorInput
Gets whether the editor input exists.

Specified by:
exists in interface org.eclipse.ui.IEditorInput
Overrides:
exists in class SQLEditorStorageEditorInput
See Also:
IEditorInput.exists()

getImageDescriptor

public org.eclipse.jface.resource.ImageDescriptor getImageDescriptor()
Description copied from class: SQLEditorStorageEditorInput
Gets the image descriptor for this input.

Specified by:
getImageDescriptor in interface org.eclipse.ui.IEditorInput
Overrides:
getImageDescriptor in class SQLEditorStorageEditorInput
See Also:
IEditorInput.getImageDescriptor()

getName

public java.lang.String getName()
Description copied from class: SQLEditorStorageEditorInput
Gets the name of this editor input for display purposes.

Specified by:
getName in interface org.eclipse.ui.IEditorInput
Overrides:
getName in class SQLEditorStorageEditorInput
See Also:
IEditorInput.getName()

getPersistable

public org.eclipse.ui.IPersistableElement getPersistable()
Description copied from class: SQLEditorStorageEditorInput
Gets an object that can be used to save the state of this editor input.

Specified by:
getPersistable in interface org.eclipse.ui.IEditorInput
Overrides:
getPersistable in class SQLEditorStorageEditorInput
See Also:
IEditorInput.getPersistable()

getToolTipText

public java.lang.String getToolTipText()
Description copied from class: SQLEditorStorageEditorInput
Gets the tool tip text for this editor input.

Specified by:
getToolTipText in interface org.eclipse.ui.IEditorInput
Overrides:
getToolTipText in class SQLEditorStorageEditorInput
See Also:
IEditorInput.getToolTipText()

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Description copied from class: SQLEditorStorageEditorInput
Gets an object which is an instance of the given class associated with this object. Returns null if no such object can be found. This default implementation returns null.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class SQLEditorStorageEditorInput
See Also:
IAdaptable.getAdapter(java.lang.Class)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getSourceCode

public java.lang.String getSourceCode()
Convenience method for ((SQLEditorStorage)getStorage()).getContentsString()

Returns:

setSourceCode

public void setSourceCode(java.lang.String code)
Convenience method for setStorage(new SQLEditorStorage(_procIdentifier.getDisplayString(), code))

Parameters:
code -

isConnectionRequired

public boolean isConnectionRequired()
Description copied from interface: ISQLEditorInput
Returns whether database connection is required for this editor input to exist.

Specified by:
isConnectionRequired in interface ISQLEditorInput
Overrides:
isConnectionRequired in class SQLEditorStorageEditorInput
Returns:

getId

public java.lang.String getId()
Description copied from interface: ISQLEditorInput
Returns the unique identifier that distinguishes this editor input

Specified by:
getId in interface ISQLEditorInput
Overrides:
getId in class SQLEditorStorageEditorInput
Returns:
A string id