Fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=552437
Change-Id: Ifb21de213039dbb9ff7627c8d945216636ae6b9e
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.remoteservice.ui/META-INF/MANIFEST.MF
index 6f70e1f..e2a7f6d 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.remoteservice.ui;singleton:=true
Automatic-Module-Name: org.eclipse.ecf.remoteservice.ui
-Bundle-Version: 3.4.202.qualifier
+Bundle-Version: 3.4.203.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/OSGI-INF/discovery.xml b/framework/bundles/org.eclipse.ecf.remoteservice.ui/OSGI-INF/discovery.xml
index 4597488..12ff647 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/OSGI-INF/discovery.xml
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/OSGI-INF/discovery.xml
@@ -3,9 +3,5 @@
<implementation class="org.eclipse.ecf.internal.remoteservices.ui.DiscoveryComponent"/>
<property name="endpoint.listener.scope" type="String" value="(ecf.endpoint.id.ns=*)"/>
<reference bind="bindRemoteServiceAdmin" cardinality="0..1" interface="org.osgi.service.remoteserviceadmin.RemoteServiceAdmin" name="RemoteServiceAdmin" policy="dynamic" unbind="unbindRemoteServiceAdmin"/>
- <service>
- <provide interface="org.osgi.service.remoteserviceadmin.EndpointEventListener"/>
- <provide interface="org.osgi.service.remoteserviceadmin.RemoteServiceAdminListener"/>
- </service>
<reference bind="bindEndpointDescriptionLocator" cardinality="0..1" interface="org.eclipse.ecf.osgi.services.remoteserviceadmin.IEndpointDescriptionLocator" name="IEndpointDescriptionLocator" policy="dynamic" unbind="unbindEndpointDescriptionLocator"/>
</scr:component>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/pom.xml b/framework/bundles/org.eclipse.ecf.remoteservice.ui/pom.xml
index 50da8ff..52038a1 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/pom.xml
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse.ecf</groupId>
<artifactId>org.eclipse.ecf.remoteservice.ui</artifactId>
- <version>3.4.202-SNAPSHOT</version>
+ <version>3.4.203-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/Activator.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/Activator.java
index 84bb606..a355012 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/Activator.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/Activator.java
@@ -21,7 +21,9 @@
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.ecf.core.IContainerManager;
+import org.eclipse.ecf.core.util.BundleStarter;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.util.tracker.ServiceTracker;
@@ -56,6 +58,8 @@
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
+ BundleStarter.startDependents(context, new String[] { "org.eclipse.ecf.osgi.services.distribution" },
+ Bundle.RESOLVED | Bundle.STARTING);
this.context = context;
ServiceTracker<IExtensionRegistry, IExtensionRegistry> st = new ServiceTracker(this.context,
IExtensionRegistry.class, null);
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/DiscoveryComponent.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/DiscoveryComponent.java
index ec1cf05..b4a48be 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/DiscoveryComponent.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/DiscoveryComponent.java
@@ -9,15 +9,16 @@
package org.eclipse.ecf.internal.remoteservices.ui;
import java.util.ArrayList;
+import java.util.Hashtable;
import java.util.List;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.IEndpointDescriptionLocator;
+import org.eclipse.ecf.osgi.services.remoteserviceadmin.ITopologyManager;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteServiceAdmin;
import org.eclipse.ecf.remoteserviceadmin.ui.endpoint.EndpointDiscoveryView;
import org.eclipse.ecf.remoteserviceadmin.ui.rsa.RemoteServiceAdminView;
-import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceRegistration;
import org.osgi.service.remoteserviceadmin.EndpointEvent;
import org.osgi.service.remoteserviceadmin.EndpointEventListener;
import org.osgi.service.remoteserviceadmin.RemoteServiceAdminEvent;
@@ -25,13 +26,17 @@
public class DiscoveryComponent implements EndpointEventListener, RemoteServiceAdminListener {
- private static final String RSA_SYMBOLICNAME = "org.eclipse.ecf.osgi.services.remoteserviceadmin"; //$NON-NLS-1$
+ private static String ENDPOINT_LISTENER_SCOPE = System
+ .getProperty("org.eclipse.ecf.remoteservices.ui.endpointListenerScope", "(ecf.endpoint.id.ns=*)");
private static DiscoveryComponent instance;
private BundleContext context;
private RemoteServiceAdmin rsa;
+ @SuppressWarnings("unused")
+ private ITopologyManager tm;
+
void bindRemoteServiceAdmin(org.osgi.service.remoteserviceadmin.RemoteServiceAdmin r) {
rsa = (RemoteServiceAdmin) r;
}
@@ -40,6 +45,14 @@
this.rsa = null;
}
+ void bindTopologyManager(ITopologyManager tm) {
+ this.tm = tm;
+ }
+
+ void unbindTopologyManager(ITopologyManager tm) {
+ this.tm = null;
+ }
+
public BundleContext getContext() {
return this.context;
}
@@ -49,6 +62,10 @@
private IEndpointDescriptionLocator edLocator;
+ private ServiceRegistration<EndpointEventListener> eelRegistration;
+
+ private ServiceRegistration<RemoteServiceAdminListener> rsaadminRegistration;
+
void bindEndpointDescriptionLocator(IEndpointDescriptionLocator locator) {
this.edLocator = locator;
}
@@ -80,11 +97,26 @@
synchronized (this) {
instance = this;
this.context = context;
+ // Register this instance as an endpoint event listener
+ Hashtable<String, Object> props = new Hashtable<String, Object>();
+ props.put(EndpointEventListener.ENDPOINT_LISTENER_SCOPE, ENDPOINT_LISTENER_SCOPE);
+ this.eelRegistration = context.registerService(EndpointEventListener.class, this, props);
+ // register as remote service admin listener
+ this.rsaadminRegistration = context.registerService(RemoteServiceAdminListener.class, this, null);
}
+
}
void deactivate() {
synchronized (this) {
+ if (this.eelRegistration != null) {
+ this.eelRegistration.unregister();
+ this.eelRegistration = null;
+ }
+ if (this.rsaadminRegistration != null) {
+ this.rsaadminRegistration.unregister();
+ this.rsaadminRegistration = null;
+ }
instance = null;
discoveryView = null;
rsa = null;
@@ -96,22 +128,6 @@
}
}
- public void startRSA() throws BundleException {
- Bundle rsaBundle = null;
- BundleContext ctxt = null;
- synchronized (this) {
- ctxt = this.context;
- if (ctxt == null)
- return;
- }
- for (Bundle b : ctxt.getBundles())
- if (b.getSymbolicName().equals(RSA_SYMBOLICNAME))
- rsaBundle = b;
- if (rsaBundle == null)
- throw new BundleException(Messages.DiscoveryComponent_ERROR_MSG_CANNOT_FIND_RSA_BUNDLE);
- rsaBundle.start();
- }
-
private List<EndpointEvent> history;
List<EndpointEvent> getHistory() {
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
index 0bc036e..468f0a8 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/RemoteServiceHandlerUtil.java
@@ -102,7 +102,7 @@
private static IRemoteServiceReference[] getRemoteServiceReferencesForRemoteServiceAdapter(
IRemoteServiceContainerAdapter adapter, IServiceInfo serviceInfo)
- throws InvalidSyntaxException, IDCreateException {
+ throws InvalidSyntaxException, IDCreateException {
ID serviceID = null;
final String serviceNamespace = getServiceNamespace(serviceInfo);
final String serviceid = getServiceID(serviceInfo);
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ConnectionHandler.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ConnectionHandler.java
index 9ddf6ed..254c7da 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ConnectionHandler.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ConnectionHandler.java
@@ -24,8 +24,7 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+ * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
* ExecutionEvent)
*/
public Object execute(ExecutionEvent event) throws ExecutionException {
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/DisonnectRemoteServicehandler.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/DisonnectRemoteServicehandler.java
index 9e2d022..f1b14d4 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/DisonnectRemoteServicehandler.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/DisonnectRemoteServicehandler.java
@@ -26,8 +26,7 @@
/*
* (non-Javadoc)
*
- * @see
- * org.eclipse.ecf.internal.remoteservices.ui.handlers.ConnectionHandler
+ * @see org.eclipse.ecf.internal.remoteservices.ui.handlers.ConnectionHandler
* #getJob()
*/
protected Job getJob(final ExecutionEvent event) throws ExecutionException {
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ReflectiveRemoteServiceHandler.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ReflectiveRemoteServiceHandler.java
index 0c88570..0bea134 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ReflectiveRemoteServiceHandler.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/handlers/ReflectiveRemoteServiceHandler.java
@@ -115,12 +115,12 @@
break;
case MethodInvocationDialog.OSGI_SERVICE_PROXY:
throw new UnsupportedOperationException();
- // invokeOSGiProxy(interfaceClass, remoteCall);
- // break;
+ // invokeOSGiProxy(interfaceClass, remoteCall);
+ // break;
case MethodInvocationDialog.REMOTE_SERVICE_PROXY:
throw new UnsupportedOperationException();
- // invokeProxy(interfaceClass, remoteService, remoteCall);
- // break;
+ // invokeProxy(interfaceClass, remoteService, remoteCall);
+ // break;
case MethodInvocationDialog.SYNCHRONOUS:
invokeSync(cls, remoteService, remoteCall);
break;
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
index 029ad4a..2faf49b 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/internal/remoteservices/ui/property/ConnectedTester.java
@@ -68,8 +68,7 @@
}
/**
- * @param connectID
- * The conected ID for which an IContainer is to be returned
+ * @param connectID The conected ID for which an IContainer is to be returned
* @return a IContainer instance of null
*/
// TODO push this functionality down into the ContainerManager
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
index ad2f259..d030161 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/EndpointDiscoveryView.java
@@ -433,7 +433,7 @@
}
protected EndpointNode createEndpointDescriptionNode(EndpointDescription ed) {
- EndpointNode edo = new EndpointNode(ed,findImportReference(ed));
+ EndpointNode edo = new EndpointNode(ed, findImportReference(ed));
// Interfaces
EndpointInterfacesNode ein = new EndpointInterfacesNode();
@@ -480,7 +480,7 @@
EndpointNode findEndpointNode(final ImportReference ir) {
EndpointGroupNode egn = contentProvider.getRootNode();
- for(AbstractEndpointNode aen: egn.getChildren()) {
+ for (AbstractEndpointNode aen : egn.getChildren()) {
if (aen instanceof EndpointNode) {
EndpointNode en = (EndpointNode) aen;
ImportReference iRef = en.getImportReference();
@@ -490,13 +490,14 @@
}
return null;
}
-
+
public void handleRSAEent(RemoteServiceAdminEvent event) {
final int type = event.getType();
Throwable t = event.getException();
if (t == null) {
TreeViewer treeViewer = this.viewer;
- if (treeViewer == null) return;
+ if (treeViewer == null)
+ return;
switch (type) {
case RemoteServiceAdminEvent.IMPORT_UNREGISTRATION:
final ImportReference ir = (ImportReference) event.getImportReference();
@@ -505,7 +506,7 @@
@Override
public void run() {
EndpointGroupNode egn = contentProvider.getRootNode();
- for(AbstractEndpointNode aen: egn.getChildren()) {
+ for (AbstractEndpointNode aen : egn.getChildren()) {
if (aen instanceof EndpointNode) {
EndpointNode en = (EndpointNode) aen;
ImportReference iRef = en.getImportReference();
@@ -514,7 +515,8 @@
}
}
viewer.refresh();
- }});
+ }
+ });
}
break;
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/model/EndpointNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/model/EndpointNode.java
index b8a6d52..ef64db1 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/model/EndpointNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/endpoint/model/EndpointNode.java
@@ -28,6 +28,7 @@
this.endpointDescription = ed;
this.importReference = (ImportReference) irn.getImportRegistration().getImportReference();
}
+
/**
* @since 3.3
*/
@@ -51,18 +52,17 @@
public EndpointDescription getEndpointDescription() {
return endpointDescription;
}
-
+
@Deprecated
public ImportRegistrationNode getImportReg() {
return null;
}
-
-
+
@Deprecated
public ImportRegistration getImportRegistration() {
return null;
}
-
+
/**
* @since 3.3
*/
@@ -84,10 +84,10 @@
public void setImportReference(ImportReference iref) {
this.importReference = iref;
}
-
+
@Deprecated
public void setImportReg(ImportRegistrationNode ir) {
-
+
}
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/AbstractRegistrationNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/AbstractRegistrationNode.java
index 707207b..a043dc6 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/AbstractRegistrationNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/AbstractRegistrationNode.java
@@ -29,7 +29,7 @@
*/
public AbstractRegistrationNode(Throwable t, boolean showStack) {
this.error = t;
- if (this.error != null)
+ if (this.error != null)
addChild(new ExceptionNode(this.error, showStack));
}
@@ -48,21 +48,21 @@
public abstract boolean isClosed();
protected abstract String getValidName();
-
+
/**
* @since 3.4
*/
- protected String getErrorName(){
+ protected String getErrorName() {
return ERROR;
}
-
+
/**
* @since 3.4
*/
protected String getClosedName() {
return CLOSED;
}
-
+
public abstract ServiceReference getServiceReference();
public String getName() {
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExceptionNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExceptionNode.java
index 093def3..b2eaeff 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExceptionNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExceptionNode.java
@@ -16,16 +16,16 @@
public ExceptionNode(String exceptionLabel, Throwable exception, boolean showStack) {
super(exceptionLabel, exception.getLocalizedMessage());
if (showStack) {
- for(StackTraceElement ste: exception.getStackTrace())
+ for (StackTraceElement ste : exception.getStackTrace())
addChild(new StackTraceElementNode(ste.toString()));
Throwable cause = exception.getCause();
if (cause != null)
- addChild(new ExceptionNode(cause,true));
+ addChild(new ExceptionNode(cause, true));
}
}
public ExceptionNode(Throwable exception, boolean showStack) {
- this("",exception, showStack);
+ this("", exception, showStack);
setNameValueSeparator("");
}
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExportRegistrationNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExportRegistrationNode.java
index cb8bce7..b5d3c05 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExportRegistrationNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ExportRegistrationNode.java
@@ -41,7 +41,7 @@
protected String getErrorName() {
return "Export " + super.getErrorName();
}
-
+
protected ExportRegistration getExportRegistration() {
return this.exportRegistration;
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ImportRegistrationNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ImportRegistrationNode.java
index 66fef67..f024676 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ImportRegistrationNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/ImportRegistrationNode.java
@@ -41,7 +41,6 @@
protected String getErrorName() {
return "Import " + super.getErrorName();
}
-
protected ImportRegistration getImportRegistration() {
return this.importRegistration;
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/RSAAdapterFactory.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/RSAAdapterFactory.java
index 779a421..280a00f 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/RSAAdapterFactory.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/RSAAdapterFactory.java
@@ -25,7 +25,7 @@
private NameValuePropertyNodeWorkbenchAdapter nameValuePropertyAdapter = new NameValuePropertyNodeWorkbenchAdapter();
private EndpointDescriptionRSANodeWorkbenchAdapter edAdapter = new EndpointDescriptionRSANodeWorkbenchAdapter();
private ExceptionNodeWorkbenchAdapter enAdapter = new ExceptionNodeWorkbenchAdapter();
-
+
@Override
public Object getAdapter(Object adaptableObject, @SuppressWarnings("rawtypes") Class adapterType) {
if (adapterType.isInstance(adaptableObject)) {
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/StackTraceElementNode.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/StackTraceElementNode.java
index 70c0f85..012ad6e 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/StackTraceElementNode.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteserviceadmin/ui/rsa/model/StackTraceElementNode.java
@@ -14,7 +14,7 @@
public class StackTraceElementNode extends NameValuePropertyNode {
public StackTraceElementNode(String stackTraceElement) {
- super("at",stackTraceElement);
+ super("at", stackTraceElement);
setNameValueSeparator(" ");
}
}
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteservices/ui/MethodInvocationDialog.java b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteservices/ui/MethodInvocationDialog.java
index de4eea8..47e550b 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteservices/ui/MethodInvocationDialog.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice.ui/src/org/eclipse/ecf/remoteservices/ui/MethodInvocationDialog.java
@@ -68,31 +68,27 @@
public static final int ASYNC_LISTENER = 0;
/**
- * An integer constant that corresponds to the "Async Future Result"
- * selection.
+ * An integer constant that corresponds to the "Async Future Result" selection.
*
* @see #getInvocationType()
*/
public static final int ASYNC_FUTURE_RESULT = ASYNC_LISTENER + 1;
/**
- * An integer constant that corresponds to the "Async Fire-and-Go"
- * selection.
+ * An integer constant that corresponds to the "Async Fire-and-Go" selection.
*
* @see #getInvocationType()
*/
public static final int ASYNC_FIRE_AND_GO = ASYNC_FUTURE_RESULT + 1;
/**
- * An integer constant that corresponds to the "OSGi Service Proxy"
- * selection.
+ * An integer constant that corresponds to the "OSGi Service Proxy" selection.
*
* @see #getInvocationType()
*/
public static final int OSGI_SERVICE_PROXY = ASYNC_FIRE_AND_GO + 1;
/**
- * An integer constant that corresponds to the "Remote Service Proxy"
- * selection.
+ * An integer constant that corresponds to the "Remote Service Proxy" selection.
*
* @see #getInvocationType()
*/
@@ -124,13 +120,10 @@
private int invocationType;
/**
- * Creates a new MethodInvocationDialog on top of the specified shell
- * provider.
+ * Creates a new MethodInvocationDialog on top of the specified shell provider.
*
- * @param parentShell
- * the provider to return the parent shell of this dialog
- * @param cls
- * the class to select the methods from
+ * @param parentShell the provider to return the parent shell of this dialog
+ * @param cls the class to select the methods from
*/
public MethodInvocationDialog(IShellProvider parentShell, Class cls) {
super(parentShell);
@@ -174,10 +167,8 @@
/**
* Creates a new MethodInvocationDialog over the provided shell.
*
- * @param parentShell
- * the parent shell
- * @param cls
- * the class to select the methods from
+ * @param parentShell the parent shell
+ * @param cls the class to select the methods from
*/
public MethodInvocationDialog(Shell parentShell, Class cls) {
this(new SameShellProvider(parentShell), cls);
@@ -408,8 +399,8 @@
}
/**
- * Retrieves the timeout value that has been specified by the user. This
- * value is in milliseconds.
+ * Retrieves the timeout value that has been specified by the user. This value
+ * is in milliseconds.
*
* @return the timeout valued specified by the user in milliseconds
*/
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/.settings/org.eclipse.m2e.core.prefs b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/META-INF/MANIFEST.MF b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/META-INF/MANIFEST.MF
index ac53d54..9cd4107 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/META-INF/MANIFEST.MF
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %bundle.name
Bundle-SymbolicName: org.eclipse.ecf.osgi.services.remoteserviceadmin
Automatic-Module-Name: org.eclipse.ecf.osgi.services.remoteserviceadmin
-Bundle-Version: 4.6.1101.qualifier
+Bundle-Version: 4.6.1102.qualifier
Bundle-Activator: org.eclipse.ecf.internal.osgi.services.remoteserviceadmin.Activator
Bundle-Vendor: %bundle.provider
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/pom.xml b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/pom.xml
index 7d8a722..1cfc803 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/pom.xml
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/pom.xml
@@ -10,6 +10,6 @@
</parent>
<groupId>org.eclipse.ecf</groupId>
<artifactId>org.eclipse.ecf.osgi.services.remoteserviceadmin</artifactId>
- <version>4.6.1101-SNAPSHOT</version>
+ <version>4.6.1102-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
index e23cc92..476ba6e 100644
--- a/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
+++ b/osgi/bundles/org.eclipse.ecf.osgi.services.remoteserviceadmin/src/org/eclipse/ecf/internal/osgi/services/remoteserviceadmin/Activator.java
@@ -63,7 +63,8 @@
private static Activator instance;
private static final String[] DEPENDENT_BUNDLES = new String[] { "org.eclipse.ecf.identity", "org.eclipse.ecf", //$NON-NLS-1$ //$NON-NLS-2$
- "org.eclipse.ecf.discovery", "org.eclipse.ecf.remoteservice", "org.eclipse.ecf.remoteservice.asyncproxy" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "org.eclipse.ecf.discovery", "org.eclipse.ecf.remoteservice", "org.eclipse.ecf.remoteservice.asyncproxy", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ "org.eclipse.osgi.services.remoteserviceadmin" }; //$NON-NLS-1$
public static BundleContext getContext() {
return context;
@@ -120,14 +121,18 @@
}
});
List<Capability> capabilities = rb.getCapabilities(namespace);
+ int bundleTypes = rb.getTypes();
if (capabilities != null && capabilities.size() > 0
- && !b.getSymbolicName().equals(hostBundle.getSymbolicName()))
- try {
- b.start();
- } catch (BundleException e) {
- LogUtility.logError("RemoteServiceAdmin.initializeProviders", DebugOptions.REMOTE_SERVICE_ADMIN, //$NON-NLS-1$
- Activator.class, startErrorMessage + " bundle=" + b.getSymbolicName(), e); //$NON-NLS-1$
+ && !b.getSymbolicName().equals(hostBundle.getSymbolicName())) {
+ if ((bundleTypes & BundleRevision.TYPE_FRAGMENT) == 0) {
+ try {
+ b.start();
+ } catch (BundleException e) {
+ LogUtility.logError("RemoteServiceAdmin.initializeProviders", DebugOptions.REMOTE_SERVICE_ADMIN, //$NON-NLS-1$
+ Activator.class, startErrorMessage + " bundle=" + b.getSymbolicName(), e); //$NON-NLS-1$
+ }
}
+ }
}
}
@@ -248,7 +253,7 @@
// approach/using the ServiceFactory extender approach for this purpose:
// https://mail.osgi.org/pipermail/osgi-dev/2011-February/003000.html
initializeProxyServiceFactoryBundle();
-
+
// Start distribution providers if not already started
initializeProviders(context.getBundle(), DistributionNamespace.DISTRIBUTION_NAMESPACE,
"Could not start distribution provider. "); //$NON-NLS-1$
@@ -280,7 +285,8 @@
}
}
}, (Dictionary) rsaProps);
- // Setup tracker for ContainerTypeDescriptions, which will modify the RSA properties when
+ // Setup tracker for ContainerTypeDescriptions, which will modify the RSA
+ // properties when
// added/removed by distribution providers
ctdTracker = new ServiceTracker<ContainerTypeDescription, ContainerTypeDescription>(context,
ContainerTypeDescription.class,
@@ -329,7 +335,7 @@
// start endpointDescriptionLocator
endpointDescriptionLocator.start();
-
+
// Start discovery providers if not already started
initializeProviders(context.getBundle(), DiscoveryNamespace.DISCOVERY_NAMESPACE,
"Could not start discovery provider. "); //$NON-NLS-1$
@@ -454,6 +460,7 @@
}
}
+ @SuppressWarnings("deprecation")
public void log(IStatus status) {
if (logService == null)
logService = getLogService();
@@ -465,6 +472,7 @@
log(sr, LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException());
}
+ @SuppressWarnings("deprecation")
public void log(ServiceReference sr, int level, String message, Throwable t) {
if (logService == null)
logService = getLogService();