This class is used to 'contain' all document scope information.
More...
#include <textdocumentscopes.h>
This class is used to 'contain' all document scope information.
◆ TextDocumentScopes()
edbee::TextDocumentScopes::TextDocumentScopes |
( |
TextDocument * |
textDocument | ) |
|
The constructor for storing/managing the textdocument scopes.
- Parameters
-
textDocument | the textdocument this scoping is for |
◆ ~TextDocumentScopes()
edbee::TextDocumentScopes::~TextDocumentScopes |
( |
| ) |
|
|
virtual |
◆ createScopedRangesAtOffsetList()
QVector< ScopedTextRange * > edbee::TextDocumentScopes::createScopedRangesAtOffsetList |
( |
int |
offset | ) |
|
This method returns all scoped ranges at the given offest Hmmm this is almost exactly the same implementation as the scopesAtOffset method !? (perhaps we should refactor this)
Warning you MUST destroy (qDeleteAll) the list with scoped textranges returned by this list
- Parameters
-
offset | he offset to retrieve the scoped ranges |
- Returns
- the vector with text scopes. These scopes are document wide
◆ defaultScopedRange()
This method retursn the default scoped textrange Currently this is done very dirty, by retrieving the defaultscoped range the begin and end is set tot he complete document a better solution would be a subclass that always returns 0 for an anchor and the documentlength for the caret.
◆ dumpScopedLineAddresses()
void edbee::TextDocumentScopes::dumpScopedLineAddresses |
( |
const QString & |
text = QString() | ) |
|
add all dumped line scopes
◆ giveLineScopedRangeList()
void edbee::TextDocumentScopes::giveLineScopedRangeList |
( |
int |
line, |
|
|
ScopedTextRangeList * |
list |
|
) |
| |
This method sets the scoped line list.
- Parameters
-
line | the line |
list | the list with all scopes on the given line |
◆ giveMultiLineScopedTextRange()
gives the multi-lined textrange to the scopedranges
◆ grammarChanged
void edbee::TextDocumentScopes::grammarChanged |
( |
| ) |
|
|
protectedslot |
the grammar has been changed
◆ lastScopedOffset()
int edbee::TextDocumentScopes::lastScopedOffset |
( |
| ) |
|
returns the last scoped offset
◆ lastScopedOffsetChanged
void edbee::TextDocumentScopes::lastScopedOffsetChanged |
( |
int |
previousOffset, |
|
|
int |
lastScopedOffset |
|
) |
| |
|
signal |
◆ multiLineScopedRangesBetweenOffsets()
QVector< MultiLineScopedTextRange * > edbee::TextDocumentScopes::multiLineScopedRangesBetweenOffsets |
( |
int |
offsetBegin, |
|
|
int |
offsetEnd |
|
) |
| |
This method returns all scope-ranges at the given offset-ranges.
CHANGED 2013-01-22, was <
◆ removeScopesAfterOffset()
void edbee::TextDocumentScopes::removeScopesAfterOffset |
( |
int |
offset | ) |
|
This method invalidates all scopes after the given offset.
- Parameters
-
offset | the offset from which to remove the offset |
◆ scopedLineCount()
int edbee::TextDocumentScopes::scopedLineCount |
( |
| ) |
|
Returns the number of scopes lines in the lineRangeList_.
◆ scopedRangesAtLine()
This method returns all scoped ranges on the given line.
- Parameters
-
line | the line to retrieve the scoped ranges for |
- Returns
- the scoped textrange list
◆ scopesAsStringList()
QStringList edbee::TextDocumentScopes::scopesAsStringList |
( |
| ) |
|
Returns a string-list will all scopes. This list is mainly used for debugging and testing.
◆ scopesAtOffset()
TextScopeList edbee::TextDocumentScopes::scopesAtOffset |
( |
int |
offset | ) |
|
returns all scopes between the given offsets
◆ setDefaultScope()
void edbee::TextDocumentScopes::setDefaultScope |
( |
const QString & |
name, |
|
|
TextGrammarRule * |
rule |
|
) |
| |
This method sets the default scope.
- Parameters
-
the | name of the scope |
rule | the rule that matched |
◆ setLastScopedOffset()
void edbee::TextDocumentScopes::setLastScopedOffset |
( |
int |
offset | ) |
|
Sets the last scoped offset.
- Parameters
-
offset | the last scoped offset |
◆ textDocument()
returns the current textdocument scope
◆ toString()
QString edbee::TextDocumentScopes::toString |
( |
| ) |
|
Converts the textdocument scoped to a string.
The documentation for this class was generated from the following files: