class CodeEditorManager

Handles connectivity of the editor with external code editing tools.

The system provides methods for interacting with external tools but the exact tool used depends on the currently active setting.

Public

Constructors

CodeEditorManager

CodeEditorManager()

Methods

~CodeEditorManager

~CodeEditorManager() noexcept

GetAvailableEditors

const Vector<CodeEditorType> &GetAvailableEditors() const

Returns a list of all available code editors for this platform.

SetActiveEditor

void SetActiveEditor(CodeEditorType editor)

Specifies the active code editor.

All operations on this object will be executed using this editor. If setting an editor that is not valid for this platform, no change will be made.

GetActiveEditor

CodeEditorType GetActiveEditor() const

OpenFile

void OpenFile(const Path &path, u32 lineNumber) const

Opens a code file in the active external editor.

path
Path to the code file to open, can be absolute or relative to project resources folder. The file should be part of a solution in the active editor.
lineNumber
Line number to focus on once the file is opened. Might not be supported by all editors.

SyncSolution

void SyncSolution() const

Synchronizes all code files and assemblies in the active project and updates the project solution for the active editor.

Each project can only have one solution per editor.

GetSolutionPath

Path GetSolutionPath() const

Returns the absolute path at which the external editor solution file should be stored.

IsSolutionDirty

bool IsSolutionDirty() const

Returns true if the solution was modified and SyncSolution() needs to be called in order to reflect the changes in the solution file.

MarkSolutionDirty

void MarkSolutionDirty()

Notifies the code editor that code file structure has changed and the solution needs to be rebuilt.

staticInstance

static T &Instance()

Returns a reference to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticInstancePtr

static T *InstancePtr()

Returns a pointer to the module instance.

Module has to have been started up first otherwise an exception will be thrown.

staticShutDown

static void ShutDown()

Shuts down this module and frees any resources it is using.

staticIsStarted

static bool IsStarted()

Query if the module has been started.

Protected

Methods

~Module<T>

virtual ~Module<T>() = default

OnStartUp

virtual void OnStartUp()

Override if you want your module to be notified once it has been constructed and started.

OnShutDown

virtual void OnShutDown()

Override if you want your module to be notified just before it is deleted.

staticInstanceInternal

static T *&InstanceInternal()

Returns a singleton instance of this module.

staticIsDestroyed

static bool &IsDestroyed()

Checks has the Module been shut down.

staticIsStartedUp

static bool &IsStartedUp()

Checks has the Module been started up.

Private

Fields

mActiveEditor

CodeEditor * mActiveEditor

mActiveEditorType

CodeEditorType mActiveEditorType

mFactoryPerEditor

Map<CodeEditorType, CodeEditorFactory *> mFactoryPerEditor

mEditors

Vector<CodeEditorType> mEditors

mFactories

Vector<CodeEditorFactory *> mFactories

mIsSolutionDirty

bool mIsSolutionDirty