mixincamembert::Plugin

camembert::Plugin

Camembert Plugin mixin

addSyntaxRule

Source

Void addSyntaxRule(Str name, File fogFile, Str[] exts)

Add an extra synatx support (fogFile) for given extensions Will only do anyhting if the fogFile doesn't exist yet in

etc/syntax/syntax-${ruleName}.fog

commands

Source

abstract PluginCommands? commands()

Plugin execution commands implemntation

createSpace

Source

abstract Space createSpace(Project project)

Return a space for the project

docProvider

Source

virtual PluginDocs? docProvider()

Documentation provider for this plugin or null if none

envType

Source

abstract Type? envType()

Env impl for the plugin

iconForFile

Source

virtual Image? iconForFile(File dir)

Return an Item if the this plugin has an icon for the file null otherwise

isCustomPrj

Source

virtual Bool isCustomPrj(File dir, Str type)

Check if the given folder is a "forced" project of a given type

isIndexing

Source

virtual Bool isIndexing()

Returns true if the project supports indexing and is currently indexing.

name

Source

virtual Str name()

Returns a unique name for this plugin

onChangedProjects

Source

virtual Void onChangedProjects(Project[] projects, Bool clearall := false)

Called whenever new/updated projects are found (to be reindexed) ClearAll can be set to tel the plugin to clear the index fully first

onFileSaved

Source

virtual Void onFileSaved(File f)

Called when a file is saved

onFrameReady

Source

virtual Void onFrameReady(Frame f, Bool initial := true)

Called once Camembert is ready to use (frame built) Good place to add menu items if any It can be called again (with initail=false) after a complete "Reload config" event

onInit

Source

virtual Void onInit(File configDir)

Called as soon as camembert starts up (before doing anything)

onShutdown

Source

virtual Void onShutdown(Bool isKill := false)

Called at the end of shutdown for cleanup purposes Might be called twice, once a "Soft" shutdown (isKill = false) and then a gain a hard kill (isKill = true)

prjProps

Source

virtual [Str:Str]? prjProps(File dir)

projectFinder

Source

abstract |Uri->Project? projectFinder()

Function that return a project item if the given folder is deemed a project by the plugin This function will be called a lot, so keep efficient

readConfig

Source

virtual PluginConfig? readConfig(Sys newSys)

Returns the setting object for the given plugin Called any time config is (re)loaded

spacePriority

Source

virtual Int spacePriority(Project project)

If this plugin provides a custom space, return the priority of this space for a given project. Zero otherwise