mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-22 13:24:42 +02:00
[CODE_REORGANISATION] reorganisation xmlMatchedTagsHighlighter class.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@285 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
4748f3fa37
commit
c9e76e0193
@ -2213,8 +2213,13 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
||||
case SCN_UPDATEUI:
|
||||
{
|
||||
braceMatch();
|
||||
XmlMatchedTagsHighlighter xmlTagMatchHiliter(_pEditView);
|
||||
xmlTagMatchHiliter.tagMatch();
|
||||
|
||||
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
||||
if (nppGUI._enableTagsMatchHilite)
|
||||
{
|
||||
XmlMatchedTagsHighlighter xmlTagMatchHiliter(_pEditView);
|
||||
xmlTagMatchHiliter.tagMatch(nppGUI._enableTagAttrsHilite);
|
||||
}
|
||||
markSelectedText();
|
||||
updateStatusBar();
|
||||
AutoCompletion * autoC = isFromPrimary?&_autoCompleteMain:&_autoCompleteSub;
|
||||
|
@ -387,12 +387,8 @@ vector< pair<int, int> > XmlMatchedTagsHighlighter::getAttributesPos(int start,
|
||||
|
||||
|
||||
|
||||
void XmlMatchedTagsHighlighter::tagMatch()
|
||||
void XmlMatchedTagsHighlighter::tagMatch(bool doHiliteAttr)
|
||||
{
|
||||
const NppGUI & nppGUI = (NppParameters::getInstance())->getNppGUI();
|
||||
if (!nppGUI._enableTagsMatchHilite)
|
||||
return;
|
||||
|
||||
// Clean up all marks of previous action
|
||||
_pEditView->clearIndicator(SCE_UNIVERSAL_TAGMATCH);
|
||||
_pEditView->clearIndicator(SCE_UNIVERSAL_TAGATTR);
|
||||
@ -425,7 +421,7 @@ void XmlMatchedTagsHighlighter::tagMatch()
|
||||
_pEditView->execute(SCI_INDICATORFILLRANGE, xmlTags.tagOpenStart, xmlTags.tagNameEnd - xmlTags.tagOpenStart);
|
||||
_pEditView->execute(SCI_INDICATORFILLRANGE, xmlTags.tagOpenEnd - openTagTailLen, openTagTailLen);
|
||||
|
||||
if (nppGUI._enableTagAttrsHilite)
|
||||
if (doHiliteAttr)
|
||||
{
|
||||
vector< pair<int, int> > attributes = getAttributesPos(xmlTags.tagNameEnd, xmlTags.tagOpenEnd - openTagTailLen);
|
||||
_pEditView->execute(SCI_SETINDICATORCURRENT, SCE_UNIVERSAL_TAGATTR);
|
||||
|
@ -28,7 +28,7 @@ enum TagCateg {tagOpen, tagClose, inSingleTag, outOfTag, invalidTag, unknownPb};
|
||||
class XmlMatchedTagsHighlighter {
|
||||
public:
|
||||
XmlMatchedTagsHighlighter(ScintillaEditView *pEditView):_pEditView(pEditView){};
|
||||
void tagMatch();
|
||||
void tagMatch(bool doHiliteAttr);
|
||||
|
||||
private:
|
||||
struct XmlMatchedTagsPos {
|
||||
|
Loading…
x
Reference in New Issue
Block a user