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 84128 Details for
Bug 147621
Enforce Bundle-Localization folders/file to be included in build.properties
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.pde.core.patch
clipboard.txt (text/plain), 3.15 KB, created by
Chris Aniszczyk
on 2007-11-29 21:36:44 EST
(
hide
)
Description:
org.eclipse.pde.core.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2007-11-29 21:36:44 EST
Size:
3.15 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.pde.core >Index: src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java,v >retrieving revision 1.31 >diff -u -r1.31 BuildErrorReporter.java >--- src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 19 Sep 2007 03:29:39 -0000 1.31 >+++ src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 30 Nov 2007 02:35:41 -0000 >@@ -55,7 +55,7 @@ > import org.eclipse.pde.internal.core.util.PatternConstructor; > import org.osgi.framework.Constants; > >-public class BuildErrorReporter extends ErrorReporter implements IBuildPropertiesConstants{ >+public class BuildErrorReporter extends ErrorReporter implements IBuildPropertiesConstants { > > private static final String DEF_SOURCE_ENTRY = PROPERTY_SOURCE_PREFIX + '.'; > >@@ -209,7 +209,7 @@ > // make sure we have a manifest entry > if(fProject.exists(ICoreConstants.MANIFEST_PATH)) { > String key = "META-INF/"; //$NON-NLS-1$ >- validateBinIncludes(binIncludes, key); >+ validateBinIncludes(binIncludes, key); > } > > // make sure if we're a fragment, we have a fragment.xml entry >@@ -223,6 +223,35 @@ > String key = "plugin.xml"; //$NON-NLS-1$ > validateBinIncludes(binIncludes, key); > } >+ >+ // validate for bundle localization >+ IPluginModelBase model = PluginRegistry.findModel(fProject); >+ if (model == null) >+ return; >+ if (model instanceof IBundlePluginModelBase && !(model instanceof IBundleFragmentModel)) { >+ IBundleModel bm = ((IBundlePluginModelBase)model).getBundleModel(); >+ IManifestHeader mh = bm.getBundle().getManifestHeader(Constants.BUNDLE_LOCALIZATION); >+ if ((mh == null || mh.getValue() == null)) { // check for default location >+ Path path = new Path(Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME); >+ if(fProject.exists(path)) >+ validateBinIncludes(binIncludes, Constants.BUNDLE_LOCALIZATION_DEFAULT_BASENAME); >+ } else { // check for the real location >+ String localization = mh.getValue(); >+ int index = localization.lastIndexOf('/'); >+ if(index != -1) { // if we're a folder >+ String folder = localization.substring(0, index + 1); >+ Path path = new Path(folder); >+ if(fProject.exists(path)) >+ validateBinIncludes(binIncludes, folder); >+ } else { // if we're just a file location >+ String location = mh.getValue().concat(".properties"); //$NON-NLS-1$ >+ Path path = new Path(location); >+ if(fProject.exists(path)) >+ validateBinIncludes(binIncludes, location); >+ } >+ } >+ } >+ > } > > private void validateBinIncludes(IBuildEntry binIncludes, String key) { >@@ -241,8 +270,12 @@ > if(project != null && tokens[i] != null) { > File file = project.toFile(); > File[] files = file.listFiles(new WildcardFilenameFilter(tokens[i])); >- if(files.length > 0) >- exists = true; >+ for(int j = 0; j < files.length; j++) { >+ if(files[j].toString().endsWith(key)) { >+ exists = true; >+ break; >+ } >+ } > } > }
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 147621
:
83252
| 84128 |
84415