directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r1677353 - in /directory/studio/trunk: eclipse-target-platform/ eclipse-target-platform/template/ features/rcp.feature/ plugins/ plugins/slf4j-eclipselog/ plugins/slf4j-eclipselog/src/ plugins/slf4j-eclipselog/src/main/ plugins/slf4j-eclips...
Date Sat, 02 May 2015 20:50:57 GMT
Author: seelmann
Date: Sat May  2 20:50:56 2015
New Revision: 1677353

URL: http://svn.apache.org/r1677353
Log:
DIRSTUDIO-1042:
* Remove slf4j-log4j12 and log4j dependencies, add log4j-over-slf4j instead
* Add slf4j to eclipse log binding
* Add Error Log view


Added:
    directory/studio/trunk/plugins/slf4j-eclipselog/   (with props)
    directory/studio/trunk/plugins/slf4j-eclipselog/build.properties
    directory/studio/trunk/plugins/slf4j-eclipselog/pom-first.xml
    directory/studio/trunk/plugins/slf4j-eclipselog/pom.xml
    directory/studio/trunk/plugins/slf4j-eclipselog/src/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/Activator.java
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLogger.java
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLoggerFactory.java
    directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
Modified:
    directory/studio/trunk/eclipse-target-platform/pom.xml
    directory/studio/trunk/eclipse-target-platform/template/org.apache.directory.studio.eclipse-target-platform.target
    directory/studio/trunk/features/rcp.feature/feature.xml
    directory/studio/trunk/plugins/pom-first.xml
    directory/studio/trunk/plugins/pom.xml
    directory/studio/trunk/tests/test.integration.ui/pom-first.xml
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
    directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java

Modified: directory/studio/trunk/eclipse-target-platform/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/eclipse-target-platform/pom.xml?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/eclipse-target-platform/pom.xml (original)
+++ directory/studio/trunk/eclipse-target-platform/pom.xml Sat May  2 20:50:56 2015
@@ -37,12 +37,6 @@
 
     <!-- Logging jars -->
     <dependency>
-      <groupId>log4j</groupId>
-      <artifactId>log4j</artifactId>
-      <version>${log4j.log4j.version}</version>
-    </dependency>
-
-    <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-api</artifactId>
       <version>${org.slf4j.version}</version>
@@ -50,7 +44,7 @@
 
     <dependency>
       <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
+      <artifactId>log4j-over-slf4j</artifactId>
       <version>${org.slf4j.version}</version>
     </dependency>
 

Modified: directory/studio/trunk/eclipse-target-platform/template/org.apache.directory.studio.eclipse-target-platform.target
URL: http://svn.apache.org/viewvc/directory/studio/trunk/eclipse-target-platform/template/org.apache.directory.studio.eclipse-target-platform.target?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/eclipse-target-platform/template/org.apache.directory.studio.eclipse-target-platform.target
(original)
+++ directory/studio/trunk/eclipse-target-platform/template/org.apache.directory.studio.eclipse-target-platform.target
Sat May  2 20:50:56 2015
@@ -19,7 +19,7 @@
   @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
 -->
 <?pde version="3.8"?>
-<target name="Apache Directory Studio Platform" sequenceNumber="124">
+<target name="Apache Directory Studio Platform" sequenceNumber="136">
   <locations>
 
     <location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner"
includeSource="true" type="InstallableUnit">
@@ -30,9 +30,8 @@
       <unit id="net.sf.ehcache" version="${net.sf.ehcache.bundleversion}"/>
 
       <!-- Logging jars -->
-      <unit id="log4j" version="${log4j.log4j.bundleversion}"/>
       <unit id="slf4j.api" version="${org.slf4j.bundleversion}"/>
-      <unit id="slf4j.log4j12" version="${org.slf4j.bundleversion}"/>
+      <unit id="log4j.over.slf4j" version="${org.slf4j.bundleversion}"/>
 
       <!-- Commons jars -->
       <unit id="org.apache.commons.collections" version="${org.apache.commons.collections.bundleversion}"/>
@@ -115,6 +114,9 @@
       <unit id="org.eclipse.platform.feature.group" version="4.4.2.v20150204-1700"/>
       <unit id="org.eclipse.platform.source.feature.group" version="4.4.2.v20150204-1700"/>
       <unit id="org.eclipse.jdt.feature.group" version="3.10.1.v20150204-1700"/>
+      <unit id="org.eclipse.jdt.source.feature.group" version="3.10.1.v20150204-1700"/>
+      <unit id="org.eclipse.pde.feature.group" version="3.10.1.v20150204-1700"/>
+      <unit id="org.eclipse.pde.source.feature.group" version="3.10.1.v20150204-1700"/>
       <unit id="org.eclipse.equinox.p2.user.ui.feature.group" version="2.2.0.v20150129-0838"/>
       <unit id="org.eclipse.equinox.executable.feature.group" version="3.6.102.v20150204-1316"/>
       <repository location="http://download.eclipse.org/eclipse/updates/4.4"/>

Modified: directory/studio/trunk/features/rcp.feature/feature.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/features/rcp.feature/feature.xml?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/features/rcp.feature/feature.xml (original)
+++ directory/studio/trunk/features/rcp.feature/feature.xml Sat May  2 20:50:56 2015
@@ -388,13 +388,6 @@ http://www.apache.org/licenses/
          unpack="false"/>
 
    <plugin
-         id="log4j"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
          id="org.apache.directory.api.ldap.schema"
          download-size="0"
          install-size="0"
@@ -416,14 +409,6 @@ http://www.apache.org/licenses/
          unpack="false"/>
 
    <plugin
-         id="slf4j.log4j12"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         fragment="true"
-         unpack="false"/>
-
-   <plugin
          id="org.apache.directory.api.dsmlv2.engine"
          download-size="0"
          install-size="0"
@@ -519,6 +504,20 @@ http://www.apache.org/licenses/
          download-size="0"
          install-size="0"
          version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.ui.views.log"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.apache.directory.studio.slf4j-eclipselog"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
          unpack="false"/>
 
 </feature>

Modified: directory/studio/trunk/plugins/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/pom-first.xml?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/plugins/pom-first.xml (original)
+++ directory/studio/trunk/plugins/pom-first.xml Sat May  2 20:50:56 2015
@@ -55,6 +55,7 @@
     <module>rcp/pom-first.xml</module>
     <module>combinededitor/pom-first.xml</module>
     <module>templateeditor/pom-first.xml</module>
+    <module>slf4j-eclipselog/pom-first.xml</module>
   </modules>
 
   <build>

Modified: directory/studio/trunk/plugins/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/pom.xml?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/plugins/pom.xml (original)
+++ directory/studio/trunk/plugins/pom.xml Sat May  2 20:50:56 2015
@@ -54,6 +54,7 @@
     <module>openldap.acl.editor</module>
     <module>templateeditor</module>
     <module>combinededitor</module>
+    <module>slf4j-eclipselog</module>
   </modules>
 
   <build>

Propchange: directory/studio/trunk/plugins/slf4j-eclipselog/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat May  2 20:50:56 2015
@@ -0,0 +1,16 @@
+target
+maven-eclipse.xml
+lib
+bin
+.externalToolBuilders
+felix-cache
+.project
+.classpath
+.settings
+eclipse-classes
+*.log
+*.iml
+*.ipr
+dependency-reduced-pom.xml
+META-INF
+

Added: directory/studio/trunk/plugins/slf4j-eclipselog/build.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/build.properties?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/build.properties (added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/build.properties Sat May  2 20:50:56 2015
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+source.. = src/main/java/
+bin.includes = META-INF/,\
+               .

Added: directory/studio/trunk/plugins/slf4j-eclipselog/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/pom-first.xml?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/pom-first.xml (added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/pom-first.xml Sat May  2 20:50:56 2015
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.studio</groupId>
+    <artifactId>org.apache.directory.studio.plugins-parent</artifactId>
+    <version>2.0.0.qualifier</version>
+    <relativePath>../pom-first.xml</relativePath>
+  </parent>
+
+  <artifactId>org.apache.directory.studio.slf4j-eclipselog</artifactId>
+  <name>Apache Directory Studio SLF4J to Eclipse Log Binding</name>
+  <description>
+    An slf4j logger binding that a forwards log entries to Eclipse log in '.metadata/.log'.
+  </description>
+  <packaging>bundle</packaging>
+
+  <build>
+     <!-- MANIFEST.MF Generation -->
+    <plugins>
+      <plugin>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>maven-bundle-plugin</artifactId>
+        <extensions>true</extensions>
+        <configuration>
+          <manifestLocation>META-INF</manifestLocation>
+          <instructions>
+            <Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
+            <Bundle-Localization>plugin</Bundle-Localization>
+            <Eclipse-LazyStart>true</Eclipse-LazyStart>
+            <Bundle-Activator>org.slf4j.impl.Activator</Bundle-Activator>
+            
+            <Export-Package>org.slf4j.impl</Export-Package>
+            
+            <Import-Package>
+            </Import-Package>
+            
+            <Require-Bundle>
+ slf4j.api,
+ org.eclipse.core.runtime
+            </Require-Bundle>
+          </instructions>
+        </configuration>
+        <executions>
+          <execution>
+            <id>generate-manifest</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>manifest</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
+

Added: directory/studio/trunk/plugins/slf4j-eclipselog/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/pom.xml?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/pom.xml (added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/pom.xml Sat May  2 20:50:56 2015
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!--
+  @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.studio</groupId>
+    <artifactId>org.apache.directory.studio.plugins-parent</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+    <relativePath>../</relativePath>
+  </parent>
+
+  <artifactId>org.apache.directory.studio.slf4j-eclipselog</artifactId>
+  <name>Apache Directory Studio SLF4J to Eclipse Log Binding</name>
+  <packaging>eclipse-plugin</packaging>
+
+  <description>
+    An slf4j logger binding that a forwards log entries to Eclipse log in '.metadata/.log'.
+  </description>
+</project>

Added: directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/Activator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/Activator.java?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/Activator.java
(added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/Activator.java
Sat May  2 20:50:56 2015
@@ -0,0 +1,63 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.slf4j.impl;
+
+
+import org.eclipse.core.runtime.Plugin;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class Activator extends Plugin
+{
+
+    private static Activator plugin;
+
+
+    public Activator()
+    {
+        plugin = this;
+    }
+
+
+    public static Activator getDefault()
+    {
+        return plugin;
+    }
+
+
+    @Override
+    public void start( BundleContext context ) throws Exception
+    {
+        super.start( context );
+    }
+
+
+    @Override
+    public void stop( BundleContext context ) throws Exception
+    {
+        super.stop( context );
+        plugin = null;
+    }
+
+}

Added: directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLogger.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLogger.java?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLogger.java
(added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLogger.java
Sat May  2 20:50:56 2015
@@ -0,0 +1,265 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.slf4j.impl;
+
+
+import org.eclipse.core.runtime.Status;
+import org.slf4j.helpers.MarkerIgnoringBase;
+import org.slf4j.helpers.MessageFormatter;
+
+
+/**
+ * Adapts {@link org.slf4j.Logger} interface to Eclipse {@link org.eclipse.core.runtime.ILog}
+ * which writes logs to <code>.metadata/.log</code> and show them in the Eclipse
'Error Log' view.
+ * <p>
+ * Only log levels 'error' and 'warn' are implemented. Log level 'info' would write too much
+ * to the Eclipse log. There is no appropriate log level 'debug' and 'trace' in Eclipse log,
thus
+ * those levels are also not supported.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EclipseLogLogger extends MarkerIgnoringBase
+{
+    private static final long serialVersionUID = 1L;
+
+
+    private void internalLog( int severity, String message, Throwable t )
+    {
+        Activator activator = Activator.getDefault();
+        if ( activator != null )
+        {
+            String symbolicName = activator.getBundle().getSymbolicName();
+            Status status = new Status( severity, symbolicName, message, t );
+            activator.getLog().log( status );
+        }
+    }
+
+
+    // ERROR
+
+    public boolean isErrorEnabled()
+    {
+        return true;
+    }
+
+
+    public void error( String msg )
+    {
+        if ( isErrorEnabled() )
+        {
+            internalLog( Status.ERROR, msg, null );
+        }
+    }
+
+
+    public void error( String format, Object arg )
+    {
+        if ( isErrorEnabled() )
+        {
+            String msgStr = MessageFormatter.format( format, arg ).getMessage();
+            internalLog( Status.ERROR, msgStr, null );
+        }
+    }
+
+
+    public void error( String format, Object arg1, Object arg2 )
+    {
+        if ( isErrorEnabled() )
+        {
+            String msgStr = MessageFormatter.format( format, arg1, arg2 ).getMessage();
+            internalLog( Status.ERROR, msgStr, null );
+        }
+    }
+
+
+    public void error( String format, Object... argArray )
+    {
+        if ( isErrorEnabled() )
+        {
+            String msgStr = MessageFormatter.arrayFormat( format, argArray ).getMessage();
+            internalLog( Status.ERROR, msgStr, null );
+        }
+    }
+
+
+    public void error( String msg, Throwable t )
+    {
+        if ( isErrorEnabled() )
+        {
+            internalLog( Status.ERROR, msg, t );
+        }
+    }
+
+
+    // WARN
+
+    public boolean isWarnEnabled()
+    {
+        return true;
+    }
+
+
+    public void warn( String msg )
+    {
+        if ( isWarnEnabled() )
+        {
+            internalLog( Status.WARNING, msg, null );
+        }
+    }
+
+
+    public void warn( String format, Object arg )
+    {
+        if ( isWarnEnabled() )
+        {
+            String msgStr = MessageFormatter.format( format, arg ).getMessage();
+            internalLog( Status.WARNING, msgStr, null );
+        }
+    }
+
+
+    public void warn( String format, Object arg1, Object arg2 )
+    {
+        if ( isWarnEnabled() )
+        {
+            String msgStr = MessageFormatter.format( format, arg1, arg2 ).getMessage();
+            internalLog( Status.WARNING, msgStr, null );
+        }
+    }
+
+
+    public void warn( String format, Object... argArray )
+    {
+        if ( isWarnEnabled() )
+        {
+            String msgStr = MessageFormatter.arrayFormat( format, argArray ).getMessage();
+            internalLog( Status.WARNING, msgStr, null );
+        }
+    }
+
+
+    public void warn( String msg, Throwable t )
+    {
+        if ( isWarnEnabled() )
+        {
+            internalLog( Status.WARNING, msg, t );
+        }
+    }
+
+
+    // INFO disabled, it would write too much logs
+
+    public boolean isInfoEnabled()
+    {
+        return false;
+    }
+
+
+    public void info( String msg )
+    {
+    }
+
+
+    public void info( String format, Object arg )
+    {
+    }
+
+
+    public void info( String format, Object arg1, Object arg2 )
+    {
+    }
+
+
+    public void info( String format, Object... argArray )
+    {
+    }
+
+
+    public void info( String msg, Throwable t )
+    {
+    }
+
+
+    // DEBUG disabled, there is no appropriate log level in Eclipse log
+
+    public boolean isDebugEnabled()
+    {
+        return false;
+    }
+
+
+    public void debug( String msg )
+    {
+    }
+
+
+    public void debug( String format, Object arg )
+    {
+    }
+
+
+    public void debug( String format, Object arg1, Object arg2 )
+    {
+    }
+
+
+    public void debug( String format, Object... argArray )
+    {
+    }
+
+
+    public void debug( String msg, Throwable t )
+    {
+    }
+
+
+    // TRACE disabled, there is no appropriate log level in Eclipse log
+
+    public boolean isTraceEnabled()
+    {
+        return false;
+    }
+
+
+    public void trace( String msg )
+    {
+    }
+
+
+    public void trace( String format, Object arg )
+    {
+    }
+
+
+    public void trace( String format, Object arg1, Object arg2 )
+    {
+    }
+
+
+    public void trace( String format, Object... argArray )
+    {
+    }
+
+
+    public void trace( String msg, Throwable t )
+    {
+    }
+}

Added: directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLoggerFactory.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLoggerFactory.java?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLoggerFactory.java
(added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/EclipseLogLoggerFactory.java
Sat May  2 20:50:56 2015
@@ -0,0 +1,42 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.slf4j.impl;
+
+
+import org.slf4j.ILoggerFactory;
+
+/**
+ * Logger factory for the {@link EclipseLogLogger}.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class EclipseLogLoggerFactory implements ILoggerFactory
+{
+    private final EclipseLogLogger logger = new EclipseLogLogger();
+
+
+    @Override
+    public EclipseLogLogger getLogger( String name )
+    {
+        return logger;
+    }
+
+}

Added: directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/StaticLoggerBinder.java?rev=1677353&view=auto
==============================================================================
--- directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
(added)
+++ directory/studio/trunk/plugins/slf4j-eclipselog/src/main/java/org/slf4j/impl/StaticLoggerBinder.java
Sat May  2 20:50:56 2015
@@ -0,0 +1,78 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.slf4j.impl;
+
+
+import org.slf4j.spi.LoggerFactoryBinder;
+
+/**
+ * The static logger binding for slf4j. Adopted from slf4j-log4j12 implementation.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class StaticLoggerBinder implements LoggerFactoryBinder
+{
+    /**
+     * The unique instance of this class.
+     */
+    private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
+
+
+    /**
+     * Return the singleton of this class.
+     * 
+     * @return the StaticLoggerBinder singleton
+     */
+    public static final StaticLoggerBinder getSingleton()
+    {
+        return SINGLETON;
+    }
+
+    /**
+     * Declare the version of the SLF4J API this implementation is compiled
+     * against. The value of this field is usually modified with each release.
+     */
+    // to avoid constant folding by the compiler, this field must *not* be final
+    public static String REQUESTED_API_VERSION = "1.7.0"; // !final
+
+    private EclipseLogLoggerFactory loggerFactory;
+
+
+    private StaticLoggerBinder()
+    {
+        loggerFactory = new EclipseLogLoggerFactory();
+    }
+
+
+    @Override
+    public EclipseLogLoggerFactory getLoggerFactory()
+    {
+        return loggerFactory;
+    }
+
+
+    @Override
+    public String getLoggerFactoryClassStr()
+    {
+        return EclipseLogLoggerFactory.class.getName();
+    }
+
+}

Modified: directory/studio/trunk/tests/test.integration.ui/pom-first.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/pom-first.xml?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/pom-first.xml (original)
+++ directory/studio/trunk/tests/test.integration.ui/pom-first.xml Sat May  2 20:50:56 2015
@@ -49,7 +49,7 @@
             
             <Require-Bundle>org.junit;bundle-version="4.11.0",
  org.hamcrest.library;bundle-version="1.3.0",
- org.apache.log4j;bundle-version="1.2.15",
+ log4j.over.slf4j;bundle-version="1.7.10",
  org.eclipse.swtbot.eclipse.finder;bundle-version="2.2.1",
  org.eclipse.swtbot.eclipse.core;bundle-version="2.2.1",
  org.eclipse.swtbot.forms.finder;bundle-version="2.2.1",
@@ -90,12 +90,14 @@
  org.apache.directory.studio.ldifeditor.help,
  org.apache.directory.studio.ldifparser,
  org.apache.directory.studio.openldap.common.ui,
+ org.apache.directory.studio.openldap.config.acl.editor,
  org.apache.directory.studio.openldap.config.editor,
  org.apache.directory.studio.openldap.syncrepl,
  org.apache.directory.studio.rcp,
  org.apache.directory.studio.rcp.help,
  org.apache.directory.studio.schemaeditor,
  org.apache.directory.studio.schemaeditor.help,
+ org.apache.directory.studio.slf4j-eclipselog,
  org.apache.directory.studio.test.integration.core,
  org.apache.directory.studio.valueeditors,
  

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/SWTBotUtils.java
Sat May  2 20:50:56 2015
@@ -299,7 +299,10 @@ public class SWTBotUtils
         {
             public void run()
             {
-                entry.expand();
+                if ( !entry.isExpanded() )
+                {
+                    entry.expand();
+                }
             }
         } );
 

Modified: directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java?rev=1677353&r1=1677352&r2=1677353&view=diff
==============================================================================
--- directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
(original)
+++ directory/studio/trunk/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/bots/BrowserWidgetBot.java
Sat May  2 20:50:56 2015
@@ -134,7 +134,10 @@ class BrowserWidgetBot
         {
             public void run()
             {
-                entry.expand();
+                if ( !entry.isExpanded() )
+                {
+                    entry.expand();
+                }
             }
         } );
 



Mime
View raw message