logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 02-06-2015, 03:43 PM   #1
Spadrick
 
Join Date: Feb 2015
Posts: 2
Default Extending DW CS3 Assistance - CodeColoring.xml

Good afternoon everyone;

I have an issue that is on the verge of snapping my brain in two, I sincerely hope that someone can shed some light on it for me.

I have set up Boolean as a custom language (AND OR NOT + - ^ * ") in the MMDocumentTypes.xml, Colors.xml and Extensions.txt (.bool), and I am trying to get color and mild validation (wrong colors appearing on error or uneven brackets) into CodeColoring.xml, and I have it half working. I believe that it is a nesting error, but I can't troubleshoot it anymore or my eyes are going to start bleeding.

As it stands now, I have quotes turning the containing word and the quotes green when they are paired up correctly, and each odd quote turning red to signify error (this is optimal for me), but I would like parenthesis/brackets to act the same way, and they simply do not. I fear that this edit is getting out of my purview and ability.

Here is my CodeColoring.xml code:

Code:
<scheme MMString:name="Boolean/scheme/name" id="Boolean" doctypes="Boolean" priority="1">
		<ignoreCase>No</ignoreCase>
		<ignoreTags>Yes</ignoreTags>
		<stringStart MMString:name="CodeColor_JavaString/stringStart/name" id="CodeColor_JavaString"><![CDATA[(]]></stringStart>
		<stringEnd><![CDATA[)]]></stringEnd>
		<stringStart MMString:name="CodeColor_JavaString/stringStart/name" id="CodeColor_JavaString"><![CDATA["]]></stringStart>
		<stringEnd><![CDATA["]]></stringEnd>
		<idChar1>_$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ</idChar1>
		<idCharRest MMString:name="CodeColoring/CodeColoring/CodeColor_Identifier" id="CodeColor_JavaIdentifier">_$abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789</idCharRest>
		<keywords MMString:name="CodeColoring/CodeColoring/CodeColor_BooleanPositive/keywords/name" id="CodeColor_BooleanPositive">
			<keyword>AND</keyword>
			<keyword>+</keyword>
		</keywords>
		<keywords MMString:name="CodeColoring/CodeColoring/CodeColor_BooleanOr/keywords/name" id="CodeColor_BooleanOr">
			<keyword>OR</keyword>
			<keyword>NEAR</keyword>
		</keywords>
		<keywords MMString:name="CodeColoring/CodeColoring/CodeColor_BooleanNegative/keywords/name" id="CodeColor_BooleanNegative">
			<keyword>NOT</keyword>
			<keyword>-</keyword>
		</keywords>
		<keywords MMString:name="CodeColoring/CodeColoring/CodeColor_BooleanOperators/keywords/name" id="CodeColor_BooleanOperators">
			<keyword>^</keyword>
			<keyword>*</keyword>
			<keyword>~</keyword>
		</keywords>
		<keywords MMString:name="CodeColoring/CodeColoring/CodeColor_BooleanQuotes/keywords/name" id="CodeColor_BooleanQuotes">
			<keyword>"</keyword>
			<keyword>(</keyword>
			<keyword>)</keyword>
		</keywords>
So I have deduced that the quotes in stringStart and stringEnd are being colored green by the CodeColor_JavaString id when they are in pairs, and being colored red when not in pairs by id CodeColor_BooleanQuotes in the <KEYWORDS> strings.

Pairing brackets the same way does not produce the same result. This code displays a boolean string like this:

HTML Code:
welcome OR intro OR beginning AND ("something for nothing" OR "development for fun")"
With the brackets and the extra quote showing in RED, the quotes inside the bracket and the words inside the quotes GREEN. I want the brackets, quotes inside the brackets, and words inside the quotes to be green, and extra brackets and extra quotes showing as red (CodeColor_BooleanQuotes).

I hope this is an adequate example and that my issue is clear. My purpose is to use DW to make dealing with three-page boolean strings every day much much simpler.

Any help. I am in your debt.

Adam
Spadrick is offline   Reply With Quote
Old 02-06-2015, 06:52 PM   #2
Spadrick
 
Join Date: Feb 2015
Posts: 2
Default

In addition to the above, I have found that the above code turns brackets and items in brackets green when there are no quotation marks next to the brackets. So: (something AND something) appears green as it should, but ("something" AND "something") shows red brackets and green "something"s.
Spadrick is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com