Syntax coloring on CodeMix 3.10.201904111446 raises exceptions

This topic contains 11 replies, has 3 voices, and was last updated by  support-swapna 5 days, 18 hours ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #612790 Reply

    lainhart
    Participant

    CodeMix 20190411 with MyEclipse Version: CI 2019.4.0; Build id: 16.0.0-20190403

    My goal is to get the syntax coloring of Javascript files to match the defaults given in Eclipse/JSDT. To that end, I open Window/Preferences/CodeMix/Syntax Coloring, and change color on items like “Comments”, “Keywords”, etc. On the current editor, the syntax coloring finally takes, but I see a bunch of IAE exceptions. Subsequent editing sessions, I’m not seeing the coloring. Stack traces for the two errors are in the attached file (including the traces inline exceeds max character threshold).

    Somewhat related – I also note that the “Enable” toggle on that “Syntax Coloring” page is non-selectable, although enabled – not sure what that’s for.

    — Todd

    Attachments:
    You must be logged in to view attached files.
    #612792 Reply

    aaronlonin
    Moderator

    Todd, Sorry you are having this issue. I quickly tried to replicate it at my end by changing all the colors on the Syntax Coloring page but it just worked for me.

    By Inspecting the code it looks like one of the color values was not correctly parsed. Can you share to me the following preference file?
    MyEclipse_Workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.genuitec.eclipse.code.ui.prefs

    Additonally you can try clicking Restore Defaults in that page and see if this time it parses the colors correctly. But if you are using a Dark based theme, ir will result in bad coloring. (Make sure to back up the file I just mentioned before this).

    Cheers!
    Aaron Lara

    #612794 Reply

    lainhart
    Participant

    Hi Aaron –

    Thanks for the quick response. I’ve copied the contents of the file you requested below.

    I did click Restore Defaults to bring me back to the system defaults (which are too colorful/distracting for me – my reason for changing). I didn’t try to set again, as I assume I would end up with the same results.

    My color theme the light(ish) Eclipse color theme – no darks.

    Thanks — Todd

    #612795 Reply

    aaronlonin
    Moderator

    Todd, did you share the file before you changed the colors? Asking because it looks like the default one. With the modified colors it would have more content, like KEYWORD=\#ff00ff | false | false | false | false.

    I would suggest you edit it again with the colors you like and if it fails for you again, share the file with me so I can try at my end with the exact same colors. That would be really helpful.

    Of course I will also raise a bug and add protection so this sort of issues won’t happen in the future.

    Thanks!
    Aaron Lara

    #612804 Reply

    lainhart
    Participant

    Sorry Aaron – I shared the file after I reset to defaults, after encountering the errors that prompted this bug. The new file is below. Only some of the values took. When I first started to change colors, and selected “Apply” (not “Apply and Close”), I saw the two errors documented in the original post of this bug.

    — Todd

    #612812 Reply

    aaronlonin
    Moderator

    Thanks for the extra details! I will raise a bug to investigate this issue. Thanks again Todd! 🙂 You were on fire today! Have a good one!

    Cheers!
    Aaron Lara

    #612843 Reply

    aaronlonin
    Moderator

    Todd, I was not able to replicate the issue but we added some protection to prevent it. This fix will be included in the next CodeMix release. It would be great if you can give it a try by following the instructions:

    1. Shut Down MyEclipse
    2. Download and extract the attached plugins.zip file.
    3. Back up the file MyEclipse_Install/plugins/com.genuitec.eclipse.code.ui_3.1.0.201904102257.jar.
    4. Replace the existing file with the one extracted in step 2.
    5. Start MyEclipse and channge the colors to the ones you desire (or just replace the pref file with the values you shared earlier before starting it).

    Let me know if that gets you up and going with the colors you prefer.

    Cheers!
    Aaron Lara

    Attachments:
    You must be logged in to view attached files.
    #612881 Reply

    lainhart
    Participant

    Much better on standalone JS files. I did see the following (multiple) errors, when editing some Javascript in an embedded Eclipse editor, and select “Open With->Javascript :: CodeMix”:

    #613068 Reply

    aaronlonin
    Moderator

    Todd, great to know colors are looking much better for you now. Thanks for trying it out. Regarding the exception you shared we are going to work on a fix for it for next release too. What kind of file are you using in this case? is this javascript inside html file?

    Cheers,
    Aaron Lara

    #613093 Reply

    lainhart
    Participant

    Hi Aaron –

    It’s actually JS embedded in XML, *but*, the file is extracted from the XML into a (Eclipse-based) linked resource, prior to opening an editor on it.

    — Todd

    #613094 Reply

    aaronlonin
    Moderator

    Todd, it would be really helpful if you can provide us with an example file so we can see and test locally, or if you have some steps we can follow up even better.

    Thanks!
    Aaron Lara

    #615856 Reply

    support-swapna
    Moderator

    Todd,

    Our latest release CodeMix CI 2019.6.11 is out with the fix for the exceptions that are logged when changing syntax coloring.
    Please update via Help > Check for Updates and let us know if you see any issues.

    –Swapna
    Genuitec Support

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: Syntax coloring on CodeMix 3.10.201904111446 raises exceptions

You must be logged in to post in the forum log in