Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 163036

Summary: Identify what classes/interfaces can be used without OSGi running
Product: [RT] ECF Reporter: Remy Suen <remy.suen>
Component: ecf.coreAssignee: ecf.core-inbox <ecf.core-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: slewis
Version: 1.1.0Keywords: helpwanted
Target Milestone: 1.2.0   
Hardware: All   
OS: All   
Whiteboard:

Description Remy Suen CLA 2006-11-01 04:25:07 EST
Within (the runtime environment of?) Eclipse, there are several interfaces and classes that can be used without OSGi running (such as IAdaptable, IPath, IStatus, Assert, NullProgressMonitor, etc.). I'd imagine that there's some system property or static method/field that can be queried to determine whether OSGi is running or not, which could be used to replace the solution conceived for resolving bug #162670.

By identifying what can or cannot be used without OSGi, users can just look for the "This class can be used without OSGi running." stamp in the javadocs instead of monotonously going through a trial-and-error procedure.
Comment 1 Scott Lewis CLA 2006-11-01 11:14:31 EST
I've determined that Platform.isRunning() is a the better way to handle #162670, so I've changed the code in IDFactory and ContainerFactory to use this method. 

I think doing what's described in this bug more thoroughly is a good idea, but the general (at this point) guideline is:  Everything in org.eclipse.ecf.identity, org.eclipse.ecf, and org.eclipse.ecf.sharedobject are/should be able to run as java application.  Haven't tested this since refactoring obviously...that's the thing to do now and find any problems introduced.  That and add to javadocs for classes/package level.
Comment 2 Remy Suen CLA 2006-11-01 22:43:28 EST
I'm curious as to whether it's actually possible to use any (of the existing) ECF APIs without OSGi running (ignoring org.eclipse.ecf.provider and provider implementations) since (as far as I know) none of the APIs are using anything from the Platform besides IAdaptable and IAdapterFactory (which can be used without OSGi anyway).

The filetransfer API may change if we want to consider supporting IFile or replacing File with IFile and/or if we wish to leverage EFS, but for the most part, I don't really see any real ECF dependencies for OSGi-required interfaces or classes.
Comment 3 Scott Lewis CLA 2006-11-02 02:59:36 EST
(In reply to comment #2)
> I'm curious as to whether it's actually possible to use any (of the existing)
> ECF APIs without OSGi running (ignoring org.eclipse.ecf.provider and provider
> implementations) since (as far as I know) none of the APIs are using anything
> from the Platform besides IAdaptable and IAdapterFactory (which can be used
> without OSGi anyway).

I think it should be possible.  The main identity and core APIs only have ties to IAdaptable IAdapterFactory and Platform (now) and the ContainerFactory and IDFactory can be modified in code (as well as by extension points).

> 
> The filetransfer API may change if we want to consider supporting IFile or
> replacing File with IFile and/or if we wish to leverage EFS, but for the most
> part, I don't really see any real ECF dependencies for OSGi-required interfaces
> or classes.

I don't think it does have any other dependencies on OSGi...other than the IDFactory and ContainerFactory.

But this would be worth trying out to be sure, of course.


> 

Comment 4 Scott Lewis CLA 2007-04-09 14:34:30 EDT
I suggest that this bug be combined as a documentation requirement for #173283.
Comment 5 Scott Lewis CLA 2007-07-22 20:37:01 EDT
Setting target milestone to 1.1.0
Comment 6 Scott Lewis CLA 2007-09-07 00:49:49 EDT
setting target milestone
Comment 7 Scott Lewis CLA 2014-02-12 15:13:06 EST
No need for this at this point.  If still desired and resources available, please reopen.