directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1682058 - in /directory/studio/trunk/plugins: aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/ aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ apacheds.configuration/src/main/java/o...
Date Wed, 27 May 2015 15:32:39 GMT
Author: elecharny
Date: Wed May 27 15:32:38 2015
New Revision: 1682058

URL: http://svn.apache.org/r1682058
Log:
o Moved all the used colors into the CommonUIConstants
o Declared and disposed those colors in CommonUIPlugin, which is visible everywhere
o Removed some warnings for unused imports

Modified:
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
    directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
    directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorPage.java
    directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
    directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIPlugin.java
    directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/TableWidget.java
    directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetLabelProvider.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
    directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
    directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/sourceeditor/OpenLdapAclTextAttributeProvider.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java
    directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
    directory/studio/trunk/plugins/templateeditor/src/main/java/org/apache/directory/studio/templateeditor/view/preferences/TemplatesLabelProvider.java

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/Activator.java
Wed May 27 15:32:38 2015
@@ -104,6 +104,7 @@ public class Activator extends AbstractU
         {
             aciTemplateStore = new ContributionTemplateStore( getAciTemplateContextTypeRegistry(),
                 getPreferenceStore(), "templates" ); //$NON-NLS-1$
+            
             try
             {
                 aciTemplateStore.load();
@@ -163,15 +164,18 @@ public class Activator extends AbstractU
     public Image getImage( String path )
     {
         Image image = getImageRegistry().get( path );
+        
         if ( image == null )
         {
             ImageDescriptor id = getImageDescriptor( path );
+            
             if ( id != null )
             {
                 image = id.createImage();
                 getImageRegistry().put( path, image );
             }
         }
+        
         return image;
     }
 
@@ -188,6 +192,7 @@ public class Activator extends AbstractU
         {
             aciItemParser = new ACIItemParser( null );
         }
+        
         return aciItemParser;
     }
 
@@ -221,8 +226,7 @@ public class Activator extends AbstractU
     /**
      * Returns the TextAttribute Provider
      * 
-     * @return
-     *      the TextAttribute Provider
+     * @return the TextAttribute Provider
      */
     public ACITextAttributeProvider getTextAttributeProvider()
     {
@@ -230,6 +234,7 @@ public class Activator extends AbstractU
         {
             textAttributeProvider = new ACITextAttributeProvider();
         }
+        
         return textAttributeProvider;
     }
 
@@ -237,8 +242,7 @@ public class Activator extends AbstractU
     /**
      * Retuns the the Aci Code Scanner
      * 
-     * @return 
-     *      the the Aci Code Scanner
+     * @return the the Aci Code Scanner
      */
     public ACICodeScanner getAciCodeScanner()
     {
@@ -246,6 +250,7 @@ public class Activator extends AbstractU
         {
             aciCodeScanner = new ACICodeScanner( getTextAttributeProvider() );
         }
+        
         return aciCodeScanner;
     }
 
@@ -253,8 +258,7 @@ public class Activator extends AbstractU
     /**
      * Gets the ACI Template ContextType Registry
      *
-     * @return
-     *      the ACI Template ContextType Registry
+     * @return the ACI Template ContextType Registry
      */
     public ContributionContextTypeRegistry getAciTemplateContextTypeRegistry()
     {
@@ -265,8 +269,7 @@ public class Activator extends AbstractU
     /**
      * Gets the ACI Template Store
      *
-     * @return
-     *      the ACI Template Store
+     * @return the ACI Template Store
      */
     public ContributionTemplateStore getAciTemplateStore()
     {
@@ -277,8 +280,7 @@ public class Activator extends AbstractU
     /**
      * Gets the plugin properties.
      *
-     * @return
-     *      the plugin properties
+     * @return the plugin properties
      */
     public PropertyResourceBundle getPluginProperties()
     {

Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
(original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/sourceeditor/ACITextAttributeProvider.java
Wed May 27 15:32:38 2015
@@ -26,9 +26,6 @@ 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;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
 
 
 /**
@@ -60,28 +57,16 @@ public class ACITextAttributeProvider
     public ACITextAttributeProvider()
     {
         attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLACK_COLOR
) );
-
-        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_PURPLE ),
-            null, SWT.BOLD ) );
-
-        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLUE ) ) );
-
-        attributes.put( GRANT_DENY_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_GREY ) ) );
-
-        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(),
CommonUIConstants.M_RED ), null, SWT.BOLD ) );
-
-        attributes.put( PRECEDENCE_ATTRIBUTE, new TextAttribute(
-            new Color( Display.getCurrent(), CommonUIConstants.M_BLUE ), 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(),
CommonUIConstants.M_PURPLE ), null, SWT.BOLD ) );
-
-        attributes.put( USER_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 0, 127, 255 ) ),
-            null, SWT.BOLD ) );
+        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_PURPLE_COLOR,
null, SWT.BOLD ) );
+        attributes.put( STRING_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLUE_COLOR
) );
+        attributes.put( GRANT_DENY_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_GREY_COLOR
) );
+        attributes.put( GRANT_VALUE, new TextAttribute( CommonUIConstants.ML_GREEN_COLOR
) );
+        attributes.put( DENY_VALUE, new TextAttribute( CommonUIConstants.ML_RED_COLOR ) );
+        attributes.put( IDENTIFICATION_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_RED_COLOR,
null, SWT.BOLD ) );
+        attributes.put( PRECEDENCE_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_BLUE_COLOR,
null, SWT.BOLD ) );
+        attributes.put( AUTHENTICATIONLEVEL_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_GREEN_COLOR,
null, SWT.BOLD ) );
+        attributes.put( ITEMORUSERFIRST_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_PURPLE_COLOR,
null, SWT.BOLD ) );
+        attributes.put( USER_ATTRIBUTE, new TextAttribute( CommonUIConstants.R0_G127_B255_COLOR,
null, SWT.BOLD ) );
 
     }
 

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorPage.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorPage.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditorPage.java
Wed May 27 15:32:38 2015
@@ -27,6 +27,7 @@ import org.apache.directory.server.confi
 import org.apache.directory.server.config.beans.DirectoryServiceBean;
 import org.apache.directory.studio.apacheds.configuration.actions.EditorExportConfigurationAction;
 import org.apache.directory.studio.apacheds.configuration.actions.EditorImportConfigurationAction;
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.connection.core.Connection;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.Separator;
@@ -46,7 +47,6 @@ import org.eclipse.swt.events.SelectionE
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.layout.GridData;
@@ -87,7 +87,6 @@ public abstract class ServerConfiguratio
     /** The default IPV4 address for servers */
     protected static final String DEFAULT_ADDRESS = "0.0.0.0"; //$NON-NLS-1$
     
-    protected static final Color GRAY_COLOR = new Color( null, 120, 120, 120 );
     protected static final String TABULATION = "      "; //$NON-NLS-1$
     
     /** A flag to indicate if the page is initialized */
@@ -461,7 +460,7 @@ public abstract class ServerConfiguratio
     {
         Label label = toolkit.createLabel( parent,
             NLS.bind( Messages.getString( "ServerConfigurationEditorPage.DefaultWithValue"
), text ), SWT.WRAP ); //$NON-NLS-1$
-        label.setForeground( GRAY_COLOR );
+        label.setForeground( CommonUIConstants.M_GREY_COLOR );
 
         return label;
     }

Modified: directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
(original)
+++ directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIConstants.java
Wed May 27 15:32:38 2015
@@ -70,31 +70,59 @@ public final class CommonUIConstants
     
     // 7 shade of greys... From dark to light, with combinaisons
     public static final RGB BD_GREY = new RGB( 31, 31, 31 );    // Black Dark grey
+    public static Color BD_GREY_COLOR;
     public static final RGB D_GREY = new RGB( 63, 63, 63 );     // Dark grey
+    public static Color D_GREY_COLOR;
     public static final RGB MD_GREY = new RGB( 95, 95, 95 );    // Medium Dark grey
+    public static Color MD_GREY_COLOR;
     public static final RGB M_GREY = new RGB( 127, 127, 127 );  // Grey
+    public static Color M_GREY_COLOR;
     public static final RGB ML_GREY = new RGB( 159, 159, 159 ); // Medium Light grey
+    public static Color ML_GREY_COLOR;
     public static final RGB L_GREY = new RGB( 191, 191, 191 );  // Light grey
+    public static Color L_GREY_COLOR;
     public static final RGB WL_GREY = new RGB( 224, 224, 224 ); // White Light grey
+    public static Color WL_GREY_COLOR;
     
     // Red
     public static final RGB M_RED = new RGB( 127, 0, 0 );       // Medium red
+    public static Color M_RED_COLOR;
     public static final RGB ML_RED = new RGB( 159, 0, 0 );      // Medium light red
+    public static Color ML_RED_COLOR;
     public static final RGB RED = new RGB( 255, 0, 0 );         // Full red
+    public static Color RED_COLOR;
     
     // Green
     public static final RGB M_GREEN = new RGB( 0, 127, 0 );     // Medium green
+    public static Color M_GREEN_COLOR;
     public static final RGB ML_GREEN = new RGB( 0, 159, 0 );    // Medium Light green
+    public static Color ML_GREEN_COLOR;
+    public static final RGB GREEN = new RGB( 0, 255, 0 );       // Full green
+    public static Color GREEN_COLOR;
     
     // Blue
     public static final RGB M_BLUE = new RGB( 0, 0, 127 );      // Medium blue
+    public static Color M_BLUE_COLOR;
     public static final RGB L_BLUE = new RGB( 0, 0, 191 );      // Light blue 
+    public static Color L_BLUE_COLOR;
     public static final RGB BLUE = new RGB( 0, 0, 255 );        // Full blue
+    public static Color BLUE_COLOR;
     
     // Purple
     public static final RGB M_PURPLE = new RGB( 127, 0, 127 );  // Middle purple
-    public static final RGB PURPLE = new RGB( 255, 0, 255 );    // Deep purple
-    
+    public static Color M_PURPLE_COLOR;
+    public static final RGB PURPLE = new RGB( 255, 0, 255 );    // Full purple
+    public static Color PURPLE_COLOR;
+
+    // Other colors
+    public static final RGB R0_G127_B255 = new RGB( 0, 127, 255 );
+    public static Color R0_G127_B255_COLOR;
+    public static final RGB R95_G63_B159 = new RGB( 95, 63, 159 );
+    public static Color R95_G63_B159_COLOR;
+    public static final RGB R63_G127_B63 = new RGB( 63, 127, 63 );
+    public static Color R63_G127_B63_COLOR;
+
     // Some specific colors
+    
     public static final String IMG_INFORMATION = "resources/icons/information.gif"; //$NON-NLS-1$
 }

Modified: directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIPlugin.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIPlugin.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIPlugin.java
(original)
+++ directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIPlugin.java
Wed May 27 15:32:38 2015
@@ -66,6 +66,39 @@ public class CommonUIPlugin extends Abst
         // Create the colors we use
         CommonUIConstants.BLACK_COLOR = new Color( null, CommonUIConstants.BLACK );
         CommonUIConstants.WHITE_COLOR = new Color( null, CommonUIConstants.WHITE );
+        
+        // Greys
+        CommonUIConstants.BD_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.D_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.MD_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.M_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.ML_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.L_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        CommonUIConstants.WL_GREY_COLOR = new Color( null, CommonUIConstants.M_GREY );
+        
+        // Reds
+        CommonUIConstants.M_RED_COLOR = new Color( null, CommonUIConstants.M_RED );
+        CommonUIConstants.ML_RED_COLOR = new Color( null, CommonUIConstants.ML_RED );
+        CommonUIConstants.RED_COLOR = new Color( null, CommonUIConstants.RED );
+        
+        // Greens
+        CommonUIConstants.M_GREEN_COLOR = new Color( null, CommonUIConstants.M_GREEN );
+        CommonUIConstants.ML_GREEN_COLOR = new Color( null, CommonUIConstants.ML_GREEN );
+        CommonUIConstants.GREEN_COLOR = new Color( null, CommonUIConstants.GREEN );
+        
+        // Blues
+        CommonUIConstants.M_BLUE_COLOR = new Color( null, CommonUIConstants.M_BLUE );
+        CommonUIConstants.L_BLUE_COLOR = new Color( null, CommonUIConstants.L_BLUE );
+        CommonUIConstants.BLUE_COLOR = new Color( null, CommonUIConstants.BLUE );
+        
+        // Purples
+        CommonUIConstants.M_PURPLE_COLOR = new Color( null, CommonUIConstants.M_PURPLE );
+        CommonUIConstants.PURPLE_COLOR = new Color( null, CommonUIConstants.PURPLE );
+        
+        // Other colors
+        CommonUIConstants.R0_G127_B255_COLOR = new Color( null, CommonUIConstants.R0_G127_B255
);
+        CommonUIConstants.R95_G63_B159_COLOR = new Color( null, CommonUIConstants.R95_G63_B159
);
+        CommonUIConstants.R63_G127_B63_COLOR = new Color( null, CommonUIConstants.R63_G127_B63
);
     }
 
 
@@ -79,6 +112,38 @@ public class CommonUIPlugin extends Abst
         // Dispose the colors
         CommonUIConstants.BLACK_COLOR.dispose();
         CommonUIConstants.WHITE_COLOR.dispose();
+        
+        // greys
+        CommonUIConstants.M_GREY_COLOR.dispose();
+        CommonUIConstants.BD_GREY_COLOR.dispose();
+        CommonUIConstants.D_GREY_COLOR.dispose();
+        CommonUIConstants.MD_GREY_COLOR.dispose();
+        CommonUIConstants.M_GREY_COLOR.dispose();
+        CommonUIConstants.ML_GREY_COLOR.dispose();
+        CommonUIConstants.L_GREY_COLOR.dispose();
+        CommonUIConstants.WL_GREY_COLOR.dispose();
+
+        //Reds
+        CommonUIConstants.M_RED_COLOR.dispose();
+        CommonUIConstants.ML_RED_COLOR.dispose();
+        CommonUIConstants.RED_COLOR.dispose();
+        
+        // Greens
+        CommonUIConstants.M_GREEN_COLOR.dispose();
+        CommonUIConstants.ML_GREEN_COLOR.dispose();
+        CommonUIConstants.GREEN_COLOR.dispose();
+
+        // Blues
+        CommonUIConstants.M_BLUE_COLOR.dispose();
+        CommonUIConstants.L_BLUE_COLOR.dispose();
+        CommonUIConstants.BLUE_COLOR.dispose();
+        
+        // Purple
+        CommonUIConstants.M_PURPLE_COLOR.dispose();
+        CommonUIConstants.PURPLE_COLOR.dispose();
+        
+        // Other colors
+        CommonUIConstants.R0_G127_B255_COLOR.dispose();
 
         super.stop( context );
     }

Modified: directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/TableWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/TableWidget.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/TableWidget.java
(original)
+++ directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/widgets/TableWidget.java
Wed May 27 15:32:38 2015
@@ -34,7 +34,6 @@ import org.eclipse.jface.viewers.LabelPr
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
 import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jface.window.Window;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;

Modified: directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
(original)
+++ directory/studio/trunk/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/ConnectionWrapper.java
Wed May 27 15:32:38 2015
@@ -31,7 +31,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.Connection.ReferralHandlingMethod;
 import org.apache.directory.studio.connection.core.io.jndi.ReferralsInfo;
-import org.apache.directory.studio.connection.core.io.jndi.JndiStudioNamingEnumeration;
 
 
 /**

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
Wed May 27 15:32:38 2015
@@ -27,11 +27,7 @@ import java.util.PropertyResourceBundle;
 import org.apache.directory.studio.connection.core.event.EventRunner;
 import org.apache.directory.studio.connection.ui.UiThreadEventRunner;
 import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtension;
-import org.eclipse.core.runtime.IExtensionPoint;
 import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jface.resource.ColorRegistry;
 import org.eclipse.jface.resource.FontRegistry;
@@ -275,8 +271,7 @@ public class BrowserCommonActivator exte
      * Note: Don't dispose the returned color. It is disposed automatically
      * when the plugin is stopped.
      *
-     * @param rgb
-     *                the rgb color data
+     * @param rgb the rgb color data
      * @return The SWT Color
      */
     public Color getColor( RGB rgb )

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterDamagerRepairer.java
Wed May 27 15:32:38 2015
@@ -21,9 +21,7 @@
 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;
 import org.eclipse.jface.text.DocumentEvent;
@@ -36,7 +34,6 @@ import org.eclipse.jface.text.presentati
 import org.eclipse.jface.text.presentation.IPresentationRepairer;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StyleRange;
-import org.eclipse.swt.graphics.RGB;
 
 
 /**
@@ -47,23 +44,17 @@ import org.eclipse.swt.graphics.RGB;
 public class FilterDamagerRepairer implements IPresentationDamager, IPresentationRepairer
 {
 
-    private static final TextAttribute DEFAULT_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator.getDefault()
-        .getColor( CommonUIConstants.BLACK ) );
+    private static final TextAttribute DEFAULT_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.BLACK_COLOR
);
 
-    private static final TextAttribute AND_OR_NOT_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( CommonUIConstants.M_GREEN ), null, SWT.BOLD );
+    private static final TextAttribute AND_OR_NOT_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.M_GREEN_COLOR,
null, SWT.BOLD );
 
-    private static final TextAttribute ATTRIBUTE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( CommonUIConstants.M_PURPLE ) );
+    private static final TextAttribute ATTRIBUTE_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.M_PURPLE_COLOR
);
 
-    private static final TextAttribute FILTER_TYPE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( CommonUIConstants.RED ), null, SWT.BOLD );
+    private static final TextAttribute FILTER_TYPE_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.RED_COLOR,
null, SWT.BOLD );
 
-    private static final TextAttribute VALUE_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator.getDefault()
-        .getColor( CommonUIConstants.M_BLUE ) );
+    private static final TextAttribute VALUE_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.M_BLUE_COLOR
);
 
-    private static final TextAttribute PARENTHESIS_TEXT_ATTRIBUTE = new TextAttribute( BrowserCommonActivator
-        .getDefault().getColor( CommonUIConstants.BLACK ), null, SWT.BOLD );
+    private static final TextAttribute PARENTHESIS_TEXT_ATTRIBUTE = new TextAttribute( CommonUIConstants.BLACK_COLOR,
null, SWT.BOLD );
 
     /** The filter parser. */
     private LdapFilterParser parser;

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/filtereditor/FilterReconcilingStrategy.java
Wed May 27 15:32:38 2015
@@ -25,7 +25,6 @@ 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;
 import org.apache.directory.studio.ldapbrowser.core.model.filter.parser.LdapFilterToken;
@@ -42,7 +41,6 @@ import org.eclipse.jface.text.source.IAn
 import org.eclipse.jface.text.source.IAnnotationModelExtension;
 import org.eclipse.jface.text.source.ISourceViewer;
 import org.eclipse.jface.text.source.MatchingCharacterPainter;
-import org.eclipse.swt.graphics.RGB;
 
 
 /**
@@ -94,12 +92,12 @@ public class FilterReconcilingStrategy i
         {
             AnnotationPainter ap = new AnnotationPainter( sourceViewer, null );
             ap.addAnnotationType( "DEFAULT" ); //$NON-NLS-1$
-            ap.setAnnotationTypeColor( "DEFAULT", BrowserCommonActivator.getDefault().getColor(
CommonUIConstants.RED ) ); //$NON-NLS-1$
+            ap.setAnnotationTypeColor( "DEFAULT", CommonUIConstants.RED_COLOR ); //$NON-NLS-1$
             sourceViewer.getAnnotationModel().addAnnotationModelListener( ap );
 
             FilterCharacterPairMatcher cpm = new FilterCharacterPairMatcher( sourceViewer,
parser );
             MatchingCharacterPainter mcp = new MatchingCharacterPainter( sourceViewer, cpm
);
-            mcp.setColor( BrowserCommonActivator.getDefault().getColor( CommonUIConstants.ML_GREY
) );
+            mcp.setColor( CommonUIConstants.ML_GREY_COLOR );
 
             paintManager = new PaintManager( sourceViewer );
             paintManager.addPainter( ap );

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetLabelProvider.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetLabelProvider.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetLabelProvider.java
Wed May 27 15:32:38 2015
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor;
 
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
@@ -261,16 +262,15 @@ public class EntryEditorWidgetLabelProvi
         {
             if ( value.isEmpty() )
             {
-                return BrowserCommonActivator.getDefault().getColor(
-                    Display.getDefault().getSystemColor( SWT.COLOR_RED ).getRGB() );
+                return CommonUIConstants.RED_COLOR;
             }
         }
+        
         if ( attribute != null && value == null )
         {
             if ( !attribute.isConsistent() )
             {
-                return BrowserCommonActivator.getDefault().getColor(
-                    Display.getDefault().getSystemColor( SWT.COLOR_RED ).getRGB() );
+                return CommonUIConstants.RED_COLOR;
             }
         }
 

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/schemabrowser/AttributeTypeDescriptionDetailsPage.java
Wed May 27 15:32:38 2015
@@ -32,7 +32,6 @@ import org.apache.directory.studio.commo
 import org.apache.directory.studio.ldapbrowser.core.model.schema.SchemaUtils;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
@@ -54,9 +53,6 @@ import org.eclipse.ui.forms.widgets.Sect
  */
 public class AttributeTypeDescriptionDetailsPage extends SchemaDetailsPage
 {
-    /** The gray color */
-    private static final Color GRAY_COLOR = new Color( null, 150, 150, 150 );
-
     /** The main section, contains oid, names, desc and usage */
     private Section mainSection;
 
@@ -345,6 +341,7 @@ public class AttributeTypeDescriptionDet
     public void setInput( Object input )
     {
         AttributeType atd = null;
+        
         if ( input instanceof AttributeType )
         {
             atd = ( AttributeType ) input;
@@ -360,7 +357,7 @@ public class AttributeTypeDescriptionDet
         }
         else
         {
-            singleValuedLabel.setForeground( GRAY_COLOR );
+            singleValuedLabel.setForeground( CommonUIConstants.ML_GREY_COLOR );
         }
 
         if ( atd != null && atd.isObsolete() )
@@ -369,7 +366,7 @@ public class AttributeTypeDescriptionDet
         }
         else
         {
-            isObsoleteLabel.setForeground( GRAY_COLOR );
+            isObsoleteLabel.setForeground( CommonUIConstants.ML_GREY_COLOR );
         }
 
         if ( atd != null && atd.isCollective() )
@@ -378,7 +375,7 @@ public class AttributeTypeDescriptionDet
         }
         else
         {
-            collectiveLabel.setForeground( GRAY_COLOR );
+            collectiveLabel.setForeground( CommonUIConstants.ML_GREY_COLOR );
         }
 
         if ( atd != null && !atd.isUserModifiable() )
@@ -387,7 +384,7 @@ public class AttributeTypeDescriptionDet
         }
         else
         {
-            noUserModificationLabel.setForeground( GRAY_COLOR );
+            noUserModificationLabel.setForeground( CommonUIConstants.ML_GREY_COLOR );
         }
 
         flagSection.layout();
@@ -396,15 +393,19 @@ public class AttributeTypeDescriptionDet
         String lsdOid = null;
         LdapSyntax lsd = null;
         long lsdLength = 0;
+        
         if ( atd != null )
         {
             lsdOid = SchemaUtils.getSyntaxNumericOidTransitive( atd, getSchema() );
+            
             if ( lsdOid != null && getSchema().hasLdapSyntaxDescription( lsdOid )
)
             {
                 lsd = getSchema().getLdapSyntaxDescription( lsdOid );
             }
+            
             lsdLength = SchemaUtils.getSyntaxLengthTransitive( atd, getSchema() );
         }
+        
         syntaxLink.setText( getNonNullString( lsd != null ? lsd.getOid() : lsdOid ) );
         syntaxLink.setHref( lsd );
         syntaxLink.setUnderlined( lsd != null );
@@ -416,14 +417,17 @@ public class AttributeTypeDescriptionDet
         // set matching rules content
         String emrOid = null;
         MatchingRule emr = null;
+        
         if ( atd != null )
         {
             emrOid = SchemaUtils.getEqualityMatchingRuleNameOrNumericOidTransitive( atd,
getSchema() );
+            
             if ( emrOid != null && getSchema().hasMatchingRuleDescription( emrOid
) )
             {
                 emr = getSchema().getMatchingRuleDescription( emrOid );
             }
         }
+        
         equalityLink.setText( getNonNullString( emr != null ? SchemaUtils.toString( emr )
: emrOid ) );
         equalityLink.setHref( emr );
         equalityLink.setUnderlined( emr != null );
@@ -431,14 +435,17 @@ public class AttributeTypeDescriptionDet
 
         String smrOid = null;
         MatchingRule smr = null;
+        
         if ( atd != null )
         {
             smrOid = SchemaUtils.getSubstringMatchingRuleNameOrNumericOidTransitive( atd,
getSchema() );
+            
             if ( smrOid != null && getSchema().hasMatchingRuleDescription( smrOid
) )
             {
                 smr = getSchema().getMatchingRuleDescription( smrOid );
             }
         }
+        
         substringLink.setText( getNonNullString( smr != null ? SchemaUtils.toString( smr
) : smrOid ) );
         substringLink.setHref( smr );
         substringLink.setUnderlined( smr != null );
@@ -446,14 +453,17 @@ public class AttributeTypeDescriptionDet
 
         String omrOid = null;
         MatchingRule omr = null;
+        
         if ( atd != null )
         {
             omrOid = SchemaUtils.getOrderingMatchingRuleNameOrNumericOidTransitive( atd,
getSchema() );
+            
             if ( omrOid != null && getSchema().hasMatchingRuleDescription( omrOid
) )
             {
                 omr = getSchema().getMatchingRuleDescription( omrOid );
             }
         }
+        
         orderingLink.setText( getNonNullString( omr != null ? SchemaUtils.toString( omr )
: omrOid ) );
         orderingLink.setHref( omr );
         orderingLink.setUnderlined( omr != null );

Modified: directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
(original)
+++ directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/text/LdifDamagerRepairer.java
Wed May 27 15:32:38 2015
@@ -26,7 +26,6 @@ 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;

Modified: directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/sourceeditor/OpenLdapAclTextAttributeProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/sourceeditor/OpenLdapAclTextAttributeProvider.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/sourceeditor/OpenLdapAclTextAttributeProvider.java
(original)
+++ directory/studio/trunk/plugins/openldap.acl.editor/src/main/java/org/apache/directory/studio/openldap/config/acl/sourceeditor/OpenLdapAclTextAttributeProvider.java
Wed May 27 15:32:38 2015
@@ -26,9 +26,6 @@ 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;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
 
 
 /**
@@ -52,10 +49,9 @@ public class OpenLdapAclTextAttributePro
     {
         attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLACK_COLOR
) );
 
-        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_PURPLE ),
-            null, SWT.BOLD ) );
+        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_PURPLE_COLOR,
null, SWT.BOLD ) );
 
-        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLUE ) ) );
+        attributes.put( STRING_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLUE_COLOR
) );
     }
 
 

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/pages/OpenLDAPServerConfigurationEditorPage.java
Wed May 27 15:32:38 2015
@@ -20,6 +20,7 @@
 package org.apache.directory.studio.openldap.config.editor.pages;
 
 
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.common.ui.widgets.WidgetModifyListener;
 import org.apache.directory.studio.openldap.config.actions.EditorExportConfigurationAction;
@@ -38,7 +39,6 @@ import org.eclipse.swt.events.SelectionE
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.events.VerifyEvent;
 import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Button;
@@ -60,7 +60,6 @@ import org.eclipse.ui.forms.widgets.Sect
  */
 public abstract class OpenLDAPServerConfigurationEditorPage extends FormPage
 {
-    protected static final Color GRAY_COLOR = new Color( null, 120, 120, 120 );
     protected static final String TABULATION = "      ";
 
     /** A flag to indicate if the page is initialized */
@@ -277,7 +276,7 @@ public abstract class OpenLDAPServerConf
     protected Label createDefaultValueLabel( FormToolkit toolkit, Composite parent, String
text )
     {
         Label label = toolkit.createLabel( parent, NLS.bind( "(Default: {0})", text ) );
-        label.setForeground( GRAY_COLOR );
+        label.setForeground( CommonUIConstants.M_GREY_COLOR );
 
         return label;
     }

Modified: directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
(original)
+++ directory/studio/trunk/plugins/schemaeditor/src/main/java/org/apache/directory/studio/schemaeditor/view/widget/SchemaTextAttributeProvider.java
Wed May 27 15:32:38 2015
@@ -26,9 +26,6 @@ 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;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
 
 
 /**
@@ -55,19 +52,11 @@ public class SchemaTextAttributeProvider
     public SchemaTextAttributeProvider()
     {
         attributes.put( DEFAULT_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLACK_COLOR
) );
-
-        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.M_PURPLE ),
-            null, SWT.BOLD ) );
-
-        attributes.put( STRING_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.BLUE ) ) );
-
-        attributes.put( ATTRIBUTETYPE_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
new RGB( 95, 63,
-            159 ) ), null, SWT.BOLD ) );
-
-        attributes.put( OBJECTCLASS_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
-            new RGB( 63, 127, 63 ) ), null, SWT.BOLD ) );
-
-        attributes.put( OID_ATTRIBUTE, new TextAttribute( new Color( Display.getCurrent(),
CommonUIConstants.RED ) ) );
+        attributes.put( KEYWORD_ATTRIBUTE, new TextAttribute( CommonUIConstants.M_PURPLE_COLOR,
null, SWT.BOLD ) );
+        attributes.put( STRING_ATTRIBUTE, new TextAttribute( CommonUIConstants.BLUE_COLOR
) );
+        attributes.put( ATTRIBUTETYPE_ATTRIBUTE, new TextAttribute( CommonUIConstants.R95_G63_B159_COLOR,
null, SWT.BOLD ) );
+        attributes.put( OBJECTCLASS_ATTRIBUTE, new TextAttribute( CommonUIConstants.R63_G127_B63_COLOR,
null, SWT.BOLD ) );
+        attributes.put( OID_ATTRIBUTE, new TextAttribute( CommonUIConstants.RED_COLOR ) );
     }
 
 

Modified: directory/studio/trunk/plugins/templateeditor/src/main/java/org/apache/directory/studio/templateeditor/view/preferences/TemplatesLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/templateeditor/src/main/java/org/apache/directory/studio/templateeditor/view/preferences/TemplatesLabelProvider.java?rev=1682058&r1=1682057&r2=1682058&view=diff
==============================================================================
--- directory/studio/trunk/plugins/templateeditor/src/main/java/org/apache/directory/studio/templateeditor/view/preferences/TemplatesLabelProvider.java
(original)
+++ directory/studio/trunk/plugins/templateeditor/src/main/java/org/apache/directory/studio/templateeditor/view/preferences/TemplatesLabelProvider.java
Wed May 27 15:32:38 2015
@@ -32,8 +32,7 @@ import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.PlatformUI;
-
+import org.apache.directory.studio.common.ui.CommonUIConstants;
 import org.apache.directory.studio.templateeditor.EntryTemplatePlugin;
 import org.apache.directory.studio.templateeditor.EntryTemplatePluginConstants;
 import org.apache.directory.studio.templateeditor.EntryTemplatePluginUtils;
@@ -50,7 +49,7 @@ import org.apache.directory.studio.templ
 public class TemplatesLabelProvider extends ColumnsLabelProvider implements ITableFontProvider,
ITableColorProvider
 {
     /** The Grey color constant */
-    private static final Color GREY_COLOR = new Color( PlatformUI.getWorkbench().getDisplay(),
150, 150, 150 );
+    private static final Color GREY_COLOR = CommonUIConstants.ML_GREY_COLOR;
 
     /** The templates manager */
     private PreferencesTemplatesManager manager;



Mime
View raw message