diff options
author | Thomas Watson | 2007-09-13 19:27:50 +0000 |
---|---|---|
committer | Thomas Watson | 2007-09-13 19:27:50 +0000 |
commit | e79e3c06bd1b2ab805d099444a02ddca2cc92de0 (patch) | |
tree | aabd5c001ed3ce8cd8453592ce7f8a8c8c382267 /bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports | |
parent | 4589300179358c774d7dac03df423e42288c1e61 (diff) | |
download | rt.equinox.framework-e79e3c06bd1b2ab805d099444a02ddca2cc92de0.tar.gz rt.equinox.framework-e79e3c06bd1b2ab805d099444a02ddca2cc92de0.tar.xz rt.equinox.framework-e79e3c06bd1b2ab805d099444a02ddca2cc92de0.zip |
Bug 201425 [osgi R4.1] Fragments should be able to export duplicate packages
Diffstat (limited to 'bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports')
2 files changed, 57 insertions, 0 deletions
diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/META-INF/MANIFEST.MF b/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/META-INF/MANIFEST.MF new file mode 100644 index 000000000..0bf4b9731 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: client2.multiple.exports +Bundle-SymbolicName: client2.multiple.exports +Bundle-Version: 1.0.0 +Bundle-Activator: client2.multiple.exports.Activator +Import-Package: host.multiple.exports; scope="private", + host.multiple.exports.onlyone, + org.eclipse.osgi.tests.bundles, + org.osgi.framework diff --git a/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/client2/multiple/exports/Activator.java b/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/client2/multiple/exports/Activator.java new file mode 100644 index 000000000..35db4f485 --- /dev/null +++ b/bundles/org.eclipse.osgi.tests/bundles_src/client2.multiple.exports/client2/multiple/exports/Activator.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2007 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 + *******************************************************************************/ +package client2.multiple.exports; + +import org.eclipse.osgi.tests.bundles.AbstractBundleTests; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class Activator implements BundleActivator { + + public void start(BundleContext context) throws Exception { + try { + AbstractBundleTests.simpleResults.addEvent(Class.forName("host.multiple.exports.PublicClass1").getName()); //$NON-NLS-1$ + } catch (Throwable t) { + AbstractBundleTests.simpleResults.addEvent(t); + } + try { + AbstractBundleTests.simpleResults.addEvent(Class.forName("host.multiple.exports.PublicClass2").getName()); //$NON-NLS-1$ + } catch (Throwable t) { + AbstractBundleTests.simpleResults.addEvent(t); + } + + try { + AbstractBundleTests.simpleResults.addEvent(Class.forName("host.multiple.exports.PrivateClass1").getName()); //$NON-NLS-1$ + } catch (Throwable t) { + AbstractBundleTests.simpleResults.addEvent(t); + } + try { + AbstractBundleTests.simpleResults.addEvent(Class.forName("host.multiple.exports.PrivateClass2").getName()); //$NON-NLS-1$ + } catch (Throwable t) { + AbstractBundleTests.simpleResults.addEvent(t); + } + } + + public void stop(BundleContext context) throws Exception { + // nothing + } + +} |