Closed Bug 734432 Opened 12 years ago Closed 12 years ago

Add Orion ProjectionTextModel to our package

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 13

People

(Reporter: msucan, Assigned: msucan)

Details

(Whiteboard: [sourceeditor][fixed-in-fx-team])

Attachments

(1 file, 1 obsolete file)

In the debugger (with the annotations/overview rulers) the Source Editor Orion code throws errors like these:

JavaScript error: chrome://browser/content/orion.js, line 2676: invalid 'instanceof' operand mProjectionTextModel.ProjectionTextModel

This happens when you hover the rulers and wait a bit. This is because we do not include ProjectionTextModel from upstream. The code is unused, but there's an instanceof that fails.

The error is harmless (currently).
Attached patch proposed patch (obsolete) — Splinter Review
Add ProjectionTextModel to Orion. This code comes from the same commit hash as the current orion.js does. This piece of code goes unused - it is used for code folding which we did not yet enable...

Should be a quick review.
Attachment #604462 - Flags: review?(rcampbell)
Updated the patch to include some comment fixes based on questions from sheppy - to, hopefully, make things clearer.

I also included Mark in the contributors list for scratchpad.xul for Bug 730898 because he forgot to add himself (and I also forgot).

Note: I'm not trying to make this patch a "kitchen sink", but this patch is already about "stuff that we are missing and it's not very important". If you prefer I do this in a different way please let me know. Not sure if there's value in making smaller patches and bugs just for small comment fixes.

Thank you!
Attachment #604462 - Attachment is obsolete: true
Attachment #604761 - Flags: review?(rcampbell)
Attachment #604462 - Flags: review?(rcampbell)
Comment on attachment 604761 [details] [diff] [review]
[in-fx-team] updated patch

    -   Erik Vold <erikvvold@gmail.com>
+   -   Mark Capella <markcapella@twcny.rr.com>

OK.



+			for (i = rangeEnd; i < projections.length; i++) {
+				projection = projections[i];
+				projection.start += changeCount;
+				projection.end += changeCount;
+//				if (projection._lineIndex + changeLineCount !== model.getLineAtOffset(projection.start)) {
+//					log("here");
+//				}
+				projection._lineIndex = model.getLineAtOffset(projection.start);
+//				projection._lineIndex += changeLineCount;
+			}

:P
Attachment #604761 - Flags: review?(rcampbell) → review+
Thanks for the r+!
Whiteboard: [sourceeditor] → [sourceeditor][land-in-fx-team]
Comment on attachment 604761 [details] [diff] [review]
[in-fx-team] updated patch

Landed:
https://hg.mozilla.org/integration/fx-team/rev/6738581dc4d0

Thanks for the r+!
Attachment #604761 - Attachment description: updated patch → [in-fx-team] updated patch
Whiteboard: [sourceeditor][land-in-fx-team] → [sourceeditor][fixed-in-fx-team]
https://hg.mozilla.org/mozilla-central/rev/6738581dc4d0
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: