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 249462 Details for
Bug 455324
Consider packages "exported" via x-friends as API
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]
draft patch
Add-possibility-to-consider-xfriend-packages-as-API.patch (text/plain), 2.63 KB, created by
Matthias Becker
on 2014-12-16 07:34:57 EST
(
hide
)
Description:
draft patch
Filename:
MIME Type:
Creator:
Matthias Becker
Created:
2014-12-16 07:34:57 EST
Size:
2.63 KB
patch
obsolete
>diff --git a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java >index a8bcea7..2feb5cb 100644 >--- a/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java >+++ b/apitools/org.eclipse.pde.api.tools/src/org/eclipse/pde/api/tools/internal/model/BundleComponent.java >@@ -546,6 +546,9 @@ > // visibility, so we need to add the package as API in that case > apiDesc.setVisibility(pkgDesc, VisibilityModifiers.API); > } >+ if (friends != null) { // TODO: make this switch-able >+ apiDesc.setVisibility(pkgDesc, VisibilityModifiers.API); >+ } > } > } > >diff --git a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java >index 7e62b0c..98fcbe2 100644 >--- a/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java >+++ b/apitools/org.eclipse.pde.api.tools/src_ant/org/eclipse/pde/api/tools/internal/tasks/ApiFileGenerationTask.java >@@ -117,6 +117,7 @@ > String manifests; > String sourceLocations; > boolean allowNonApiProject = false; >+ boolean treatFriendPackagesAsApi = false; > /** > * The encoding to read the source files with > * >@@ -197,6 +198,23 @@ > */ > public void setAllowNonApiProject(String allow) { > this.allowNonApiProject = Boolean.valueOf(allow).booleanValue(); >+ } >+ >+ /** >+ * Set if the task should treat packages as API that are only exposed via >+ * x-friends. >+ * <p> >+ * The possible values are: <code>true</code> or <code>false</code> >+ * </p> >+ * <p> >+ * Default is: <code>false</code>. >+ * </p> >+ * >+ * @since 1.2 >+ * @param allow >+ */ >+ public void setTreatFriendPackagesAsApi(String allow) { >+ this.treatFriendPackagesAsApi = Boolean.valueOf(allow).booleanValue(); > } > > /** >@@ -289,6 +307,9 @@ > } > if (this.sourceLocations != null) { > System.out.println("Extra source locations entries : " + this.sourceLocations); //$NON-NLS-1$ >+ } >+ if (this.treatFriendPackagesAsApi) { >+ System.out.println("Packages only exposed via x-friends are treated as API"); //$NON-NLS-1$ > } > } > // collect all compilation units >@@ -534,6 +555,10 @@ > include = false; > break loop; > } >+ if (treatFriendPackagesAsApi && "x-friends".equals(directive)) { //$NON-NLS-1$ >+ include = true; >+ break loop; >+ } > } > if (include) { > set.add(packageName.getValue());
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 455324
: 249462