directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1642867 - in /directory/studio/branches/studio-tycho/plugins: aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ common.ui/src/main/java/org/apache/directory/studio/common/ui/ ldapbrowser.common/src/main/ja...
Date Tue, 02 Dec 2014 13:36:07 GMT
Author: elecharny
Date: Tue Dec  2 13:36:07 2014
New Revision: 1642867

URL: http://svn.apache.org/r1642867
Log:
o Declared some RGB colors as constants, and used the most frequent of those colors
o Only use increments of 32 for any color (ie 0, 32, 64, etc).

Modified:
    directory/studio/branches/studio-tycho/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
    directory/studio/branches/studio-tycho/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
    directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
    directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
    directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorPreferencesInitializer.java
    directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
    directory/studio/branches/studio-tycho/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java

Modified: directory/studio/branches/studio-tycho/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
Tue Dec  2 13:36:07 2014
@@ -23,6 +23,8 @@ package org.apache.directory.studio.acii
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
+import org.apache.directory.studio.ldapbrowser.core.utils.Utils;
 import org.eclipse.jface.text.TextAttribute;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
@@ -58,32 +60,29 @@ public class ACITextAttributeProvider
      */
     public ACITextAttributeProvider()
     {
-        attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 0, 0 ) ) ) );
+        attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLACK ) ) );
 
-        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 127, 0, 85 ) ),
+        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 128, 0, 96 ) ),
             null, SWT.BOLD ) );
 
-        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 0, 255 ) ) ) );
+        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLUE ) ) );
 
-        attributes.put( GRANT_DENY_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 125, 125,
-            125 ) ) ) );
+        attributes.put( GRANT_DENY_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_GREY ) ) );
 
-        attributes.put( GRANT_VALUE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 150, 0 ) ) ) );
-        attributes.put( DENY_VALUE, new TextAttribute( new Color( Display.getCurrent(), new
RGB( 150, 0, 0 ) ) ) );
+        attributes.put( GRANT_VALUE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.ML_GREEN ) ) );
+        attributes.put( DENY_VALUE, new TextAttribute( new Color( Display.getCurrent(), CommonUIConstants.ML_RED
) ) );
 
-        attributes.put( IDENTIFICATION_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 125, 0,
-            0 ) ), null, SWT.BOLD ) );
+        attributes.put( IDENTIFICATION_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_RED ), null, SWT.BOLD ) );
 
         attributes.put( PRECEDENCE_ATTRIBUTE, new TextAttribute(
-            new Color( Display.getCurrent(), new RGB( 0, 0, 125 ) ), null, SWT.BOLD ) );
+            new Color( Display.getCurrent(), CommonUIConstants.M_BLUE ), null, SWT.BOLD )
);
 
-        attributes.put( AUTHENTICATIONLEVEL_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0,
-            125, 0 ) ), null, SWT.BOLD ) );
+        attributes.put( AUTHENTICATIONLEVEL_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_GREEN ), null, SWT.BOLD ) );
 
-        attributes.put( ITEMORUSERFIRST_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 125, 0,
-            125 ) ), null, SWT.BOLD ) );
+        attributes.put( ITEMORUSERFIRST_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 128, 0,
+            128 ) ), null, SWT.BOLD ) );
 
-        attributes.put( USER_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 122, 255 ) ),
+        attributes.put( USER_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 128, 255 ) ),
             null, SWT.BOLD ) );
 
     }

Modified: directory/studio/branches/studio-tycho/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
Tue Dec  2 13:36:07 2014
@@ -20,6 +20,8 @@
 
 package org.apache.directory.studio.common.ui;
 
+import org.eclipse.swt.graphics.RGB;
+
 
 /**
  * Constants used in the connection UI plugin.
@@ -43,4 +45,49 @@ public final class CommonUIConstants
 
     /** The pull-down image */
     public static final String IMG_PULLDOWN = "resources/icons/pulldown.gif"; //$NON-NLS-1$
+
+    /** 
+     * The various colors in use. Each color have gradients, from black to white (ie from
0 to 255). We 
+     * use colors by increments of 32 :
+     * <ul>
+     * <li>0 : Black or no color</li>
+     * <li>32 : Black Dark color (BD_[color]) for instance BD_GREEN</li>
+     * <li>64 : Dark color (D_[color]) for instance D_GREEN</li>
+     * <li>96 : Mid Dark Color(MD_[color]) for instance MD_GREEN</li>
+     * <li>128 : Mid color (M_[color]), for instance M_GREEN</li>
+     * <li>160 : Mid Light color (ML_[color]), for instance ML_GREEN</li>
+     * <li>192 : Light color (L_[color]), for instance L_GREEN</li>
+     * <li>224 : White Light color (WL_[color]), for instance WL_GREEN</li>
+     * <li>255 : Full color ([color]), for instance GREEN</li>
+     * </ul>
+     **/
+    // To see teh world in black and white
+    public static final RGB BLACK = new RGB( 0, 0, 0 );
+    public static final RGB WHITE = new RGB( 255, 255, 255 );
+    
+    // 7 shade of greys... From dark to light, with combinaisons
+    public static final RGB BD_GREY = new RGB( 32, 32, 32 );    // Black Dark grey
+    public static final RGB D_GREY = new RGB( 64, 64, 64 );     // Dark grey
+    public static final RGB MD_GREY = new RGB( 96, 96, 96 );    // Medium Dark grey
+    public static final RGB M_GREY = new RGB( 128, 128, 128 );  // Grey
+    public static final RGB ML_GREY = new RGB( 160, 160, 160 ); // Medium Light grey
+    public static final RGB L_GREY = new RGB( 192, 192, 192 );  // Light grey
+    public static final RGB WL_GREY = new RGB( 224, 224, 224 ); // White Light grey
+    
+    // Red
+    public static final RGB M_RED = new RGB( 128, 0, 0 );       // Medium red
+    public static final RGB ML_RED = new RGB( 160, 0, 0 );      // Medium light red
+    public static final RGB RED = new RGB( 255, 0, 0 );         // Full red
+    
+    // Green
+    public static final RGB M_GREEN = new RGB( 0, 128, 0 );     // Medium green
+    public static final RGB ML_GREEN = new RGB( 0, 160, 0 );    // Medium Light green
+    
+    // Blue
+    public static final RGB M_BLUE = new RGB( 0, 0, 128 );      // Medium blue
+    public static final RGB L_BLUE = new RGB( 0, 0, 192 );      // Light blue 
+    public static final RGB BLUE = new RGB( 0, 0, 255 );        // Full blue
+    
+    // Some specific colors
+    
 }

Modified: directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
Tue Dec  2 13:36:07 2014
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.common.filtereditor;
 
 
+import org.apache.directory.studio.common.core.jobs.CommonCoreConstants;
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterParser;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterToken;
@@ -46,22 +48,22 @@ public class FilterDamagerRepairer imple
 {
 
     private static final TextAttribute DEFAULT_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator.getDefault()
-        .getColor( new RGB( 0, 0, 0 ) ) );
+        .getColor( CommonUIConstants.BLACK ) );
 
     private static final TextAttribute AND_OR_NOT_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( new RGB( 0, 127, 0 ) ), null, SWT.BOLD );
+        .getDefault().getColor( CommonUIConstants.M_GREEN ), null, SWT.BOLD );
 
     private static final TextAttribute ATTRIBUTE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( new RGB( 127, 0, 85 ) ) );
+        .getDefault().getColor( new RGB( 128, 0, 96 ) ) );
 
     private static final TextAttribute FILTER_TYPE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( new RGB( 255, 0, 0 ) ), null, SWT.BOLD );
+        .getDefault().getColor( CommonUIConstants.RED ), null, SWT.BOLD );
 
     private static final TextAttribute VALUE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator.getDefault()
-        .getColor( new RGB( 0, 0, 127 ) ) );
+        .getColor( CommonUIConstants.M_BLUE ) );
 
     private static final TextAttribute PARENTHESIS_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( new RGB( 0, 0, 0 ) ), null, SWT.BOLD );
+        .getDefault().getColor( CommonUIConstants.BLACK ), null, SWT.BOLD );
 
     /** The filter parser. */
     private LdapFilterParser parser;

Modified: directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
Tue Dec  2 13:36:07 2014
@@ -24,6 +24,7 @@ package org.apache.directory.studio.ldap
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.LdapFilter;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterParser;
@@ -93,12 +94,12 @@ public class FilterReconcilingStrategy i
         {
             AnnotationPainter ap = new AnnotationPainter( sourceViewer, null );
             ap.addAnnotationType( "DEFAULT" ); //$NON-NLS-1$
-            ap.setAnnotationTypeColor( "DEFAULT", BrowserCommonActivator.getDefault().getColor(
new RGB( 255, 0, 0 ) ) ); //$NON-NLS-1$
+            ap.setAnnotationTypeColor( "DEFAULT", BrowserCommonActivator.getDefault().getColor(
CommonUIConstants.RED ) ); //$NON-NLS-1$
             sourceViewer.getAnnotationModel().addAnnotationModelListener( ap );
 
             FilterCharacterPairMatcher cpm = new FilterCharacterPairMatcher( sourceViewer,
parser );
             MatchingCharacterPainter mcp = new MatchingCharacterPainter( sourceViewer, cpm
);
-            mcp.setColor( BrowserCommonActivator.getDefault().getColor( new RGB( 159, 159,
159 ) ) );
+            mcp.setColor( BrowserCommonActivator.getDefault().getColor( CommonUIConstants.ML_GREY
) );
 
             paintManager = new PaintManager( sourceViewer );
             paintManager.addPainter( ap );

Modified: directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorPreferencesInitializer.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorPreferencesInitializer.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorPreferencesInitializer.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/LdifEditorPreferencesInitializer.java
Tue Dec  2 13:36:07 2014
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldifeditor;
 
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
@@ -58,43 +59,43 @@ public class LdifEditorPreferencesInitia
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_OPTIONS_CONTINUEONERROR,
true );
 
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_COMMENT
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 63, 127,
95 ) );// green
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 64, 128,
96 ) );// green
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_COMMENT
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.NORMAL );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_KEYWORD
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 128,
128, 128 ) );// gray
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, CommonUIConstants.M_GREY
);
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_KEYWORD
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_DN
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 0, 0,
0 ) );// black
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, CommonUIConstants.BLACK
);
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_DN
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_ATTRIBUTE
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 127,
0, 85 ) );// violett
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 128,
0, 96 ) );// violet
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_ATTRIBUTE
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_VALUETYPE
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 255,
0, 0 ) );// red
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, CommonUIConstants.RED
);
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_VALUETYPE
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_VALUE
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 0, 0,
192 ) );// blue
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, CommonUIConstants.L_BLUE
);// blue
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_VALUE
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.NORMAL );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEADD
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 123,
170, 91 ) );// green
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 128,
160, 96 ) );// green
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEADD
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODIFY
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 214,
160, 100 ) );// yellow
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 224,
160, 96 ) );// yellow
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODIFY
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEDELETE
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 242,
70, 86 ) );// red
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 255,
64, 96 ) );// red
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEDELETE
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );
         PreferenceConverter.setDefault( store, LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODDN
-            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 127,
159, 191 ) );// bright
+            + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_RGB_SUFFIX, new RGB( 128,
160, 192 ) );// bright
         // blue
         store.setDefault( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_CHANGETYPEMODDN
             + LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_STYLE_SUFFIX, SWT.BOLD );

Modified: directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
Tue Dec  2 13:36:07 2014
@@ -26,6 +26,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.ldifeditor.LdifEditorActivator;
 import org.apache.directory.studio.ldifeditor.LdifEditorConstants;
 import org.apache.directory.studio.ldifeditor.editor.ILdifEditor;
@@ -51,7 +52,6 @@ import org.apache.directory.studio.ldifp
 import org.apache.directory.studio.ldifparser.model.lines.LdifNewrdnLine;
 import org.apache.directory.studio.ldifparser.model.lines.LdifNewsuperiorLine;
 import org.apache.directory.studio.ldifparser.model.lines.LdifVersionLine;
-
 import org.eclipse.jface.preference.IPreferenceStore;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.jface.text.DocumentEvent;
@@ -185,8 +185,7 @@ public class LdifDamagerRepairer impleme
     {
 
         // TextAttribute DEFAULT_TEXT_ATTRIBUTE = new
-        // TextAttribute(Activator.getDefault().getColor(new RGB(0, 0,
-        // 0)));
+        // TextAttribute(Activator.getDefault().getColor(CommonUIConstants.COLOR_BLACK));
 
         TextAttribute COMMENT_TEXT_ATTRIBUTE = geTextAttribute( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_COMMENT
);
         TextAttribute KEYWORD_TEXT_ATTRIBUTE = geTextAttribute( LdifEditorConstants.PREFERENCE_LDIFEDITOR_SYNTAX_KEYWORD
);

Modified: directory/studio/branches/studio-tycho/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-tycho/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java?rev=1642867&r1=1642866&r2=1642867&view=diff
==============================================================================
--- directory/studio/branches/studio-tycho/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
(original)
+++ directory/studio/branches/studio-tycho/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
Tue Dec  2 13:36:07 2014
@@ -23,6 +23,7 @@ package org.apache.directory.studio.sche
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.eclipse.jface.text.TextAttribute;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.graphics.Color;
@@ -53,20 +54,20 @@ public class SchemaTextAttributeProvider
      */
     public SchemaTextAttributeProvider()
     {
-        attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 0, 0 ) ) ) );
+        attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLACK ) ) );
 
-        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 127, 0, 85 ) ),
+        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 128, 0, 96 ) ),
             null, SWT.BOLD ) );
 
-        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 0, 255 ) ) ) );
+        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLUE ) ) );
 
-        attributes.put( ATTRIBUTETYPE_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 89, 71,
-            158 ) ), null, SWT.BOLD ) );
+        attributes.put( ATTRIBUTETYPE_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 96, 64,
+            160 ) ), null, SWT.BOLD ) );
 
         attributes.put( OBJECTCLASS_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
-            new RGB( 45, 124, 68 ) ), null, SWT.BOLD ) );
+            new RGB( 64, 128, 64 ) ), null, SWT.BOLD ) );
 
-        attributes.put( OID_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 255, 0, 0 ) ) ) );
+        attributes.put( OID_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.RED ) ) );
     }
 
 



Mime
View raw message