WSF
wizard::ProjectWorkspace Class Reference

#include <ProjectWorkspace.hpp>

Inherits QObject.

Classes

struct  FileStat

Signals

void ProjectOpened (Project *aProjectPtr)
void ProjectClosed (Project *aProjectPtr)
void ActiveProjectChanged (Project *aProjectPtr)
void StartingExecution (WsfExecution *aExecutionPtr)
void ParseStatisticsReady (Project *aProjectPtr, QString aReportText)
void SourceRemoved (TextSource *aSourcePtr)
void ProxyUpdated (ProxyMerge *aProxyMerge)
void FullParseComplete (Project *aProjectPtr)
 The project has been fully parsed and proxied.
void PerformanceResult (Project *aProjectPtr, QString aWorkType, int aTimeToCompleteMS)
 A piece of work has completed. This is used to record timing information.
void NewTextSource (TextSource *aSourcePtr)
void ChangeDebug (bool aIsActive)

Public Member Functions

 ProjectWorkspace ()
 ~ProjectWorkspace () override
TextSourceCacheGetSourceCache () const
ProjectGetProject ()
void Update ()
void customEvent (QEvent *) override
void WaitForParsing ()
 Waits until the parsing thread is complete. This should only be called from the main thread.
void WaitForAbortParsing ()
void RequestReparseWsf (TextSource *aSourcePtr)
void WaitForSourceModifications (TextSource *aSourcePtr)
 Returns when the source has all queued changes applied. This may require waiting until parsing is complete.
void ProjectAdded (Project *aProjectPtr)
void RemoveProject (Project *aProjectPtr)
void NotifyOfSourceChange (TextSource *aSourcePtr)
void ViewOpened (TextSourceView *aViewPtr)
void ViewClosed (TextSourceView *aViewPtr)
ActionManagerGetActionManager () const
EditorManagerGetEditorManager () const
bool ParseIsUpToDate ()
double GetLastGrammarParseTime () const noexcept
double GetLastInputParseTime () const noexcept
double GetLastProxyDeserializeTime () const noexcept
double GetLastProxyMergeGUI_Time () const noexcept
void ReparseAll ()
void CheckFilesForModification ()
void ScheduleCheckingFilesForModification ()
void ApplicationActivated ()
void SaveAll ()
void ParseStatistics ()
TextSourceFindSource (const std::string &aPath, bool aCreate, bool aRead)
std::vector< TextSource * > GetSourceList ()
wizard::EditorOpenSource (TextSource *aSourcePtr)
 Attempts to open or show an already open source file.
wizard::EditorGotoRange (const UtTextDocumentRange &aRange)
wizard::EditorGotoRange (const std::string &aFilePath, size_t aLineNumber)
wizard::EditorGotoFile (UtTextDocument *aSourcePtr, bool aRecordLocation)
wizard::EditorGotoFile (const std::string &aFilePath, bool aRecordLocation=true)
bool RequestClose (bool aForce=false)
void ProjectIncrementParseNumber ()
void TouchParse (bool aUpdateQuick=false)
void RestyleViews ()
void StartExecution (WsfExecution *aExecutionPtr)
void StopAllExecutions ()
const std::vector< WsfExecution * > & GetExecutions () const
VI_DEPRECATED void EmitProxyUpdated (ProxyMerge *aProxyMerge)
void BeginSerialize ()
WsfConnectorGetWsfConnector ()
bool IsProcessing () const
void NewProject ()
void CreateA_NewFile (Project *aProject, const UtPath &aDir)

Static Public Member Functions

static ProjectWorkspaceInstance ()
static int GetMaximumWSF_FileSize ()
static void SetMaximumWSF_FileSize (int aFileSize)

Public Attributes

QTimer mUpdateTimer

Protected Slots

void ExecutionDestroyed (QObject *aObjectPtr)
void OnChangeDebug (bool aIsActive)

Constructor & Destructor Documentation

◆ ProjectWorkspace()

◆ ~ProjectWorkspace()

wizard::ProjectWorkspace::~ProjectWorkspace ( )
override

Member Function Documentation

◆ ActiveProjectChanged

void wizard::ProjectWorkspace::ActiveProjectChanged ( Project * aProjectPtr)
signal

◆ ApplicationActivated()

void wizard::ProjectWorkspace::ApplicationActivated ( )

References wizSignals.

Referenced by ProjectWorkspace().

◆ BeginSerialize()

◆ ChangeDebug

void wizard::ProjectWorkspace::ChangeDebug ( bool aIsActive)
signal

◆ CheckFilesForModification()

void wizard::ProjectWorkspace::CheckFilesForModification ( )

References WaitForParsing().

Referenced by ExecutionDestroyed().

◆ CreateA_NewFile()

void wizard::ProjectWorkspace::CreateA_NewFile ( Project * aProject,
const UtPath & aDir )

◆ customEvent()

◆ EmitProxyUpdated()

void wizard::ProjectWorkspace::EmitProxyUpdated ( ProxyMerge * aProxyMerge)

References ProxyUpdated().

◆ ExecutionDestroyed

void wizard::ProjectWorkspace::ExecutionDestroyed ( QObject * aObjectPtr)
protectedslot

◆ FindSource()

◆ FullParseComplete

void wizard::ProjectWorkspace::FullParseComplete ( Project * aProjectPtr)
signal

The project has been fully parsed and proxied.

Referenced by wizard::DeveloperActions::DeveloperActions(), and Update().

◆ GetActionManager()

ActionManager * wizard::ProjectWorkspace::GetActionManager ( ) const
inline

◆ GetEditorManager()

◆ GetExecutions()

const std::vector< WsfExecution * > & wizard::ProjectWorkspace::GetExecutions ( ) const
inline

◆ GetLastGrammarParseTime()

double wizard::ProjectWorkspace::GetLastGrammarParseTime ( ) const
noexcept

Get the time the WsfParseDefinitions spent parsing the WsfGrammar

Returns
the latest grammar parsing time

Referenced by wizard::DeveloperActions::DeveloperActions().

◆ GetLastInputParseTime()

double wizard::ProjectWorkspace::GetLastInputParseTime ( ) const
noexcept

Get the time the WsfParser spent parsing the input files

Returns
the latest input parsing time

Referenced by wizard::DeveloperActions::DeveloperActions().

◆ GetLastProxyDeserializeTime()

double wizard::ProjectWorkspace::GetLastProxyDeserializeTime ( ) const
noexcept

Get the time the WsfPProxyDeserialize spent deserializing the parse tree

Returns
the latest proxy deserializing time

Referenced by wizard::DeveloperActions::DeveloperActions().

◆ GetLastProxyMergeGUI_Time()

double wizard::ProjectWorkspace::GetLastProxyMergeGUI_Time ( ) const
noexcept

Get the time the ProxyMerge spent merging the old and new WsfPProxys/Wizard spent updating its GUIs

Returns
the latest proxy merging/GUI updating time

Referenced by wizard::DeveloperActions::DeveloperActions().

◆ GetMaximumWSF_FileSize()

int wizard::ProjectWorkspace::GetMaximumWSF_FileSize ( )
inlinestatic

◆ GetProject()

wizard::Project * wizard::ProjectWorkspace::GetProject ( )

◆ GetSourceCache()

TextSourceCache * wizard::ProjectWorkspace::GetSourceCache ( ) const
inline

◆ GetSourceList()

std::vector< wizard::TextSource * > wizard::ProjectWorkspace::GetSourceList ( )

◆ GetWsfConnector()

WsfConnector * wizard::ProjectWorkspace::GetWsfConnector ( )
inline

◆ GotoFile() [1/2]

wizard::Editor * wizard::ProjectWorkspace::GotoFile ( const std::string & aFilePath,
bool aRecordLocation = true )

References FindSource(), and GotoFile().

◆ GotoFile() [2/2]

wizard::Editor * wizard::ProjectWorkspace::GotoFile ( UtTextDocument * aSourcePtr,
bool aRecordLocation )

Open the file and make it active.

Parameters
aSourcePtrThe source to open / activate.
aRecordLocationIf true, records the location for forward/backward navigation.

References wizard::EditorDock::DisableFullscreen(), wizard::EditorDock::EnableFullscreen(), wizard::Editor::GetDock(), GetEditorManager(), wizard::TextSource::GetView(), and wizard::TextSourceView::mEditorPtr.

Referenced by wizard::EditorHelpers::AddNewAttributeInText(), GotoFile(), GotoRange(), wizard::ProxyUtil::InvalidateInput(), and wizard::Environment::LoadProject().

◆ GotoRange() [1/2]

wizard::Editor * wizard::ProjectWorkspace::GotoRange ( const std::string & aFilePath,
size_t aLineNumber )

◆ GotoRange() [2/2]

wizard::Editor * wizard::ProjectWorkspace::GotoRange ( const UtTextDocumentRange & aRange)

◆ Instance()

wizard::ProjectWorkspace * wizard::ProjectWorkspace::Instance ( )
static

◆ IsProcessing()

bool wizard::ProjectWorkspace::IsProcessing ( ) const

◆ NewProject()

void wizard::ProjectWorkspace::NewProject ( )

◆ NewTextSource

void wizard::ProjectWorkspace::NewTextSource ( TextSource * aSourcePtr)
signal

◆ NotifyOfSourceChange()

void wizard::ProjectWorkspace::NotifyOfSourceChange ( TextSource * aSourcePtr)

◆ OnChangeDebug

void wizard::ProjectWorkspace::OnChangeDebug ( bool aIsActive)
protectedslot

Referenced by ChangeDebug(), and ProjectWorkspace().

◆ OpenSource()

wizard::Editor * wizard::ProjectWorkspace::OpenSource ( TextSource * aSourcePtr)

◆ ParseIsUpToDate()

bool wizard::ProjectWorkspace::ParseIsUpToDate ( )

◆ ParseStatistics()

void wizard::ProjectWorkspace::ParseStatistics ( )

References WaitForParsing().

◆ ParseStatisticsReady

void wizard::ProjectWorkspace::ParseStatisticsReady ( Project * aProjectPtr,
QString aReportText )
signal

Referenced by customEvent().

◆ PerformanceResult

void wizard::ProjectWorkspace::PerformanceResult ( Project * aProjectPtr,
QString aWorkType,
int aTimeToCompleteMS )
signal

A piece of work has completed. This is used to record timing information.

Referenced by customEvent().

◆ ProjectAdded()

void wizard::ProjectWorkspace::ProjectAdded ( wizard::Project * aProjectPtr)

◆ ProjectClosed

◆ ProjectIncrementParseNumber()

void wizard::ProjectWorkspace::ProjectIncrementParseNumber ( )
inline

◆ ProjectOpened

void wizard::ProjectWorkspace::ProjectOpened ( Project * aProjectPtr)
signal

◆ ProxyUpdated

void wizard::ProjectWorkspace::ProxyUpdated ( ProxyMerge * aProxyMerge)
signal

◆ RemoveProject()

void wizard::ProjectWorkspace::RemoveProject ( wizard::Project * aProjectPtr)

◆ ReparseAll()

◆ RequestClose()

bool wizard::ProjectWorkspace::RequestClose ( bool aForce = false)

◆ RequestReparseWsf()

void wizard::ProjectWorkspace::RequestReparseWsf ( TextSource * aSourcePtr)

Referenced by NotifyOfSourceChange().

◆ RestyleViews()

void wizard::ProjectWorkspace::RestyleViews ( )

References GetEditorManager(), and GetProject().

◆ SaveAll()

void wizard::ProjectWorkspace::SaveAll ( )

◆ ScheduleCheckingFilesForModification()

void wizard::ProjectWorkspace::ScheduleCheckingFilesForModification ( )

◆ SetMaximumWSF_FileSize()

void wizard::ProjectWorkspace::SetMaximumWSF_FileSize ( int aFileSize)
inlinestatic

◆ SourceRemoved

void wizard::ProjectWorkspace::SourceRemoved ( TextSource * aSourcePtr)
signal

◆ StartExecution()

void wizard::ProjectWorkspace::StartExecution ( WsfExecution * aExecutionPtr)

◆ StartingExecution

void wizard::ProjectWorkspace::StartingExecution ( WsfExecution * aExecutionPtr)
signal

Referenced by StartExecution().

◆ StopAllExecutions()

void wizard::ProjectWorkspace::StopAllExecutions ( )

◆ TouchParse()

void wizard::ProjectWorkspace::TouchParse ( bool aUpdateQuick = false)

◆ Update()

◆ ViewClosed()

void wizard::ProjectWorkspace::ViewClosed ( TextSourceView * aViewPtr)

◆ ViewOpened()

void wizard::ProjectWorkspace::ViewOpened ( TextSourceView * aViewPtr)

◆ WaitForAbortParsing()

void wizard::ProjectWorkspace::WaitForAbortParsing ( )

◆ WaitForParsing()

void wizard::ProjectWorkspace::WaitForParsing ( )

Waits until the parsing thread is complete. This should only be called from the main thread.

References wizard::ProjectParseThread::cNOT_WORKING, and wizard::ProjectParseThread::cPARSING.

Referenced by BeginSerialize(), CheckFilesForModification(), and ParseStatistics().

◆ WaitForSourceModifications()

void wizard::ProjectWorkspace::WaitForSourceModifications ( TextSource * aSourcePtr)

Returns when the source has all queued changes applied. This may require waiting until parsing is complete.

References WaitForAbortParsing().

Member Data Documentation

◆ mUpdateTimer

QTimer wizard::ProjectWorkspace::mUpdateTimer

Referenced by ProjectWorkspace().


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved