2 Replies Latest reply on Jun 10, 2011 7:04 AM by Dave DuPlantis

    Syntax highlighting is buggy - any way to fix?

    Ryan Stille

      CF Builder 2 sometimes gives up on syntax highlighting. Is there anything I can do to fix this?

       

      For example this line of code is about half way down in the file I'm editing:

       

      <a href="#myself#fastmaterialsearch&salesOrg=#session.userBean.getSalesOrg()#&sapID=#custome r.getSapID()#&priceGroup=#customer.getPriceGroup()#&materialList=#materialList#&removeItmN umber=#currentrow#&preferredPlantList=#valueList(materialDetails.preferredPlant)#&qtyList= &qtyList=#valueList(materialDetails.qty)#&qtyMultiplier=#viewstate.getValue("qtyMultiplier ")#&activityID=#val(viewstate.getValue("activityID"))#"><img src="/images/icons/delete.png" width="16" height="16" border="0"></a>

       

      Starting right at the <img tag, all the text in the file is black, no more syntax highlighting.

       

      Any ideas?

        • 1. Re: Syntax highlighting is buggy - any way to fix?
          JR "Bob" Dobbs Level 4

          Disclaimer: I am not a heavy user of CF Builder.

           

          That being said, I'll take a guess that the nested double-quotes are causing a problem.  You have the string "activityID" nested inside the quoted portion of an anchor tag.  Try changing the quotes around activityID or the entire hyperlink, but not both, to single quotes.

          • 2. Re: Syntax highlighting is buggy - any way to fix?
            Dave DuPlantis

            I've had similar problems (using the plugin to Flash Builder 4.5), but there doesn't seem to be a pattern to them that I recognize. Sometimes it's like in your example, when the parser apparently can't figure out what's happening. Sometimes it happens after pasting code from another source. Sometimes it happens after synchronizing.

             

            Sometimes it's just after a certain point in the file, and sometimes it's the entire file. Sometimes reopening the file fixes the problem, sometimes restarting CF Builder 2/FB 4.5 fixes the problem, and sometimes it just doesn't get fixed. It happens with both CFCs and JavaScript files.

             

            I seem to recall having similar problems with the Aptana plugins and older versions of Eclipse (back in the CFEclipse days), so maybe this is just an ongoing issue.