| Summary: | Syntax Coloring - Not colored in some cases | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Toshihiro Izumi <euthanasia_waltz> |
| Component: | PDT | Assignee: | PHP UI <php.ui-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | CC: | silviya, thierryblind, zulus |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| See Also: |
https://git.eclipse.org/r/71768 https://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=675638caadc348b66a0245051ce1f84395f929ff |
||
| Whiteboard: | |||
| Bug Depends on: | 430312 | ||
| Bug Blocks: | |||
The main reason is...
1. "Foo" has "Classes" and "Deprecated members" highlightings.
2. org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler ignores existed same highlighting.
step2 above,
Foo has [Deprecated] => Deprecated
step6,
Foo has [Classes]+[Deprecated(=previous Deprecated)]
=> reconciler rejects [Deprecated] because same one existed => Classes
step8,
Foo has [Classes(!=previous Classes)]+[Deprecated] => Deprecated
step10,
Foo has [Classes]+[Deprecated(=previous Deprecated)]
=> reconciler rejects [Deprecated] because same one existed => Classes
Workaround?
org.eclipse.wst.sse.ui.internal.style.SemanticHighlightingReconciler.addPosition(Position, HighlightingStyle, boolean)
private void addPosition(Position position, HighlightingStyle highlighting, boolean isReadOnly) {
boolean isExisting = false;
// TODO: use binary search
/* delete loop since this doesn't care priority of multi highlightings */
// for (int i = 0, n = fRemovedPositions.size(); i < n; i++) {
// HighlightedPosition highlightedPosition = (HighlightedPosition) fRemovedPositions.get(i);
// if (highlightedPosition == null)
// continue;
// if (highlightedPosition.isEqual(position, highlighting)) {
// isExisting = true;
// fRemovedPositions.set(i, null);
// fNOfRemovedPositions--;
// break;
// }
// }
if (!isExisting) {
fAddedPositions.add(fJobPresenter.createHighlightedPosition(position, highlighting, isReadOnly));
}
}
This was fixed in latest SSE (luna release): http://git.eclipse.org/c/sourceediting/webtools.sourceediting.git/commit/?id=2f0f662df276264f8e3119843b283099e40e28ef I can still reproduce the last case (points 9 and 10):
9. Edit script as
|class Foo {-}
10. Undo edit (revert to "class Foo {}")
=> Now you can see "Foo" in bold, not with strikethrough [NG]
I need do close-reopen the file to see it back with strikethrough (nightly from 27.05.2015). Reopening the bug
New Gerrit change created: https://git.eclipse.org/r/71768 Gerrit change https://git.eclipse.org/r/71768 was merged to [master]. Commit: http://git.eclipse.org/c/pdt/org.eclipse.pdt.git/commit/?id=675638caadc348b66a0245051ce1f84395f929ff Merged patch https://git.eclipse.org/r/71768 corrects only a part of the problem, this bug report also depends on bug 430312 and can be closed once patch from bug 430312 was merged. Thierry. Bug 430312 was fixed, close this one now. Thierry. |
'Deprecated members' for example Steps to reproduce: 1. Reset syntax coloring (Restore Defaults) 2. Edit php script as |<?php |/** | * @deprecated | */ |class Foo {} |?> (now you can see "Foo" with strikethrough) 3. Open Preferences>PHP>Editor>Syntax Coloring 4. Enable 'Classes' (select 'Classes' and check 'Enable') 5. Check 'Bold' 6. Click 'OK' to close preference => Now you can see "Foo" in bold, not with strikethrough [NG] 7. Delete "@deprecated" 8. Undo delete => Now you can see "Foo" with strikethrough [OK] 9. Edit script as |class Foo {-} 10. Undo edit (revert to "class Foo {}") => Now you can see "Foo" in bold, not with strikethrough [NG]