Class Index | File Index

Classes


Class orion.util

This class contains static utility methods.
Defined in: </shared/eclipse/e4/orion/I201206221139/plugins/org.eclipse.orion.client.core/web/orion/util.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
This class contains static utility methods.
Method Summary
Method Attributes Method Name and Description
 
followLink(href)
Opens a link in response to some event.
 
getText(node)
Returns the text contained by a DOM node.
 
Determines if the path represents the workspace root
 
Opens a dialog near the given DOM node
 
Returns whether the given event should cause a reference to open in a new window or not.
 
safeText(string)
Escapes HTML in string.
 
splitFile(text)
Split file contents into lines.
Class Detail
orion.util()
This class contains static utility methods. It is not intended to be instantiated.
Method Detail
followLink(href)
Opens a link in response to some event. Whether the link is opened in the same window or a new window depends on the event
Parameters:
{String} href
The link location

{String} getText(node)
Returns the text contained by a DOM node.
Parameters:
{DomNode} node
Returns:
{String} The text contained by node. Note that treatment of whitespace and child nodes is not consistent across browsers.

isAtRoot()
Determines if the path represents the workspace root

openDialog()
Opens a dialog near the given DOM node

openInNewWindow(event)
Returns whether the given event should cause a reference to open in a new window or not.
Parameters:
{Object} event
The key event

{String} safeText(string)
Escapes HTML in string. Use this to sanitize user input that is destined for innerHTML.
Parameters:
{String} string
Returns:
{String} The string with HTML safely escaped.

{Array} splitFile(text)
Split file contents into lines. It also handles the mixed line endings with "\n", "\r" and "\r\n".
Parameters:
{String} text
The file contetns.
Returns:
{Array} Split file lines.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Jun 22 2012 11:43:40 GMT-0400 (EDT)