args - args
func - func
instance - instance
interval - window.setInterval()
running - Boolean
timeout - window.setTimeout()
timer - Number
show our about dialog XXX DEPRECATE, this should be dialog.about or ko.about
show mailing list archives on ASPN that are related to the topic
topic - String
browse to a predefined url on activestate.com see tag2uri in ko.browse
show the url defined in "localHelpFile" in an instance of koIAppInfoEx
app - String
the app identifier from the CID of a koIAppInfoEx implementation (eg. @activestate.com/koAppInfoEx?app=Perl)
open the given url or complain appropriately
url - String
browser - String
optional, retreived from prefs if not used
show a list of command id's in the browser
show a list of keybindings in the browser
Hide or show the local help entries in the Help->Languages popup depending on whether an actually help file to launch can be found.
show the url defined in "webHelpURL" in an instance of koIAppInfoEx
app - String
the app identifier from the CID of a koIAppInfoEx implementation (eg. @activestate.com/koAppInfoEx?app=Perl)
Returns - rc
event - Event
Returns - Boolean
Returns - found
alert - parent.opener.ko.dialogs.alert
yesNo - parent.opener.ko.dialogs.yesNo
yesNo()
Returns - ko.dialogs.authenticate2()
Returns - Object
Returns - obj.response
Returns - obj.response
Returns - Object
Returns - obj.response
Returns - obj.response
canHandleMultipleItems - Boolean
event - Event
Returns - Boolean
event - Event
event - Event
Returns - flavours
event - Event
Returns - Boolean
event - Event
A dialog to pick a directory, and put the directory path into a XUL textbox.
textbox - Element
A dialog to pick a remote directory and put the path into a XUL textbox.
textbox - Element
Pick a directory/folder.
Returns - String
Pick an executable file for open.
Returns - String
Pick a file for open.
Returns - String
Pick multiple files for open.
Returns - Array
Open remote file(s) Same parameters meanings as "filepicker_remoteFileBrowser" (above) Returns nothing. Note: The files will be opened through this function call
Browse for remote file(s)
Returns - Object
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.
Pick a file for save.
Returns - String
alternate uses the alternate help preference
getTag old help open method, DEPRECATED
Returns - tag
openTag old help open method, DEPRECATED
language open language specific help for the current buffer.
open open Komodo help window
page - String
a page tag as defined in toc.xml
tutorialProject used by the help system to open KPF files associated with a tutorial
tutorial - String
name of tutorial to open
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).
tutorial - String
name of tutorial to open
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
id - String
Returns - contents
event - Event
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); } }
Returns - projectFile
Returns - String
Returns - projectFile
Return a list of start and end offsets of interpolation code blocks into the given strings "s".
Returns - offsets
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.
Returns - viewData
Returns - scimoz.getTextRange()
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.
Returns - istrings
Returns - istring
controller - ISController
keylabel2keysequence - keylabel2keysequence
keysequence2keylabel - keysequence2keylabel
_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()
data - lines.join()
document - document
inPrefixCapture - Boolean
key2command - Object
keybindingSchemeService
keyDownLabels
keynames - Array
keyTree - Object
lastcategory - String
prefset - gPrefSvc.prefs
rownum - Number
Returns - String
Returns - Boolean
Returns - root
Returns - keysequence2keylabel()
Returns - seqs
Returns - commanddesc
Returns - String
Returns - commanddesc
Returns - commanddesc
Returns - scheme.writeable
event - Event
Returns - Boolean
event - Event
Returns - data.join()
event - Event
Returns - possible
Returns - this._knownconfigs
event - Event
Returns - String
Returns - String
Returns - newconfigname
Parse the keybinding configuration file data into commands. Acitivate the keybinding commands.
Returns - key
Returns - Boolean
Returns - usedbys
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 open the diff dialog, you must provide the diff
diff - String
title - String
message - String
Returns - window.openDialog()
Open the Find dialog.
searchTerm - String
Open Find in Files dialog.
searchTerm - String
folders - String
openAddonsMgr open the extension/add ons manager window
Returns - ko.windowManager.openOrFocusDialog()
Open the Find & Replace dialog. TODO: add searchTerm/replacement arguments.
runCommand open the run command dialog
Returns - window.openDialog()
watchLocalFile prompt for a file to watch, then open a new watch window
event - Event
_lastRequestId - Number
_lintTimer - objectTimer
constructor
errorString - request.errorString
lintingEnabled - this.view.prefs.getBooleanPref()
lintResults - request.results
view - view
Returns - this
LOG_CRITICAL - Number
LOG_DEBUG - Number
LOG_ERROR - Number
LOG_INFO - Number
LOG_NOTSET - Number
LOG_WARN - Number
loggingSvc - Components.interfaces.koILoggingService
Returns - res
event - Event
Returns - this.getLoggingMgr().getLogger()
Returns - _gLoggingMgr
Returns - s
Returns - str
Returns - s
_logger - logger
_logger_name - logger_name
constructor
Returns - this._logger.getEffectiveLevel()
current - _partSvc.runningMacro
eventHandler - MacroEventHandler
recorder - MacroRecorder
Returns - Boolean
log - _log
addCanQuitHandler observer for watching the quit-application-requested notification, and easily handling a response to it.
addUnloadHandler Register a routine to be called on Komodo shutdown. To register a simple routine do this: ko.main.addUnloadHandler(<routine>) To register an object method do this: ko.main.addUnloadHandler(this.<method>, this);
addWillQuitHandler simple observer for watching the quit-application-granted notification
Returns - Boolean
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
Read a file from disk, cache and return the contents.
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 the standard Komodo markers in the given SciMoz instance and return an appropriate mask for ISciMoz.setMarginMaskN(<n>, <mask>).
scimoz - iSciMoz
scimoz plugin instsance
Returns - ko.markers.MARKERS_MASK_SYMBOLS
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
Returns - retval
Returns - retval
Returns - maxEntries
The open namespace contains functionality to open buffers in komodo
Open the given path in Komodo.
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.
open a file picker, and open the files that the user selects
Open Komodo's Start Page
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.
function for opening buffers in Komodo tabs
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.
Returns - DOMElement xul:view
Returns - Boolean
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
Returns - Boolean
Returns - ko.views.manager.newTemplate()
Returns - Boolean
Returns - snippet
Returns - Boolean
Returns - Boolean
Returns - Boolean
Returns - items
findPart find a part in the toolboxes and/or a specifid part's project
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
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()
Returns - parts
does the active view have real focus, if so, return it, otherwise null.
Returns - ko.projects.active.manager
Returns - Boolean
Returns - Boolean
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.
Given the ID of a part, find it and invoke it.
Returns - Boolean
Returns - Boolean
Returns - Boolean
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.
Returns - items
Returns - Boolean
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
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.
Run the given command.
Returns - Boolean
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
Remove any processes that have terminated from the list.
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.
Complete a terminal session. The command exited with the given value.
Returns - _gTerminalHandler
Kill the process currently running in the output window's terminal, if any.
event - Event
Pass a koIRunProcess reference to the output window so it can manipulate the process that is being run in its terminal, if necessary.
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.
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).
event - Event
event - Event
Returns - Boolean
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 all statusbar elements
ClearCheck clear the syntax checking status
dump dump the current message stack to stdout
Returns - _sysUtils.byteLength()
Returns - _sysUtils.charIndexFromPosition()
Returns - String
Returns - newtext
Returns - newValue
shared
user - toolboxManager
Returns - _tracer
constructor
myPerfTimer - Object
perfLog - Number
timelineService - Components.interfaces.nsITimelineService
Returns - _buttonTextShowing
Returns - Boolean
Returns - Boolean
Returns - ko.views.manager.doFileNewFromTemplate()
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.
Returns - Boolean
baseName 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
dirName 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 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 Get the extension of the given file. "file" can be a local filename or URI
Returns - koFileEx.ext
fixupURI DEPRECATED, remains for compatibility
Returns - uri
Returns - mappeduri
Returns - ko.uriparse.pathToURI()
localPathToURI 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. 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 - koFileEx.URI
pathToURI 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. 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 - koFileEx.URI
URIToLocalPath 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
manager - ko.views.viewManager
Get the view manager.
viewManager - viewManager
Returns - pos
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.
_currentView - subject
_keylistener
_observingCtrlKeyUp - Boolean
_recentViews - Array
_timeout - objectTimer
constructor
inBufferSwitchingSession - Boolean
log - ko.logging.getLogger()
event - Event
event - Event
Returns - view
Returns - view
Returns - state
Returns - menuitem
view_checkDiskFiles is only called from the window's focus handler, located in komodo.xul. it handles checking if any files have changed.
event - Event
Returns - Boolean
does scintilla have focus? Return the scintilla widget
Returns - Element
does any view widget have focus? return which one does or null
Returns - Element
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
close all open windows, return true if successful. The normal goQuitApplication function in toolkit does this, but we want to prevent quitting if one of the dialogs prevents shutdown by not closing.
Returns - Boolean
Returns - inargs
return a reference to the main Komodo window
Returns - wm.getMostRecentWindow()
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()
Returns - _restoreInProgress
restore all workspace preferences and state, open files and projects
save all workspace preferences and state