|
WSF
|
Functions | |
| QString | GetInsertWithComments (const UtTextDocumentRange &aEntryRange, const QString &aAttributeName, const QString &aInsert) |
| bool | ReplaceTextInEditor (const UtTextDocumentRange &aEntryRange, const QString &aAttributeName, const QString &aInsert) |
| QTextCursor | FindStartCursor (const WsfPProxyNode &aNode) noexcept |
| QTextCursor | FindEndCursor (const WsfPProxyNode &aNode) noexcept |
| int | GetIndentLevel (const QString &aLine) noexcept |
| QString | ConstructTextToAppendToBlock (const QTextCursor &aStartCursor, const QTextCursor &aEndCursor, const QString &aAttributeName, const QString &aDataValue) noexcept |
| void | AddNewAttributeInText (const WsfPProxyNode &aProxyNode, const QString &aAttributeName, const QString &aDataValue) noexcept |
| bool | MoveToPreviousNonWhitespaceToken (QTextCursor &aCursor, QTextCursor::MoveMode aMoveMode, int aOperationCount) noexcept |
| bool | IsWhitespaceString (const QString &aText) noexcept |
| bool | ReplacePositionText (QStringList &aPositionTokens, int aCommandIndex, const vespa::VaPosition &aNewPosition) noexcept |
| bool | ReplaceMGRS_Text (QStringList &aMGRS_Tokens, int aCommandIndex, const vespa::VaPosition &aNewPosition) noexcept |
| void | InsertTextAndResetCursor (wizard::Editor *aEditorPtr, QTextCursor &aCursor, const QString &aTextToInsert) noexcept |
| QString | GetPositionString (const vespa::VaPosition &aPosition) noexcept |
| template<typename UNITARY_PROPERTY> | |
| bool | ReplaceUnitaryText (QStringList &aUnitaryTokens, int aCommandIndex, UNITARY_PROPERTY &aNewUnitary) noexcept |
| template<wkf::ValueType UNITARY_TYPE, typename UNITARY_PROPERTY> | |
| QString | GetUnitaryString (UNITARY_PROPERTY &aUnitary) noexcept |
|
noexcept |
Add a new attribute in the text
| aProxyNode | contains the context for the new attribute |
| aAttributeName | is the name of the new attribute |
| aDataValue | is the value of the new attribute |
References ConstructTextToAppendToBlock(), FindEndCursor(), FindStartCursor(), wizard::ProjectWorkspace::GotoFile(), wizard::Editor::GoToLine(), wizard::ProjectWorkspace::Instance(), and MoveToPreviousNonWhitespaceToken().
|
noexcept |
Constructs the new text to append to the AFSIM input block designated by the given QTextCursors
| aStartCursor | is the cursor pointing to the start of the AFSIM input block |
| aEndCursor | is the cursor pointing to the end of the AFSIM input block |
| aAttributeName | is the name of the attribute to append |
| aDataValue | is the value of the attribute to append |
References GetIndentLevel(), and wizard::EditorPrefObject::TabSpace().
Referenced by AddNewAttributeInText().
|
noexcept |
Get the cursor pointing to the end of the definition
| aNode | is the proxy node containing the definition |
References FindStartCursor().
Referenced by AddNewAttributeInText().
|
noexcept |
Get the cursor pointing to the start of the definition
| aNode | is the proxy node containing the definition |
References wizard::Project::GotoFile(), and wizard::Project::Instance().
Referenced by AddNewAttributeInText(), and FindEndCursor().
|
noexcept |
Gets the level of indent for the given line
| aLine | is the line of text |
Referenced by ConstructTextToAppendToBlock().
| QString VI_EXPORT wizard::EditorHelpers::GetInsertWithComments | ( | const UtTextDocumentRange & | aEntryRange, |
| const QString & | aAttributeName, | ||
| const QString & | aInsert ) |
Replaces the value of the given attribute with a new value or removes the attribute
| aEntryRange | the range that is to be modified |
| aAttributeName | the name of the attribute |
| aInsert | the text to insert |
References wizard::Editor::FindNextValidToken(), and wizard::Editor::Split().
Referenced by ReplaceTextInEditor().
|
noexcept |
Converts a vespa::VaPosition to a QString
| aPosition | is the vespa::VaPosition to convert to a QString |
|
noexcept |
Converts a UtUnitaryValue to a QString
| aUnitary | is the UtUnitaryValue to convert to a QString |
|
noexcept |
Inserts the given QString into the given wizard::Editor at the given QTextCursor and resets the QTextCursor's position to the start of the block
| aEditorPtr | is the wizard::Editor in which to add the text |
| aCursor | is the QTextCursor pointing to the location to insert the text |
| aTextToInsert | is the text to insert |
|
noexcept |
Determines whether the given string is composed of only whitespace characters
| aText | is the input text |
Referenced by MoveToPreviousNonWhitespaceToken().
|
noexcept |
Moves the QTextCursor to the beginning of the previous non-whitespace token
| aCursor | is the QTextCursor (a return value parameter) |
| aMoveMode | is whether to move or keep the anchor |
| aOperationCount | is the number of times to move the cursor |
References IsWhitespaceString(), and ok.
Referenced by AddNewAttributeInText().
|
noexcept |
Replaces the old MGRS coordinate text with the new MGRS coordinate text
| aMGRS_Tokens | are the tokens from the "mgrs_coordinate" (or similar) UtTextDocumentRange |
| aCommandIndex | is the index in aMGRS_Tokens of the "mgrs_coordinate" (or similar) command |
| aNewPosition | is the new position whose MGRS coordinate text will replace the old MGRS coordinate text |
References wizard::Editor::FindNextValidToken().
|
noexcept |
Replaces the position's old latitude and longitude text with new latitude and longitude text
| aPositionTokens | are the tokens from the "position" (or similar) UtTextDocumentRange |
| aCommandIndex | is the index in aPositionTokens of the "position" (or similar) command |
| aNewPosition | is the new position whose latitude and longitude text will replace the old latitude and longitude text |
References wizard::Editor::FindNextValidToken().
| CPP17_NODISCARD bool VI_EXPORT wizard::EditorHelpers::ReplaceTextInEditor | ( | const UtTextDocumentRange & | aEntryRange, |
| const QString & | aAttributeName, | ||
| const QString & | aInsert ) |
Modifies the given range by replacing the given attribute's value or removing the attribute
| aEntryRange | the range that is to be modified |
| aAttributeName | the name of the attribute |
| aInsert | the text to insert |
References GetInsertWithComments(), wizard::Project::GotoFile(), wizard::Project::Instance(), pos, success, and wizEnv.
|
noexcept |
Replaces the old unitary property with the new unitary property
| aUnitaryTokens | are the tokens from the unitary property's UtTextDocumentRange |
| aCommandIndex | is the index in aUnitaryTokens of the unitary property's command |
| aNewUnitary | is the new unitary property whose text will replace the old unitary property's text |
References wizard::Editor::FindNextValidToken(), and ReplaceUnitaryText().
Referenced by ReplaceUnitaryText().