# Komodo IDE/Edit 6 API Changes

- Dropped Global Names
- Deprecated Global Names
- Deprecated XPCOM
- Interface changes
- Deprecated names we want to drop
- Dropped XUL elements
  - toolbox element IDs:
  - toolbox entities
  - to classify:
  - Misc. XUL names:
    - XUL elements
    - XUL misc
    - XUL entities
  - XUL commands
- Dropped Project and Toolbox stuff
  - Importing and exporting packages from projects is gone. Affected files:
- Limited compatibility:
- Added Misc
- Dropped Notifications:
- ko.filepicker

A list of interfaces and globals that are being changed, dropped, or deprecated in Komodo 6.

# Dropped Global Names

- gProjectManager - use ko.projects.manager

  Currently used in

  - Rails toolkit
  - findinprojectfiles
  - knose

- gFocusedProjectView - use ko.projects.active. Used in guibuilder/peGUI.js

- toolboxMgr - ko.toolboxes.user. Not used anywhere.

- ko.dd - use ko.dragdrop. Not used anywhere.

- ko.views.manager.loadViewFromURI - use ko.views.manager.doFileOpenAsync

Used only in ActiveState's ' about:config' macro.

# Deprecated Global Names

- var peMenu_addMenu = ko.projects.addMenu;
- var peMenu_addMenuFromPart = ko.projects.addMenuFromPart;
- var peMenu_addToolbar = ko.projects.addToolbar;
- var peMenu_addToolbarFromPart = ko.projects.addToolbarFromPart;
- var peMenu_editProperties = ko.projects.menuProperties;
- var peMenu_partAcceptsMenuToolbar = ko.projects.partAcceptsMenuToolbar;
- var peMenu_removeToolbarForPart = ko.projects.removeToolbarForPart;
- var peMenu_toggleToolbarHiddenStateInPref = ko.projects.toggleToolbarHiddenStateInPref;
- var findItemsByURL = ko.projects.findItemsByURL;
- var removeItemsByURL = ko.projects.removeItemsByURL;
- var findPartsByURL = ko.projects.findPartsByURL;
- var invalidateItem = ko.projects.invokePart;
- var part_invokePartById = ko.projects.invokePartById;
- var part_findPartById = ko.projects.findPartById;
- var part_ImportFromFS = ko.projects.importFromFileSystem;
- var part_ImportFromPackage = ko.projects.importFromPackage;
- var peCommand_addCommand = ko.projects.addCommand == ko.toolbox2.add_command
- var command_editProperties = ko.projects.commandProperties;
- var Run_CommandPart = ko.projects.runCommand;
- var peFile_addDirectoryShortcut = ko.projects.addDirectoryShortcut;
- var peFile_Properties = ko.projects.fileProperties;
- var peFile_ShowDiffs = ko.fileutils.showDiffs;
- var OpenDirectoryShortcut = ko.projects.openDirectoryShortcut;
- var peFolder_getDefaultDirectory = ko.projects.getDefaultDirectory;
- var peFolder_add = ko.projects.addNewPart;
- var peFolder_ensureFolderAdd = ko.projects.ensureAddMenu;
- var peFolder_addNewFileFromTemplate = ko.projects.addNewFileFromTemplate;
- var peFolder_addFileWithURL = ko.projects.addFileWithURL;
- var peFolder_addFile = ko.projects.addFile;
- var peFolder_addRemoteFile = ko.projects.addRemoteFile;
- var peFolder_addFolder = ko.projects.addFolder;
- var peFolder_addLiveFolder = ko.projects.addLiveFolder;
- var gPeMacro = ko.macros.eventHandler;
- var peMacro_addMacro = ko.projects.addMacro;
- var macro_executeMacro = ko.projects.executeMacro;
- var macro_editProperties = ko.projects.macroProperties;
- var macro_executeMacroById = ko.projects.executeMacroById;
- var macro_evalAsJavascript = ko.macros.evalAsJavaScript;
- var macro_recordPartInvocation = ko.macros.recordPartInvocation;
- var peSnippet_addSnippet = ko.projects.addSnippet;
- var AddSnippetFromText = ko.projects.addSnippetFromText;
- var Snippet_insert = ko.projects.snippetInsert;
- var snippet_editProperties = ko.projects.snippetProperties;
- var peURL_editProperties = ko.projects.URLProperties;
- var peURL_addURL = ko.projects.addURLFromText;
- var peURL_newURL = ko.projects.addURL;
- var view_openFilesWithPicker = ko.open.filePicker;
- var view_openTemplatesWithPicker = ko.open.templatePicker;
- var view_restoreWorkspace = ko.workspace.restoreWorkspace;
- var view_saveWorkspace = ko.workspace.saveWorkspace;
- var view_focusedScintilla = ko.window.focusedScintilla;
- var view_focusedView = ko.window.focusedView;
- var view_checkDiskFiles = ko.window.checkDiskFiles;
- var View_GetCwd = ko.window.getCwd;
- gViewsMgr remains as a deprecated alias to ko.views.manager

# Deprecated XPCOM

- koPreferenceSet.addObserver - use koPreferenceSet.prefObserverService
- koPreferenceSet.removeObserver - use koPreferenceSet.prefObserverService

# Interface changes

koIPartService.runningMacro deprecated, replaced by koToolBox2Service.runningMacro

runningMacro.project returns the active project, if there is one, regardless of where the macro being run lives. If the macro is part of the current project, runningMacro.project gives that project. This JavaScript gives the main owner of the runningMacro:

    var parent = runningMacro.parent;
    while (parent.parent) parent = parent.parent;
    return parent;

koIPartService.findPartForRunningMacro is dropped. Use koIToolbox2Service.runningMacro.project.findPart(...) instead

# Deprecated names we want to drop

gViewMgr -- use ko.views.manager -- used in closeallbut, aboutconfig, Bookmark-Click, komodo_html_entities, knose

# Dropped XUL elements

## toolbox element IDs:

- menu_toolbox
- menu_toolboxAdd
- menu_toolboxExportPackage
- menu_toolboxHiddenMenu
- menu_toolboxImportPackage
- menu_toolboxSortBy
- menupopup_toolboxSortBy
- popup_toolbox
- popup_toolboxAdd
- toolbox-menuseparator
- toolboxContext
- toolboxContextMenu_cut
- toolboxContextMenu_copy
- toolboxContextMenu_partPaste
- toolboxContextMenu_delete
- toolboxContextMenu_editProperties
- menu_projectMakeActive
- menu_projectMakeActive_popup
- ko.projects.manager.getProjectsMenu
- menu_projectSortBy
- cmd_projectSortBy
- menu_project_submenu
- menu_projectAdd
- broadcaster_projectCurrent
- projectAdd_popup

## toolbox entities

- exportPackage.label
- importPackage.label
- menuToolboxAdd.accesskey
- toolbox.accesskey
- toolbox.label
- menuToolbox.accesskey

## to classify:

- Added: cmd_renameProject

## Misc. XUL names:

### XUL elements

- partviewer-filter-textbox
- partviewer
- id projectviewbox (Used in several overlays' insertafter attribute)
- id="projectview-vbox">
- id="projectview"
- id projectContext
- id="projectContext"
- id="projectContextMenu_cut"
- id="projectContextMenu_copy"
- id="projectContextMenu_partPaste"
- id="projectContextMenu_delete"
- id="projectContextMenu_editProperties"
- tabid="project_tab"
- broadcaster_projectCurrent
- projectNameTreeColumn.label
- projectNameTreeColumn.accesskey
- id="projectView_toolsPopup"
- id="projectView_newProjectButton"
- id="projectView_openButton"
- id="projectView_saveButton"
- id="projectView_sortByMenu"
- id="projectView_sortByMenuPopup"
- id="projectView_AddItem"
- id="projectView_AddItemPopup"
- id="project_sortBy_menupopup
- id="project_sortBy_name_menu"
- id="project_sortByName_menupopup"
- id="project_sortDirection_menupopup"
- id="project_sortDirection_natural_menuitem"
- id= project_sortDirection_ascending_menuitem"
- id= project_sortDirection_descending_menuitem"
- id="project_tab"
- id="projectView_tools"
- id="projectView_toolsPopup"
- id="projectView_newProjectButton"
- id="projectView_openButton"
- id="projectView_saveButton"
- id="projectView_sortByMenu"
- id="projectView_sortByMenuPopup
- id="projectView_AddItem"
- id="projectView_AddItemPopup"
- id="folder_context"
- id="folder_context_popup"
- id="folder_context_newFile"
- id="folder_context_newFolder"
- id="folder_context_newLiveFolder"
- id="folder_context_existingFile"
- id="folder_context_remoteFile"

### XUL misc

- css class addToolboxItemButton

### XUL entities

- projectView.tooltiptext
- entity projectSortDirectionNatural.label
- entity projectSortDirectionNatural.accesskey
- entity projectSortDirectionAscending.label
- entity projectSortDirectionAscending.accesskey
- entity projectSortDirectionDescending.label
- entity projectSortDirectionDescending.accesskey
- entity addItemToCurrentProject.tooltiptext
- entity folderContext.accesskey
- folderContextExistingFile.accesskey
- folderContextNewCommand.accesskey
- folderContextNewFile.accesskey
- folderContextNewFolder.accesskey
- folderContextNewLiveFolder.accesskey
- folderContextNewMacro.accesskey
- folderContextNewMenu.accesskey
- folderContextNewShortcut.accesskey
- folderContextNewSnippet.accesskey
- folderContextNewTemplate.accesskey
- folderContextNewToolbar.accesskey
- folderContextNewURL.accesskey
- folderContextRemoteFile.accesskey

## XUL commands

- cmd_exportItems
- cmd_exportToPackage
- cmd cmd_viewProjects

# Dropped Project and Toolbox stuff

- ko.projects.handle_parts_reload
- ko.toolboxes.shared
- ko.toolboxes.scc
- most of ko.toolboxes.user
- ko.projects.active
- ko.projects.activeView
- ko.projects.getManagerForItem
- ko.projects.manager.lastCurrentProject
- ko.projects.manager._projects
- ko.projects.manager.getProjectsMenu (and xul tag)
- ko.projects.manager.hasProject
- ko.projects.manager.managers
- ko.projects.manager.getAllProjects
- ko.projects.manager.getFocusedProjectView
- ko.projects.lastCurrentProject
- ko.projects.manager.addItem
- ko.projects.manager.removeItem
- ko.projects.manager.removeItems
- ko.toolboxes.importPackage -- can't import packages into toolboxes now
- folder_context_newSnippet
- folder_context_newCommand
- folder_context_newTemplate
- folder_context_newURL
- folder_context_newMacro
- folder_context_newShortcut
- folder_context_newMenu
- folder_context_newToolbar
- exporting packages from the toolbox is gone
- toolboxController is no longer supported:
- ko.projects.exportItems
- ko.projects.exportPackageItems
- Toolbox_ExportItems
- Toolbox_ExportPackageItems
- ko.projects.sortByOnPopupShowing
- ko.projects.sortByMenuHandler
- ko.projects.sortByDirectionOnPopupShowing
- projectExtensionManager.prototype.updateToplevelMenu
- projectExtensionManager.prototype.updateMenu
- ko.projects.ensureAddMenu
- ko.projects.exportItems
- ko.projects.exportPackageItems
- ko.projects.manager.lastCurrentProject
- ko.projects.manager.activeView
- ko.projects.manager._projects
- ko.projects.manager.getProjectsMenu (and xul tag)
- ko.projects.manager.hasProject
- ko.projects.manager.managers
- ko.projects.manager.getAllProjects
- ko.projects.manager.getFocusedProjectView
- ko.projects.manager.findItemByAttributeValue
- ko.projects.manager.sortByMenuHandler
- ko.projects.manager.sortByDirectionOnPopupShowing
- ko.projects.ensureAddMenu
- peFolder_ensureFolderAdd
- newProjectFromTemplate
- menu_newProjectFromTemplate
- cmd_newProjectFromTemplate
- generalNewProjectFromTemplate.desc (entity)
- ko.projects.manager.newProjectFromTemplate
- cmd_reimportFromFS_Project
- reImport.label
- cmd_reimportFromFS_Project
- menu_reimportFromFS
- reImportFromFileSystemWithSameSettings.tooltiptext

## Importing and exporting packages from projects is gone. Affected files:

- package-export-wizard.xul
- package-import-wizard.xul

# Limited compatibility:

- ko.toolboxes.user
- ko.toolboxes.user.toolbox.createPartFromType =&gt; ko.toolbox2.createPartFromType
- ko.toolboxes.user.addItem =&gt; ko.toolbox2.addItem

# Added Misc

- koIPartService.runningMacro now expects a koITool object, not a koIPart
- closeTheOpenedFilesFromThisProject.message - no longer used in

# Dropped Notifications:

- kpf_tree_filter_status

# ko.filepicker

- ko.filepicker.openFile => ko.filepicker.browseForFile
- ko.filepicker.openExeFile => ko.filepicker.browseForExeFile
- ko.filepicker.openFiles => ko.filepicker.browseForFiles