|
| 1 | +/******************************************************************************* |
| 2 | + * Copyright (c) 2013, 2024 BestSolution.at and others. |
| 3 | + * |
| 4 | + * This program and the accompanying materials |
| 5 | + * are made available under the terms of the Eclipse Public License 2.0 |
| 6 | + * which accompanies this distribution, and is available at |
| 7 | + * https://www.eclipse.org/legal/epl-2.0/ |
| 8 | + * |
| 9 | + * SPDX-License-Identifier: EPL-2.0 |
| 10 | + * |
| 11 | + * Contributors: |
| 12 | + * BestSolution.at - initial API and implementation |
| 13 | + * IBM Corporation - ongoing enhancements |
| 14 | + * Christoph Läubrich - allow register as a service |
| 15 | + *******************************************************************************/ |
| 16 | +package org.eclipse.pde.core; |
| 17 | + |
| 18 | +import java.util.stream.Stream; |
| 19 | + |
| 20 | +import org.eclipse.jdt.core.IClasspathEntry; |
| 21 | +import org.eclipse.osgi.service.resolver.BundleDescription; |
| 22 | +import org.eclipse.pde.core.plugin.PluginRegistry; |
| 23 | +import org.osgi.resource.Resource; |
| 24 | + |
| 25 | +/** |
| 26 | + * Extension interface for {@link org.eclipse.pde.core.IClasspathContributor}. |
| 27 | + * <p> |
| 28 | + * This interface allows adding classpath entries after the classpath has been |
| 29 | + * calculated. |
| 30 | + * </p> |
| 31 | + * |
| 32 | + * @since 3.21 |
| 33 | + */ |
| 34 | +public interface IClasspathContributor2 extends IClasspathContributor { |
| 35 | + |
| 36 | + /** |
| 37 | + * Get any additional classpath entries to add to a project when its |
| 38 | + * classpath is first computed. The provided {@link BundleDescription} |
| 39 | + * describes the plug-in project that the classpath is being computed for. |
| 40 | + * The entries are added at the end of the calculation process. Additional |
| 41 | + * PDE model information can be obtained using |
| 42 | + * {@link PluginRegistry#findModel(Resource)}. |
| 43 | + * |
| 44 | + * @param project |
| 45 | + * the bundle descriptor for the plug-in project having its |
| 46 | + * classpath computed |
| 47 | + * @return additional classpath entries to add to the project at the end of |
| 48 | + * the classpath calculation, possibly empty, must not be |
| 49 | + * <code>null</code> |
| 50 | + * @since 3.21 |
| 51 | + */ |
| 52 | + Stream<IClasspathEntry> getAdditionalEntries(BundleDescription project); |
| 53 | +} |
0 commit comments