leksah-0.15.2.0: Haskell IDE written in Haskell

Safe HaskellNone
LanguageHaskell2010

IDE.Pane.SourceBuffer

Description

The source editor part of Leksah

Synopsis

Documentation

data IDEBuffer Source

A text editor pane description

Constructors

forall editor . TextEditor editor => IDEBuffer 

fileSaveBuffer :: MonadIDE m => TextEditor editor => Bool -> Notebook -> EditorView editor -> EditorBuffer editor -> IDEBuffer -> Int -> m Bool Source

fileCheckAll :: MonadIDE m => (IDEBuffer -> m [alpha]) -> m [alpha] Source

inBufContext :: MonadIDE m => alpha -> IDEBuffer -> (forall editor. TextEditor editor => Notebook -> EditorView editor -> EditorBuffer editor -> IDEBuffer -> Int -> m alpha) -> m alpha Source

inActiveBufContext :: alpha -> (forall editor. TextEditor editor => Notebook -> EditorView editor -> EditorBuffer editor -> IDEBuffer -> Int -> IDEM alpha) -> IDEM alpha Source

selectedText :: IDEM (Maybe Text) Source

Get the currently selected text or Nothing is no text is selected

selectedTextOrCurrentLine :: IDEM (Maybe Text) Source

Get the currently selected text, or, if none, the current line text

selectedTextOrCurrentIdentifier :: IDEM (Maybe Text) Source

Get the currently selected text, or, if none, tries to selected the current identifier (the one under the cursor)

newTextBuffer :: PanePath -> Text -> Maybe FilePath -> IDEM (Maybe IDEBuffer) Source

Tries to create a new text buffer, fails when the given filepath does not exist or when it is not a text file.

belongsToPackages :: MonadIDE m => FilePath -> m [IDEPackage] Source

Returns the packages to which this file belongs uses the bufferProjCache and might extend it

belongsToPackages' :: MonadIDE m => IDEBuffer -> m [IDEPackage] Source

Returns the packages to which this buffer belongs uses the bufferProjCache and might extend it

belongsToPackage :: FilePath -> IDEPackage -> Bool Source

Checks whether a file belongs to a package (includes files in sandbox source dirs)

belongsToWorkspace :: MonadIDE m => FilePath -> m Bool Source

Checks whether a file belongs to the workspace

belongsToWorkspace' :: MonadIDE m => IDEBuffer -> m Bool Source

Checks whether a file belongs to the workspace

getIdentifierUnderCursorFromIter :: TextEditor editor => (EditorIter editor, EditorIter editor) -> IDEM (EditorIter editor, EditorIter editor) Source

Get an iterator pair (start,end) delimiting the identifier currently contained inside the provided iterator pair