Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 113821 Details for
Bug 240724
[plan] Update Execution Environment profile format to include custom jdt settings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
org.eclipse.osgi.patch
equinox.patch (text/plain), 40.33 KB, created by
Chris Aniszczyk
on 2008-09-29 18:41:34 EDT
(
hide
)
Description:
org.eclipse.osgi.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2008-09-29 18:41:34 EDT
Size:
40.33 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.osgi >Index: core/framework/org/eclipse/osgi/framework/internal/core/Framework.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/Framework.java,v >retrieving revision 1.122 >diff -u -r1.122 Framework.java >--- core/framework/org/eclipse/osgi/framework/internal/core/Framework.java 31 Jul 2008 22:26:21 -0000 1.122 >+++ core/framework/org/eclipse/osgi/framework/internal/core/Framework.java 29 Sep 2008 22:39:08 -0000 >@@ -28,6 +28,7 @@ > import org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager; > import org.eclipse.osgi.internal.permadmin.SecurityAdmin; > import org.eclipse.osgi.internal.profile.Profile; >+import org.eclipse.osgi.service.environment.ExecutionEnvironment; > import org.eclipse.osgi.util.ManifestElement; > import org.eclipse.osgi.util.NLS; > import org.osgi.framework.*; >@@ -66,6 +67,8 @@ > protected SecurityAdmin securityAdmin; > /** Startlevel object. This object manages the framework and bundle startlevels */ > protected StartLevelManager startLevelManager; >+ /** ProfileService object. This object manages the vm profiles */ >+ protected ExecutionEnvironmentServiceImpl executionEnvService; > /** The ServiceRegistry */ > protected ServiceRegistry serviceRegistry; //TODO This is duplicated from the adaptor, do we really gain ? > /** next free service id. */ >@@ -216,6 +219,10 @@ > installLock = new Hashtable(10); > /* create the system bundle */ > createSystemBundle(); >+ >+ // create the profile service >+ executionEnvService = new ExecutionEnvironmentServiceImpl(this); >+ > loadVMProfile(); // load VM profile after the system bundle has been created > setBootDelegation(); //set boot delegation property after system exports have been set > if (Profile.PROFILE && Profile.STARTUP) >@@ -231,6 +238,10 @@ > bundles = new BundleRepository(bundleDatas == null ? 10 : bundleDatas.length + 1); > /* add the system bundle to the Bundle Repository */ > bundles.add(systemBundle); >+ >+ // search for profiles >+ discoverProfiles(); >+ > if (bundleDatas != null) { > for (int i = 0; i < bundleDatas.length; i++) { > try { >@@ -401,7 +412,36 @@ > bootDelegationStems = (String[]) stemMatch.toArray(new String[stemMatch.size()]); > } > >+ private void discoverProfiles() { >+ Enumeration e = systemBundle.findEntries("profiles", "*.profile", false); //$NON-NLS-1$ //$NON-NLS-2$ >+ while (e.hasMoreElements()) { >+ URL url = (URL) e.nextElement(); >+ InputStream in = null; >+ try { >+ Properties properties = new Properties(); >+ in = url.openStream(); >+ properties.load(new BufferedInputStream(in)); >+ >+ // time to create profiles! >+ ExecutionEnvironment ee = new ExecutionEnvironmentImpl(properties); >+ executionEnvService.register(ee); >+ >+ } catch (IOException ex) { >+ // TODO consider logging ... >+ } finally { >+ if (in != null) >+ try { >+ in.close(); >+ } catch (IOException ee) { >+ // do nothing >+ } >+ } >+ } >+ >+ } >+ > private void loadVMProfile() { >+ // TODO handle managing profiles here > Properties profileProps = findVMProfile(); > String systemExports = properties.getProperty(Constants.OSGI_FRAMEWORK_SYSTEM_PACKAGES); > // set the system exports property using the vm profile; only if the property is not already set >Index: core/framework/org/eclipse/osgi/framework/internal/core/SystemBundleActivator.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi/core/framework/org/eclipse/osgi/framework/internal/core/SystemBundleActivator.java,v >retrieving revision 1.17 >diff -u -r1.17 SystemBundleActivator.java >--- core/framework/org/eclipse/osgi/framework/internal/core/SystemBundleActivator.java 31 Jul 2008 22:26:21 -0000 1.17 >+++ core/framework/org/eclipse/osgi/framework/internal/core/SystemBundleActivator.java 29 Sep 2008 22:39:08 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2005 IBM Corporation and others. >+ * Copyright (c) 2003, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -28,6 +28,7 @@ > protected ServiceRegistration packageAdmin; > protected ServiceRegistration securityAdmin; > protected ServiceRegistration startLevel; >+ protected ServiceRegistration executionEnvironmentService; > protected ServiceRegistration debugOptions; > > public SystemBundleActivator() { >@@ -44,6 +45,8 @@ > securityAdmin = register(new String[] {Constants.OSGI_PERMISSIONADMIN_NAME, ConditionalPermissionAdmin.class.getName()}, framework.securityAdmin); > if (framework.startLevelManager != null) > startLevel = register(new String[] {Constants.OSGI_STARTLEVEL_NAME}, framework.startLevelManager); >+ if (framework.executionEnvService != null) >+ executionEnvironmentService = register(new String[] {"org.eclipse.osgi.service.environment.ExecutionEnvironmentService"}, framework.executionEnvService); //$NON-NLS-1$ > FrameworkDebugOptions dbgOptions = null; > if ((dbgOptions = FrameworkDebugOptions.getDefault()) != null) > debugOptions = register(new String[] {org.eclipse.osgi.service.debug.DebugOptions.class.getName()}, dbgOptions); >@@ -68,6 +71,8 @@ > securityAdmin.unregister(); > if (startLevel != null) > startLevel.unregister(); >+ if (executionEnvironmentService != null) >+ executionEnvironmentService.unregister(); > if (debugOptions != null) > debugOptions.unregister(); > >Index: profiles/CDC-1.1_Foundation-1.1.profile >=================================================================== >RCS file: profiles/CDC-1.1_Foundation-1.1.profile >diff -N profiles/CDC-1.1_Foundation-1.1.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/CDC-1.1_Foundation-1.1.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+############################################################################### >+# Copyright (c) 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.microedition.io,\ >+ javax.microedition.pki,\ >+ javax.security.auth.x500 >+org.osgi.framework.bootdelegation = \ >+ javax.microedition.io,\ >+ javax.microedition.pki,\ >+ javax.security.auth.x500 >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ CDC-1.0/Foundation-1.0,\ >+ CDC-1.1/Foundation-1.1 >+osgi.java.profile.name = CDC-1.1/Foundation-1.1 >Index: profiles/JavaSE-1.6.profile >=================================================================== >RCS file: profiles/JavaSE-1.6.profile >diff -N profiles/JavaSE-1.6.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/JavaSE-1.6.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,185 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.accessibility,\ >+ javax.activation,\ >+ javax.activity,\ >+ javax.annotation,\ >+ javax.annotation.processing,\ >+ javax.crypto,\ >+ javax.crypto.interfaces,\ >+ javax.crypto.spec,\ >+ javax.imageio,\ >+ javax.imageio.event,\ >+ javax.imageio.metadata,\ >+ javax.imageio.plugins.bmp,\ >+ javax.imageio.plugins.jpeg,\ >+ javax.imageio.spi,\ >+ javax.imageio.stream,\ >+ javax.jws,\ >+ javax.jws.soap,\ >+ javax.lang.model,\ >+ javax.lang.model.element,\ >+ javax.lang.model.type,\ >+ javax.lang.model.util,\ >+ javax.management,\ >+ javax.management.loading,\ >+ javax.management.modelmbean,\ >+ javax.management.monitor,\ >+ javax.management.openmbean,\ >+ javax.management.relation,\ >+ javax.management.remote,\ >+ javax.management.remote.rmi,\ >+ javax.management.timer,\ >+ javax.naming,\ >+ javax.naming.directory,\ >+ javax.naming.event,\ >+ javax.naming.ldap,\ >+ javax.naming.spi,\ >+ javax.net,\ >+ javax.net.ssl,\ >+ javax.print,\ >+ javax.print.attribute,\ >+ javax.print.attribute.standard,\ >+ javax.print.event,\ >+ javax.rmi,\ >+ javax.rmi.CORBA,\ >+ javax.rmi.ssl,\ >+ javax.script,\ >+ javax.security.auth,\ >+ javax.security.auth.callback,\ >+ javax.security.auth.kerberos,\ >+ javax.security.auth.login,\ >+ javax.security.auth.spi,\ >+ javax.security.auth.x500,\ >+ javax.security.cert,\ >+ javax.security.sasl,\ >+ javax.sound.midi,\ >+ javax.sound.midi.spi,\ >+ javax.sound.sampled,\ >+ javax.sound.sampled.spi,\ >+ javax.sql,\ >+ javax.sql.rowset,\ >+ javax.sql.rowset.serial,\ >+ javax.sql.rowset.spi,\ >+ javax.swing,\ >+ javax.swing.border,\ >+ javax.swing.colorchooser,\ >+ javax.swing.event,\ >+ javax.swing.filechooser,\ >+ javax.swing.plaf,\ >+ javax.swing.plaf.basic,\ >+ javax.swing.plaf.metal,\ >+ javax.swing.plaf.multi,\ >+ javax.swing.plaf.synth,\ >+ javax.swing.table,\ >+ javax.swing.text,\ >+ javax.swing.text.html,\ >+ javax.swing.text.html.parser,\ >+ javax.swing.text.rtf,\ >+ javax.swing.tree,\ >+ javax.swing.undo,\ >+ javax.tools,\ >+ javax.transaction,\ >+ javax.transaction.xa,\ >+ javax.xml,\ >+ javax.xml.bind,\ >+ javax.xml.bind.annotation,\ >+ javax.xml.bind.annotation.adapters,\ >+ javax.xml.bind.attachment,\ >+ javax.xml.bind.helpers,\ >+ javax.xml.bind.util,\ >+ javax.xml.crypto,\ >+ javax.xml.crypto.dom,\ >+ javax.xml.crypto.dsig,\ >+ javax.xml.crypto.dsig.dom,\ >+ javax.xml.crypto.dsig.keyinfo,\ >+ javax.xml.crypto.dsig.spec,\ >+ javax.xml.datatype,\ >+ javax.xml.namespace,\ >+ javax.xml.parsers,\ >+ javax.xml.soap,\ >+ javax.xml.stream,\ >+ javax.xml.stream.events,\ >+ javax.xml.stream.util,\ >+ javax.xml.transform,\ >+ javax.xml.transform.dom,\ >+ javax.xml.transform.sax,\ >+ javax.xml.transform.stax,\ >+ javax.xml.transform.stream,\ >+ javax.xml.validation,\ >+ javax.xml.ws,\ >+ javax.xml.ws.handler,\ >+ javax.xml.ws.handler.soap,\ >+ javax.xml.ws.http,\ >+ javax.xml.ws.soap,\ >+ javax.xml.ws.spi,\ >+ javax.xml.xpath,\ >+ org.ietf.jgss,\ >+ org.omg.CORBA,\ >+ org.omg.CORBA_2_3,\ >+ org.omg.CORBA_2_3.portable,\ >+ org.omg.CORBA.DynAnyPackage,\ >+ org.omg.CORBA.ORBPackage,\ >+ org.omg.CORBA.portable,\ >+ org.omg.CORBA.TypeCodePackage,\ >+ org.omg.CosNaming,\ >+ org.omg.CosNaming.NamingContextExtPackage,\ >+ org.omg.CosNaming.NamingContextPackage,\ >+ org.omg.Dynamic,\ >+ org.omg.DynamicAny,\ >+ org.omg.DynamicAny.DynAnyFactoryPackage,\ >+ org.omg.DynamicAny.DynAnyPackage,\ >+ org.omg.IOP,\ >+ org.omg.IOP.CodecFactoryPackage,\ >+ org.omg.IOP.CodecPackage,\ >+ org.omg.Messaging,\ >+ org.omg.PortableInterceptor,\ >+ org.omg.PortableInterceptor.ORBInitInfoPackage,\ >+ org.omg.PortableServer,\ >+ org.omg.PortableServer.CurrentPackage,\ >+ org.omg.PortableServer.POAManagerPackage,\ >+ org.omg.PortableServer.POAPackage,\ >+ org.omg.PortableServer.portable,\ >+ org.omg.PortableServer.ServantLocatorPackage,\ >+ org.omg.SendingContext,\ >+ org.omg.stub.java.rmi,\ >+ org.w3c.dom,\ >+ org.w3c.dom.bootstrap,\ >+ org.w3c.dom.css,\ >+ org.w3c.dom.events,\ >+ org.w3c.dom.html,\ >+ org.w3c.dom.ls,\ >+ org.w3c.dom.ranges,\ >+ org.w3c.dom.stylesheets,\ >+ org.w3c.dom.traversal,\ >+ org.w3c.dom.views ,\ >+ org.xml.sax,\ >+ org.xml.sax.ext,\ >+ org.xml.sax.helpers >+org.osgi.framework.bootdelegation = \ >+ javax.*,\ >+ org.ietf.jgss,\ >+ org.omg.*,\ >+ org.w3c.*,\ >+ org.xml.*,\ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ JRE-1.1,\ >+ J2SE-1.2,\ >+ J2SE-1.3,\ >+ J2SE-1.4,\ >+ J2SE-1.5,\ >+ JavaSE-1.6 >+osgi.java.profile.name = JavaSE-1.6 >Index: profiles/CDC-1.0_Foundation-1.0.profile >=================================================================== >RCS file: profiles/CDC-1.0_Foundation-1.0.profile >diff -N profiles/CDC-1.0_Foundation-1.0.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/CDC-1.0_Foundation-1.0.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,19 @@ >+############################################################################### >+# Copyright (c) 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.microedition.io >+org.osgi.framework.bootdelegation = \ >+ javax.microedition.io >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ CDC-1.0/Foundation-1.0 >+osgi.java.profile.name = CDC-1.0/Foundation-1.0 >Index: profiles/JRE-1.1.profile >=================================================================== >RCS file: profiles/JRE-1.1.profile >diff -N profiles/JRE-1.1.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/JRE-1.1.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,17 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = >+org.osgi.framework.bootdelegation = \ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ JRE-1.1 >+osgi.java.profile.name = JRE-1.1 >Index: profiles/J2SE-1.3.profile >=================================================================== >RCS file: profiles/J2SE-1.3.profile >diff -N profiles/J2SE-1.3.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/J2SE-1.3.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,63 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.accessibility,\ >+ javax.naming,\ >+ javax.naming.directory,\ >+ javax.naming.event,\ >+ javax.naming.ldap,\ >+ javax.naming.spi,\ >+ javax.rmi,\ >+ javax.rmi.CORBA,\ >+ javax.sound.midi,\ >+ javax.sound.midi.spi,\ >+ javax.sound.sampled,\ >+ javax.sound.sampled.spi,\ >+ javax.swing,\ >+ javax.swing.border,\ >+ javax.swing.colorchooser,\ >+ javax.swing.event,\ >+ javax.swing.filechooser,\ >+ javax.swing.plaf,\ >+ javax.swing.plaf.basic,\ >+ javax.swing.plaf.metal,\ >+ javax.swing.plaf.multi,\ >+ javax.swing.table,\ >+ javax.swing.text,\ >+ javax.swing.text.html,\ >+ javax.swing.text.html.parser,\ >+ javax.swing.text.rtf,\ >+ javax.swing.tree,\ >+ javax.swing.undo,\ >+ javax.transaction,\ >+ org.omg.CORBA,\ >+ org.omg.CORBA_2_3,\ >+ org.omg.CORBA_2_3.portable,\ >+ org.omg.CORBA.DynAnyPackage,\ >+ org.omg.CORBA.ORBPackage,\ >+ org.omg.CORBA.portable,\ >+ org.omg.CORBA.TypeCodePackage,\ >+ org.omg.CosNaming,\ >+ org.omg.CosNaming.NamingContextPackage,\ >+ org.omg.SendingContext,\ >+ org.omg.stub.java.rmi >+org.osgi.framework.bootdelegation = \ >+ javax.*,\ >+ org.omg.*,\ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ JRE-1.1,\ >+ J2SE-1.2,\ >+ J2SE-1.3 >+osgi.java.profile.name = J2SE-1.3 >Index: core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentImpl.java >=================================================================== >RCS file: core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentImpl.java >diff -N core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,48 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <zx@code9.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.osgi.framework.internal.core; >+ >+import java.util.ArrayList; >+import java.util.Properties; >+import org.eclipse.osgi.service.environment.ExecutionEnvironment; >+ >+public class ExecutionEnvironmentImpl implements ExecutionEnvironment { >+ >+ private String name; >+ private ArrayList environments; >+ private ArrayList packages; >+ >+ public ExecutionEnvironmentImpl(Properties properties) { >+ this.name = properties.getProperty(Constants.OSGI_JAVA_PROFILE_NAME); >+ // TODO do the environments and packages >+ } >+ >+ public String getName() { >+ return name; >+ } >+ >+ public void setName(String name) { >+ this.name = name; >+ } >+ >+ public String[] getSupportedEnvironments() { >+ return (String[]) environments.toArray(new String[environments.size()]); >+ } >+ >+ public String[] getSystemPackages() { >+ return (String[]) packages.toArray(new String[packages.size()]); >+ } >+ >+ public String toString() { >+ return this.name; >+ } >+ >+} >Index: profiles/J2SE-1.4.profile >=================================================================== >RCS file: profiles/J2SE-1.4.profile >diff -N profiles/J2SE-1.4.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/J2SE-1.4.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,123 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.accessibility,\ >+ javax.crypto,\ >+ javax.crypto.interfaces,\ >+ javax.crypto.spec,\ >+ javax.imageio,\ >+ javax.imageio.event,\ >+ javax.imageio.metadata,\ >+ javax.imageio.plugins.jpeg,\ >+ javax.imageio.spi,\ >+ javax.imageio.stream,\ >+ javax.naming,\ >+ javax.naming.directory,\ >+ javax.naming.event,\ >+ javax.naming.ldap,\ >+ javax.naming.spi,\ >+ javax.net,\ >+ javax.net.ssl,\ >+ javax.print,\ >+ javax.print.attribute,\ >+ javax.print.attribute.standard,\ >+ javax.print.event,\ >+ javax.rmi,\ >+ javax.rmi.CORBA,\ >+ javax.security.auth,\ >+ javax.security.auth.callback,\ >+ javax.security.auth.kerberos,\ >+ javax.security.auth.login,\ >+ javax.security.auth.spi,\ >+ javax.security.auth.x500,\ >+ javax.security.cert,\ >+ javax.sound.midi,\ >+ javax.sound.midi.spi,\ >+ javax.sound.sampled,\ >+ javax.sound.sampled.spi,\ >+ javax.sql,\ >+ javax.swing,\ >+ javax.swing.border,\ >+ javax.swing.colorchooser,\ >+ javax.swing.event,\ >+ javax.swing.filechooser,\ >+ javax.swing.plaf,\ >+ javax.swing.plaf.basic,\ >+ javax.swing.plaf.metal,\ >+ javax.swing.plaf.multi,\ >+ javax.swing.table,\ >+ javax.swing.text,\ >+ javax.swing.text.html,\ >+ javax.swing.text.html.parser,\ >+ javax.swing.text.rtf,\ >+ javax.swing.tree,\ >+ javax.swing.undo,\ >+ javax.transaction,\ >+ javax.transaction.xa,\ >+ javax.xml.parsers,\ >+ javax.xml.transform,\ >+ javax.xml.transform.dom,\ >+ javax.xml.transform.sax,\ >+ javax.xml.transform.stream,\ >+ org.ietf.jgss,\ >+ org.omg.CORBA,\ >+ org.omg.CORBA_2_3,\ >+ org.omg.CORBA_2_3.portable,\ >+ org.omg.CORBA.DynAnyPackage,\ >+ org.omg.CORBA.ORBPackage,\ >+ org.omg.CORBA.portable,\ >+ org.omg.CORBA.TypeCodePackage,\ >+ org.omg.CosNaming,\ >+ org.omg.CosNaming.NamingContextExtPackage,\ >+ org.omg.CosNaming.NamingContextPackage,\ >+ org.omg.Dynamic,\ >+ org.omg.DynamicAny,\ >+ org.omg.DynamicAny.DynAnyFactoryPackage,\ >+ org.omg.DynamicAny.DynAnyPackage,\ >+ org.omg.IOP,\ >+ org.omg.IOP.CodecFactoryPackage,\ >+ org.omg.IOP.CodecPackage,\ >+ org.omg.Messaging,\ >+ org.omg.PortableInterceptor,\ >+ org.omg.PortableInterceptor.ORBInitInfoPackage,\ >+ org.omg.PortableServer,\ >+ org.omg.PortableServer.CurrentPackage,\ >+ org.omg.PortableServer.POAManagerPackage,\ >+ org.omg.PortableServer.POAPackage,\ >+ org.omg.PortableServer.portable,\ >+ org.omg.PortableServer.ServantLocatorPackage,\ >+ org.omg.SendingContext,\ >+ org.omg.stub.java.rmi,\ >+ org.w3c.dom,\ >+ org.w3c.dom.css,\ >+ org.w3c.dom.events,\ >+ org.w3c.dom.html,\ >+ org.w3c.dom.stylesheets,\ >+ org.w3c.dom.views ,\ >+ org.xml.sax,\ >+ org.xml.sax.ext,\ >+ org.xml.sax.helpers >+org.osgi.framework.bootdelegation = \ >+ javax.*,\ >+ org.ietf.jgss,\ >+ org.omg.*,\ >+ org.w3c.*,\ >+ org.xml.*,\ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ JRE-1.1,\ >+ J2SE-1.2,\ >+ J2SE-1.3,\ >+ J2SE-1.4 >+osgi.java.profile.name = J2SE-1.4 >Index: profiles/OSGi_Minimum-1.1.profile >=================================================================== >RCS file: profiles/OSGi_Minimum-1.1.profile >diff -N profiles/OSGi_Minimum-1.1.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/OSGi_Minimum-1.1.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,18 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = >+org.osgi.framework.bootdelegation = \ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1 >+osgi.java.profile.name = OSGi/Minimum-1.1 >Index: profiles/OSGi_Minimum-1.0.profile >=================================================================== >RCS file: profiles/OSGi_Minimum-1.0.profile >diff -N profiles/OSGi_Minimum-1.0.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/OSGi_Minimum-1.0.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,17 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = >+org.osgi.framework.bootdelegation = \ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0 >+osgi.java.profile.name = OSGi/Minimum-1.0 >Index: supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironment.java >=================================================================== >RCS file: supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironment.java >diff -N supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironment.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironment.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,41 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <zx@code9.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.osgi.service.environment; >+ >+/** >+ * A vm profile represents an execution environment. >+ * >+ * @since 3.5 >+ */ >+public interface ExecutionEnvironment { >+ >+ /** >+ * The unique and primary name of the execution environment profile >+ * >+ * @since 3.5 >+ */ >+ public String getName(); >+ >+ /** >+ * The unique and primary name of the execution environment profile >+ * >+ * @since 3.5 >+ */ >+ public String[] getSystemPackages(); >+ >+ /** >+ * The unique and primary name of the execution environment profile >+ * >+ * @since 3.5 >+ */ >+ public String[] getSupportedEnvironments(); >+ >+} >Index: profiles/J2SE-1.5.profile >=================================================================== >RCS file: profiles/J2SE-1.5.profile >diff -N profiles/J2SE-1.5.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/J2SE-1.5.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,150 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.accessibility,\ >+ javax.activity,\ >+ javax.crypto,\ >+ javax.crypto.interfaces,\ >+ javax.crypto.spec,\ >+ javax.imageio,\ >+ javax.imageio.event,\ >+ javax.imageio.metadata,\ >+ javax.imageio.plugins.bmp,\ >+ javax.imageio.plugins.jpeg,\ >+ javax.imageio.spi,\ >+ javax.imageio.stream,\ >+ javax.management,\ >+ javax.management.loading,\ >+ javax.management.modelmbean,\ >+ javax.management.monitor,\ >+ javax.management.openmbean,\ >+ javax.management.relation,\ >+ javax.management.remote,\ >+ javax.management.remote.rmi,\ >+ javax.management.timer,\ >+ javax.naming,\ >+ javax.naming.directory,\ >+ javax.naming.event,\ >+ javax.naming.ldap,\ >+ javax.naming.spi,\ >+ javax.net,\ >+ javax.net.ssl,\ >+ javax.print,\ >+ javax.print.attribute,\ >+ javax.print.attribute.standard,\ >+ javax.print.event,\ >+ javax.rmi,\ >+ javax.rmi.CORBA,\ >+ javax.rmi.ssl,\ >+ javax.security.auth,\ >+ javax.security.auth.callback,\ >+ javax.security.auth.kerberos,\ >+ javax.security.auth.login,\ >+ javax.security.auth.spi,\ >+ javax.security.auth.x500,\ >+ javax.security.cert,\ >+ javax.security.sasl,\ >+ javax.sound.midi,\ >+ javax.sound.midi.spi,\ >+ javax.sound.sampled,\ >+ javax.sound.sampled.spi,\ >+ javax.sql,\ >+ javax.sql.rowset,\ >+ javax.sql.rowset.serial,\ >+ javax.sql.rowset.spi,\ >+ javax.swing,\ >+ javax.swing.border,\ >+ javax.swing.colorchooser,\ >+ javax.swing.event,\ >+ javax.swing.filechooser,\ >+ javax.swing.plaf,\ >+ javax.swing.plaf.basic,\ >+ javax.swing.plaf.metal,\ >+ javax.swing.plaf.multi,\ >+ javax.swing.plaf.synth,\ >+ javax.swing.table,\ >+ javax.swing.text,\ >+ javax.swing.text.html,\ >+ javax.swing.text.html.parser,\ >+ javax.swing.text.rtf,\ >+ javax.swing.tree,\ >+ javax.swing.undo,\ >+ javax.transaction,\ >+ javax.transaction.xa,\ >+ javax.xml,\ >+ javax.xml.datatype,\ >+ javax.xml.namespace,\ >+ javax.xml.parsers,\ >+ javax.xml.transform,\ >+ javax.xml.transform.dom,\ >+ javax.xml.transform.sax,\ >+ javax.xml.transform.stream,\ >+ javax.xml.validation,\ >+ javax.xml.xpath,\ >+ org.ietf.jgss,\ >+ org.omg.CORBA,\ >+ org.omg.CORBA_2_3,\ >+ org.omg.CORBA_2_3.portable,\ >+ org.omg.CORBA.DynAnyPackage,\ >+ org.omg.CORBA.ORBPackage,\ >+ org.omg.CORBA.portable,\ >+ org.omg.CORBA.TypeCodePackage,\ >+ org.omg.CosNaming,\ >+ org.omg.CosNaming.NamingContextExtPackage,\ >+ org.omg.CosNaming.NamingContextPackage,\ >+ org.omg.Dynamic,\ >+ org.omg.DynamicAny,\ >+ org.omg.DynamicAny.DynAnyFactoryPackage,\ >+ org.omg.DynamicAny.DynAnyPackage,\ >+ org.omg.IOP,\ >+ org.omg.IOP.CodecFactoryPackage,\ >+ org.omg.IOP.CodecPackage,\ >+ org.omg.Messaging,\ >+ org.omg.PortableInterceptor,\ >+ org.omg.PortableInterceptor.ORBInitInfoPackage,\ >+ org.omg.PortableServer,\ >+ org.omg.PortableServer.CurrentPackage,\ >+ org.omg.PortableServer.POAManagerPackage,\ >+ org.omg.PortableServer.POAPackage,\ >+ org.omg.PortableServer.portable,\ >+ org.omg.PortableServer.ServantLocatorPackage,\ >+ org.omg.SendingContext,\ >+ org.omg.stub.java.rmi,\ >+ org.w3c.dom,\ >+ org.w3c.dom.bootstrap,\ >+ org.w3c.dom.css,\ >+ org.w3c.dom.events,\ >+ org.w3c.dom.html,\ >+ org.w3c.dom.ls,\ >+ org.w3c.dom.ranges,\ >+ org.w3c.dom.stylesheets,\ >+ org.w3c.dom.traversal,\ >+ org.w3c.dom.views ,\ >+ org.xml.sax,\ >+ org.xml.sax.ext,\ >+ org.xml.sax.helpers >+org.osgi.framework.bootdelegation = \ >+ javax.*,\ >+ org.ietf.jgss,\ >+ org.omg.*,\ >+ org.w3c.*,\ >+ org.xml.*,\ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ OSGi/Minimum-1.0,\ >+ OSGi/Minimum-1.1,\ >+ JRE-1.1,\ >+ J2SE-1.2,\ >+ J2SE-1.3,\ >+ J2SE-1.4,\ >+ J2SE-1.5 >+osgi.java.profile.name = J2SE-1.5 >Index: supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironmentService.java >=================================================================== >RCS file: supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironmentService.java >diff -N supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironmentService.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ supplement/src/org/eclipse/osgi/service/environment/ExecutionEnvironmentService.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,69 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <zx@code9.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.osgi.service.environment; >+ >+/** >+ * The profile service is used to register, unregister and acquire profiles. >+ * >+ * <p> >+ * Profiles available by default: >+ * <ul> >+ * <li>OSGi/Minimum-1.0</li> >+ * <li>OSGi/Minimum-1.1</li> >+ * <li>CDC-1.0/Foundation-1.0</li> >+ * <li>CDC-1.1/Foundation-1.1</li> >+ * <li>JRE-1.1</li> >+ * <li>J2SE-1.2</li> >+ * <li>J2SE-1.3</li> >+ * <li>J2SE-1.4</li> >+ * <li>J2SE-1.5</li> >+ * <li>JavaSE-1.6</li> >+ * </p> >+ * >+ * <p> >+ * This interface is not intended to be implemented by clients. >+ * </p> >+ * >+ * @since 3.5 >+ * @noimplement This interface is not intended to be implemented by clients. >+ */ >+public interface ExecutionEnvironmentService { >+ >+ public static String OSGI_MINIMUM_1_0 = "OSGi/Minimum-1.0"; //$NON-NLS-1$ >+ public static String OSGI_MINIMUM_1_1 = "OSGi/Minimum-1.1"; //$NON-NLS-1$ >+ public static String FOUNDATION_1_0 = "CDC-1.0/Foundation-1.0"; //$NON-NLS-1$ >+ public static String FOUNDATION_1_1 = "CDC-1.1/Foundation-1.1"; //$NON-NLS-1$ >+ public static String JRE_1_1 = "JRE-1.1"; //$NON-NLS-1$ >+ public static String J2SE_1_2 = "J2SE-1.2"; //$NON-NLS-1$ >+ public static String J2SE_1_3 = "J2SE-1.3"; //$NON-NLS-1$ >+ public static String J2SE_1_4 = "J2SE-1.4"; //$NON-NLS-1$ >+ public static String J2SE_1_5 = "J2SE-1.5"; //$NON-NLS-1$ >+ public static String JAVASE_1_6 = "JavaSE-1.6"; //$NON-NLS-1$ >+ >+ /** >+ * Acquire an execution environment profile >+ * >+ * @param name the unique name of the profile >+ * >+ * @return A <code>ExecutionEnvironment</code> for the given unique name. >+ */ >+ public ExecutionEnvironment getExecutionEnvironment(String name); >+ >+ /** >+ * Acquire the list of all available execution environment profiles >+ * >+ * @param name the unique name of the profile >+ * >+ * @return A list of <code>ExecutionEnvironment</code> available. >+ */ >+ public ExecutionEnvironment[] getExecutionEnvironments(); >+ >+} >Index: profiles/J2SE-1.2.profile >=================================================================== >RCS file: profiles/J2SE-1.2.profile >diff -N profiles/J2SE-1.2.profile >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ profiles/J2SE-1.2.profile 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,42 @@ >+############################################################################### >+# Copyright (c) 2003, 2005 IBM Corporation and others. >+# All rights reserved. This program and the accompanying materials >+# are made available under the terms of the Eclipse Public License v1.0 >+# which accompanies this distribution, and is available at >+# http://www.eclipse.org/legal/epl-v10.html >+# >+# Contributors: >+# IBM Corporation - initial API and implementation >+############################################################################### >+org.osgi.framework.system.packages = \ >+ javax.accessibility,\ >+ javax.swing,\ >+ javax.swing.border,\ >+ javax.swing.colorchooser,\ >+ javax.swing.event,\ >+ javax.swing.filechooser,\ >+ javax.swing.plaf,\ >+ javax.swing.plaf.basic,\ >+ javax.swing.plaf.metal,\ >+ javax.swing.plaf.multi,\ >+ javax.swing.table,\ >+ javax.swing.text,\ >+ javax.swing.text.html,\ >+ javax.swing.text.html.parser,\ >+ javax.swing.text.rtf,\ >+ javax.swing.tree,\ >+ javax.swing.undo,\ >+ org.omg.CORBA,\ >+ org.omg.CORBA.DynAnyPackage,\ >+ org.omg.CORBA.ORBPackage,\ >+ org.omg.CORBA.portable,\ >+ org.omg.CORBA.TypeCodePackage,\ >+ org.omg.CosNaming,\ >+ org.omg.CosNaming.NamingContextPackage >+org.osgi.framework.bootdelegation = \ >+ sun.*,\ >+ com.sun.* >+org.osgi.framework.executionenvironment = \ >+ JRE-1.1,\ >+ J2SE-1.2 >+osgi.java.profile.name = J2SE-1.2 >Index: core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentServiceImpl.java >=================================================================== >RCS file: core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentServiceImpl.java >diff -N core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentServiceImpl.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ core/framework/org/eclipse/osgi/framework/internal/core/ExecutionEnvironmentServiceImpl.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,47 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Chris Aniszczyk <zx@code9.com> - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.osgi.framework.internal.core; >+ >+import java.util.HashMap; >+import java.util.Map; >+import org.eclipse.osgi.service.environment.ExecutionEnvironment; >+import org.eclipse.osgi.service.environment.ExecutionEnvironmentService; >+ >+public class ExecutionEnvironmentServiceImpl implements ExecutionEnvironmentService { >+ >+ protected static Framework framework; >+ protected static Map profileMap; >+ >+ protected static final String[] PROFILES = {ExecutionEnvironmentService.FOUNDATION_1_0, ExecutionEnvironmentService.FOUNDATION_1_1, ExecutionEnvironmentService.J2SE_1_2, ExecutionEnvironmentService.J2SE_1_3, ExecutionEnvironmentService.J2SE_1_4, ExecutionEnvironmentService.J2SE_1_5, ExecutionEnvironmentService.JAVASE_1_6}; >+ >+ /** This constructor is called by the Framework */ >+ protected ExecutionEnvironmentServiceImpl(Framework framework) { >+ ExecutionEnvironmentServiceImpl.framework = framework; >+ profileMap = new HashMap(7); >+ } >+ >+ public ExecutionEnvironment getExecutionEnvironment(String name) { >+ return (ExecutionEnvironment) profileMap.get(name); >+ } >+ >+ protected void register(ExecutionEnvironment profile) { >+ profileMap.put(profile.getName(), profile); >+ } >+ >+ protected void unregister(ExecutionEnvironment profile) { >+ profileMap.remove(profile.getName()); >+ } >+ >+ public ExecutionEnvironment[] getExecutionEnvironments() { >+ return (ExecutionEnvironment[]) profileMap.values().toArray(new ExecutionEnvironment[profileMap.size()]); >+ } >+ >+} >#P org.eclipse.osgi.tests >Index: src/org/eclipse/osgi/tests/eclipseadaptor/AllTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/eclipseadaptor/AllTests.java,v >retrieving revision 1.1 >diff -u -r1.1 AllTests.java >--- src/org/eclipse/osgi/tests/eclipseadaptor/AllTests.java 3 Jun 2005 19:18:04 -0000 1.1 >+++ src/org/eclipse/osgi/tests/eclipseadaptor/AllTests.java 29 Sep 2008 22:39:09 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005 IBM Corporation and others. >+ * Copyright (c) 2005, 2008 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -7,6 +7,7 @@ > * > * Contributors: > * IBM Corporation - initial API and implementation >+ * Chris Aniszczyk <zx@code9.com> - bug 240724 > *******************************************************************************/ > package org.eclipse.osgi.tests.eclipseadaptor; > >@@ -18,6 +19,7 @@ > TestSuite suite = new TestSuite(AllTests.class.getName()); > suite.addTest(EnvironmentInfoTest.suite()); > suite.addTest(FilePathTest.suite()); >+ suite.addTest(ExecutionEnvironmentTest.suite()); > return suite; > } > } >Index: src/org/eclipse/osgi/tests/eclipseadaptor/ExecutionEnvironmentTest.java >=================================================================== >RCS file: src/org/eclipse/osgi/tests/eclipseadaptor/ExecutionEnvironmentTest.java >diff -N src/org/eclipse/osgi/tests/eclipseadaptor/ExecutionEnvironmentTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/osgi/tests/eclipseadaptor/ExecutionEnvironmentTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,46 @@ >+/******************************************************************************* >+ * Copyright (c) 2008 Code 9 Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Code 9 Corporation - initial API and implementation >+ * Chris Aniszczyk <zx@code9.com> - bug 240724 >+ *******************************************************************************/ >+package org.eclipse.osgi.tests.eclipseadaptor; >+ >+import junit.framework.*; >+import org.eclipse.osgi.service.environment.ExecutionEnvironment; >+import org.eclipse.osgi.service.environment.ExecutionEnvironmentService; >+import org.eclipse.osgi.tests.OSGiTestsActivator; >+import org.osgi.framework.ServiceReference; >+ >+public class ExecutionEnvironmentTest extends TestCase { >+ >+ public static Test suite() { >+ return new TestSuite(ExecutionEnvironmentTest.class); >+ } >+ >+ public ExecutionEnvironmentTest(String name) { >+ super(name); >+ } >+ >+ public void testExecutionEnvironments() { >+ ServiceReference reference = null; >+ reference = OSGiTestsActivator.getContext().getServiceReference(ExecutionEnvironmentService.class.getName()); >+ assertNotNull(reference); >+ >+ ExecutionEnvironmentService eeService = (ExecutionEnvironmentService) OSGiTestsActivator.getContext().getService(reference); >+ assertNotNull(eeService); >+ >+ ExecutionEnvironment[] environments = eeService.getExecutionEnvironments(); >+ assertNotNull(environments); >+ >+ ExecutionEnvironment env1 = eeService.getExecutionEnvironment(ExecutionEnvironmentService.FOUNDATION_1_0); >+ assertNotNull(env1); >+ >+ // TODO add more tests >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 240724
:
113375
|
113820
|
113821
|
113875
|
114032
|
114352
|
114810