com.ibm.designer.domino.xsp.api.editor
Class AbstractDesignerHyperlink

java.lang.Object
  extended by com.ibm.designer.domino.xsp.api.editor.AbstractDesignerHyperlink
All Implemented Interfaces:
org.eclipse.jface.text.hyperlink.IHyperlink

public abstract class AbstractDesignerHyperlink
extends java.lang.Object
implements org.eclipse.jface.text.hyperlink.IHyperlink

An abstract IHyperlink class that allows for easy hyperlink integration within the XPages editor. This class may be extended to allow hyperlink navigation for third party tags. Classes who extend this class will need to return an ID for the editor that should be opened when the hyperlink is clicked and also the DesignElement that should be opened in the given editor.


Constructor Summary
AbstractDesignerHyperlink(DesignerProject designerProject, org.eclipse.jface.text.IRegion region, java.lang.String typeLabel, java.lang.String hLinkLabel)
          Constructs a new instance of this class.
 
Method Summary
protected abstract  DesignerDesignElement getDesignElement()
          Returns the DesignElement that is to be opened within the editor (provided by getEditorId()) when the hyperlink is clicked
protected  DesignerProject getDesignerProject()
           
protected abstract  java.lang.String getEditorId()
          Returns the ID of the editor that is to be opened by this hyperlink operation
 org.eclipse.jface.text.IRegion getHyperlinkRegion()
           
 java.lang.String getHyperlinkText()
           
 java.lang.String getTypeLabel()
           
 void open()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDesignerHyperlink

public AbstractDesignerHyperlink(DesignerProject designerProject,
                                 org.eclipse.jface.text.IRegion region,
                                 java.lang.String typeLabel,
                                 java.lang.String hLinkLabel)
Constructs a new instance of this class.

Parameters:
designerProject - the DesignerProject that contains the linked item
region - describes the region of the hyperlink
typeLabel - the hyperlink type text
hLinkLabel - the hyperlink text
Method Detail

getHyperlinkRegion

public org.eclipse.jface.text.IRegion getHyperlinkRegion()
Specified by:
getHyperlinkRegion in interface org.eclipse.jface.text.hyperlink.IHyperlink

getTypeLabel

public java.lang.String getTypeLabel()
Specified by:
getTypeLabel in interface org.eclipse.jface.text.hyperlink.IHyperlink

getHyperlinkText

public java.lang.String getHyperlinkText()
Specified by:
getHyperlinkText in interface org.eclipse.jface.text.hyperlink.IHyperlink

getDesignerProject

protected DesignerProject getDesignerProject()

open

public void open()
Specified by:
open in interface org.eclipse.jface.text.hyperlink.IHyperlink

getEditorId

protected abstract java.lang.String getEditorId()
Returns the ID of the editor that is to be opened by this hyperlink operation

Returns:
the editor ID

getDesignElement

protected abstract DesignerDesignElement getDesignElement()
Returns the DesignElement that is to be opened within the editor (provided by getEditorId()) when the hyperlink is clicked

Returns:
a DesignElement that will be opened by the Hyperlink operation