mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
ecode: Added XML Tools plugin, currently provides highlight of matching xml tags and auto edit of xml tag name. Some minor fixes are still pending.
This commit is contained in:
@@ -36,6 +36,26 @@ class BoolScopedOp {
|
||||
bool& boolRef;
|
||||
};
|
||||
|
||||
class BoolScopedOpOptional {
|
||||
public:
|
||||
explicit BoolScopedOpOptional( bool cond, bool& boolRef ) : cond( cond ), boolRef( boolRef ) {}
|
||||
|
||||
explicit BoolScopedOpOptional( bool cond, bool& boolRef, bool initialVal ) :
|
||||
cond( cond ), boolRef( boolRef ) {
|
||||
if ( cond )
|
||||
boolRef = initialVal;
|
||||
}
|
||||
|
||||
~BoolScopedOpOptional() {
|
||||
if ( cond )
|
||||
boolRef = !boolRef;
|
||||
}
|
||||
|
||||
private:
|
||||
bool cond;
|
||||
bool& boolRef;
|
||||
};
|
||||
|
||||
}} // namespace EE::System
|
||||
|
||||
#endif // EE_SYSTEM_SCOPEDOP_HPP
|
||||
|
||||
@@ -556,13 +556,13 @@ class EE_API TextDocument {
|
||||
|
||||
SyntaxHighlighter* getHighlighter() const;
|
||||
|
||||
TextRange getWordRangeInPosition( const TextPosition& pos );
|
||||
TextRange getWordRangeInPosition( const TextPosition& pos, bool basedOnHighlighter = true );
|
||||
|
||||
TextRange getWordRangeInPosition();
|
||||
TextRange getWordRangeInPosition( bool basedOnHighlighter = true );
|
||||
|
||||
String getWordInPosition( const TextPosition& pos );
|
||||
String getWordInPosition( const TextPosition& pos, bool basedOnHighlighter = true );
|
||||
|
||||
String getWordInPosition();
|
||||
String getWordInPosition( bool basedOnHighlighter = true );
|
||||
|
||||
bool mightBeBinary() const;
|
||||
|
||||
@@ -578,6 +578,10 @@ class EE_API TextDocument {
|
||||
|
||||
void stopActiveFindAll();
|
||||
|
||||
bool isDoingTextInput() const;
|
||||
|
||||
bool isInsertingText() const;
|
||||
|
||||
protected:
|
||||
friend class UndoStack;
|
||||
|
||||
@@ -609,6 +613,7 @@ class EE_API TextDocument {
|
||||
bool mHAsCpp{ false };
|
||||
bool mLastCursorChangeWasInteresting{ false };
|
||||
bool mDoingTextInput{ false };
|
||||
bool mInsertingText{ false };
|
||||
std::vector<std::pair<String::StringBaseType, String::StringBaseType>> mAutoCloseBracketsPairs;
|
||||
Uint32 mIndentWidth{ 4 };
|
||||
IndentType mIndentType{ IndentType::IndentTabs };
|
||||
|
||||
@@ -71,6 +71,22 @@ class EE_API TextRange {
|
||||
return mStart >= other.mStart && mEnd >= other.mEnd;
|
||||
}
|
||||
|
||||
TextRange operator+( const TextRange& other ) const {
|
||||
return TextRange( mStart + other.mStart, mEnd + other.mEnd );
|
||||
}
|
||||
|
||||
TextRange operator+=( const TextRange& other ) const {
|
||||
return TextRange( mStart + other.mStart, mEnd + other.mEnd );
|
||||
}
|
||||
|
||||
TextRange operator-( const TextRange& other ) const {
|
||||
return TextRange( mStart - other.mStart, mEnd - other.mEnd );
|
||||
}
|
||||
|
||||
TextRange operator-=( const TextRange& other ) const {
|
||||
return TextRange( mStart - other.mStart, mEnd - other.mEnd );
|
||||
}
|
||||
|
||||
bool contains( const TextPosition& position ) const {
|
||||
if ( !( position.line() > mStart.line() ||
|
||||
( position.line() == mStart.line() && position.column() >= mStart.column() ) ) )
|
||||
|
||||
Reference in New Issue
Block a user