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 163312 Details for
Bug 292906
build.properties problems should be reported one by one
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]
Patch
20100330.txt (text/plain), 23.40 KB, created by
Ankur Sharma
on 2010-03-29 14:46:56 EDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Ankur Sharma
Created:
2010-03-29 14:46:56 EDT
Size:
23.40 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/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java,v >retrieving revision 1.54 >diff -u -r1.54 BuildErrorReporter.java >--- src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 25 Mar 2010 16:40:02 -0000 1.54 >+++ src/org/eclipse/pde/internal/core/builders/BuildErrorReporter.java 29 Mar 2010 18:41:02 -0000 >@@ -318,7 +318,7 @@ > if (projectJavaCompatibility != null) { > if (jreCompilationProfileEntry == null) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel); >- prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); >+ prepareError(PROPERTY_JRE_COMPILATION_PROFILE, projectJavaCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); > } else { > if (!projectJavaCompatibility.equalsIgnoreCase(jreCompilationProfileEntry.getTokens()[0])) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JRE_COMPILATION_PROFILE, PDECoreMessages.BuildErrorReporter_CompilercomplianceLevel); >@@ -328,7 +328,7 @@ > } else { > if (javacSourceEntry == null) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility); >- prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); >+ prepareError(PROPERTY_JAVAC_SOURCE, projectSourceCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); > } else { > if (!projectSourceCompatibility.equalsIgnoreCase(javacSourceEntry.getTokens()[0])) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_SOURCE, PDECoreMessages.BuildErrorReporter_SourceCompatibility); >@@ -337,7 +337,7 @@ > } > if (javacTargetEntry == null) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility); >- prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); >+ prepareError(PROPERTY_JAVAC_TARGET, projectClassCompatibility, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); > } else { > if (!projectClassCompatibility.equalsIgnoreCase(javacTargetEntry.getTokens()[0])) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_TARGET, PDECoreMessages.BuildErrorReporter_GeneratedClassFilesCompatibility); >@@ -367,7 +367,7 @@ > if (javacWarningsEntry == null) { > if (warningToken.length() > 0) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceMissingEntry, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers); >- prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); >+ prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); > } > } else { > if (javacWarningsEntry.contains(ASSERT_IDENTIFIER) || javacWarningsEntry.contains('+' + ASSERT_IDENTIFIER) || javacWarningsEntry.contains('-' + ASSERT_IDENTIFIER)) { >@@ -381,7 +381,7 @@ > warningToken = join(assertToken, enumToken); > if (warningToken.length() > 0) { > message = NLS.bind(PDECoreMessages.BuildErrorReporter_ProjectSpecificJavaComplianceDifferentToken, PROPERTY_JAVAC_WARNINGS_PREFIX, PDECoreMessages.BuildErrorReporter_DisallowIdentifiers); >- prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); >+ prepareError(JAVAC_WARNINGS_ENTRY, warningToken, message, PDEMarkerFactory.B_JAVA_ADDDITION, fJavaComplSeverity, PDEMarkerFactory.CAT_EE); > } > } > } >@@ -514,7 +514,7 @@ > } > > if (!exists) { >- prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); >+ prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); > } > } > >@@ -592,7 +592,7 @@ > } > } > if (!found) >- prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); >+ prepareError(PROPERTY_BIN_INCLUDES, key, NLS.bind(PDECoreMessages.BuildErrorReporter_binIncludesMissing, key), PDEMarkerFactory.B_ADDITION, fBinInclSeverity, PDEMarkerFactory.CAT_FATAL); > } > } > >@@ -633,7 +633,7 @@ > } > String sourceEntryKey = PROPERTY_SOURCE_PREFIX + libname; > if (!sourceEntryKeys.contains(sourceEntryKey) && !containedInFragment(model.getBundleDescription(), libname)) >- prepareError(sourceEntryKey, null, NLS.bind(PDECoreMessages.BuildErrorReporter_missingEntry, sourceEntryKey), PDEMarkerFactory.B_SOURCE_ADDITION, PDEMarkerFactory.CAT_OTHER); >+ prepareError(sourceEntryKey, null, NLS.bind(PDECoreMessages.BuildErrorReporter_missingEntry, sourceEntryKey), PDEMarkerFactory.B_ADDITION, PDEMarkerFactory.CAT_OTHER); > } > } > >@@ -679,23 +679,17 @@ > > private void validateSourceEntries(ArrayList sourceEntries, IClasspathEntry[] cpes) { > String[] unlisted = PDEBuilderHelper.getUnlistedClasspaths(sourceEntries, fProject, cpes); >- StringBuffer sb = new StringBuffer(); >+ String name = ((IBuildEntry) sourceEntries.get(0)).getName(); >+ String message = PDECoreMessages.BuildErrorReporter_classpathEntryMissing1; >+ if (sourceEntries.size() > 1) { >+ name = DEF_SOURCE_ENTRY; >+ message = PDECoreMessages.BuildErrorReporter_classpathEntryMissing; >+ } > for (int i = 0; i < unlisted.length; i++) { > if (unlisted[i] == null) > break; >- if (sb.length() > 0) >- sb.append(", "); //$NON-NLS-1$ >- sb.append(unlisted[i]); >+ prepareError(name, unlisted[i], NLS.bind(message, unlisted[i], name), PDEMarkerFactory.B_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); > } >- String unlistedEntries = sb.toString(); >- if (sb.length() == 0) >- return; >- if (sourceEntries.size() == 1) { >- String name = ((IBuildEntry) sourceEntries.get(0)).getName(); >- prepareError(name, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing1, unlistedEntries, name), PDEMarkerFactory.B_SOURCE_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); >- } else >- prepareError(DEF_SOURCE_ENTRY, null, NLS.bind(PDECoreMessages.BuildErrorReporter_classpathEntryMissing, unlistedEntries), PDEMarkerFactory.B_SOURCE_ADDITION, fSrcLibSeverity, PDEMarkerFactory.CAT_OTHER); >- > } > > // bug 286808 >Index: src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java,v >retrieving revision 1.25 >diff -u -r1.25 PDEMarkerFactory.java >--- src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java 17 Nov 2009 20:33:13 -0000 1.25 >+++ src/org/eclipse/pde/internal/core/builders/PDEMarkerFactory.java 29 Mar 2010 18:41:02 -0000 >@@ -51,10 +51,11 @@ > // build properties fixes > public static final int B_APPEND_SLASH_FOLDER_ENTRY = 0x2001; > public static final int B_REMOVE_SLASH_FILE_ENTRY = 0x2002; >- public static final int B_ADDDITION = 0x2003; >+ public static final int B_ADDITION = 0x2003; > public static final int B_SOURCE_ADDITION = 0x2004; > public static final int B_REMOVAL = 0x2005; > public static final int B_REPLACE = 0x2006; >+ public static final int B_JAVA_ADDDITION = 0x2007; > > // plugin.xml fixes > public static final int P_ILLEGAL_XML_NODE = 0x3001; >Index: src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java,v >retrieving revision 1.8 >diff -u -r1.8 SourceEntryErrorReporter.java >--- src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java 22 Jan 2010 12:01:07 -0000 1.8 >+++ src/org/eclipse/pde/internal/core/builders/SourceEntryErrorReporter.java 29 Mar 2010 18:41:02 -0000 >@@ -346,7 +346,7 @@ > String libName = (String) iter.next(); > MissingOutputEntry errorEntry = (MissingOutputEntry) missingOutputEntryErrors.get(libName); > String message = NLS.bind(PDECoreMessages.SourceEntryErrorReporter_MissingOutputEntry, errorEntry.get(errorEntry.fSsrcFolders), PROPERTY_OUTPUT_PREFIX + libName); >- prepareError(PROPERTY_OUTPUT_PREFIX + libName, errorEntry.get(errorEntry.fOutputFolders), message, PDEMarkerFactory.B_ADDDITION, fMissingOutputLibSeverity, PDEMarkerFactory.CAT_OTHER); >+ prepareError(PROPERTY_OUTPUT_PREFIX + libName, errorEntry.get(errorEntry.fOutputFolders), message, PDEMarkerFactory.B_ADDITION, fMissingOutputLibSeverity, PDEMarkerFactory.CAT_OTHER); > } > } > >#P org.eclipse.pde.ui >Index: src/org/eclipse/pde/internal/ui/PDEUIMessages.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/PDEUIMessages.java,v >retrieving revision 1.466 >diff -u -r1.466 PDEUIMessages.java >--- src/org/eclipse/pde/internal/ui/PDEUIMessages.java 4 Mar 2010 21:57:41 -0000 1.466 >+++ src/org/eclipse/pde/internal/ui/PDEUIMessages.java 29 Mar 2010 18:41:07 -0000 >@@ -2683,6 +2683,8 @@ > > public static String ManifestEditorContributor_externStringsActionName; > >+ public static String MultiFixResolution_JavaFixAll; >+ > public static String MultiFixResolution_FixAll; > > public static String SplashSection_progressBar; >Index: src/org/eclipse/pde/internal/ui/pderesources.properties >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/pderesources.properties,v >retrieving revision 1.1124 >diff -u -r1.1124 pderesources.properties >--- src/org/eclipse/pde/internal/ui/pderesources.properties 5 Mar 2010 20:01:53 -0000 1.1124 >+++ src/org/eclipse/pde/internal/ui/pderesources.properties 29 Mar 2010 18:41:09 -0000 >@@ -2158,7 +2158,8 @@ > RenamePluginProcessor_renameProjectDesc=Rename project ''{0}'' to ''{1}'' > RemoveInternalDirective_label=Remove redundant x-internal header > RemoveInternalDirective_desc=The x-friends directive implies x-internal, so the latter is redundant >-MultiFixResolution_FixAll=Add all missing java compiler build entries >+MultiFixResolution_JavaFixAll=Add all missing java compiler build entries >+MultiFixResolution_FixAll=Fix all similar entries > ImportPackageSection_dialogButtonLabel=&Show non-exported packages > ExportPackageSection_dialogButtonLabel=&Show non-Java packages > MissingResourcePage_missingResource=Missing Resource >Index: src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java,v >retrieving revision 1.5 >diff -u -r1.5 AddBuildEntryResolution.java >--- src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java 27 May 2009 20:38:15 -0000 1.5 >+++ src/org/eclipse/pde/internal/ui/correction/AddBuildEntryResolution.java 29 Mar 2010 18:41:09 -0000 >@@ -13,8 +13,7 @@ > import org.eclipse.core.resources.IMarker; > import org.eclipse.core.runtime.CoreException; > import org.eclipse.osgi.util.NLS; >-import org.eclipse.pde.internal.core.text.build.Build; >-import org.eclipse.pde.internal.core.text.build.BuildEntry; >+import org.eclipse.pde.internal.core.text.build.*; > import org.eclipse.pde.internal.ui.PDEUIMessages; > > public class AddBuildEntryResolution extends BuildEntryMarkerResolution { >@@ -29,10 +28,16 @@ > > protected void createChange(Build build) { > try { >+ BuildModel buildModel = build.getModel(); >+ if (buildModel.isStale()) { >+ buildModel.reconciled(buildModel.getDocument()); >+ } > BuildEntry buildEntry = (BuildEntry) build.getEntry(fEntry); > if (buildEntry == null) >- buildEntry = new BuildEntry(fEntry, build.getModel()); >- buildEntry.addToken(fToken); >+ buildEntry = new BuildEntry(fEntry, buildModel); >+ >+ if (fToken != null) >+ buildEntry.addToken(fToken); > } catch (CoreException e) { > } > } >Index: src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java,v >retrieving revision 1.3 >diff -u -r1.3 MultiFixResolution.java >--- src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java 7 Jan 2010 14:49:48 -0000 1.3 >+++ src/org/eclipse/pde/internal/ui/correction/MultiFixResolution.java 29 Mar 2010 18:41:09 -0000 >@@ -28,11 +28,16 @@ > public class MultiFixResolution extends WorkbenchMarkerResolution { > > IMarker fMarker; >+ String fLabel; > // if quick fix is invoked from editor, then fix all related markers. If invoked from problem view, fix only the selected ones. > boolean problemViewQuickFix; > >- public MultiFixResolution(IMarker marker) { >+ public MultiFixResolution(IMarker marker, String label) { > fMarker = marker; >+ if (label != null) >+ fLabel = label; >+ else >+ fLabel = PDEUIMessages.MultiFixResolution_FixAll; > problemViewQuickFix = false; > } > >@@ -60,7 +65,7 @@ > } > > public String getLabel() { >- return PDEUIMessages.MultiFixResolution_FixAll; >+ return fLabel; > } > > public void run(IMarker marker) { >Index: src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java,v >retrieving revision 1.38 >diff -u -r1.38 ResolutionGenerator.java >--- src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java 30 Nov 2009 19:13:34 -0000 1.38 >+++ src/org/eclipse/pde/internal/ui/correction/ResolutionGenerator.java 29 Mar 2010 18:41:09 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.pde.internal.core.ICoreConstants; > import org.eclipse.pde.internal.core.TargetPlatformHelper; > import org.eclipse.pde.internal.core.builders.PDEMarkerFactory; >+import org.eclipse.pde.internal.ui.PDEUIMessages; > import org.eclipse.ui.IMarkerResolution; > import org.eclipse.ui.IMarkerResolutionGenerator2; > import org.osgi.framework.Constants; >@@ -78,8 +79,10 @@ > return new IMarkerResolution[] {new RemoveSeperatorBuildEntryResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)}; > case PDEMarkerFactory.B_APPEND_SLASH_FOLDER_ENTRY : > return new IMarkerResolution[] {new AppendSeperatorBuildEntryResolution(AbstractPDEMarkerResolution.RENAME_TYPE, marker)}; >- case PDEMarkerFactory.B_ADDDITION : >- return getBuildEntryAdditionResolutions(marker); >+ case PDEMarkerFactory.B_ADDITION : >+ return getBuildEntryAdditionResolutions(marker, null); >+ case PDEMarkerFactory.B_JAVA_ADDDITION : >+ return getBuildEntryAdditionResolutions(marker, PDEUIMessages.MultiFixResolution_JavaFixAll); > case PDEMarkerFactory.B_SOURCE_ADDITION : > return new IMarkerResolution[] {new AddSourceBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker)}; > case PDEMarkerFactory.B_REMOVAL : >@@ -106,15 +109,16 @@ > return NO_RESOLUTIONS; > } > >- private IMarkerResolution[] getBuildEntryAdditionResolutions(IMarker marker) { >+ private IMarkerResolution[] getBuildEntryAdditionResolutions(IMarker marker, String multiFixDescription) { > ArrayList resolutions = new ArrayList(2); > resolutions.add(new AddBuildEntryResolution(AbstractPDEMarkerResolution.CREATE_TYPE, marker)); > try { > String markerCategory = (String) marker.getAttribute(PDEMarkerFactory.CAT_ID); >+ int problemID = marker.getAttribute("id", PDEMarkerFactory.NO_RESOLUTION); //$NON-NLS-1$ > IMarker[] relatedMarkers = marker.getResource().findMarkers(marker.getType(), true, IResource.DEPTH_INFINITE); > for (int i = 0; i < relatedMarkers.length; i++) { >- if (markerCategory.equals(relatedMarkers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && !marker.equals(relatedMarkers[i])) { >- resolutions.add(new MultiFixResolution(marker)); >+ if (markerCategory.equals(relatedMarkers[i].getAttribute(PDEMarkerFactory.CAT_ID)) && relatedMarkers[i].getAttribute("id", PDEMarkerFactory.NO_RESOLUTION) == problemID && !marker.equals(relatedMarkers[i])) { //$NON-NLS-1$ >+ resolutions.add(new MultiFixResolution(marker, multiFixDescription)); > break; > } > } >#P org.eclipse.pde.ui.tests >Index: src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.tests/src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java,v >retrieving revision 1.1 >diff -u -r1.1 AbstractBuildValidationTest.java >--- src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java 25 Jan 2010 22:03:20 -0000 1.1 >+++ src/org/eclipse/pde/ui/tests/build/properties/AbstractBuildValidationTest.java 29 Mar 2010 18:41:12 -0000 >@@ -52,6 +52,7 @@ > public abstract class AbstractBuildValidationTest extends TestCase { > > private static final String MARKER = "marker"; >+ private static final String MULTIPLE_MARKERS = "multipleMarkers"; > private int fBuildPropIndex; > > /* (non-Javadoc) >@@ -60,7 +61,7 @@ > protected void setUp() throws Exception { > URL location = MacroPlugin.getBundleContext().getBundle().getEntry("/tests/build.properties"); > File projectFile = new File(FileLocator.toFileURL(location).getFile()); >- assertTrue("Could not find test zip files at " + projectFile,projectFile.isDirectory()); >+ assertTrue("Could not find test zip files at " + projectFile, projectFile.isDirectory()); > File[] zipFiles = projectFile.listFiles(); > for (int i = 0; i < zipFiles.length; i++) { > int index = zipFiles[i].getName().lastIndexOf('.'); >@@ -90,7 +91,7 @@ > if (resGen.hasResolutions(markers[i])) { > String markerEntry = (String) markers[i].getAttribute(PDEMarkerFactory.BK_BUILD_ENTRY); > IMarkerResolution[] resolutions = resGen.getResolutions(markers[i]); >- String quickFixindex = getProperty(expectedValues, markerEntry , "quickfix"); >+ String quickFixindex = getProperty(expectedValues, markerEntry, "quickfix"); > resolutions[new Integer(quickFixindex.trim()).intValue()].run(markers[i]); > buildProject(markers[i].getResource().getProject(), 0); > assertFalse("Quick fix verification failed for build.properties" + fBuildPropIndex, markers[i].exists()); >@@ -125,17 +126,17 @@ > default : > markerSeverity = IMarker.SEVERITY_INFO; > } >- >+ > for (int i = 0; i < markers.length; i++) { > message = "Marker severity for build.properties" + fBuildPropIndex; > String markerEntry = (String) markers[i].getAttribute(PDEMarkerFactory.BK_BUILD_ENTRY); >- assertEquals(message, markerSeverity, getIntAttribute(markers[i],IMarker.SEVERITY)); >- >+ assertEquals(message, markerSeverity, getIntAttribute(markers[i], IMarker.SEVERITY)); >+ > message = "Marker type for build.properties" + fBuildPropIndex; > String markerType = getProperty(expectedValues, markerEntry, PDEMarkerFactory.CAT_ID); >- assertEquals(message, markerType, getStringAttribute(markers[i],PDEMarkerFactory.CAT_ID)); >+ assertEquals(message, markerType, getStringAttribute(markers[i], PDEMarkerFactory.CAT_ID)); > >- message = "Marker line number for build.properties" + fBuildPropIndex; >+ message = "Marker line number for build.properties" + fBuildPropIndex; > int lineNumber; > try { > lineNumber = new Integer(getProperty(expectedValues, markerEntry, IMarker.LINE_NUMBER)).intValue(); >@@ -143,15 +144,21 @@ > message = "Could not read expected line number for build.properties" + fBuildPropIndex; > lineNumber = 0; > } >- assertEquals(message, lineNumber, getIntAttribute(markers[i],IMarker.LINE_NUMBER)); >+ assertEquals(message, lineNumber, getIntAttribute(markers[i], IMarker.LINE_NUMBER)); > > message = "Marker build entry token value for build.properties" + fBuildPropIndex; >+ String multipleMarkers = getProperty(expectedValues, markerEntry, MULTIPLE_MARKERS); > String tokenValue = getProperty(expectedValues, markerEntry, PDEMarkerFactory.BK_BUILD_TOKEN); >- assertEquals(message, tokenValue, getStringAttribute(markers[i],PDEMarkerFactory.BK_BUILD_TOKEN)); >+ if (multipleMarkers.equalsIgnoreCase(Boolean.TRUE.toString())) { >+ boolean contains = tokenValue.indexOf(getStringAttribute(markers[i], PDEMarkerFactory.BK_BUILD_TOKEN)) >= 0; >+ assertTrue(message, contains); >+ } else { >+ assertEquals(message, tokenValue, getStringAttribute(markers[i], PDEMarkerFactory.BK_BUILD_TOKEN)); >+ } > } > > } >- >+ > private int getIntAttribute(IMarker marker, String property) { > Integer value; > try { >@@ -160,9 +167,9 @@ > return 0; > } > >- if (value == null ) >+ if (value == null) > return 0; >- return value.intValue(); >+ return value.intValue(); > } > > private String getStringAttribute(IMarker marker, String property) { >@@ -175,9 +182,9 @@ > > if (value == null || value.equalsIgnoreCase("\"\"")) > value = ""; >- return value.trim(); >+ return value.trim(); > } >- >+ > private String getProperty(PropertyResourceBundle propertyBundle, String property) { > String value; > try { >@@ -187,11 +194,11 @@ > } > if (value == null || value.equalsIgnoreCase("\"\"")) > value = ""; >- return value.trim(); >+ return value.trim(); > } >- >+ > private String getProperty(PropertyResourceBundle propertyBundle, String entry, String property) { >- return getProperty(propertyBundle, entry + '.' + property); >+ return getProperty(propertyBundle, entry + '.' + property); > } > > /** >@@ -305,7 +312,7 @@ > projectPrefs.flush(); > projectPrefs.sync(); > } >- >+ > /** > * Find the project in workspace with the given id > * @param id project id >Index: tests/build.properties/org.eclipse.pde.tests.build.properties.one.zip >=================================================================== >RCS file: /cvsroot/eclipse/pde/ui/org.eclipse.pde.ui.tests/tests/build.properties/org.eclipse.pde.tests.build.properties.one.zip,v >retrieving revision 1.1 >diff -u -r1.1 org.eclipse.pde.tests.build.properties.one.zip >Binary files /tmp/cvsDT6Xea and org.eclipse.pde.tests.build.properties.one.zip differ
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 292906
:
163312
|
163313
|
163440