46 TextScope(
const QString& fullScope );
125 QVector<TextScopeList*> selectorList_;
162 QList<QString> atomNameList_;
163 QHash<QString,TextScopeAtomId> atomNameMap_;
166 QList<TextScope*> textScopeList_;
167 QHash<QString,TextScope*> textScopeRefMap_;
241 QVector<ScopedTextRange*> ranges_;
289 virtual void addRange(
int anchor,
int caret );
293 virtual void clear();
312 QList<MultiLineScopedTextRange*> scopedRangeList_;
381 int lastScopedOffset_;
This class is used to define a gap vector. A Gapvector is split in 2 parts. where the gap is moved to...
Definition gapvector.h:19
This class 'defines' a single document scope.
Definition textdocumentscopes.h:254
void giveEndRegExp(RegExp *regExp)
Gives the end regular expression.
Definition textdocumentscopes.cpp:201
static bool lessThan(MultiLineScopedTextRange *r1, MultiLineScopedTextRange *r2)
This method compares selection ranges.
Definition textdocumentscopes.cpp:215
TextGrammarRule * grammarRule() const
Returns the active grammar rule.
Definition textdocumentscopes.cpp:194
MultiLineScopedTextRange(int anchor, int caret, TextScope *scope)
The multiline scoped textrange.
Definition textdocumentscopes.cpp:171
void setGrammarRule(TextGrammarRule *rule)
Sets the rule (we need the rule to perform end-of-line matching)
Definition textdocumentscopes.cpp:187
RegExp * endRegExp()
returns the end-regular expression
Definition textdocumentscopes.cpp:208
virtual MultiLineScopedTextRange * multiLineScopedTextRange()
returns the multi-line scoped text range
Definition textdocumentscopes.cpp:76
MultiLineScopedTextRangeReference(MultiLineScopedTextRange &range)
Creates a scoped text range based on a scope textrange.
Definition textdocumentscopes.cpp:62
This is a set of scoped textranges. This set is used to remember parsed language ranges.
Definition textdocumentscopes.h:279
virtual MultiLineScopedTextRange & scopedRange(int idx)
this method returns the scoped range
Definition textdocumentscopes.cpp:693
void processChangesIfRequired(bool joinBorders)
This method process the changes if required.
Definition textdocumentscopes.cpp:738
virtual TextRange & range(int idx)
returns the given textrange
Definition textdocumentscopes.cpp:633
virtual const TextRange & constRange(int idx) const
returns the cont range
Definition textdocumentscopes.cpp:641
virtual void removeRange(int idx)
' removes the given scope
Definition textdocumentscopes.cpp:663
void removeAndInvalidateRangesAfterOffset(int offset)
This method removes all ranges after a given offset. This means it will remove all complete ranges af...
Definition textdocumentscopes.cpp:713
virtual int rangeCount() const
Returns the number of ranges.
Definition textdocumentscopes.cpp:626
void reset()
Completely empties the scope list.
Definition textdocumentscopes.cpp:618
virtual void clear()
removes all scopes
Definition textdocumentscopes.cpp:671
QString toString()
convert the found ranges to strings
Definition textdocumentscopes.cpp:751
virtual void toSingleRange()
Definition textdocumentscopes.cpp:678
TextDocumentScopes * textDocumentScopes()
Returns a reference to the textdocument scopes.
Definition textdocumentscopes.cpp:226
MultiLineScopedTextRangeSet(TextDocument *textDocument, TextDocumentScopes *textDocumentScopes)
A multilinescoped textrange set.
Definition textdocumentscopes.cpp:604
virtual void sortRanges()
This method sorts all ranges.
Definition textdocumentscopes.cpp:686
void giveScopedTextRange(MultiLineScopedTextRange *textScope)
This method gives the scoped text range to this object.
Definition textdocumentscopes.cpp:731
virtual void addRange(int anchor, int caret)
This method adds a range with the default scope.
Definition textdocumentscopes.cpp:649
A class for matching QStrings with the Oniguruma API We need this Regular Expression library to be ab...
Definition regexp.h:35
A base scoped text range.
Definition textdocumentscopes.h:176
QString toString() const
Converts the scoped textrange to a string.
Definition textdocumentscopes.cpp:51
ScopedTextRange(int anchor, int caret, TextScope *scope)
A scoped text range.
Definition textdocumentscopes.cpp:21
virtual MultiLineScopedTextRange * multiLineScopedTextRange()
returns the multi-line scoped text range
Definition textdocumentscopes.h:187
void setScope(TextScope *scope)
sets the scope of this textrange
Definition textdocumentscopes.cpp:36
TextScope * scope() const
returns the scope
Definition textdocumentscopes.cpp:44
a list of textscopes This class is used for single-line scopes (Todo, this needs to be optimized)
Definition textdocumentscopes.h:220
ScopedTextRangeList()
A scoped textrange lsit.
Definition textdocumentscopes.cpp:86
void squeeze()
Squeezes the ranges (reduces the memory usage)
Definition textdocumentscopes.cpp:133
QString toString()
Converts the scoped textrange list to a strubg.
Definition textdocumentscopes.cpp:154
ScopedTextRange * at(int idx)
Returns the scoped textrange at the given list.
Definition textdocumentscopes.cpp:109
void giveAndPrependRange(ScopedTextRange *range)
Prepends a range.
Definition textdocumentscopes.cpp:126
int size() const
Retursn the number of scoped textranges in the list.
Definition textdocumentscopes.cpp:102
bool isIndependent() const
returns the independent flag
Definition textdocumentscopes.cpp:147
void setIndependent(bool enable=true)
set the independent flag. The independent flag means it's not dependent on other lines
Definition textdocumentscopes.cpp:140
void giveRange(ScopedTextRange *at)
give a rnage to the range set
Definition textdocumentscopes.cpp:118
This is the base and abstract class of a text document A TextDocument is the model part of the editor...
Definition textdocument.h:42
This class is used to 'contain' all document scope information.
Definition textdocumentscopes.h:322
QStringList scopesAsStringList()
Returns a string-list will all scopes. This list is mainly used for debugging and testing.
Definition textdocumentscopes.cpp:988
QVector< MultiLineScopedTextRange * > multiLineScopedRangesBetweenOffsets(int offsetBegin, int offsetEnd)
This method returns all scope-ranges at the given offset-ranges.
Definition textdocumentscopes.cpp:893
void giveLineScopedRangeList(int line, ScopedTextRangeList *list)
This method sets the scoped line list.
Definition textdocumentscopes.cpp:820
void grammarChanged()
the grammar has been changed
Definition textdocumentscopes.cpp:1033
TextScopeList scopesAtOffset(int offset, bool includeEnd=false)
returns all scopes between the given offsets
Definition textdocumentscopes.cpp:911
void giveMultiLineScopedTextRange(MultiLineScopedTextRange *range)
gives the multi-lined textrange to the scopedranges
Definition textdocumentscopes.cpp:850
void setDefaultScope(const QString &name, TextGrammarRule *rule)
This method sets the default scope.
Definition textdocumentscopes.cpp:810
ScopedTextRangeList * scopedRangesAtLine(int line)
This method returns all scoped ranges on the given line.
Definition textdocumentscopes.cpp:835
MultiLineScopedTextRange & defaultScopedRange()
This method retursn the default scoped textrange Currently this is done very dirty,...
Definition textdocumentscopes.cpp:885
TextDocument * textDocument()
returns the current textdocument scope
Definition textdocumentscopes.cpp:1026
void removeScopesAfterOffset(int offset)
This method invalidates all scopes after the given offset.
Definition textdocumentscopes.cpp:858
void lastScopedOffsetChanged(int previousOffset, int lastScopedOffset)
Definition moc_textdocumentscopes.cpp:180
void setLastScopedOffset(int offset)
Sets the last scoped offset.
Definition textdocumentscopes.cpp:797
int scopedLineCount()
Returns the number of scopes lines in the lineRangeList_.
Definition textdocumentscopes.cpp:843
QString toString()
Converts the textdocument scoped to a string.
Definition textdocumentscopes.cpp:981
int lastScopedOffset()
returns the last scoped offset
Definition textdocumentscopes.cpp:789
QVector< ScopedTextRange * > createScopedRangesAtOffsetList(int offset)
This method returns all scoped ranges at the given offset Hmmm this is almost exactly the same implem...
Definition textdocumentscopes.cpp:948
void dumpScopedLineAddresses(const QString &text=QString())
add all dumped line scopes
Definition textdocumentscopes.cpp:1015
TextDocumentScopes(TextDocument *textDocument)
The constructor for storing/managing the textdocument scopes.
Definition textdocumentscopes.cpp:768
defines a single grammar rule
Definition textgrammar.h:24
A single text region A region constists of an anchor and a caret: The anchor defines the 'start' of t...
Definition textrange.h:29
TextRange(int anchor=0, int caret=0)
Definition textrange.h:31
int anchor() const
Definition textrange.h:33
int caret() const
Definition textrange.h:34
TextRangeSetBase(TextDocument *doc)
Definition textrange.cpp:434
TextDocument * textDocument() const
Returns the associated textdocument.
Definition textrange.cpp:972
This class defines a full text-scope. A full textscope is textscope with one ore more scoped-elements...
Definition textdocumentscopes.h:36
friend class TextScopeManager
Definition textdocumentscopes.h:53
TextScopeAtomId atomAt(int idx) const
This method returns the atom at the given index.
Definition textdocumentscopes.cpp:294
int atomCount()
returns the number of atom items
Definition textdocumentscopes.cpp:287
const QString name()
This method returns the name of this scope.
Definition textdocumentscopes.cpp:273
int rindexOf(TextScope *scope)
This method returns the 'index' of the given full-scope. This is a kind of substring search.
Definition textdocumentscopes.cpp:324
bool startsWith(TextScope *scope)
Checks if the current scope starts with the given scope wild-card atoms will always match.
Definition textdocumentscopes.cpp:304
A list of text-scopes. on a certian location, usually more then one scope is available on a given loc...
Definition textdocumentscopes.h:61
TextScopeList()
A list of text scopes.
Definition textdocumentscopes.cpp:352
int atomCount() const
This method returns the total number of atoms.
Definition textdocumentscopes.cpp:375
QString toString()
Converts the scopelist to a string.
Definition textdocumentscopes.cpp:386
TextScope * refTextScope(const QString &scopeString)
This method finds or creates a full-scope.
Definition textdocumentscopes.cpp:561
TextScopeAtomId findOrRegisterScopeAtom(const QString &atom)
This method registers the scope element.
Definition textdocumentscopes.cpp:548
TextScopeAtomId wildcardId()
returns the wildcard reference id
Definition textdocumentscopes.cpp:541
const QString & atomName(TextScopeAtomId id)
Returns the name of the given atom id.
Definition textdocumentscopes.cpp:593
TextScopeList * createTextScopeList(const QString &scopeListString)
This method creates a text-scope list from the given scope string.
Definition textdocumentscopes.cpp:581
TextScopeManager()
The scopemanager constructor.
Definition textdocumentscopes.cpp:498
void reset()
This method clears and delets all scopes. WARNING this destroys all registered text-scopes This metho...
Definition textdocumentscopes.cpp:515
TextScope * refEmptyScope()
Returns the empty scope.
Definition textdocumentscopes.cpp:574
TextScopeSelector(const QString &selector)
The textscope selector.
Definition textdocumentscopes.cpp:401
QString toString()
Converts the scope to a string.
Definition textdocumentscopes.cpp:439
double calculateMatchScore(const TextScopeList *scopeList)
This method calculates the matching score of the scope with this selector Currently the scope-calcula...
Definition textdocumentscopes.cpp:428
#define EDBEE_EXPORT
Definition exports.h:15
QT Acessibility has an issue with reporting blank lines between elements lines. defining 'WINDOWS_EMP...
Definition commentcommand.cpp:20
short TextScopeAtomId
This type defines a single scope atom.
Definition textdocumentscopes.h:27