User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Build Identifier: For example support for adding an error or warning marker to indicate there is a syntax error on the line. Reproducible: Always
Confirming, because this would be a useful feature. I would like to note, though, that there already is a syntax notifier that pops up a little window to annoy you when you've typed something with incorrect syntax.
Severity: normal → enhancement
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk
Created attachment 372211 [details] [diff] [review] Initial patch to add lineMarkers Initial patch to add lineMarkers. When a parser error occurs, the gutter changes color according to new lineMarkerGutterColor and lineMarkerFontColor theme options. You can click on the gutter to see the parser error message again. Although the parser currently only ever reports a single error, the code is written such that multiple lineMarkers can be present simultaneously. This should enable future enhancements such as jslint integration. As this is my first ever patch to any Mozilla product, please let me know how I'm doing!
At a quick glance, the code looks good, though I haven't actually applied it to ensure that it works. However, I'm assigning this to you, Chris, so you can do any follow-up changes recommended by those more familiar with this area.
Assignee: nobody → chris.f.jay
Status: NEW → ASSIGNED
Created attachment 372401 [details] [diff] [review] Rebased to tip There have been some changes to editor.js since I originally wrote the patch. Updated to fit latest trunk as of 13-Apr-09.
Thanks Chris. I have added Ben to this puppy as he was just in there doing the smart gutter work and I want him to review.
Priority: -- → P4
Target Milestone: -- → Future
Chris, I like this patch, thanks for your work on it. I've applied it.
Ben applied this patch in changeset e0bd354779b2. However, as far as I know, neither he nor I have been able to actually add markers in the gutter. Are we missing something? If so, is this fixed? Can it be closed?
Created attachment 373173 [details] [diff] [review] interdiff with added themes to make lineMarkers visible Well it turns out my patch relied on themes.js which has changed. Here is the new patch, it only modifies the themes files because the rest of the code has been checked in and works fine. Let me know how this goes, when you apply this patch it should highlight the gutter when there's an error.
Chris, Thanks! Added this info to the styles in change set e647724cac9f. Good to go?
This is a mass migration from Mozilla Labs :: Bespin to Bespin :: Editor.
Component: Bespin → Editor
Product: Mozilla Labs → Bespin
QA Contact: bespin → editor
Created attachment 383197 [details] [diff] [review] v2 of messages patch Well actually the old "set syntaxcheck errors" stuff has been removed on tip to prepare for code complete ... so I added a new setting "set syntaxmarkers" which has the possible values * "all": show all markers (errors, warnings and messages) * "errors": show just the error markers * "warnings": show just the warning markers * "messages": show just the message markers * "none": don't show any markers this works alongside syntaxcheck, obviously if syntaxcheck is off then none of the markers show anyway
Attachment #383119 - Attachment is obsolete: true
code is now slightly out of date, revised patch coming.
Created attachment 384489 [details] [diff] [review] rebased to new code folding patch Rebased to match the new code folding patch in bug 473329. It also fixes a very annoying bug where the parser doesn't start automatically when you load the document.
Created attachment 388533 [details] [diff] [review] Rebased to tip Rebased to tip, this is read to apply.
Attachment #384489 - Attachment is obsolete: true
Created attachment 388989 [details] [diff] [review] rebased to tip, default syntaxmarkers setting and fix parse rerun issue Rebased to tip. Fixes an issue with the parser where it doesn't run if the document changes Adds a default setting "syntaxmarkers" as described above
Attachment #388533 - Attachment is obsolete: true
Committed patch; can I close the issue?
pushed to tip, this resolves the issue. Thanks Ben.
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
This was committed in changeset 68efb9bef23f and does appear to work. Marking as VERIFIED.
Status: RESOLVED → VERIFIED
Target Milestone: Future → 0.3.x
You need to log in before you can comment on or make changes to this bug.