| Store | Cart

ActiveState Docs

Komodo 5.0 Documentation

Loading...

ko

Classes

class objectTimer

Constructor

objectTimer(instance, func, args)

Class variables

args - args


func - func


instance - instance


interval - window.setInterval()


running - Boolean


timeout - window.setTimeout()


timer - Number


Class functions

free()

monitor()

startInterval(timer)

startTimeout(timer)

stop(timer)

stopInterval()

stopTimeout()


ko.abbrev

Functions

expandAbbrev(abbrev, lang, sublang)

Expands the abbreviation, if any, at the current cursor position.

Arguments

abbrev - String

Optional. The abbreviation to expand. If not given, then the current selection or word before the cursor is used.

lang - String

The language name to scope the search. Optional.

sublang - String

The sub-language name top scope the search. Optional.

Returns - Boolean


findAbbrevSnippet(abbrev, lang, sublang)

Find a snippet for the given abbreviation name. Abbreviations used for snippets are looked for in "Abbreviations" groups in these places: 1. the current project (if any) 2. the toolbox 3. the shared toolbox (if any) And for these languages: A. the current buffer sub-lang (for multi-lang files) B. the current buffer lang (if different than A) C. the "General" lang (i.e. not language-specific)

Arguments

abbrev - String

The abbreviation name.

lang - String

The language name to scope the search. Optional. If not given, then the language of the current view is used. Specify "General" to *not* search for a lang-specific abbreviation.

sublang - String

The sub-language name top scope the search. This can be relevant for multi-language files (e.g. HTML can have HTML and JavaScript and CSS). Optional. If not given, then the sub-lang of the current cursor position in the current view is used. Specify "General" to *not* search for a sub-lang-specific abbreviation.

Returns - Components.interfaces.koIPart_snippet


insertAbbrevSnippet(snippet, view)

Insert an abbreviation snippet into a buffer.

Arguments

snippet - Components.interfaces.koIPart_snippet

The snippet part to insert. You can use `ko.abbrev.findAbbrevSnippet()` to get one.

view - Components.interfaces.koIView

The buffer view in which to insert the snippet. Optional. If not specified then the current view is used.


ko.browse

Functions

about()

show our about dialog XXX DEPRECATE, this should be dialog.about or ko.about


aspnMailingList(topic)

show mailing list archives on ASPN that are related to the topic

Arguments

topic - String


browseTag(tag)

browse to a predefined url on activestate.com see tag2uri in ko.browse


localHelp(app)

show the url defined in "localHelpFile" in an instance of koIAppInfoEx

Arguments

app - String

the app identifier from the CID of a koIAppInfoEx implementation (eg. @activestate.com/koAppInfoEx?app=Perl)


openUrlInDefaultBrowser(url, browser)

open the given url or complain appropriately

Arguments

url - String

browser - String

optional, retreived from prefs if not used


showCommandIds()

show a list of command id's in the browser


showKeybindings()

show a list of keybindings in the browser


updateHelpLanguagesPopup()

Hide or show the local help entries in the Help->Languages popup depending on whether an actual help file to launch can be found.


webHelp(app)

show the url defined in "webHelpURL" in an instance of koIAppInfoEx

Arguments

app - String

the app identifier from the CID of a koIAppInfoEx implementation (eg. @activestate.com/koAppInfoEx?app=Perl)


ko.commands

Functions

doCode(cmdId, code)

doCodeAsync(cmdId, code)

doCommand(command)

Returns - rc


doCommandAsync(command, event)
Arguments

event - Event

Returns - Boolean


setCommandEnabled(id, node, supported, enabled)
Arguments

node - top.document.getElementById()


updateCommand(command, commandNode, controller)
Arguments

controller - _getControllerForCommand()

Returns - found


updateCommandset(commandset)

ko.dbg

Variables

bpManager


controller - DebuggerItemsController


listener - _listener


manager


tabManager


Functions

doCommand(command, event)
Arguments

event - Event

Returns - Boolean


getDefaultInteractiveShellLanguage()

Returns - String


haveInteractiveShellExecutable(language)

Returns - languageService.getLanguageService().executablePath


status()

tabInit()

tabSelect()

Classes

class bpInit

Constructor

bpInit()

Class variables

bpManager - BreakpointsTabManager



class onload

Constructor

onload()

Class variables

manager - DBG_Manager



ko.dbg.breakpoints

Variables

manager


Functions

deleteAll()

Returns - Boolean


deleteAllInURI(uri)

Returns - Boolean


newBreakpoint()

newSpawnpoint()

properties(bp)

toggleState(view, line)

Classes

class init

Constructor

init()

Class variables

manager - Components.interfaces.koIDBGPBreakpointManager



ko.dbg.invocation

Variables

_log - ko.logging.getLogger()


INVOKE_BUILD - Components.interfaces.koIInvocation.INVOKE_BUILD


INVOKE_DEBUG - Components.interfaces.koIInvocation.INVOKE_DEBUG


INVOKE_INTERACTIVE - Components.interfaces.koIInvocation.INVOKE_INTERACTIVE


INVOKE_RUN - Components.interfaces.koIInvocation.INVOKE_RUN


log


Functions

_showInvalidInterpreterAlert(invocation, session, error_text)

doExecute(session, invoke_type, new_debugger_state)

Returns - rc


doStart(initial_step_type, invoke_type, session)
Arguments

invoke_type - ko.dbg.invocation.INVOKE_DEBUG

session - ko.dbg.manager.newSession()


getInteractiveInvocation(session)

Returns - this.showInvocationDialog()


getInvocation(session)
Arguments

session - ko.dbg.manager.newSession()

Returns - this.showInvocationDialog()


getStoredInvocation(prefs, scriptData)

Returns - Array


interactiveShell(language, event)
Arguments

language - gPrefs.getStringPref()

event - Event

Returns - ret


makeDefaultInvocation(prefs, scriptData)

Returns - Array


makeInvocation(prefs, scriptData)

Returns - invocation


runScript()

Returns - this.doStart()


showInvocationDialog(invocation, session, prefs, scriptData)
Arguments

invocation - resp.invocation

Returns - invocation


test()

toggleInteractiveShell()

Returns - Boolean


ko.dialogs

Variables

alert - parent.opener.ko.dialogs.alert


yesNo - parent.opener.ko.dialogs.yesNo


yesNo()


Functions

alert(prompt, text, title, doNotAskPref, options)
Arguments

options - String


authenticate(title, message, loginname, allowAnonymous, allowPersist)

Returns - ko.dialogs.authenticate2()


authenticate2(prompt, server, username, allowAnonymous, title, login)

Returns - Object


customButtons(prompt, buttons, response, text, title, doNotAskPref, style)
Arguments

style - String

Returns - obj.response


editEnvVar(name, value, title, mruName, interpolateValues)
Arguments

mruName - String

interpolateValues - Boolean


handleEnterKey()

internalError(error, text, exception)

okCancel(prompt, response, text, title, doNotAskPref, helpTopic)

Returns - obj.response


pickIcon()

pickPreview(url, language, mode)
Arguments

mode - String

Returns - Object


progress(processor, prompt, title, is_cancellable, cancel_warning, modal)
Arguments

is_cancellable - Boolean

modal - Boolean


prompt(prompt, label, value, title, mruName, validator, multiline, screenX, screenY, tacType, tacParam, tacShowCommentColumn, selectionStart, selectionEnd)

prompt2(prompt, label1, value1, label2, value2, title, mruName1, mruName2, validator, multiline1, multiline2, screenX, screenY)

selectFromList(title, prompt, items, selectionCondition, stringifier, doNotAskPref, yesNoCancel, buttonNames)
Arguments

selectionCondition - String

yesNoCancel - Boolean


yesNo(prompt, response, text, title, doNotAskPref, helpTopic)

Returns - obj.response


yesNoCancel(prompt, response, text, title, doNotAskPref, style, helpTopic)
Arguments

response - String

style - String

Returns - obj.response


ko.dragDrop

Functions

unpackData(flavourData, ret)

ko.dragDrop.dragObserver

Variables

canHandleMultipleItems - Boolean


Functions

canDrop(event, session)
Arguments

event - Event

Returns - Boolean


doDragOverEvent(event)
Arguments

event - Event


doDropEvent(event)
Arguments

event - Event


focusWindow()

getSupportedFlavours()

Returns - flavours


onDragOver(event, flavour, session)
Arguments

event - Event

Returns - Boolean


onDrop(event, transferDataSet, dragSession)
Arguments

event - Event


ko.eggs

Functions

boing()

ko.filepicker

Functions

browseForDir(textbox)

A dialog to pick a directory, and put the directory path into a XUL textbox.

Arguments

textbox - Element


browseForRemoteDir(textbox)

A dialog to pick a remote directory and put the path into a XUL textbox.

Arguments

textbox - Element


getFolder(defaultDirectory, prompt)

Pick a directory/folder.

Returns - String


openExeFile(defaultDirectory, defaultFilename, title)

Pick an executable file for open.

Arguments

defaultDirectory - ko.uriparse.dirName()

title - String

Returns - String


openFile(defaultDirectory, defaultFilename, title, defaultFilterName, filterNames)

Pick a file for open.

Arguments

defaultDirectory - ko.uriparse.dirName()

title - String

Returns - String


openFiles(defaultDirectory, defaultFilename, title, defaultFilterName, filterNames)

Pick multiple files for open.

Arguments

defaultDirectory - ko.uriparse.dirName()

title - String

Returns - Array


openRemoteFiles(defaultUrl, defaultFilename, defaultFilterName, filterNames)

Open remote file(s) Same parameters meanings as "filepicker_remoteFileBrowser" (above) Returns nothing. Note: The files will be opened through this function call


remoteFileBrowser(defaultUrl, defaultFilename, mode, title, defaultFilterName, filterNames, helpTag)

Browse for remote file(s)

Arguments

defaultUrl - currentView.document.file.URI

defaultFilename - String

mode - Components.interfaces.nsIFilePicker.modeOpen

title - String

defaultFilterName - Array

filterNames - Array

helpTag - String

Returns - Object


saveAsRemoteFiles(defaultUrl, defaultFilename, defaultFilterName, filterNames)

Choose remote filename to save as Same parameters meanings as "filepicker_remoteFileBrowser" (above) Returns the remote url of the selected file, or null if the dialog is cancelled.


saveFile(defaultDirectory, defaultFilename, title, defaultFilterName, filterNames)

Pick a file for save.

Arguments

defaultDirectory - ko.uriparse.dirName()

title - String

Returns - String


ko.fileutils

Functions

showDiffs(fname1, fname2)
Arguments

fname1 - fname1.replace()

fname2 - fname2.replace()


ko.formatters

Functions

formatView(view, formatSelection)

Format this view. If there is a selection in this view or the formatSelection argument is true, then the formatter will work upon the view's selection, else the formatter works on the complete document. The targetted text will be replaced if the formatting is successful.

Arguments

view - Components.interfaces.koIScintillaView

(Optional) The view to format. Defaults to the currentview.

formatSelection - Boolean

(Optional) Force the formater to work on a selection of the view.


formatViewSelectionUsingConfigUuid(uuid)

Format the current view with the formatter configuration that has the provided UUID. This is required for the formatter menu(item)'s.

Arguments

uuid - String

The unique identifier of the configuration prefset.


formatViewUsingConfig(view, config, formatSelection)

Format the given view (defaults to the current view when not supplied) with the formatter configuration provided. If there is a selection in this view then the formatter will work upon the view's selection, else the formatter works on the complete document. The targetted text will be replaced if the formatting is successful.

Arguments

view - Components.interfaces.koIScintillaView

The view to format. Defaults to the current view if null.

config - Components.interfaces.koIPreferenceSet

The formatter configuration prefset to use for formatting.

formatSelection - Boolean

(Optional) Force the formater to work on a selection of the view.


formatViewUsingConfigName(view, configName)

Format the given view (defaults to the currentView when not supplied) with the formatter configuration that has the supplied config name. If there is a selection in this view then the formatter will work upon the view's selection, else the formatter works on the complete document. The targetted text will be replaced if the formatting is successful.

Arguments

view - Components.interfaces.koIScintillaView

The view to format. Defaults to the current view if null.

configName - String

The name of the formatter configuration to use for formatting.


getAllFormatterConfigurationsForPrefset(prefset)

Return a list of all formatter configuration preferences.

Returns - Array


getFormatterConfigurationsForLangAndPrefset(lang, prefset)

Return a list of formatter configuration preferences that are setup for the given language.

Returns - Array


getFormatterConfigurationsForView(view)

Return a list of formatter configuration preferences that are setup for the current view's language and prefset.

Arguments

view - ko.views.manager.currentView

Returns - Array


loadFormatterMenusForCurrentView(menupopup, event)

Populate the provided menupopup element with the available formatters for the current view.

Arguments

event - Event


ko.help

Functions

alternate()

alternate uses the alternate help preference


DEPRECATED_getTag(tag)

getTag old help open method, DEPRECATED

Returns - tag


DEPRECATED_openTag(tag)

openTag old help open method, DEPRECATED


language()

language open language specific help for the current buffer.


open(page)

open open Komodo help window

Arguments

page - String

a page tag as defined in toc.xml


tutorialProject(tutorial)

tutorialProject used by the help system to open KPF files associated with a tutorial

Arguments

tutorial - String

name of tutorial to open


tutorials(tutorial)

tutorials Open the Tutorial in the help browser "tutorial" can optionally be used to specify a particular tutorial to start with. Currently valid values are "perl", "python", "php", "xslt", and null (to go to Tutorial home page).

Arguments

tutorial - String

name of tutorial to open


ko.inputBuffer

Input buffering When you need to capture user input while a slow XUL window is loading you can use the input buffer. Usage: - in some JS code: ko.inputBuffer.start() // open XUL window - in slow XUL window onload handler: var contents = ko.inputBuffer.finish(); // use the contents somehow

Variables

id - String


Functions

finish()

Returns - contents


focus(event)
Arguments

event - Event


start()

ko.interpolate

Utility methods to easily use the KoIInterpolationService from JavaScript. Basically you can use the ko.interpolate.interpolate() method to iterpolation special '%'-escape codes in a given list of strings. See koInterpolationService.py (or play around with "run commands") for an authoritative description of available escape codes. How to interpolate a couple of strings (mystringa, mystringb). You can do as many strings as you want. var imystringa = null; var imystringb = null; try { var istrings = ko.interpolate.interpolate( <ref-to-komodo.xul>, [mystringa, mystringb], // codes are not bracketed [mystringc, mystringd], // codes are bracketed <optional-query-title>); imystringaForUse = istrings[0]; imystringaForDisplay = istrings[1]; imystringbForUse = istrings[2]; imystringbForDisplay = istrings[3]; imystringcForUse = istrings[4]; imystringcForDisplay = istrings[5]; imystringdForUse = istrings[6]; imystringcForDisplay = istrings[7]; } catch (ex) { var errno = lastErrorSvc.getLastErrorCode(); if (errno == Components.results.NS_ERROR_ABORT) { // Command was cancelled. } else if (errno == Components.results.NS_ERROR_INVALID_ARG) { var errmsg = lastErrorSvc.getLastErrorMessage(); alert("Could not interpolate:" + errmsg); } else { log.error(ex); alert("There was an unexpected error: " + ex); } }

Functions

activeProjectPath()

Returns - projectFile


currentFilePath()

Returns - String


currentFileProjectPath()

Returns - projectFile


getBlockOffsets(s, bracketed)

Return a list of start and end offsets of interpolation code blocks into the given strings "s".

Returns - offsets


getViewData(editor, viewData)

A utility function to retrieving specific view data required by Interpolate_interpolate(). "editor" is a reference to the komodo.xul window. "viewData" (optional) is a object possibly containing overriding values for some of the view data.

Arguments

viewData - Object

Returns - viewData


getWordUnderCursor(scimoz)

Return the current word from the current scimoz character position.

Arguments

scimoz - Components.interfaces.ISciMoz

(Optional) The scimoz editor to retireive the word from.

Returns - String


interpolate(editor, strings, bracketedStrings, queryTitle, viewData)

Interpolate '%'-escape codes in the given list(s) of strings. "editor" is a reference the komodo.xul window. "strings" is a list of raw strings to interpolate. "bracketedStrings" is a list of raw strings to interpolate, using the bracketed form "queryTitle" (optional) is a title for the possible query dialog raised during interpolation. "viewData" (optional) allows one to override specific view data used for interpolation. By default view data is retrieved from the current view. This may not always be appropriate. It may be an object with one or more of the following attributes: "fileName" is the filename of the current file (null, if N/A); "lineNum" is the current line number (0, if N/A); "word" is the current word under cursor (null if none); "selection" is the current selection (null if none). On success, this function returns a *double* list of interpolated strings: For each string in "strings" and "bracketedStrings" two strings are returned. The first is the interpolated string for use and the second for *display*. In most cases these are the same but they may differ, for example, if a password query response was interpolated into the string which should not be displayed in the Komodo UI. Otherwise an exception is raised and an error set on the last error service: koILastError errno reason ----------------------- ----------------------------------------- NS_ERROR_ABORT User cancelled the query dialog. NS_ERROR_INVALID_ARG A normal interpolation failure because of invalid interp code usage.

Arguments

viewData - ko.interpolate.getViewData()

Returns - istrings


interpolateStrings(s, bracketed, queryTitle)
Arguments

bracketed - Boolean

queryTitle - String

Returns - istring


isWordCharacter(ch)

ko.isearch

Variables

controller - ISController


ko.keybindings

Variables

keylabel2keysequence - keylabel2keysequence


keysequence2keylabel - keysequence2keylabel


Functions

onload()

Classes

class manager

Constructor

manager()

Class variables

_commandParams - Object


_configDirty - Boolean


_configKeyTree - cloneObject()


_configUnsaved - Boolean


_keyPressCaptureWindow - window


_knownconfigs - Array


activeCommands - Object


command2key - Object


commanditems - Array


commandnames - Array


constructor


currentConfiguration - gPrefSvc.prefs.getStringPref()


currentPrefixMap - this.keyTree


currentPrefixString - String


currentScheme - this.keybindingSchemeService.getScheme()


document - document


inPrefixCapture - Boolean


key2command - Object


keybindingSchemeService


keyDownLabels


keynames - Array


keyTree - Object


lastcategory - String


prefset - gPrefSvc.prefs


rownum - Number


Class functions

_addRow(category, desc, keys)
Arguments

desc - desc.replace()

Returns - String


_clearActiveBindings()

_configKnown(newconfigname)

Returns - Boolean


_getKeyTreeRoot(keysequence)

Returns - root


_saveKnownConfigs()

_usedbys(root, remainingsequence, sofarsequence, usedbys)
Arguments

root - commandMatch


applyCurrentConfiguration()

assignKey(commandId, keysequence, parameter)

cancelPrefix(why)

clearBinding(commandId, commandParam, restore)

clearBindings()

clearSequence(commandId, keylabel, restore)

clearUsedBys(commandId, keysequence)

command2keylabel(commandId)

Returns - keysequence2keylabel()


command2keysequences(commandId, commandParam)

Returns - seqs


commandId2desc(commandname, param, label)

Returns - commanddesc


commandId2parameter(commandname, label)

Returns - String


commandId2shortdesc(commandname, param)

Returns - commanddesc


commandId2tabledesc(commandname, param)

Returns - commanddesc


configurationWriteable(configname)

Returns - scheme.writeable


deleteConfiguration(configname, prefset)

evalCommand(event, commandname, keylabel)
Arguments

event - Event

Returns - Boolean


event2keylabel(event, useShift)
Arguments

event - Event

useShift - Boolean

Returns - data.join()


eventBindings(event)
Arguments

event - Event

Returns - possible


finalize(part, topic, partId)

getConfigurations()

Returns - this._knownconfigs


getKey(keyname)
Arguments

keyname - keyname.slice()


keypressHandler(event)
Arguments

event - Event


learnParameter(commandId, parameter, keylabel)

loadConfiguration(configName, forceReload)
Arguments

forceReload - Boolean


makeCommandIdTable()

Returns - String


makeCurrentKeyBindingTable()

Returns - String


makeDirty()

makeKeyActive(commandId, keysequence)

makeNewConfiguration(newconfigname, prefset)

Returns - newconfigname


mergeSchemeConfiguration(configName, forceReload)
Arguments

forceReload - Boolean


observe(part, topic, partId)

offerToSave()

parseConfiguration(data, forceReload, ignoreCommandPrefix)

Parse the keybinding configuration file data into commands. Acitivate the keybinding commands.

Arguments

forceReload - Boolean


parseGlobalData()

removeCommandsWithPrefix(prefix)

removeListener()

revertToPref(configname)

saveAndApply(prefset)

saveCurrentConfiguration()

setKeyBinding(keysequence, commandId, commandKey)

Returns - key


startPrefixCapture()

stashIn(vessel, keylabel)

switchConfiguration(newconfigname)

Returns - Boolean


unsetKey(keylabel)

unsetKeyBinding(commandId)

usedBy(sequence)

Returns - usedbys


walk_and_apply(root, keysequence)


ko.launch

Functions

checkForUpdates()

Opens the update manager and checks for updates to the application. From http://plow/source/xref/mozilla/1.8/browser/base/content/utilityOverlay.js#452


diff(diff, title, message)

diff open the diff dialog, you must provide the diff

Arguments

diff - String

title - String

message - String

Returns - ko.windowManager.openDialog()


find(pattern)

Open the Find dialog.

Arguments

pattern - String

The pattern to search for.

Returns - ko.windowManager.openDialog()


findInCollection(collection, pattern)

Open the find dialog for searching in a "collection" find context.

Arguments

collection - koICollectionFindContext

defines in what to search.

pattern - String

is the pattern to search for. Optional.

Returns - ko.windowManager.openDialog()


findInCurrProject(pattern)

Open Find dialog to search in the current project.

Arguments

pattern - String

Returns - ko.windowManager.openDialog()


findInFiles(pattern, dirs, includes, excludes)

Open Find dialog to search in files.

Arguments

pattern - String

dirs - String

includes - Array

excludes - Array

Returns - ko.windowManager.openDialog()


httpInspector()

httpInspector open the HTTPInspector window

Returns - ko.windowManager.openOrFocusDialog()


newWindow(uri)

newWindowFromWorkspace(workspaceIndex)

openAddonsMgr()

openAddonsMgr open the extension/add ons manager window

Returns - ko.windowManager.openOrFocusDialog()


replace(pattern, repl)

Open the Find/Replace dialog.

Arguments

pattern - String

The pattern to search for.

repl - String

The replacement pattern.

Returns - ko.windowManager.openDialog()


replaceInCollection(collection, pattern, repl)

Open the find dialog to find & replace in a "collection" of files.

Arguments

collection - koICollectionFindContext

defines in what to search.

pattern - String

The pattern to search for.

repl - String

The replacement pattern.

Returns - ko.windowManager.openDialog()


replaceInCurrProject(pattern, repl)

Open Find dialog to find & replace in the current project.

Arguments

pattern - String

The pattern to search for.

repl - String

The replacement pattern.

Returns - ko.windowManager.openDialog()


replaceInFiles(pattern, repl, dirs, includes, excludes)

Open Find dialog to make replacements in files.

Arguments

pattern - String

repl - String

dirs - String

includes - Array

excludes - Array

Returns - ko.windowManager.openDialog()


runCommand()

runCommand open the run command dialog

Returns - window.openDialog()


rxToolkit(mode, regex, replacement, searchText, matchCase, isModal, flagMultiline)

Open the rx toolkit.

Arguments

mode - String

One of "match", "match-all", "split", "replace", "replace-all" or null for the default (match-all).

regex - String

The regular expression pattern, or null for the default (the last regex).

replacement - String

searchText - String

matchCase - Boolean

Whether to set the "I" match option.

isModal - Boolean

Whether to open the Rx dialog modally (default is false.

flagMultiline - Boolean

Whether to set the "M" match option.

Returns - args


watchLocalFile()

watchLocalFile prompt for a file to watch, then open a new watch window


ko.launch.find2_dialog_args

Variables

collection - collection


cwd - cwd


dirs - dirs


excludes - excludes


includes - includes


mode - String


pattern - pattern


repl - repl


ko.lint

Variables

_lintDisplayer - Components.interfaces.koILintDisplayer


_lintSvc - Components.interfaces.koILintService


Functions

clearResults()

doClick(event)
Arguments

event - Event


doRequest()

jumpToNextLintResult()

Classes

class lintBuffer

Constructor

lintBuffer(view)

Class variables

_lastRequestId - Number


_lintTimer - objectTimer


constructor


errorString - request.errorString


lintingEnabled - this.view.prefs.getBooleanPref()


lintResults - request.results


view - view


Class functions

_cancelDelayedRequest()

_clearResults()

_createLintRequest(linterType)

_getLinterCID()

_issueRequest()

_notify()

destructor()

observe(subject, topic, data)

QueryInterface(iid)

Returns - this


reportResults(request)

request(reason)
Arguments

reason - String



ko.logging

Variables

dumpDOM - dumpDOM


getObjectTree - getObjectTree


getStack - getStack


loggingSvc - Components.interfaces.koILoggingService


Functions

_repeatStr(str, aCount)

Returns - res


dumpEvent(event)
Arguments

event - Event


dumpObject(o, name)

dumpObjectTree(o, recurse, compress, level)

dumpStack()

dumpView(view)

getLogger(logger_name)

Returns - this.getLoggingMgr().getLogger()


getLoggingMgr()

Returns - _gLoggingMgr


LoggingMgr()

strObject(o, name)
Arguments

name - String

Returns - s


Classes

class Logger

Constructor

Logger(logger, logger_name)

Class variables

_logger - logger


_logger_name - logger_name


constructor


Class functions

critical(message)

debug(message)

deprecated(message)

Log a deprecation warning message. This will also log the stack trace to show where the deprecated code was being called from. Note: This is not a core Python logging function, it's just used from JavaScript code to warn about Komodo JavaScript API deprecations.

Arguments

message - String

The deprecation warning message.


error(message)

exception(e, message)
Arguments

message - String


getEffectiveLevel()

Returns - this._logger.getEffectiveLevel()


info(message)

setLevel(level)

warn(message)


ko.logging.LoggerMap

ko.macros

Variables

current - _partSvc.runningMacro


eventHandler - MacroEventHandler


recorder - MacroRecorder


Functions

evalAsJavaScript(__code, part, __observer_arguments)

Returns - Boolean


recordPartInvocation(part)

ko.main

Functions

_onClose(event)

Window "close" event handler to close the Komodo window and, if it is the last one, quit. This is called when the application's "x" close button is pressed. It is NOT called when quitting Komodo via "File -> Exit", "Cmd+Q", or equivalent.

Arguments

event - Event


_onDOMWindowClose(event)

Window "DOMWindowClose" event sent when the window is about to be closed by `window.close()`. For Komodo shutdown this is called when a window is closed via toolkit's `goQuitApplication()`, but NOT when closed via the application window's "x" close button. http://developer.mozilla.org/en/docs/Gecko-Specific_DOM_Events#DOMWindowClose http://mxr.mozilla.org/mozilla1.8/source/dom/src/base/nsGlobalWindow.cpp#4737 ... DispatchCustomEvent("DOMWindowClose") ...

Arguments

event - Event


addCanCloseHandler(handler, object)

addWillCloseHandler(handler, object)

addWillCloseHandler Register a routine to be called when a Komodo window is closed. To register a simple routine do this: ko.main.addWillCloseHandler(<routine>) To register an object method do this: ko.main.addWillCloseHandler(this.<method>, this);


quitApplication()

runCanCloseHandlers()

Returns - Boolean


runWillCloseHandlers()

ko.main.window

Functions

onload(event)
Arguments

event - Event


tryToClose()

Returns - res


ko.markers

Variables

MARKERS_MASK_SYMBOLS - Number


MARKNUM_BOOKMARK - Number


MARKNUM_BREAKPOINT_DISABLED - Number


MARKNUM_BREAKPOINT_ENABLED - Number


MARKNUM_CURRENT_LINE_BACKGROUND - Number


MARKNUM_DEBUG_CURRENT_LINE - Number


MARKNUM_INTERACTIVE_PROMPT - Number


MARKNUM_INTERACTIVE_PROMPT_MORE - Number


MARKNUM_SPAWNPOINT_DISABLED - Number


MARKNUM_SPAWNPOINT_ENABLED - Number


MARKNUM_STDERR - Number


MARKNUM_STDIN_PROMPT - Number


MARKNUM_STDOUT - Number


MARKNUM_TRANSIENTMARK - Number


Functions

getPixmap(uri, force)

Read a file from disk, cache and return the contents.

Arguments

uri - String

file uri

force - Boolean

force read from file Note: The file contents are cached by URI. This is used to load pixmaps for scintilla markers.

Returns - content_cache[uri]


setup(scimoz)

Setup the standard Komodo markers in the given SciMoz instance and return an appropriate mask for ISciMoz.setMarginMaskN(<n>, <mask>).

Arguments

scimoz - iSciMoz

scimoz plugin instsance

Returns - ko.markers.MARKERS_MASK_SYMBOLS


ko.mozhacks

Functions

pluginContextMenu()

pluginContextMenu Verified still necessary with moz 1.8 branch - SMC For some reason popups over the plugin are messed up until the first context menu over mozilla is activated. It is apparently due to popupNode not being initialized, so we do that here. See: http://www.xulplanet.com/references/elemref/ref_popup.html


ko.mru

Functions

add(prefName, entry, caseSensitive)

addFromACTextbox(widget)

addURL(prefName, url)

del(prefName, index, notify)
Arguments

notify - Boolean


finalize()

get(prefName, index)
Arguments

index - Number

Returns - retval


getAll(prefName, maxLength)
Arguments

maxLength - Math.max()

Returns - retval


initialize()

maxEntries(listPrefName)

Returns - maxEntries


reset(prefName)

ko.open

The open namespace contains functionality to open buffers in komodo

Functions

displayPath(displayPath, viewType, callback)

Open the given path in Komodo. If you need the view for the file that is opened from this call, pass in a callback function argument and then this function will be called after the view is opened (or re-focused if it was already open).

Arguments

displayPath - String

identifies the path to open. Display path may be the display path of an already open (and possibly untitled) document.

viewType - String

optional default "editor", the type of view to create for the openned path. It is ignored if the displayPath indicates an already open view.

callback - Function

optional, to be called when the asynchronous load is complete. This will only be called if this opens or switches to an editor view, e.g. this won't be called for a kpf file. The view will be passed as an argument to the function.


filePicker(viewType)

open a file picker, and open the files that the user selects

Arguments

viewType - String


multipleURIs(urls, viewType)
Arguments

urls - urls.concat()


startPage()

Open Komodo's Start Page - the view will be opened synchronously.


templatePicker(viewType)

open a file picker, and open the templates that the user selects. This allows editing the templates, it is not for creating new files from templates.

Arguments

viewType - String


URI(uri, viewType, skipRecentOpenFeature, callback)

Asynchronously open the URI in a new Komodo tab, if the file is already open then this existing tab becomes the currently focused tab. If you need the view for the file that is opened from this call, pass in a callback function argument and then this function will be called after the view is opened (or re-focused if it was already open).

Arguments

uri - String

the path or URI to open

viewType - String

optional default "editor" type of view component to use. Values can be [ "editor", "browser", "diff" ].

skipRecentOpenFeature - Boolean

optional default false, can be used when the URI to open is a project file to specify that the feature to open files in that project should not be offered.

callback - Function

optional, to be called when the asynchronous load is complete. This will only be called if this opens or switches to an editor view, e.g. this won't be called for a kpf file. The view will be passed as an argument to the function.


ko.printing

Functions

browserPrint()

browserPrintPreview()

browserPrintPreviewEnter()

browserPrintPreviewExit()

print(view, preview, tofile, selectionOnly)
Arguments

tofile - Boolean

selectionOnly - Boolean

Returns - Boolean


printPreview(view, preview, tofile, selectionOnly)

ko.projects

Variables

active - _activeView

The active view is the last project view to have received focus. It does not mean that the view currently has focus.


BaseManager - BaseManager


extensionManager - projectExtensionManager


manager - projectManager


managers - Array


Functions

_detabify(s, tabWidth)

Returns - s_new


_stripLeadingWS(text, tabWidth, baseIndentation)

Returns - fixedLines.join()


addCommand(item)
Arguments

item - ko.projects.active.getSelectedItem()


addDirectoryShortcut(dirname, parent)
Arguments

parent - ko.projects.active.manager.getCurrentProject()


addFile(parent_item)

Returns - Boolean


addFileWithURL(url, parent)
Arguments

parent - ko.projects.active.getSelectedItem()


addFolder(name, parent)

Returns - this.addSimplePart()


addItem(item, parent)

addLiveFolder(dirname, parent)

addMacro(parent)

addMenu(parent)

addMenuFromPart(part)

addNewFileFromTemplate(parent)

addNewPart(type, partviewerId)

addRemoteFile(item)

Returns - Boolean


addSimplePart(name, parent, type)

Returns - ko.projects.addItem()


addSnippet(parent)
Arguments

parent - ko.projects.active.getSelectedItem()


addSnippetFromText(snippettext, parent)
Arguments

parent - ko.projects.active.manager.getCurrentProject()

Returns - snippet


addTemplate(parent)
Arguments

parent - ko.projects.active.getSelectedItem()


addToolbar(parent)

addToolbarFromPart(part)

addURL(parent)

addURLFromText(URLtext, parent)
Arguments

parent - ko.projects.active.manager.getCurrentProject()


commandProperties(item)

ensureAddMenu(popup)

executeMacro(part, async, observer_arguments)
Arguments

async - part.getBooleanAttribute()

Returns - Boolean


executeMacroById(id, asynchronous)

Returns - Boolean


exportItems(items)

exportPackageItems(items)

fileProperties(item, view, folder)
Arguments

view - ko.views.manager.getViewForURI()

folder - Boolean

Returns - Boolean


findItemsByURL(url)

Returns - items


findPart(type, name, where, part)

findPart find a part in the toolboxes and/or a specifid part's project

Arguments

type - String

name - String

where - String

one of "container", "toolbox", "shared toolbox", "toolboxes" or "*" where "*" means "current part project, toolbox, shared toolbox"

part - koIPart

defaults to the running macro if available

Returns - koIPart


findPartById(id)

Given a ID, look in the projects and toolboxes until you find the first part with that id (the id allocation scheme guarantees there will be at most one) and return it. Return null on failure to find such a part.

Returns - gPartSvc.getPartById()


findPartsByURL(url)

Returns - parts


getDefaultDirectory(parent)
Arguments

parent - parent.parent


getFocusedProjectView()

does the active view have real focus, if so, return it, otherwise null.


getManagerForItem(item)

Returns - ko.projects.active.manager


handle_parts_reload()

hasURL(url)

Returns - Boolean


importFromFileSystem(part, baseURL)

Returns - Boolean


importFromPackage(part, filename)
Arguments

filename - ko.filepicker.openFile()


invalidateItem(item)

invokePart(part)

Given a koIPart, invoke it (do it's "double-click" action) through whatever code path is appropriate for that part -- i.e. snippets get inserted, commands get run, etc.


invokePartById(id)

Given the ID of a part, find it and invoke it.


isToolbarRememberedAsHidden(id)

Returns - Boolean


macroProperties(item)

menuProperties(item, rank)

onload()

open(url, skipRecentOpenFeature)
Arguments

skipRecentOpenFeature - Boolean


openDirectoryShortcut(part)

partAcceptsMenuToolbar(part)
Arguments

part - part.parent

Returns - Boolean


refreshStatus(items)
Arguments

items - pview.getSelectedItems()


registerExtension(ext)

reimportFromFileSystem(part)

Returns - Boolean


removeImportedVirtualFilesAndFolders(part)

Recursively removes virtual files and folders, but does not remove any folders that have been added manually or parts that are not files or folders (i.e. snippets, macros, etc...). This function will also remove any manually added files, that were not added as part of the import process, because there is not way to tell manually added files and imported files apart.


removeItemsByURL(url, skipDialog)

Returns - items


removeItemsByURLList(urls, skipDialog)

removeToolbarForPart(part)

runCommand(cmdPart)

saveProjectAs(project)

Returns - Boolean


snippetInsert(snippet)

snippetInsertImpl(snippet, view)
Arguments

view - ko.views.manager.currentView

Returns - enteredUndoableTabstop


snippetProperties(item)

toggleToolbarHiddenStateInPref(id)

updateToolbarForPart(part)

URLProperties(item)

ko.run

Functions

buildRecentCommandsMenu(popupWidget)

canClose()

Prepare to close Komodo. Return false if cannot yet close Komodo. If there are processes still running then must wait for or kill them.

Returns - Boolean


registerProcess(command, process)

Keep a list of processes spawned by the RunCommand system. This is necessary to ensure that there are no hangs when Komodo closes because some process is still running. Before closing Komodo all process must be terminated.


runCommand(editor, command, cwd, env, insertOutput, operateOnSelection, doNotOpenOutputWindow, runIn, parseOutput, parseRegex, showParsedOutputList, name, clearOutputWindow, terminationCallback, saveInMRU, saveInMacro, viewData)

Run the given command.

Arguments

parseOutput - Boolean

parseRegex - String

showParsedOutputList - Boolean

clearOutputWindow - Boolean

saveInMRU - Boolean

saveInMacro - Boolean

Returns - Boolean


runEncodedCommand(editor, encodedCommand, terminationCallback)

Run an "encoded" command. An encoded command is a string that describes the command and possibly a number of optional arguments. The encoding is defined by koIRunService.Decode().

Returns - Boolean


unregisterZombieProcess()

Remove any processes that have terminated from the list.


ko.run.output

The interface for using the run output window (where run command output goes to, in the bottom pane of the Komodo workspace). Expected usage: - Someone calls ko.run.output.initialize() at startup and ko.run.output.finalize() at shutdown. - When a command is to be run in the output window do this: * announce intention to start session ko.run.output.startSession(...); *... setup and start running the actual command calling * ko.run.output.getTerminal() and ko.run.output.show() as needed ko.run.output.setProcessHandle(p); * to allow user to kill process *... setup ko.run.output.endSession() to be run when the process * terminates.

Functions

endSession(retval)

Complete a terminal session. The command exited with the given value.


finalize()

getTerminal()

Returns - _gTerminalHandler


initialize()

kill(retval)

Kill the process currently running in the output window's terminal, if any.


scintillaOnClick(event)
Arguments

event - Event


setProcessHandle(process)

Pass a koIRunProcess reference to the output window so it can manipulate the process that is being run in its terminal, if necessary.


show(editor, showParsedOutputList)

Show the command output window. "editor" is the XUL window holding the command output window. "showParseOutputList" is a boolean indicating whether to show the tree parsed output list.


startSession(command, parseOutput, parseRegex, cwd, filename, clearContent)

Start a terminal session in the output window with the given command. This raises an exception if the run output window is currently busy. "command" is the command being run (note that this is the command string *for display* which might be slight different -- passwords obscured -- than the actual command) "parseOutput" is a boolean indicating whether to parse output lines "parseRegex" is the regular expression to use to parse output lines "cwd" is the directory in which the command is being run (note: ditto *for display* subtlety withh "command") "filename" is the current editor filename (if any) "clearContent" is a boolean indicating whether to clear the output window content (by default "true", i.e. the window _is_ cleared).

Arguments

clearContent - Boolean


toggleView()

treeOnClick(event)
Arguments

event - Event


treeOnKeyPress(event)
Arguments

event - Event

Returns - Boolean


ko.scc

Functions

Add(sccSvc, urls, postCallback)

Add the supplied urls to SCC.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls to be added.

postCallback - Function

Function to be called on completion.


Checkout(checkoutFolder)

Checkout a SCC repository.

Arguments

checkoutFolder - String

(optional) Initial checkout directory.


Commit(sccSvc, urls, message, postCallback)

Commit the changes for the supplied urls into SCC.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls to be commited.

message - String

The checkin message.

postCallback - Function

Function to be called on completion.


Diff(sccSvc, urls, additionalOptions, postCallback)

Perform a diff revisions, and display the results.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls used.

additionalOptions - String

Additional diff command options.

postCallback - Function

Function to be called on completion.


DiffRevisions(sccSvc, uri1, version1, uri2, version2, filepath, additionalOptions, postCallback)

Perform a diff revisions, and display the results.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

uri1 - String

The second file uri to diff against.

version1 - String

Version of the first file to use.

version2 - String

Version of the second file to use.

filepath - String

Local path of the file used to diff.

additionalOptions - String

Additional diff command options.

postCallback - Function

Function to be called on completion.


Edit(sccSvc, urls, postCallback)

Edit the supplied urls under SCC.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls to be edited.

postCallback - Function

Function to be called on completion.


getAvailableSCCComponents()

Get the available scc names and components.

Returns - Array


getServiceForFile(koIFile)

Return the SCC services that can handles the supplied koIFile. If Komodo has not yet checked the supplied file for SCC support then it is possible this function will return with no matching service even though the file may be under a SCC system. XXX - How to avoid this, force the fileStatusService to check the file?

Arguments

koIFile - Components.interfaces.koIFileEx

File needing SCC support.

Returns - Components.interfaces.koISCC


getServiceForUrl(url)

Return the SCC services that can handles the supplied koIFile. If Komodo has not yet checked the supplied url/file for SCC support then it is possible this function will return with no matching service even though the file may be under a SCC system. XXX - How to avoid this, force the fileStatusService to check the file?

Arguments

url - wstring

Url to get the handling SCC services for.

Returns - Components.interfaces.koISCC


History(sccSvc, urls, localRevisions)

Load the SCC history dialog for the given urls.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls.

localRevisions - Array

The matching list of current scc file versions, must be one for every url.


Remove(sccSvc, urls, postCallback)

Remove the supplied urls from SCC.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls to be removed.

postCallback - Function

Function to be called on completion.


Revert(sccSvc, urls, postCallback)

Revert (undo changes for) the supplied urls in SCC.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls to be added.

postCallback - Function

Function to be called on completion.


Update(sccSvc, urls, postCallback)

Update the supplied urls for latest SCC contents.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

urls - Array

The list of urls.

postCallback - Function

Function to be called on completion.


warnSSHConfiguration()

Warn the user about enabling CVS and SVN SSH integration.


ko.scc.logger

Functions

append(text)

Adds text to the SCC output panel.

Arguments

text - String

The output text to be added.


clear()

Clear all the text in the SCC output panel.


finalize()

init()

One off initialization of the SCC output panel text.


reportResults(actiondescription, actiontext)

Add the description and text to the SCC output panel.

Arguments

actiondescription - String

Title description of text.

actiontext - String

The text to add to the SCC output panel.


reportSCCAction(sccSvc, cmdName, urls, text)

Report the SCC command results in the main Komodo SCC output panel.

Arguments

sccSvc - Components.interfaces.koISCC

SCC service instance.

cmdName - String

The name of the scc command.

urls - Array

The list of urls used.

text - String

The command output text.


show()

Show the main Komodo SCC output panel, will ask if the user wants to see it.


ko.sleuth

Variables

manager - Sleuth


tabManager - SleuthResultsTabManager


Functions

SleuthTabManager_Initialize()

Classes

class SleuthResultsTabManager.prototype.SciMozEventist

Class functions

onCharAdded()

Returns - Boolean


onDoubleClick()

Returns - Boolean


onDwellEnd()

onDwellStart()

onKey()

Returns - Boolean


onMacroRecord()

Returns - Boolean


onMarginClick()

Returns - Boolean


onModified()

onModifyAttemptRO()

Returns - Boolean


onNeedShown()

Returns - Boolean


onPosChanged()

Returns - Boolean


onSavePointLeft()

Returns - Boolean


onSavePointReached()

Returns - Boolean


onStyleNeeded()

Returns - Boolean


onUpdateUI()

Returns - Boolean


QueryInterface(iid)

Returns - this



ko.statusBar

Variables

_sectionActive - Boolean


_sectionHaveDoneFirstSearch - Boolean


_sectionSelectedIndex - Number


Functions

AddMessage(msg, category, timeout, highlight, interactive)

AddMessage Post a message to the status bar message area. "msg" is the message string. An empty string or null indicates that the message (of the given category) should be cleared. "category" is the message group to which the message belongs. It is an arbitrary string (it must be at least one character). "timeout" is the amount of time, in milliseconds, that the message should appear. A value of 0 indicates that the message does not timeout. "highlight" is a boolean indicating whether the message should be highlighted on the status bar. "interactive" is a boolean indicating whether the message corresponds to an interactive prompt (such as interactive search). These have higher 'priority' over non-interactive messages in case of conflict. A structure similar to a stack of status messages is maintained. The latest message is always shown. When/if it timesout then the previous message is the stack is displayed. There can only be one message per category, so reusing a category allows for removal of status messages that are no longer appropriate. To add a message that does not timeout: ko.statusBar.addMessage("hello there", "my_category", 0, false) To remove that message: ko.statusBar.addMessage(null, "my_category", 0, false) To add a highlighted message for three seconds: ko.statusBar.addMessage("hello there", "my_category", 3000, true)


Clear()

Clear clear all statusbar elements


ClearCheck()

ClearCheck clear the syntax checking status


dump()

dump dump the current message stack to stdout


sectionActivate()

sectionBlur()

sectionDeactivate()

sectionMousedown(event)
Arguments

event - Event


sectionPopupSelection(selectedIndex)

sectionReverted()

sectionSearchComplete()

sectionTextEntered()

ko.stringutils

Functions

bytelength(s)

Returns - _sysUtils.byteLength()


charIndexFromPosition(s, p)

Returns - _sysUtils.charIndexFromPosition()


escapeWhitespace(text)
Arguments

text - text.replace()

Returns - String


getSubAttr(value, subattrname)
Arguments

value - part.slice().replace().replace()


strip(s)

Return a copy of s with the leading and trailing whitespace removed.

Returns - String


unescapeWhitespace(text, eol)

Returns - newtext


updateSubAttr(oldValue, subattrname, subattrvalue)

Returns - newValue


ko.tabstops

Variables

backrefNum - backrefNum


backrefNumber - backrefNumber


indicator - indicator


isBackref - isBackref


isBackrefAnchor - isBackrefAnchor


message - msg


snippet - snippet


text - String


Functions

_clearAllCurrentHits(scimoz, position)

_containsActiveLink(scimoz, indicator)

Returns - indicatorEnd


_deleteTabstopItem(view, tabstopInsertionTable, idx)

_ensureInsertMode()

_hasOtherLinks(tabstopInsertionTable, backrefNumber, idx)

Returns - Boolean


_removeIndicatorsBeforeDelete(view, targetRangeStart, targetRangeEnd)

_restoreDroppedIndicators(followingSet, prevSet, scimoz, pos, utf8Len)

_updateAllHits(scimoz, position, indicator, newUnicodeText, newUTF8Length)

_updateAllZeroWidthHits(scimoz, position, newUnicodeText, newUTF8Length)

_useIndicator(view, scimoz, indicator, spos, epos, isBackref)
Arguments

isBackref - Boolean


atEmptyLinkedTabstop(scimoz, position, utf8Length)

Are we the first string to be added in a linked tabstop?


clearLinkedTabstops(scimoz, view)

Remove linked tabstops from the document.

Arguments

view - ko.views.manager.currentView


clearTabstopInfo(view)

Remove all traces of tabstops from the view and document.


dumpParseResult(tree)

findByIndicator(scimoz, indicator, startingPos)

Returns - Array


forceUpdateAllZeroWidthLinks(view, scimoz, position, text, utf8Length)

This method creates non-empty tabstops where only a zero-width indicator link was found. It's necessary because the indicator might be detected when 'a' is typed like so: a<*> but by the time it's processed, the user has typed 'sd', leading to this situation: asd<*> In this case, only the 'd' is found to be next to a zero-width indicator, so the 'a' and 's' don't appear in the other tabstops. This function fixes that.


handleBackspace(scimoz)

Watches for backspace at the start of a tabstop. Further comments in the code.


handleDelete(scimoz)

Similar to handleBackspace, but watches for delete actions at the right of the indicator. This routine is simpler: if we're about to step on the TSCZW indicator at the end of a linked tabstop, it's time to unlink them.


handleDeleteByUndo(view, scimoz, position, length)

If we're removing a full TSC, but not the trailing TSCZW, remove the linked items anyway. Otherwise we end up in a state where modifying the parent text doesn't affect the linked tabstops, but if we append at this point, the other tabstops get the update. It's asymmetrical, so we'll unlink.


insertEmptyIndicator(scimoz, startingPos, indicator)

Returns - finalLen


moveToNextTabstop(view)

When the user presses the tab key, this method first determines if there is a current set of linked tabstops to unlink, and then finds the next tabstop to visit. If that tabstop is the head of a set of tabstops linked by the same backref, it colors each tabstop with the TSC indicator ("Tabstop Current"), and also places an invisible TSCZW indicator to the right of each one, to allow the user to delete TSC-indicated text.

Returns - Boolean


parseLiveText(liveText)

Parse a stream of pieces of text and tabstop.

Returns - Object


textHasTabstops(text)

Returns - tabstop_re.test()


updateLinkedBackrefs(modificationType, view, position, unicodeText, utf8Length)

When the user makes a modification in a document with tabstops, this routine handles the change. It handles two main events: 1. The first linked tabstop has changed. All other linked tabstops are updated with the new value. 2. Text containing indicators is about to be deleted. This routine removes the appropriate entries from the view's tabstopIndicatorTable.


Classes

class LiveTextParser

Constructor

LiveTextParser()

Class variables

availIndicators - Array


endingIndicatorsInUse - Array


idx - Number


lastIndicatorInUse - indicator


lim - liveText.length


nestedIndicatorsInUse - Array


subjectText - liveText


Class functions

_availableIndicatorCheck()

_parseTabstopNameSequence()

Returns - retStrParts.join()


_releaseIndicators()

_shuffleIndicators(indicator)

lookingAtTabstop()

Returns - this.subjectText.substr()


parse(liveText)

Returns - Node


parseNestedLiveText(parentNode, isInner)
Arguments

isInner - Boolean


parseTabstop()

parseTextBlock(isInner)

Returns - ko.tabstops.LiveTextPlain


throwParseException(expecting, reason)


class LiveTextParserException

Exception object. The message field gives a specific message.

Constructor

LiveTextParserException(msg, snippet)

Class variables

constructor - Error.constructor


Class functions

insertLiveText(scimoz_, insertionPoint, tabstopTextTree)

Inserts the contents of parsed liveText into the buffer

Returns - Number



class LiveTextPlain

Constructor

LiveTextPlain(text)

Class functions

describe(indent)

Returns - indent


insertLiveTextPart()

Returns - ko.stringutils.bytelength()



class LiveTextTabstopBackrefDef

Constructor

LiveTextTabstopBackrefDef(indicator, backrefNum, text)

Class functions

describe(indent)

Returns - indent


insertLiveTextPart()

Returns - insertLiveTextPartHelper()



class LiveTextTabstopBackrefUse

Constructor

LiveTextTabstopBackrefUse(indicator, backrefNum, text)

Class functions

describe(indent)

Returns - indent


insertLiveTextPart()

Returns - insertLiveTextPartHelper()



class LiveTextTabstopEmpty

Constructor

LiveTextTabstopEmpty()

Class functions

describe(indent)

Returns - indent


insertLiveTextPart()

Returns - ko.tabstops.insertEmptyIndicator()



class LiveTextTabstopNested

Constructor

LiveTextTabstopNested(indicator)

Class functions

describe(indent)

Returns - parts.join()


insertLiveTextPart()

Returns - len



class LiveTextTabstopText

Constructor

LiveTextTabstopText(indicator, text)

Class functions

describe(indent)

Returns - indent


insertLiveTextPart()

Returns - insertLiveTextPartHelper()



class TabstopInsertionNode

Constructor

TabstopInsertionNode(indicator, isBackref, backrefNumber, isBackrefAnchor)
Arguments

isBackref - Boolean


Class functions

describe()

Returns - s



ko.tabstops._parseResultsById

ko.toolboxes

Variables

scc - changelistManager


toolboxBaseManager - toolboxBaseManager


user - toolboxManager


Functions

addCommand(command, cwd, env, insertOutput, operateOnSelection, doNotOpenOutputWindow, runIn, parseOutput, parseRegex, showParsedOutputList, name)
Arguments

name - command


importPackage(filename)

onload()

removeListener()

updateSharedToolbox()

In a discussion btwn DavidA and TrentM it was decided that the shared toolbox behaviour should be the following (in light of the possibility that the current Komodo user might not have permissions to write to the shared toolbox location): - If the useSharedToolbox pref is false, then shared toolbox support is off. - Else if the shared toolbox file exists then shared toolbox support is on. - Else if the user DOES have access to write to the shared toolbox file location then a blank one is created (as for the normal Toolbox) and shared toolbox support is on. - Else (useSharedToolbox is true, the shared toolbox file does not exist and the user does NOT have write access) shared toolbox support is turned off. Update the shared toolbox state (i.e. enable or disable it).


ko.toolboxes.shared

ko.toolboxes.shared.viewMgr

ko.trace

Functions

get()

Returns - _tracer


Classes

class Trace

Constructor

Trace()

Class variables

constructor


myPerfTimer - Object


perfLog - Number


timelineService - Components.interfaces.nsITimelineService


Class functions

enter(text)

indent(text)

leave(text)

mark(text)

markTimer(name, text)

outdent(text)

perfTimer(name, title, reset)
Arguments

reset - Boolean


resetTimer(name)

startTimer(name)

stopTimer(name)

timestamp(name, title)


ko.uilayout

Functions

buildViewAsLanguageMenu()

ensureOutputPaneShown()

ensurePaneForTabHidden(tabName)

ensurePaneShown(tabs)

ensureTabShown(tabId, focusToo)
Arguments

focusToo - Boolean


focusPane(tabsId)

fullScreen()

handle_current_view_changed_setup(event)
Arguments

event - Event


isButtonTextShowing()

Returns - _buttonTextShowing


isCodeBrowserTabShown()

Returns - Boolean


isPaneShown(tabs)

Returns - Boolean


leftPaneShown()

newFileFromTemplateOrTrimMRU(templateURI, mruPrefName, mruIndex)

onFullScreen()

onload()

onloadDelayed()

outputPaneShown()

populatePreviewToolbarButton(popup)

restoreTabSelections(prefs)
Arguments

prefs - gPrefs


rightPaneShown()

saveTabSelections(prefs)
Arguments

prefs - gPrefs


toggleButtons()

togglePane(splitterId, tabsId, cmdId, force)
Arguments

force - Boolean


toggleSplitter(aCommandID)

toggleTab(tabId, collapseIfFocused)
Arguments

collapseIfFocused - Boolean


toggleToolbarVisibility(toolbarId)

unload()

updateFullScreen()

updateMRUMenuIfNecessary(mru)

updateSplitterBroadcasterState(aCommandID)

updateTabpickerMenu(menupopup)

updateTitlebar(view)

updateToolbarArrangement(buttonTextShowing)
Arguments

buttonTextShowing - broadcaster.hasAttribute()


updateViewAsMenuIfNecessary()

updateWindowList(popup)

ko.uriparse

Functions to convert/parse strings representing URLs, files, etc. This is basically a loose shim around class URIParser in URIlib.py (somewhat obtusely via koIFileEx). Routines: ko.uriparse.localPathToURI(<localPath>) ko.uriparse.pathToURI(<URI or localPath>) ko.uriparse.URIToLocalPath(<URI or localPath>) ko.uriparse.displayPath(<localPath or URI>) ko.uriparse.baseName(<localPath or URI>) ko.uriparse.dirName(<localPath or URI>) ko.uriparse.ext(<localPath or URI>) Dev Notes: - This module caches a single koIFileEx instance to, presumably, speed things up.

Functions

addMappedURI(uri, path)

Show the dialog for creating a new mapped URI with the supplied uri and path arguments.

Arguments

uri - String

The URI to add a mapping for.

path - String

The path the URI will be mapped to.

Returns - Boolean


baseName(file)

Get the basename (a.k.a. leafName) of the given file. "file" can be a local filename or URI. Examples: file:///D:/trentm/foo.txt -> foo.txt D:\trentm\foo.txt -> foo.txt ftp://ftp.activestate.com/ActivePython -> ActivePython

Returns - koFileEx.baseName


commonURIPrefixFromURIs(uris)

Return the common URI prefix of the given list of URIs.

Arguments

uris - Array

Returns - commonprefix


dirName(file)

Get the dirname of the given file. "file" can be a local filename or URI referring to a local file. Examples: file:///D:/trentm/foo.txt -> D:\trentm D:\trentm\foo.txt -> D:\trentm ftp://ftp.activestate.com/ActivePython -> throws exception

Returns - koFileEx.dirName


displayPath(uri)

Get an appropriate representation of the given URI for display to the user. "uri", typically, is a URI, though it can be a local filename as well. Examples: file:///D:/trentm/foo.txt -> D:\trentm\foo.txt D:\trentm\foo.txt -> D:\trentm\foo.txt ftp://ftp.activestate.com/ActivePython -> ftp://ftp.activestate.com/ActivePython

Returns - koFileEx.displayPath


ext(file)

Get the extension of the given file. "file" can be a local filename or URI

Returns - koFileEx.ext


deprecated fixupURI(uri)

DEPRECATED: Was once used to ensure URI's were properly formatted.

Returns - uri


getMappedPath(path, prefs)

This is a reverse of getMappedURI. Return a unmapped URI if there is a pref setup to match the given path, else return whatever was passed in. Note: If a mapping existed, the return result is *always* a URI.

Arguments

path - String

The path or URI to check for uri mappings.

prefs - Components.interfaces.koIPreferenceSet

Optional. The preference set to check against.

Returns - String


getMappedURI(uri, prefs)

Uses the supplied URI to check if there are any special mappings setup in order to change this URI into another location. If there is a match, return the new URI, else return the original URI.

Arguments

uri - String

The URI to check.

prefs - Components.interfaces.koIPreferenceSet

Optional. The preference set to check against.

Returns - String


localPathToURI(localPath)

Get the URI representation of the given local file path. "localPath" must be a local file path. Returns the URI for the given path or raises an exception if "localPath" is not a local path. Returned URIs are normalized ("x/./y" => "x/y", etc.) Examples: D:\trentm\foo.txt -> file:///D:/trentm/foo.txt \\planer\d\trentm\tmp\foo.txt -> file://planer/d/trentm/tmp/foo.txt file:///D:/trentm/foo.txt -> throws exception ftp://ftp.activestate.com/ActivePython -> throws exception

Returns - _normalizedPathToURI()


pathToURI(path)

Get the URI representation of the given local file path or URI "path" must be a local file path or a URI Returns the URI for the given path or the URI if one was passed in. Returned URIs are normalized ("x/./y" => "x/y", etc.) Examples: D:\trentm\foo.txt -> file:///D:/trentm/foo.txt file:///D:/trentm/foo.txt -> file:///D:/trentm/foo.txt ftp://ftp.activestate.com/ActivePython -> ftp://ftp.activestate.com/ActivePython

Returns - _normalizedPathToURI()


URIToLocalPath(uri)

Get the local file path for the given URI. "uri" may be a URI for a local file or a local path. Returns the local file path or raises an exception if there is no local file representation for that URI. Note: I would rather this explicitly raised if "uri" were a local path, but koIFileEx does not work that way. Examples: D:\trentm\foo.txt -> D:\trentm\foo.txt file:///D:/trentm/foo.txt -> D:\trentm\foo.txt ftp://ftp.activestate.com/ActivePython -> throws exception

Returns - koFileEx.path


ko.views

Variables

manager - ko.views.viewManager

Get the view manager.


viewManager - viewManager


Functions

nullOnModifiedHandler()

Returns - Boolean


onload()

ScimozOffsetFromUCS2Offset(scimoz, pos, delta)
Arguments

pos - scimoz.positionAfter()

Returns - pos


wrapScintillaChange(view, func)

Classes

class ViewHistory

view history controller Recently-visited views: The viewhistory object maintains a stack of recently visited lists. This information can be used to switch to recent views. The semantics of the following methods are as follows: - .getNextMostRecentView() and .getNextLeastRecentView() are used by the buffer switching commands to know which views to switch to. - .enterBufferSwitchingSession() and .exitBufferSwitchingSession() are called by the buffer swiching commands to help .setMostRecentView() know how to behave (the "recent views" stack is NOT updated during such a session). Note that .enter...() may be called multiple times for one .exit...() call. - .setMostRecentView() is called by the view manager's .selectView() and can be called directly by the buffer switching commands for proper session handling. NOTE: THIS BEHAVIOR IS TURNED OFF BY SETTING "handlestctrltab" to false on the tabbed view.

Constructor

ViewHistory()

Class variables

_currentView


_keylistener


_observingCtrlKeyUp - Boolean


_recentViews - Array


_timeout - objectTimer


constructor


inBufferSwitchingSession - Boolean


log - ko.logging.getLogger()


Class functions

_debug_recentViews()

_getCurrentViewIdx()

Returns - currIndex


_keylistener(event)
Arguments

event - Event


_setKeyListener()

ctrlup(event)
Arguments

event - Event


doNextLeastRecentView()

doNextMostRecentView()

enterBufferSwitchingSession()

exitBufferSwitchingSession()

finalize()

getNextLeastRecentView()

Returns - view


getNextMostRecentView()

Returns - view


getState()

Returns - state


handle_current_view_changed(event)
Arguments

event - Event


handle_view_closed(event)
Arguments

event - Event


handle_view_list_closed(event)
Arguments

event - Event


handle_view_opened(event)
Arguments

event - Event


removeRecentView(view)

setMostRecentView(view)

setState(state, viewcontainer)


ko.widgets

Functions

getEncodingPopup(hierarchy, toplevel, action)

Returns - menuitem


ko.window

Functions

checkDiskFiles(event)

view_checkDiskFiles is only called from the window's focus handler, located in komodo.xul. it handles checking if any files have changed.

Arguments

event - Event

Returns - Boolean


focusedScintilla()

does scintilla have focus? Return the scintilla widget

Returns - Element


focusedView()

does any view widget have focus? return which one does or null

Returns - Element


getCwd()

get the current working directory for the window, which is the directory of the current buffer, or the home directory of the user

Returns - String


ko.windowManager

Functions

closeAll(parent)

Close all open windows (or just children of a given parent window). The normal goQuitApplication function in toolkit does this, but we want to prevent quitting if one of the dialogs prevents shutdown by not closing.

Arguments

parent - Window

An optional argument to only close windows that are children of this window.

Returns - Boolean


closeChildren()

Close children of the current main Komodo window.

Returns - this.closeAll()


fixupOpenDialogArgs(inargs)

Returns - args


fixupOpenDialogFeatures(features)

Return a "fixed-up" version of the "features" argument for window.openDialog(). This tweaks the string on Mac OS X to ensure the dialog is *not* opened as a sheet.

Arguments

features - String

The features string to fixup. Pass in null to get a reasonable default.

Returns - features


getMainWindow()

return a reference to the main Komodo window

Returns - wm.getMostRecentWindow()


getWindows()

Returns an array of all Komodo windows that are currently open.

Returns - Array


lastWindow()

return true if this is the only Komodo window open


openDialog()

An alternative version of window.openDialog() that does some fixups that Komodo wants in general.

Returns - window.openDialog.apply()


openOrFocusDialog(chromeURI, windowType)

Open a window if no windows of windowType exist. Otherwise, bring the window of windowType to the front. Parameters for this function are identical to window.openDialog()

Returns - window.openDialog.apply()


otherWindowHasViewForURI(uri)

Returns - Boolean


ko.workspace

Functions

_restoreWindowWorkspace(workspace, currentWindow, checkWindowBounds)

restoreInProgress()

Returns - _restoreInProgress


restoreWorkspace(currentWindow)

restore all workspace preferences and state, open files and projects

Arguments

currentWindow - ko.windowManager.getMainWindow()


restoreWorkspaceByIndex(currentWindow, idx)
Arguments

idx - parseInt()


saveWorkspace()

save all workspace preferences and state


xtk

Functions

importNS(to, from)

importNS import one namespace into another

Arguments

to - from[i]


include(ns)

include include an xtk namespace


load(uri, obj)

load load a JavaScript file into the global namespace or a defined namespace

Arguments

uri - String

uri to a JavaScript File

obj - Object

object to load the JavaScript into, if undefined loads into global namespace


Classes

class baseTreeView

Constructor

baseTreeView()

Class variables

debug - Number


mSelection - s


mSelectionCallback - f


mSingleSelect - Boolean


mSortType - Number


mTotalRows - Number


mTree - tree


rowCount


selection


selectionCallback


singleSelect


Class functions

canDrop(index, orientation)

Returns - Boolean


cycleCell(row, colID)

cycleHeader(colID, elt)

drop(row, orientation)

getCellProperties(row, colID, properties)

getCellText(row, colID)

Returns - String


getColumnProperties(colID, colElt, properties)

getImageSrc(row, colID)

getLevel(index)

Returns - Number


getParentIndex(rowIndex)

Returns - Number


getRowProperties(index, properties)

hasNextSibling(rowIndex, afterIndex)

isContainer(index)

Returns - Boolean


isContainerEmpty(index)

Returns - Boolean


isContainerOpen(index)

Returns - Boolean


isEditable(row, colID)

Returns - Boolean


isSeparator(index)

Returns - Number


isSorted()

performAction(action)

performActionOnCell(action, row, colID)

performActionOnRow(action, row)

QueryInterface(iid)

Returns - this


selectionChanged()

setCellText(row, colID, value)

setTree(tree)

toggleOpenState(index)


class Controller

Constructor

Controller()

Class functions

doCommand(command)

isCommandEnabled(command)

Returns - result


onEvent(event)
Arguments

event - Event


supportsCommand(command)

Returns - result



class dataTreeView

Constructor

dataTreeView(initial_rows)

Class variables

_debug - Number


_rows - Array


_sortCaseInsensitive - Boolean


_sortColumn - column


_sortDirection - Number


rowCount


rows


SORT_ASCENDING - Number


SORT_DESCENDING - Number


tree - out


Class functions

cycleCell(row, colId)

cycleHeader(col)

getCellProperties(row, column, properties)

getCellText(row, column)

Returns - String


getCellValue(row, column)

getColumnProperties(column, prop)

getImageSrc()

getLevel(row)

Returns - Number


getRowProperties(row, prop)

isContainer(row)

Returns - Boolean


isContainerEmpty(index)

Returns - Boolean


isContainerOpen(index)

Returns - Boolean


isEditable(row, column)

Returns - Boolean


isSeparator(index)

Returns - Boolean


isSorted()

Returns - Boolean


performAction(action)

QueryInterface(iid)

Returns - this


reSort()

selectionChanged()

setCellValue(row, column, value)

setSortDirection(column, newSortDirection)

setTree(out)

setTreeRows(rows, doReSort)

sortAscending(column)

sortByColumn(col, sortDirection)
Arguments

col - this.tree.columns.getFirstColumn().element

sortDirection - xtk.dataTreeView.SORT_ASCENDING


sortDescending(column)


xtk.clipboard

Useful clipboard functions.

Functions

_getSupportsCString(flavor)

Returns - supportCString


_getTextFlavor(textFlavor)

Returns - String


addTextDataFlavor(flavor, text, transferable)

Add a text flavor (eg html or plain text) to a transferable object, if passed transferable is null or not defined a new one is created. Returns the tranferable object.

Arguments

flavor - String

The mime-type flavor (eg "text/html").

text - String

The text to add.

transferable - Components.interfaces.nsITransferable

(Optional) The tranferable to use, if null a new object is created.

Returns - Components.interfaces.nsITransferable


containsFlavors(flavors)

Check if clipboard contains at least one of passed formats (ie flavor). Returns true if clipboard contains one of passed flavor, false otherwise.

Arguments

flavors - Array

Mime-type strings (eg ["text/html", "text/unicode"])

Returns - Boolean


containsHtml()

Check if clipboard contains text in HTML format. Returns true if clipboard contains HTML text, false otherwise.

Returns - Boolean


copyFromTransferable(transferable)

Copy to clipboard using a tranferable object, this allows to copy text in multiple format for example the same text as HTML and plain text.

Arguments

transferable - Components.interfaces.nsITransferable

The tranferable object


createTransferable()

Create a transferable object useful to copy multiple formats to clipboard and return with it.

Returns - Components.interfaces.nsITransferable


getHtml()

Get HTML source code from clipboard.

Returns - String


getText()

Get plain text from clipboard.

Returns - String


setText(text)

Set the clipboard to contain the plain text provided.

Arguments

text - String

The text to copy to clipboard.


xtk.color

Variables

black - this.RGB()


blue - this.RGB()


brightness - Number


gamma - Number


green - this.RGB()


red - this.RGB()


topScale - Number


white - this.RGB()


yellow - this.RGB()


Functions

hexToLong(hexstring)

hexToLong Converts a color of the form #ffaabb to a long

Arguments

hexstring - String

Returns - Number


RGB(r, g, b)

RGB covert rgb value into a long int

Returns - Number


Classes

class scaler

Constructor

scaler()

Class functions

Adjust(color, factor)

Returns - Math.floor()


NanometerToRGB(nanoMetres)

Returns - r


scaleToRGB(w)

Returns - this.NanometerToRGB()



xtk.domutils

Variables

__END__


Functions

elementInFocus(el)

is this element or an ancestor focused?

Returns - Boolean


fireEvent(target, eventName)

getFocusedAncestorByName(localName)

is the focused element, or it's ancestor a element with a matching localName?

Arguments

localName - String

Returns - Element


xtk.domutils.tooltips

Functions

getHandler(tooltipName)

Returns - _handlers[tooltipName]


xtk.logging

Variables

LOG_CRITICAL - Number


LOG_DEBUG - Number


LOG_ERROR - Number


LOG_INFO - Number


LOG_NOTSET - Number


LOG_WARN - Number


name - name


Functions

getLogger(name)

Returns - _logs[name]


getObjectTree(o, recurse, compress, level)
Arguments

recurse - Number

compress - Boolean

level - Number

Returns - s


Logger(name)

xtk.logging.Logger

Variables

constructor - xtk.logging.Logger


lastErrorMsg - str


level - Number


Functions

debug(str)

doDump(level)

error(str)

exception(e, str)
Arguments

str - str


info(str)

setLevel(level)

warn(str)