Author: rombert
Date: Fri Jul 19 15:04:09 2013
New Revision: 1504906
URL: http://svn.apache.org/r1504906
Log:
SLING-2973 - [Tooling] Align Eclipse tooling to proposed structure
Provide an internal tracing service for the http ( impl ) bundle.
Added:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/.options
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
(with props)
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
(with props)
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Tracer.java
- copied, changed from r1504905,
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
(with props)
Removed:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/component.xml
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/RepositoryImpl.xml
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingContentModuleFactory.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingLaunchpadBehaviour.java
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/ui/internal/ImportWizard.java
Added: sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/.options
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/.options?rev=1504906&view=auto
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/.options (added)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/.options Fri Jul
19 15:04:09 2013
@@ -0,0 +1 @@
+org.apache.sling.slingclipse.http/debug=false
\ No newline at end of file
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/META-INF/MANIFEST.MF
Fri Jul 19 15:04:09 2013
@@ -12,5 +12,5 @@ Require-Bundle: org.eclipse.ui,
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Service-Component: OSGI-INF/RepositoryImpl.xml,
- OSGI-INF/SimpleXmlSerializationManager.xml
+ OSGI-INF/SimpleXmlSerializationManager.xml, OSGI-INF/Tracer.xml
Import-Package: org.json
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/RepositoryImpl.xml
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/RepositoryImpl.xml?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/RepositoryImpl.xml
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/RepositoryImpl.xml
Fri Jul 19 15:04:09 2013
@@ -4,4 +4,5 @@
<service>
<provide interface="org.apache.sling.slingclipse.api.Repository"/>
</service>
+ <reference bind="bindTracer" cardinality="1..1"
interface="org.apache.sling.ide.impl.util.Tracer" name="Tracer"
policy="static"/>
</scr:component>
Added:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml?rev=1504906&view=auto
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
(added)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
Fri Jul 19 15:04:09 2013
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
immediate="false">
+ <implementation class="org.apache.sling.ide.impl.util.Tracer"/>
+ <property name="listener.symbolic.name" type="String"
value="org.apache.sling.slingclipse.http"/>
+ <service>
+ <provide interface="org.apache.sling.ide.impl.util.Tracer"/>
+ </service>
+</scr:component>
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/OSGI-INF/Tracer.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
--- sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
(original)
+++ sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/build.properties
Fri Jul 19 15:04:09 2013
@@ -1,5 +1,6 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- OSGI-INF/
+ OSGI-INF/,\
+ .options
source.. = src/
Added:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java?rev=1504906&view=auto
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
(added)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
Fri Jul 19 15:04:09 2013
@@ -0,0 +1,22 @@
+/*
+ * 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.apache.sling.ide.impl.util;
+
+public class Constants {
+
+ public static final String PLUGIN_ID = "org.apache.sling.slingclipse.http";
+}
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Constants.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision Rev URL
Copied:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Tracer.java
(from r1504905,
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java)
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Tracer.java?p2=sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Tracer.java&p1=sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java&r1=1504905&r2=1504906&rev=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/ide/impl/util/Tracer.java
Fri Jul 19 15:04:09 2013
@@ -1,4 +1,4 @@
- /*
+/*
* 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.
@@ -14,53 +14,33 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.sling.slingclipse.helper;
+package org.apache.sling.ide.impl.util;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
-import org.apache.sling.slingclipse.SlingclipsePlugin;
import org.eclipse.osgi.service.debug.DebugOptions;
import org.eclipse.osgi.service.debug.DebugOptionsListener;
import org.eclipse.osgi.service.debug.DebugTrace;
import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
public class Tracer implements DebugOptionsListener {
private boolean debugEnabled;
private DebugTrace trace;
- private ServiceRegistration<?> serviceRegistration;
-
- public void register(BundleContext bundleContext) {
-
- Dictionary<String, String> properties = new Hashtable<String,
String>(1);
- properties.put(DebugOptions.LISTENER_SYMBOLICNAME,
SlingclipsePlugin.PLUGIN_ID);
-
- serviceRegistration =
bundleContext.registerService(DebugOptionsListener.class.getName(), this,
properties );
- }
-
- public void unregister() {
-
- if ( serviceRegistration != null )
- serviceRegistration.unregister();
- }
-
+
@Override
public void optionsChanged(DebugOptions options) {
-
- debugEnabled = options.getBooleanOption(SlingclipsePlugin.PLUGIN_ID +
"/debug", false);
- trace = options.newDebugTrace(SlingclipsePlugin.PLUGIN_ID, getClass());
+
+ debugEnabled = options.getBooleanOption(Constants.PLUGIN_ID +
"/debug", false);
+ trace = options.newDebugTrace(Constants.PLUGIN_ID, getClass());
}
-
+
public void trace(String message, Object... arguments) {
- if ( !debugEnabled )
- return;
-
- if ( arguments.length > 0 )
- message = NLS.bind(message, arguments);
-
- trace.trace("/debug", message);
+ if (!debugEnabled)
+ return;
+
+ if (arguments.length > 0)
+ message = NLS.bind(message, arguments);
+
+ trace.trace("/debug", message);
}
+
}
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-http/src/org/apache/sling/slingclipse/http/impl/RepositoryImpl.java
Fri Jul 19 15:04:09 2013
@@ -29,6 +29,7 @@ import org.apache.commons.httpclient.met
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.StringPart;
+import org.apache.sling.ide.impl.util.Tracer;
import org.apache.sling.slingclipse.api.Command;
import org.apache.sling.slingclipse.api.FileInfo;
import org.apache.sling.slingclipse.api.RepositoryException;
@@ -37,14 +38,15 @@ import org.apache.sling.slingclipse.api.
public class RepositoryImpl extends AbstractRepository{
- private final HttpClient httpClient = new HttpClient();
+ private final HttpClient httpClient = new HttpClient();
+ private Tracer tracer;
/* (non-Javadoc)
* @see
org.apache.sling.slingclipse.api.Repository#newAddNodeCommand(org.apache.sling.slingclipse.api.FileInfo)
*/
@Override
public Command<Void> newAddNodeCommand(final FileInfo fileInfo) {
- return new Command<Void>() {
+ return wrap(new Command<Void>() {
@Override
public Result<Void> execute() {
PostMethod post = new
PostMethod(createFullPath(fileInfo.getRelativeLocation()));
@@ -56,7 +58,7 @@ public class RepositoryImpl extends Abst
}
httpClient.getState().setCredentials(AuthScope.ANY, new
UsernamePasswordCredentials(repositoryInfo.getUsername(),repositoryInfo.getPassword()));
httpClient.getParams().setAuthenticationPreemptive(true);
- int
responseStatus=httpClient.executeMethod(post);
+ int responseStatus = httpClient.executeMethod(post);
return
resultForResponseStatus(responseStatus);
@@ -72,9 +74,14 @@ public class RepositoryImpl extends Abst
return String.format("%8s %s", "ADD",
fileInfo.getRelativeLocation() + "/" + fileInfo.getName());
}
- };
+ });
}
+ private <T> Command<T> wrap(Command<T> command) {
+
+ return new TracingCommand<T>(command, tracer);
+ }
+
private Result<Void> resultForResponseStatus(int responseStatus) {
if ( isSuccessStatus(responseStatus) )
return AbstractResult.success(null);
@@ -95,7 +102,7 @@ public class RepositoryImpl extends Abst
@Override
public Command<Void> newDeleteNodeCommand(final FileInfo fileInfo) {
- return new Command<Void>() {
+ return wrap(new Command<Void>() {
@Override
public Result<Void> execute() {
PostMethod post = new
PostMethod(createFullPath(fileInfo.getRelativeLocation() + "/"
@@ -119,12 +126,12 @@ public class RepositoryImpl extends Abst
public String toString() {
return String.format("%8s %s", "DELETE",
fileInfo.getRelativeLocation() + "/" + fileInfo.getName());
}
- };
+ });
}
@Override
public Command<String> newListChildrenNodeCommand(final String
path,final ResponseType responseType) {
- return new Command<String>() {
+ return wrap(new Command<String>() {
@Override
public Result<String> execute() {
//TODO handle the response type
@@ -154,13 +161,13 @@ public class RepositoryImpl extends Abst
return String.format("%8s %s (%s)", "LISTCH",
path, responseType);
}
- };
+ });
}
@Override
public Command<byte[]> newGetNodeCommand(final String path) {
- return new Command<byte[]>() {
+ return wrap(new Command<byte[]>() {
@Override
public Result<byte[]> execute() {
@@ -189,7 +196,7 @@ public class RepositoryImpl extends Abst
return String.format("%8s %s", "GETNODE", path);
}
- };
+ });
}
private String createFullPath(String relativePath) {
@@ -209,7 +216,7 @@ public class RepositoryImpl extends Abst
@Override
public Command<String> newGetNodeContentCommand(final String path,
final ResponseType responseType) {
- return new Command<String>() {
+ return wrap(new Command<String>() {
@Override
public Result<String> execute() {
//TODO handle the response type
@@ -237,13 +244,13 @@ public class RepositoryImpl extends Abst
return String.format("%8s %s (%s)", "GETCONT",
path, responseType);
}
- };
+ });
}
@Override
public Command<Void> newUpdateContentNodeCommand(final FileInfo
fileInfo, final Map<String, String> properties) {
- return new Command<Void>() {
+ return wrap(new Command<Void>() {
@Override
public Result<Void> execute() {
PostMethod post = new
PostMethod(createFullPath(fileInfo.getRelativeLocation()));
@@ -272,7 +279,40 @@ public class RepositoryImpl extends Abst
return String.format("%8s %s", "UPDATE",
fileInfo.getRelativeLocation() + "/" + fileInfo.getName());
}
- };
+ });
}
-
+
+ public void bindTracer(Tracer tracer) {
+
+ System.out.println("Bound tracer " + tracer);
+
+ this.tracer = tracer;
+ }
+
+ public void unbindTracer(Tracer tracer) {
+
+ this.tracer = null;
+ }
+
+ static class TracingCommand<T> implements Command<T> {
+
+ private final Command<T> command;
+ private final Tracer tracer;
+
+ public TracingCommand(Command<T> command, Tracer tracer) {
+ this.command = command;
+ this.tracer = tracer;
+ }
+
+ @Override
+ public Result<T> execute() {
+
+ Result<T> result = command.execute();
+
+ tracer.trace("{} -> {}", command, result.toString());
+
+ return result;
+ }
+
+ }
}
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/META-INF/MANIFEST.MF
Fri Jul 19 15:04:09 2013
@@ -16,7 +16,6 @@ Require-Bundle: org.eclipse.ui,
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
-Service-Component: OSGI-INF/component.xml
Import-Package: org.eclipse.osgi.service.debug;version="1.2.0",
org.osgi.service.component;version="1.1.0"
Export-Package: org.apache.sling.slingclipse,
Added:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml?rev=1504906&view=auto
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
(added)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
Fri Jul 19 15:04:09 2013
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
immediate="false">
+ <implementation class="org.apache.sling.slingclipse.helper.Tracer"/>
+ <property name="listener.symbolic.name" type="String"
value="org.apache.sling.slingclipse"/>
+ <service>
+ <provide interface="org.apache.sling.slingclipse.helper.Tracer"/>
+ </service>
+</scr:component>
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/OSGI-INF/Tracer.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/SlingclipsePlugin.java
Fri Jul 19 15:04:09 2013
@@ -41,6 +41,7 @@ public class SlingclipsePlugin extends A
private ServiceReference<Repository> repositoryRef;
private ServiceReference<SerializationManager> serializationManagerRef;
+ private ServiceReference<Tracer> tracerRef;
/*
* (non-Javadoc)
@@ -49,8 +50,9 @@ public class SlingclipsePlugin extends A
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
- tracer = new Tracer();
- tracer.register(getBundle().getBundleContext());
+
+ tracerRef = context.getServiceReference(Tracer.class);
+ tracer = context.getService(tracerRef);
repositoryRef = context.getServiceReference(Repository.class);
repository = context.getService(repositoryRef);
@@ -66,10 +68,10 @@ public class SlingclipsePlugin extends A
public void stop(BundleContext context) throws Exception {
context.ungetService(repositoryRef);
context.ungetService(serializationManagerRef);
+ context.ungetService(tracerRef);
plugin = null;
super.stop(context);
- tracer.unregister();
}
/**
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-plugin/src/org/apache/sling/slingclipse/helper/Tracer.java
Fri Jul 19 15:04:09 2013
@@ -16,36 +16,16 @@
*/
package org.apache.sling.slingclipse.helper;
-import java.util.Dictionary;
-import java.util.Hashtable;
-
import org.apache.sling.slingclipse.SlingclipsePlugin;
import org.eclipse.osgi.service.debug.DebugOptions;
import org.eclipse.osgi.service.debug.DebugOptionsListener;
import org.eclipse.osgi.service.debug.DebugTrace;
import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceRegistration;
public class Tracer implements DebugOptionsListener {
private boolean debugEnabled;
private DebugTrace trace;
- private ServiceRegistration<?> serviceRegistration;
-
- public void register(BundleContext bundleContext) {
-
- Dictionary<String, String> properties = new Hashtable<String,
String>(1);
- properties.put(DebugOptions.LISTENER_SYMBOLICNAME,
SlingclipsePlugin.PLUGIN_ID);
-
- serviceRegistration =
bundleContext.registerService(DebugOptionsListener.class.getName(), this,
properties );
- }
-
- public void unregister() {
-
- if ( serviceRegistration != null )
- serviceRegistration.unregister();
- }
@Override
public void optionsChanged(DebugOptions options) {
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingContentModuleFactory.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingContentModuleFactory.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingContentModuleFactory.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingContentModuleFactory.java
Fri Jul 19 15:04:09 2013
@@ -81,8 +81,6 @@ public class SlingContentModuleFactory e
IPath relativePath = resource.getProjectRelativePath();
- System.out.println("Visiting " + resource + " ...");
-
// only recurse in the expected content path
// TODO make configurable
if
(!SlingclipseHelper.JCR_ROOT.equals(relativePath.segment(0))) {
@@ -102,8 +100,6 @@ public class SlingContentModuleFactory e
if (moduleFile != null)
resources.add(moduleFile);
- System.out.println("Converted " + resource + " to " +
moduleFile);
-
return true;
}
});
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingLaunchpadBehaviour.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingLaunchpadBehaviour.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingLaunchpadBehaviour.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/internal/SlingLaunchpadBehaviour.java
Fri Jul 19 15:04:09 2013
@@ -233,8 +233,6 @@ public class SlingLaunchpadBehaviour ext
}
Result<?> result = command.execute();
- System.out.println("COMMAND : " + command + " -> " + result);
-
if (!result.isSuccess()) // TODO proper logging
throw new CoreException(new Status(Status.ERROR, "some.plugin",
result.toString()));
}
Modified:
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/ui/internal/ImportWizard.java
URL:
http://svn.apache.org/viewvc/sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/ui/internal/ImportWizard.java?rev=1504906&r1=1504905&r2=1504906&view=diff
==============================================================================
---
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/ui/internal/ImportWizard.java
(original)
+++
sling/whiteboard/asanso/plugins/eclipse/slingclipse-wst/src/org/apache/sling/ide/eclipse/wst/ui/internal/ImportWizard.java
Fri Jul 19 15:04:09 2013
@@ -250,7 +250,7 @@ public class ImportWizard extends Wizard
if ( destinationFile.exists() )
return;
- SlingclipsePlugin.getDefault().getTracer().trace("Creating
file{0}", destinationFile.getFullPath());
+ SlingclipsePlugin.getDefault().getTracer().trace("Creating file {0}",
destinationFile.getFullPath());
destinationFile.create(new ByteArrayInputStream(node), true,
null /* TODO progress monitor */);
}