com.borland.jbuilder.node
Class HTMLFileNode

java.lang.Object
  |
  +--com.borland.primetime.node.Node
        |
        +--com.borland.primetime.node.UrlNode
              |
              +--com.borland.primetime.node.FileNode
                    |
                    +--com.borland.primetime.node.TextFileNode
                          |
                          +--com.borland.jbuilder.node.HTMLFileNode
All Implemented Interfaces:
java.lang.Comparable, com.borland.jbuilder.node.html.HTMLParserCallBack, WebViewable
Direct Known Subclasses:
JspFileNode

public class HTMLFileNode
extends TextFileNode
implements com.borland.jbuilder.node.html.HTMLParserCallBack, WebViewable

HTMLFileNode instances represent HTML, HTM and ASP files.


Inner classes inherited from class com.borland.jbuilder.node.WebViewable
WebViewable.MaybeServlet
 
Field Summary
static java.lang.String EXTENSION
          The default extension of files represented by this class.
static javax.swing.Icon ICON
          The icon used for html files
 
Fields inherited from class com.borland.primetime.node.Node
EMPTY_ARRAY, nodeListeners
 
Constructor Summary
HTMLFileNode(Project project, Node parent, Url url)
          All FileNode subtypes must expose this constructor signature.
 
Method Summary
 void endHTMLTag(java.lang.String name, boolean needsClose, int line, int col)
          This routine is part of the HTMLParserCallBack and contains no implementation.
 void endText(java.lang.String value)
          This routine is part of the HTMLParserCallBack and contains no implementation.
 javax.swing.Icon getDisplayIcon()
          Return the icon used for this type of file.
 java.lang.Class getEditorKitClass()
          Get the HTMLEditorKit class used by this file node type to customize the editor.
 java.lang.String getEncoding()
          Overridden from TextFileNode because we have to do some special processing for encodings.
 com.borland.jbuilder.node.html.JspCompiledPage getJspCompiledPage()
          Fetches page reference for CodeInsight.
 java.lang.Class getTextStructureClass()
          Get the type of the class that is responsible for filling in the structure pane.
static void initOpenTool(byte majorVersion, byte minorVersion)
          OpenTool initialization.
 boolean isWebViewable()
          Part of the WebViewable interface implementation.
 void parseApplet(java.util.ArrayList attributes, java.util.ArrayList names, java.util.ArrayList values)
          This routine parses an APPLET tag.
 void reportError(java.lang.String msg, int line, int col)
          This routine is part of the HTMLParserCallBack and contains no implementation.
 boolean searchForApplet()
          Returns true if the html has an applet tag used to decide if the run/debug menu items are placed on the context menu for a html file.
 void setJspCompiledPage(com.borland.jbuilder.node.html.JspCompiledPage j)
          Retain page reference for CodeInsight.
 void setWebViewable(boolean isWebViewable)
          Part of the WebViewable interface implementation.
 void startHTMLTag(java.lang.String name, java.util.ArrayList attributes, int line, int col)
          This routine is part of the HTMLParserCallBack and looks for APPLET and PARAM tags.
 void startText(java.lang.String value, int line, int col)
          This routine is part of the HTMLParserCallBack and contains no implementation.
 
Methods inherited from class com.borland.primetime.node.TextFileNode
setCaretPosition
 
Methods inherited from class com.borland.primetime.node.FileNode
check, findBuffer, findFileNodeClass, findFileNodeClass, findFileNodeClass, getBuffer, getDisplayName, getDisplaySequence, getInputStream, getLongDisplayName, getOutputStream, getTimestamp, getUrl, isModified, isNew, isPersistant, isReadOnly, registerFileNodeClass, rename, revert, save, saveAs, setUrl
 
Methods inherited from class com.borland.primetime.node.UrlNode
getSuggestedUrl
 
Methods inherited from class com.borland.primetime.node.Node
addNodeListener, compareTo, dumpNodes, dumpNodes, dumpNodes, equals, fireNodeRenamed, getChildren, getDisplayChildren, getNodeID, getParent, getProject, getProperties, getProperty, getProperty, getProperty, hasChildren, hasDisplayChildren, hashCode, makePersistant, removeNodeListener, setParent, setProperty, setProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
The default extension of files represented by this class.

ICON

public static final javax.swing.Icon ICON
The icon used for html files
Constructor Detail

HTMLFileNode

public HTMLFileNode(Project project,
                    Node parent,
                    Url url)
             throws DuplicateNodeException
All FileNode subtypes must expose this constructor signature.
Parameters:
project - Project (cannot be null) to which this node will be associated.
parent - Immediate parent (may be null) of this node and must be of same Project.
url - The storage available to this node.
Throws:
DuplicateNodeException - if node already registered.
See Also:
Project.getNode(com.borland.primetime.vfs.Url)
Method Detail

initOpenTool

public static void initOpenTool(byte majorVersion,
                                byte minorVersion)
OpenTool initialization. This is the time to register the html and asp extensions as belonging to this type of FileNode.
Parameters:
majorVersion - Major release number for which OpenTool is being initialized.
minorVersion - Minor release number for which OpenTool is being initialized.

setWebViewable

public void setWebViewable(boolean isWebViewable)
Part of the WebViewable interface implementation. Call with true if this node should be viewable in a web browser. By default, this node is not web viewable.
Specified by:
setWebViewable in interface WebViewable
Parameters:
isWebViewable - If true, this node will be viewable in a web browser.

isWebViewable

public boolean isWebViewable()
Part of the WebViewable interface implementation. Is this node viewable in a web browser? By default, this node is not web viewable.
Specified by:
isWebViewable in interface WebViewable
Returns:
true if this node is viewable in a web browser, false otherwise.

getEditorKitClass

public java.lang.Class getEditorKitClass()
Get the HTMLEditorKit class used by this file node type to customize the editor.
Overrides:
getEditorKitClass in class TextFileNode
Returns:
The editor kit to use.

getEncoding

public java.lang.String getEncoding()
Overridden from TextFileNode because we have to do some special processing for encodings.
Overrides:
getEncoding in class TextFileNode
Returns:
The current encoding.

getDisplayIcon

public javax.swing.Icon getDisplayIcon()
Return the icon used for this type of file.
Overrides:
getDisplayIcon in class TextFileNode
Returns:
The icon for this file type.

getTextStructureClass

public java.lang.Class getTextStructureClass()
Get the type of the class that is responsible for filling in the structure pane. This would normally be the HTMLStructure class.
Overrides:
getTextStructureClass in class TextFileNode
Returns:
The type of the class responsible for filling the structure pane.

searchForApplet

public boolean searchForApplet()
Returns true if the html has an applet tag used to decide if the run/debug menu items are placed on the context menu for a html file.
Returns:
true if this file has an applet tag, false otherwise.

parseApplet

public void parseApplet(java.util.ArrayList attributes,
                        java.util.ArrayList names,
                        java.util.ArrayList values)
This routine parses an APPLET tag.
Parameters:
attributes - Where to return PARAM values.
names - Where to return NAMEs.
values - Where to return NAME values.

startHTMLTag

public void startHTMLTag(java.lang.String name,
                         java.util.ArrayList attributes,
                         int line,
                         int col)
This routine is part of the HTMLParserCallBack and looks for APPLET and PARAM tags.
Specified by:
startHTMLTag in interface com.borland.jbuilder.node.html.HTMLParserCallBack
Parameters:
name - Name of the tag.
attributes - Attributes inside the tag.
line - Line where this tag appears.
row - Row where this tag appears.

endHTMLTag

public void endHTMLTag(java.lang.String name,
                       boolean needsClose,
                       int line,
                       int col)
This routine is part of the HTMLParserCallBack and contains no implementation.
Specified by:
endHTMLTag in interface com.borland.jbuilder.node.html.HTMLParserCallBack

startText

public void startText(java.lang.String value,
                      int line,
                      int col)
This routine is part of the HTMLParserCallBack and contains no implementation.
Specified by:
startText in interface com.borland.jbuilder.node.html.HTMLParserCallBack

endText

public void endText(java.lang.String value)
This routine is part of the HTMLParserCallBack and contains no implementation.
Specified by:
endText in interface com.borland.jbuilder.node.html.HTMLParserCallBack

reportError

public void reportError(java.lang.String msg,
                        int line,
                        int col)
This routine is part of the HTMLParserCallBack and contains no implementation.
Specified by:
reportError in interface com.borland.jbuilder.node.html.HTMLParserCallBack

setJspCompiledPage

public void setJspCompiledPage(com.borland.jbuilder.node.html.JspCompiledPage j)
Retain page reference for CodeInsight.
Parameters:
j - A JspCompilerPage to retain.

getJspCompiledPage

public com.borland.jbuilder.node.html.JspCompiledPage getJspCompiledPage()
Fetches page reference for CodeInsight.
Returns:
Returns JspCompilerPage provided by corresponding setter.