Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- Object
- orion
- orion.breadcrumbs.BreadCrumbs
- orion.commands.Command
- orion.commands.CommandService
- orion.compare.DiffProvider
- orion.compare.rulers.CompareOverviewRuler
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compareUtils
- orion.contentAssist.CssContentAssistProvider
- orion.dialogs.DialogService
- orion.editor.AbstractStyler
- orion.editor.ContentAssist
- orion.editor.Editor
- orion.editor.HtmlGrammar
- orion.editor.JavaScriptContentAssistProvider
- orion.editor.TextMateStyler
- orion.explorer-table.FileExplorer
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.SelectionRenderer
- orion.favorites.Favorites
- orion.favorites.FavoritesService
- orion.fileClient.FileClient
- orion.fileCommands
- orion.git.GitClonesExplorer
- orion.git.GitClonesModel
- orion.git.GitCommitNavigator
- orion.git.GitService
- orion.globalCommands
- orion.log.LogService
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.searchClient.Searcher
- orion.searchResults.SearchResultsGenerator
- orion.selection.Selection
- orion.serviceregistry.EventTarget
- orion.serviceregistry.Service
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.status.StatusReportingService
- orion.textview.ContextMenuEvent
- orion.textview.DestroyEvent
- orion.textview.KeyBinding
- orion.textview.LineStyleEvent
- orion.textview.ModelChangedEvent
- orion.textview.ModelChangingEvent
- orion.textview.ModifyEvent
- orion.textview.Ruler
- orion.textview.ScrollEvent
- orion.textview.Selection
- orion.textview.SelectionEvent
- orion.textview.Style
- orion.textview.StyleRange
- orion.textview.TextModel
- orion.textview.TextView
- orion.textview.UndoStack
- orion.textview.VerifyEvent
- orion.treetable.TableTree
- orion.util
- orion.widgets.DirectoryTreeModel
- String

# Class orion.util

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

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.util() 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.
| hashFromPosition(filePath, start, end, line, offset, length) Construct a URL hash that represents the given file path at the given position, with the specified selection range.
| 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.
| safeText(string) Escapes HTML in string.
| setUsername(username) Sets the current user name

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.

hashFromPosition(filePath, start, end, line, offset, length)
Construct a URL hash that represents the given file path at the given position, with the specified selection range.

Parameters:
{String} filePath
  path of the file on the server
{Number} start
  starting position within the content of the file
{Number} end
  ending position of selection within the content of the file
{Number} line
  line number within the content of the file, used only when no start is specified
{Number} offset
  offset within the line number, used only when line is specified
{Number} length
  length of the selection, used to compute the ending point from a start or line offset

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.

setUsername(username)
Sets the current user name

Parameters:
{String} username
  The user name

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jun 27 2011 02:03:41 GMT-0400 (EDT)