[275492] Updating read-only regions causes the semantic highlighting to color incorrectly
diff --git a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java index 53dbdc0..7baf254 100644 --- a/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java +++ b/bundles/org.eclipse.wst.sse.ui/src/org/eclipse/wst/sse/ui/internal/style/SemanticHighlightingPresenter.java
@@ -35,8 +35,8 @@ import org.eclipse.swt.custom.StyleRange; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; -import org.eclipse.wst.sse.core.internal.encoding.util.Logger; import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument; +import org.eclipse.wst.sse.ui.internal.Logger; import org.eclipse.wst.sse.ui.internal.SSEUIPlugin; import org.eclipse.wst.sse.ui.internal.StructuredTextViewer; import org.eclipse.wst.sse.ui.internal.preferences.EditorPreferenceNames; @@ -176,7 +176,7 @@ position.update(newRightOffset, newRightLength); } else { position.setLength(newLeftLength); - addPositionFromUI(newRightOffset, newRightLength, position.getHighlighting()); + addPositionFromUI(position); } } } @@ -781,12 +781,10 @@ * Add a position with the given range and highlighting unconditionally, only from UI thread. * The position will also be registered on the document. The text presentation is not invalidated. * - * @param offset The range offset - * @param length The range length - * @param highlighting + * @param uiPosition the highlighted position to add from the UI */ - private void addPositionFromUI(int offset, int length, HighlightingStyle highlighting) { - Position position= createHighlightedPosition(offset, length, highlighting); + private void addPositionFromUI(HighlightedPosition uiPosition) { + Position position= createHighlightedPosition(uiPosition, uiPosition.getHighlighting(), uiPosition.isReadOnly()); synchronized (fPositionLock) { insertPosition(position); }