com.aptana.ide.editor.js.contentassist
Class JSInformationPresenter

java.lang.Object
  extended by org.eclipse.jface.text.AbstractInformationControlManager
      extended by com.aptana.ide.editor.js.contentassist.JSInformationPresenter
All Implemented Interfaces:
org.eclipse.jface.text.information.IInformationPresenter, org.eclipse.jface.text.information.IInformationPresenterExtension, org.eclipse.jface.text.IWidgetTokenKeeper, org.eclipse.jface.text.IWidgetTokenKeeperExtension

public class JSInformationPresenter
extends org.eclipse.jface.text.AbstractInformationControlManager
implements org.eclipse.jface.text.information.IInformationPresenter, org.eclipse.jface.text.information.IInformationPresenterExtension, org.eclipse.jface.text.IWidgetTokenKeeper, org.eclipse.jface.text.IWidgetTokenKeeperExtension

Author:
Paul Colton

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.text.AbstractInformationControlManager
org.eclipse.jface.text.AbstractInformationControlManager.Anchor, org.eclipse.jface.text.AbstractInformationControlManager.IInformationControlCloser
 
Field Summary
static int WIDGET_PRIORITY
          Priority of the info controls managed by this information presenter.
 
Fields inherited from class org.eclipse.jface.text.AbstractInformationControlManager
ANCHOR_BOTTOM, ANCHOR_GLOBAL, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP, fDisposed, fInformationControl, fInformationControlCloser, fInformationControlCreator, STORE_LOCATION_X, STORE_LOCATION_Y, STORE_SIZE_HEIGHT, STORE_SIZE_WIDTH
 
Constructor Summary
JSInformationPresenter(org.eclipse.jface.text.IInformationControlCreator creator)
          Creates a new information presenter that uses the given information control creator.
 
Method Summary
protected  void computeInformation()
           
 java.lang.String getDocumentPartitioning()
           
 org.eclipse.jface.text.information.IInformationProvider getInformationProvider(java.lang.String contentType)
           
protected  void handleInformationControlDisposed()
           
protected  void hideInformationControl()
           
 void install(org.eclipse.jface.text.ITextViewer textViewer)
           
 boolean requestWidgetToken(org.eclipse.jface.text.IWidgetTokenOwner owner)
           
 boolean requestWidgetToken(org.eclipse.jface.text.IWidgetTokenOwner owner, int priority)
           
 void setDocumentPartitioning(java.lang.String partitioning)
          Sets the document partitioning to be used by this information presenter.
 boolean setFocus(org.eclipse.jface.text.IWidgetTokenOwner owner)
           
 void setInformationProvider(org.eclipse.jface.text.information.IInformationProvider provider, java.lang.String contentType)
          Registers a given information provider for a particular content type.
 void setOffset(int offset)
          Sets a offset to override the selection.
protected  void showInformationControl(org.eclipse.swt.graphics.Rectangle subjectArea)
           
 void uninstall()
           
 
Methods inherited from class org.eclipse.jface.text.AbstractInformationControlManager
computeAvailableArea, computeInformationControlLocation, computeLocation, computeSizeConstraints, computeSizeConstraints, dispose, disposeInformationControl, doShowInformation, getInformationControl, getNextFallbackAnchor, getSubjectArea, getSubjectControl, handleSubjectControlDisposed, install, isEnabled, presentInformation, restoreInformationControlBounds, setAnchor, setCloser, setCustomInformationControlCreator, setEnabled, setFallbackAnchors, setInformation, setInformation, setMargins, setRestoreInformationControlBounds, setSizeConstraints, showInformation, storeInformationControlBounds, takesFocusWhenVisible, updateLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.text.information.IInformationPresenter
showInformation
 

Field Detail

WIDGET_PRIORITY

public static final int WIDGET_PRIORITY
Priority of the info controls managed by this information presenter. Default value: 5.

Since:
3.0
See Also:
Constant Field Values
Constructor Detail

JSInformationPresenter

public JSInformationPresenter(org.eclipse.jface.text.IInformationControlCreator creator)
Creates a new information presenter that uses the given information control creator. The presenter is not installed on any text viewer yet. By default, an information control closer is set that closes the information control in the event of key strokes, resizing, moves, focus changes, mouse clicks, and disposal - all of those applied to the information control's parent control. Also, the setup ensures that the information control when made visible will request the focus. By default, the default document partitioning IDocumentExtension3.DEFAULT_PARTITIONING is used.

Parameters:
creator - the information control creator to be used
Method Detail

setDocumentPartitioning

public void setDocumentPartitioning(java.lang.String partitioning)
Sets the document partitioning to be used by this information presenter.

Parameters:
partitioning - the document partitioning to be used by this information presenter
Since:
3.0

getDocumentPartitioning

public java.lang.String getDocumentPartitioning()
Specified by:
getDocumentPartitioning in interface org.eclipse.jface.text.information.IInformationPresenterExtension
Since:
3.0
See Also:
IInformationPresenterExtension.getDocumentPartitioning()

setInformationProvider

public void setInformationProvider(org.eclipse.jface.text.information.IInformationProvider provider,
                                   java.lang.String contentType)
Registers a given information provider for a particular content type. If there is already a provider registered for this type, the new provider is registered instead of the old one.

Parameters:
provider - the information provider to register, or null to remove an existing one
contentType - the content type under which to register

getInformationProvider

public org.eclipse.jface.text.information.IInformationProvider getInformationProvider(java.lang.String contentType)
Specified by:
getInformationProvider in interface org.eclipse.jface.text.information.IInformationPresenter
See Also:
IInformationPresenter.getInformationProvider(String)

setOffset

public void setOffset(int offset)
Sets a offset to override the selection. Setting the value to -1 will disable overriding.

Parameters:
offset - the offset to override selection or -1

computeInformation

protected void computeInformation()
Specified by:
computeInformation in class org.eclipse.jface.text.AbstractInformationControlManager
See Also:
AbstractInformationControlManager.computeInformation()

install

public void install(org.eclipse.jface.text.ITextViewer textViewer)
Specified by:
install in interface org.eclipse.jface.text.information.IInformationPresenter
See Also:
IInformationPresenter.install(ITextViewer)

uninstall

public void uninstall()
Specified by:
uninstall in interface org.eclipse.jface.text.information.IInformationPresenter
See Also:
IInformationPresenter.uninstall()

showInformationControl

protected void showInformationControl(org.eclipse.swt.graphics.Rectangle subjectArea)
Overrides:
showInformationControl in class org.eclipse.jface.text.AbstractInformationControlManager
See Also:
AbstractInformationControlManager.showInformationControl(Rectangle)

hideInformationControl

protected void hideInformationControl()
Overrides:
hideInformationControl in class org.eclipse.jface.text.AbstractInformationControlManager
See Also:
AbstractInformationControlManager.hideInformationControl()

handleInformationControlDisposed

protected void handleInformationControlDisposed()
Overrides:
handleInformationControlDisposed in class org.eclipse.jface.text.AbstractInformationControlManager
See Also:
AbstractInformationControlManager.handleInformationControlDisposed()

requestWidgetToken

public boolean requestWidgetToken(org.eclipse.jface.text.IWidgetTokenOwner owner)
Specified by:
requestWidgetToken in interface org.eclipse.jface.text.IWidgetTokenKeeper
See Also:
IWidgetTokenKeeper.requestWidgetToken(IWidgetTokenOwner)

requestWidgetToken

public boolean requestWidgetToken(org.eclipse.jface.text.IWidgetTokenOwner owner,
                                  int priority)
Specified by:
requestWidgetToken in interface org.eclipse.jface.text.IWidgetTokenKeeperExtension
Since:
3.0
See Also:
IWidgetTokenKeeperExtension.requestWidgetToken(org.eclipse.jface.text.IWidgetTokenOwner, int)

setFocus

public boolean setFocus(org.eclipse.jface.text.IWidgetTokenOwner owner)
Specified by:
setFocus in interface org.eclipse.jface.text.IWidgetTokenKeeperExtension
Since:
3.0
See Also:
IWidgetTokenKeeperExtension.setFocus(org.eclipse.jface.text.IWidgetTokenOwner)