Closed
Bug 746218
Opened 12 years ago
Closed 11 years ago
Source Editor should comment a block with // comments
Categories
(DevTools :: Source Editor, defect)
DevTools
Source Editor
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: dangoor, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [sourceeditor][fixed by work for bug 816756])
Attachments
(1 file)
6.85 KB,
patch
|
rcampbell
:
review+
|
Details | Diff | Splinter Review |
Some combination of bug 725430 and bug 739192 added the ability to comment/uncomment a line or block of code in the source editor. When you comment a line of code, it adds a // at the beginning of the line. When you select a block of code, it uses /* */. I just confirmed that both TextMate and Sublime Text use // at the beginning of lines in both cases. The reason can be seen in this test case: var foo = function() { var bar = 27; /* This is my code */ } foo(); If you comment a block of code that contains /* */ already, that code becomes invalid.
Comment 1•12 years ago
|
||
Kevin, do you suggest that we drop the use of block comments entirely and only add line comments, in all cases?
Reporter | ||
Comment 2•12 years ago
|
||
Yes, that is what I'm suggesting. It's what other editors do as well.
Comment 3•12 years ago
|
||
Thanks! Marking this as a tentative to be fixed with bug 759351.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Depends on: 759351
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
Comment 4•12 years ago
|
||
Moving to Source Editor component. Filter on CHELICERAE.
Component: Developer Tools → Developer Tools: Source Editor
Comment 5•12 years ago
|
||
Attachment #645434 -
Flags: review?(rcampbell)
Updated•12 years ago
|
Comment 6•12 years ago
|
||
Comment on attachment 645434 [details] [diff] [review] proposed patch + * - allowBlockComment: tells if the code that comments out + * a selection is allowed to use the block comment wrappers. If not, + * you should use the line comment string. do we need this option at all? No point in complicating things if we're just going to stick with // line comments... but then I remembered the CSS editor. Looks like it is needed after all.
Attachment #645434 -
Flags: review?(rcampbell) → review+
Comment 7•12 years ago
|
||
to land?
Comment 8•12 years ago
|
||
Paul: all source editor patches wait for: 1. the orion upstream update. bug 759351 2. their owners to finish them up. In this case I do not need to make any patch changes. However I do need to address Rob's review comments for other patches I submitted for review. 3. currently I am prioritizing work on the web console remote debugging support - bug 768096. Source editor work needs to wait. Thanks!
Updated•12 years ago
|
Whiteboard: [sourceeditor] → [sourceeditor][waiting-on-orion-update][see-comment-8]
Comment 9•11 years ago
|
||
Switch to CodeMirror fixed this.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Assignee: mihai.sucan → nobody
Whiteboard: [sourceeditor][waiting-on-orion-update][see-comment-8] → [sourceeditor][fixed by work for bug 816756]
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•