Skip to content

Latest commit

 

History

History
89 lines (62 loc) · 2.88 KB

FileViewController.md

File metadata and controls

89 lines (62 loc) · 2.88 KB

Import :

const FileViewController = brackets.getModule("project/FileViewController")

WORKING_SET_VIEW : string

view managing working set.

Kind: global variable

PROJECT_MANAGER : string

manager handling project-related operations.

Kind: global variable

setFileViewFocus(fileSelectionFocus)

Modifies the selection focus in the project side bar. A file can either be selected in the working set (the open files) or in the file tree, but not both.

Kind: global function

Param Type Description
fileSelectionFocus String either PROJECT_MANAGER or WORKING_SET_VIEW

openAndSelectDocument(fullPath, fileSelectionFocus, paneId) ⇒ $.Promise

Opens a document if it's not open and selects the file in the UI corresponding to fileSelectionFocus

Kind: global function

Param Type Description
fullPath fullPath full path of the document to open
fileSelectionFocus string (WORKING_SET_VIEW
paneId string pane in which to open the document

openFileAndAddToWorkingSet(fullPath, [paneId]) ⇒ $.Promise

Opens the specified document if it's not already open, adds it to the working set, and selects it in the WorkingSetView

Kind: global function

Param Type Description
fullPath fullPath
[paneId] string Pane in which to add the view. If omitted, the command default is to use the ACTIVE_PANE

openWithExternalApplication()

Opens the specified document with its associated external editor,

Kind: global function

getFileSelectionFocus() ⇒ String

returns either WORKING_SET_VIEW or PROJECT_MANAGER

Kind: global function

setWorkingSetContext(file, [paneId])

Remembers the file a working set or tab bar context menu was opened on. Pass null when the menu closes. Fires workingSetContextChange with the context so the views can mark the file while the menu is up.

Kind: global function

Param Type Description
file File the right-clicked file, or null to forget it
[paneId] string the pane the file is shown or listed in, defaults to the active pane

getWorkingSetContext() ⇒ Object

The file a working set or tab bar context menu is currently open for

Kind: global function
Returns: Object - null when no such menu is up