Namespace eclipse.util
eclipse.util holds stateless utility methods.
Defined in: </shared/eclipse/e4/orion/I201106101640/plugins/org.eclipse.orion.client.core/web/orion/util.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Utility methods
|
Method Attributes | Method Name and Description |
---|---|
<static> |
eclipse.util.followLink(href, event)
|
<static> |
eclipse.util.getPositionInfo(fileString)
|
<static> |
eclipse.util.getText(node)
|
<static> |
eclipse.util.getUserKeyString(binding)
|
<static> |
eclipse.util.getUserText(id, refNode, shouldHideRefNode, initialText, onComplete, onEditDestroy, promptMessage, selectTo)
|
<static> |
eclipse.util.hashFromPosition(path, starting, ending, line, offset, length)
Construct a URL hash that represents the given file path at the given position,
with the specified selection range.
|
<static> |
eclipse.util.isAtRoot(path)
Determines if the path represents the workspace root
|
<static> |
eclipse.util.makeFullPath(location)
|
<static> |
eclipse.util.makeRelative(location)
|
<static> |
eclipse.util.openDialog(dialog, refNode)
|
<static> |
eclipse.util.openInNewWindow(event)
|
<static> |
eclipse.util.processNavigatorParent(parent, children)
|
<static> |
eclipse.util.rememberSuccessfulTraversal(item, registry)
|
<static> |
eclipse.util.safeText(string)
Escapes HTML in string.
|
<static> |
eclipse.util.setText(node, text)
Removes all children of node and replaces them with a single text node containing text.
|
<static> |
eclipse.util.setUserName(userName)
|
Method Detail
<static>
eclipse.util.followLink(href, event)
- Parameters:
- href
- event
<static>
eclipse.util.getPositionInfo(fileString)
- Parameters:
- fileString
<static>
{String}
eclipse.util.getText(node)
- Parameters:
- {DomNode} node
- Returns:
- {String} The text contained by node. Note that treatment of whitespace and child nodes is not consistent across browsers.
<static>
eclipse.util.getUserKeyString(binding)
- Parameters:
- binding
<static>
eclipse.util.getUserText(id, refNode, shouldHideRefNode, initialText, onComplete, onEditDestroy, promptMessage, selectTo)
- Parameters:
- id
- refNode
- shouldHideRefNode
- initialText
- onComplete
- onEditDestroy
- promptMessage
- selectTo
<static>
eclipse.util.hashFromPosition(path, starting, ending, line, offset, length)
Construct a URL hash that represents the given file path at the given position,
with the specified selection range.
- Parameters:
- {String} path
- of the file on the server
- {Number} starting
- position within the content of the file
- {Number} ending
- position of selection within the content of the file
- {Number} line
- number within the content of the file, used only when no start is specified
- {Number} offset
- within the line number, used only when line is specified
- {Number} length
- of the selection, used to compute the ending point from a start or line offset
<static>
eclipse.util.isAtRoot(path)
Determines if the path represents the workspace root
- Parameters:
- path
<static>
eclipse.util.makeFullPath(location)
- Parameters:
- location
<static>
eclipse.util.makeRelative(location)
- Parameters:
- location
<static>
eclipse.util.openDialog(dialog, refNode)
- Parameters:
- dialog
- refNode
<static>
eclipse.util.openInNewWindow(event)
- Parameters:
- event
<static>
eclipse.util.processNavigatorParent(parent, children)
- Parameters:
- parent
- children
<static>
eclipse.util.rememberSuccessfulTraversal(item, registry)
- Parameters:
- item
- registry
<static>
{String}
eclipse.util.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.
<static>
eclipse.util.setText(node, text)
Removes all children of node and replaces them with a single text node containing text.
HTML is safely escaped.
- Parameters:
- {DomNode} node
- {String} text
<static>
eclipse.util.setUserName(userName)
- Parameters:
- userName