|
WSF
|
#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 | |
| TextSourceCache * | GetSourceCache () const |
| Project * | GetProject () |
| 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) |
| ActionManager * | GetActionManager () const |
| EditorManager * | GetEditorManager () 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 () |
| TextSource * | FindSource (const std::string &aPath, bool aCreate, bool aRead) |
| std::vector< TextSource * > | GetSourceList () |
| wizard::Editor * | OpenSource (TextSource *aSourcePtr) |
| Attempts to open or show an already open source file. | |
| wizard::Editor * | GotoRange (const UtTextDocumentRange &aRange) |
| wizard::Editor * | GotoRange (const std::string &aFilePath, size_t aLineNumber) |
| wizard::Editor * | GotoFile (UtTextDocument *aSourcePtr, bool aRecordLocation) |
| wizard::Editor * | GotoFile (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 () |
| WsfConnector * | GetWsfConnector () |
| bool | IsProcessing () const |
| void | NewProject () |
| void | CreateA_NewFile (Project *aProject, const UtPath &aDir) |
Static Public Member Functions | |
| static ProjectWorkspace * | Instance () |
| static int | GetMaximumWSF_FileSize () |
| static void | SetMaximumWSF_FileSize (int aFileSize) |
Public Attributes | |
| QTimer | mUpdateTimer |
Protected Slots | |
| void | ExecutionDestroyed (QObject *aObjectPtr) |
| void | OnChangeDebug (bool aIsActive) |
| wizard::ProjectWorkspace::ProjectWorkspace | ( | ) |
|
override |
References RemoveProject(), and StopAllExecutions().
|
signal |
Referenced by wizard::EditorManager::EditorManager(), ProjectAdded(), and RemoveProject().
| void wizard::ProjectWorkspace::ApplicationActivated | ( | ) |
References wizSignals.
Referenced by ProjectWorkspace().
| void wizard::ProjectWorkspace::BeginSerialize | ( | ) |
|
signal |
References ExecutionDestroyed(), and OnChangeDebug().
Referenced by wizard::EditorDock::EditorDock(), and ProjectWorkspace().
| void wizard::ProjectWorkspace::CheckFilesForModification | ( | ) |
References WaitForParsing().
Referenced by ExecutionDestroyed().
| void wizard::ProjectWorkspace::CreateA_NewFile | ( | Project * | aProject, |
| const UtPath & | aDir ) |
References wizard::Project::Instance().
|
override |
References Vi::cEDIT_MODE_TEXT, wizard::ThreadNotifyEvent::cFAILED, wizard::ThreadNotifyEvent::cPARSE_RESULTS_READY, wizard::ThreadNotifyEvent::cPERFORMANCE_TEST_RESULTS_READY, wizard::ThreadNotifyEvent::cPROXY_READY, wizard::ThreadNotifyEvent::cSERIALIZE_COMPLETED, wizard::ThreadNotifyEvent::cTHREAD_NOTIFY_EVENT_ID, wizard::ThreadNotifyEvent::cWORK_COMPLETE, wizard::Project::GiveParseResults(), wizard::ThreadNotifyEvent::mNotificationType, wizard::ThreadNotifyEvent::mProjectPtr, wizard::ThreadNotifyEvent::mProxy, wizard::ThreadNotifyEvent::mProxyHash, wizard::ThreadNotifyEvent::mSerializeToComplete, wizard::ThreadNotifyEvent::mTaskId, wizard::ThreadNotifyEvent::mTimeToCompleteParseMs, wizard::ThreadNotifyEvent::mTimeToCompleteProxyMs, OpenSource(), ParseStatisticsReady(), PerformanceResult(), wizard::Project::ProxyReady(), wizard::TextSource::ReloadViews(), ReparseAll(), wizard::TextSource::SetObsoleteSequenceNumber(), and wizSignals.
| void wizard::ProjectWorkspace::EmitProxyUpdated | ( | ProxyMerge * | aProxyMerge | ) |
References ProxyUpdated().
|
protectedslot |
References CheckFilesForModification(), ReparseAll(), and wizSignals.
Referenced by ChangeDebug(), and StartExecution().
| wizard::TextSource * wizard::ProjectWorkspace::FindSource | ( | const std::string & | aPath, |
| bool | aCreate, | ||
| bool | aRead ) |
References wizard::ProjectParseThread::cNOT_WORKING, and wizard::TextSource::GetSource().
Referenced by wizard::CreatePlatformDialog::CreatePlatform(), wizard::RenameFileDialog::FileRename(), GotoFile(), GotoRange(), wizard::DocumentationInterpretter::LookupDocumentationUrl(), and wizard::EditAssist::ProcessUrl().
|
signal |
The project has been fully parsed and proxied.
Referenced by wizard::DeveloperActions::DeveloperActions(), and Update().
|
inline |
|
inline |
Referenced by wizard::Environment::BeginUndoCapture(), wizard::Environment::ClearUndo(), wizard::Environment::EndUndoCapture(), GotoFile(), wizard::Environment::IsCapturingUndo(), wizard::Environment::Redo(), RestyleViews(), wizard::Environment::Undo(), wizard::ActionManager::UpdateFocusActions(), and wizard::EditorDock::VisibilityChanged().
|
inline |
|
noexcept |
Get the time the WsfParseDefinitions spent parsing the WsfGrammar
Referenced by wizard::DeveloperActions::DeveloperActions().
|
noexcept |
Get the time the WsfParser spent parsing the input files
Referenced by wizard::DeveloperActions::DeveloperActions().
|
noexcept |
Get the time the WsfPProxyDeserialize spent deserializing the parse tree
Referenced by wizard::DeveloperActions::DeveloperActions().
|
noexcept |
Get the time the ProxyMerge spent merging the old and new WsfPProxys/Wizard spent updating its GUIs
Referenced by wizard::DeveloperActions::DeveloperActions().
|
inlinestatic |
| wizard::Project * wizard::ProjectWorkspace::GetProject | ( | ) |
Referenced by OpenSource(), wizard::EditAssist::ProcessUrl(), and RestyleViews().
|
inline |
| std::vector< wizard::TextSource * > wizard::ProjectWorkspace::GetSourceList | ( | ) |
|
inline |
| wizard::Editor * wizard::ProjectWorkspace::GotoFile | ( | const std::string & | aFilePath, |
| bool | aRecordLocation = true ) |
References FindSource(), and GotoFile().
| wizard::Editor * wizard::ProjectWorkspace::GotoFile | ( | UtTextDocument * | aSourcePtr, |
| bool | aRecordLocation ) |
Open the file and make it active.
| aSourcePtr | The source to open / activate. |
| aRecordLocation | If 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().
| wizard::Editor * wizard::ProjectWorkspace::GotoRange | ( | const std::string & | aFilePath, |
| size_t | aLineNumber ) |
References FindSource(), GotoFile(), wizard::Editor::GoToLine(), and wizard::Editor::RecordCurrentLocation().
| wizard::Editor * wizard::ProjectWorkspace::GotoRange | ( | const UtTextDocumentRange & | aRange | ) |
References OpenSource(), wizard::Editor::RecordCurrentLocation(), and wizard::Editor::SetSelection().
Referenced by wizard::FindResultsControl::ItemActivated(), and wizard::Environment::LoadProject().
|
static |
Referenced by wizard::EditorHelpers::AddNewAttributeInText(), wizard::Signals::applyProxy(), wizard::Environment::BeginUndoCapture(), wizard::Editor::BuildTitleBarMenu(), wizard::Environment::ClearUndo(), wizard::EditorManager::CloseAllButIncluded(), wizard::EditorManager::CloseAllButStartup(), wizard::CreatePlatformDialog::CreatePlatform(), wizard::DeveloperActions::DeveloperActions(), wizard::EditorDock::EditorDock(), wizard::EditorManager::EditorManager(), wizard::Environment::EndUndoCapture(), wizard::Editor::event(), wizard::ShutdownFilter::eventFilter(), wizard::Environment::FileOpen(), wizard::FindResultsControl::FindResultsControl(), wizard::WsfEditor::FormatSelection(), wizard::ProxyUtil::InvalidateInput(), wizard::Environment::IsCapturingUndo(), wizard::FindResultsControl::ItemActivated(), wizard::Environment::LoadProject(), wizard::FindResultsControl::NewFind(), wizard::ActionManager::NewProject(), wizard::TextSource::NewView(), wizard::PointOfInterestPropertiesWidget::PopulateFiles(), wizard::EditAssist::ProcessUrl(), ProjectWorkspace(), wizard::ProxyWatcher::ProxyWatcher(), wizard::Environment::Redo(), wizard::Signals::revertVisualModeChanges(), wizard::StartupDialog::StartupDialog(), wizard::WsfConnector::Stop(), wizard::TextLocationItemModel::TextLocationItemModel(), wizard::TextLocationItemModel::TextLocationItemModel(), wizard::Environment::Undo(), wizard::ActionManager::UpdateFocusActions(), and wizard::EditorDock::VisibilityChanged().
| bool wizard::ProjectWorkspace::IsProcessing | ( | ) | const |
References wizard::ProjectParseThread::cNOT_WORKING.
| void wizard::ProjectWorkspace::NewProject | ( | ) |
References wizard::Project::SetProjectLocation(), and wizRunMgr.
Referenced by wizard::ActionManager::NewProject().
|
signal |
| void wizard::ProjectWorkspace::NotifyOfSourceChange | ( | TextSource * | aSourcePtr | ) |
References wizard::ParseResultsTiny::IncludesFile(), and RequestReparseWsf().
|
protectedslot |
Referenced by ChangeDebug(), and ProjectWorkspace().
| wizard::Editor * wizard::ProjectWorkspace::OpenSource | ( | TextSource * | aSourcePtr | ) |
Attempts to open or show an already open source file.
References GetProject(), wizard::TextSource::GetView(), wizard::TextSource::GetViews(), wizard::TextSourceView::mEditorPtr, and wizard::TextSource::NewView().
Referenced by customEvent(), and GotoRange().
| bool wizard::ProjectWorkspace::ParseIsUpToDate | ( | ) |
| void wizard::ProjectWorkspace::ParseStatistics | ( | ) |
References WaitForParsing().
|
signal |
Referenced by customEvent().
|
signal |
A piece of work has completed. This is used to record timing information.
Referenced by customEvent().
| void wizard::ProjectWorkspace::ProjectAdded | ( | wizard::Project * | aProjectPtr | ) |
References ActiveProjectChanged(), and ProjectOpened().
|
signal |
|
inline |
References ProjectIncrementParseNumber().
Referenced by ProjectIncrementParseNumber().
|
signal |
|
signal |
Referenced by EmitProxyUpdated(), wizard::WsfEditor::Initialize(), and wizard::ProxyWatcher::ProxyWatcher().
| void wizard::ProjectWorkspace::RemoveProject | ( | wizard::Project * | aProjectPtr | ) |
References ActiveProjectChanged(), ProjectClosed(), WaitForAbortParsing(), and wizRunMgr.
Referenced by ~ProjectWorkspace().
| void wizard::ProjectWorkspace::ReparseAll | ( | ) |
| bool wizard::ProjectWorkspace::RequestClose | ( | bool | aForce = false | ) |
| void wizard::ProjectWorkspace::RequestReparseWsf | ( | TextSource * | aSourcePtr | ) |
Referenced by NotifyOfSourceChange().
| void wizard::ProjectWorkspace::RestyleViews | ( | ) |
References GetEditorManager(), and GetProject().
| void wizard::ProjectWorkspace::SaveAll | ( | ) |
| void wizard::ProjectWorkspace::ScheduleCheckingFilesForModification | ( | ) |
References wizard::ProjectParseThread::cPARSING.
Referenced by wizard::RenameFileDialog::OkClick(), and ProjectWorkspace().
|
inlinestatic |
|
signal |
| void wizard::ProjectWorkspace::StartExecution | ( | WsfExecution * | aExecutionPtr | ) |
|
signal |
Referenced by StartExecution().
| void wizard::ProjectWorkspace::StopAllExecutions | ( | ) |
Referenced by wizard::Environment::FileOpen(), wizard::WsfConnector::Stop(), and ~ProjectWorkspace().
| void wizard::ProjectWorkspace::TouchParse | ( | bool | aUpdateQuick = false | ) |
| void wizard::ProjectWorkspace::Update | ( | ) |
| void wizard::ProjectWorkspace::ViewClosed | ( | TextSourceView * | aViewPtr | ) |
| void wizard::ProjectWorkspace::ViewOpened | ( | TextSourceView * | aViewPtr | ) |
References wizard::TextSourceView::mEditorPtr.
| void wizard::ProjectWorkspace::WaitForAbortParsing | ( | ) |
References wizard::ProjectParseThread::cNOT_WORKING, and wizard::ProjectParseThread::cPARSING.
Referenced by RemoveProject(), and WaitForSourceModifications().
| 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().
| 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().
| QTimer wizard::ProjectWorkspace::mUpdateTimer |
Referenced by ProjectWorkspace().