aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhongwei2012-08-01 23:02:59 (EDT)
committerzzhongwei2012-08-01 23:02:59 (EDT)
commit695aa7142d1c1a584e4ace577c0bc3135d821a02 (patch)
tree4ea3dfe48343e5a49c7b6e9219ce4252969b5858
parent783fd5346d4913575a7f6d3407a706ffda6cf5bb (diff)
downloadorg.eclipse.pdt-695aa7142d1c1a584e4ace577c0bc3135d821a02.zip
org.eclipse.pdt-695aa7142d1c1a584e4ace577c0bc3135d821a02.tar.gz
org.eclipse.pdt-695aa7142d1c1a584e4ace577c0bc3135d821a02.tar.bz2
Bug 385911 trait method invocation and field access are not highlighting
correctly in php syntax color preference page preview
-rw-r--r--plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPSyntaxColoringPage.java51
1 files changed, 51 insertions, 0 deletions
diff --git a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPSyntaxColoringPage.java b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPSyntaxColoringPage.java
index 2fe59e9..16dfd3f 100644
--- a/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPSyntaxColoringPage.java
+++ b/plugins/org.eclipse.php.ui/src/org/eclipse/php/internal/ui/preferences/PHPSyntaxColoringPage.java
@@ -1344,6 +1344,57 @@ public final class PHPSyntaxColoringPage extends PreferencePage implements
return DeprecatedHighlighting.class.getName();
}
});
+ highlightings.add(new TraitHighlighting() {
+ @Override
+ protected Program getProgram(
+ IStructuredDocumentRegion region) {
+ return program;
+ }
+
+ @Override
+ public ISourceModule getSourceModule() {
+ return sourceModule;
+ }
+
+ @Override
+ public String getPreferenceKey() {
+ return TraitHighlighting.class.getName();
+ }
+ });
+ highlightings.add(new TraitMethodHighlighting() {
+ @Override
+ protected Program getProgram(
+ IStructuredDocumentRegion region) {
+ return program;
+ }
+
+ @Override
+ public ISourceModule getSourceModule() {
+ return sourceModule;
+ }
+
+ @Override
+ public String getPreferenceKey() {
+ return TraitMethodHighlighting.class.getName();
+ }
+ });
+ highlightings.add(new TraitFieldHighlighting() {
+ @Override
+ protected Program getProgram(
+ IStructuredDocumentRegion region) {
+ return program;
+ }
+
+ @Override
+ public ISourceModule getSourceModule() {
+ return sourceModule;
+ }
+
+ @Override
+ public String getPreferenceKey() {
+ return TraitFieldHighlighting.class.getName();
+ }
+ });
Collections.sort(highlightings);