Bug 291559 - Create a new section for preferences of build.properties related problems
Summary: Create a new section for preferences of build.properties related problems
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M5   Edit
Assignee: Ankur Sharma CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 286808
Blocks:
  Show dependency tree
 
Reported: 2009-10-07 03:00 EDT by Ankur Sharma CLA
Modified: 2015-02-25 05:17 EST (History)
5 users (show)

See Also:


Attachments
New build.properties related preferences (64.34 KB, image/jpeg)
2009-12-17 15:46 EST, Ankur Sharma CLA
no flags Details
Fix (32.00 KB, patch)
2010-01-03 04:37 EST, Ankur Sharma CLA
no flags Details | Diff
junit (16.04 KB, patch)
2010-01-03 04:39 EST, Ankur Sharma CLA
no flags Details | Diff
sample projects for testing (6.73 KB, application/force-download)
2010-01-03 04:41 EST, Ankur Sharma CLA
no flags Details
patch (33.17 KB, patch)
2010-01-04 14:02 EST, Darin Wright CLA
no flags Details | Diff
Updated fix patch (33.84 KB, patch)
2010-01-08 15:28 EST, Ankur Sharma CLA
no flags Details | Diff
updated lables (33.86 KB, patch)
2010-01-11 10:36 EST, Darin Wright CLA
no flags Details | Diff
Test Cases (18.95 KB, patch)
2010-01-22 07:05 EST, Ankur Sharma CLA
no flags Details | Diff
Test Projects (8.00 KB, patch)
2010-01-22 07:10 EST, Ankur Sharma CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur Sharma CLA 2009-10-07 03:00:06 EDT
The preference for build.properties related problem is associated with many problem. Create a separate section for build.properties covering the preferences liked with each property like source.<library>, src.includes, etc.
Comment 1 Curtis Windatt CLA 2009-10-07 11:48:49 EDT
I see about 8 different kinds of problems including the following.  However, I'm not sure if it justifies a new section in the preferences.  I can't see why someone would want to ignore any of them.  This enhancement should probably wait until it is requested by the community.

BuildErrorReporter_missingFolder=The folder "{0}" does not exist in the workspace
BuildErrorReporter_sourceMissing=The plug-in's classpath library '.' does not have a corresponding source build entry
BuildErrorReporter_cannotFindJar={0} cannot be resolved
BuildErrorReporter_cannotFindBundle=Bundle {0} cannot be resolved
Builders_Manifest_key_not_found = Key ''{0}'' is not found localization properties file
Builders_Manifest_useless_file = A plug-in manifest must contain at least one extension or extension point
BuildErrorReporter_missingEntry=An "{0}" build entry is missing

Builders_Convert_missingAttribute = ''{0}'' attribute is missing
Builders_Convert_illegalValue = Illegal value for ''{0}'' attribute
BuildErrorReporter_emptyEntry=Build entries must contain at least one value
BuildErrorReporter_missingFile=The file "{0}" does not exist in the workspace
Comment 2 Ankur Sharma CLA 2009-10-13 14:22:02 EDT
(In reply to comment #1)
> I see about 8 different kinds of problems including the following.  However,
> I'm not sure if it justifies a new section in the preferences.  I can't see why
> someone would want to ignore any of them.  This enhancement should probably
> wait until it is requested by the community.

User may not want to ignore them. But they might want to mark some as Error and some less important ones like bug #154292 as warnings. But I agree we have more priority stuff to take care before this one.
Comment 3 Andrew Niefer CLA 2009-11-23 14:10:50 EST
Bug 291528 may be an exception here.  It is synchronizing the compiler warnings and error settings.  The build.properties here will affect the nightly and integration builds.  Some developers may wish to have different settings for development in the workspace (more strict?) that what they have in the real builds.  In this case they would want to turn off the warning when those particular properties are out of synch.
Comment 4 Ankur Sharma CLA 2009-12-17 15:46:48 EST
Created attachment 154704 [details]
New build.properties related preferences

let me know your comments
Comment 5 Darin Wright CLA 2009-12-18 09:11:25 EST
* I would suggest to name the top-level twisty "Build" instead of "build.properties".
* In general, "with" should be used instead of "in" - for example: "problems with binary build entry"
* Can we be more specific about the problems? For example instead of "Problems with Java compliance", say "Missing or incompatible Java compliance property". (Obviously, this is more difficult if the entry pertains to more than one possible problem).
Comment 6 Ankur Sharma CLA 2010-01-03 04:37:49 EST
Created attachment 155178 [details]
Fix
Comment 7 Ankur Sharma CLA 2010-01-03 04:39:05 EST
Created attachment 155179 [details]
junit

This patch also needs projects zipped in next attachment
Comment 8 Ankur Sharma CLA 2010-01-03 04:41:46 EST
Created attachment 155180 [details]
sample projects for testing

This zip file contains zipped projects. They should be unzipped to the location org.eclipse.pde.ui.tests\tests\build.properties
Comment 9 Darin Wright CLA 2010-01-04 13:45:39 EST
I discovered the following issue:
* Launch new target workspace
* Create a new plug-in project a.b.c, with default settings
* Open the build.properties
* Remove the output.. entry
* Open workspace preferences, change the severity for "Missing output.<library> entry" to "Warning".
* build occurrs

An error appears rather than a warning. Reverting the severity to ignore does not make the error go away. Even cleaining the project does not make the error go away.
Comment 10 Darin Wright CLA 2010-01-04 14:02:24 EST
Created attachment 155261 [details]
patch

updated patch. The severity settings were not properly initialized - as well, validation was bailing when the general setting was set to "ignore".
Comment 11 Ankur Sharma CLA 2010-01-08 13:17:40 EST
Darin, if you are OK with the JUnit too then I will go ahead and commit the patch?
Comment 12 Ankur Sharma CLA 2010-01-08 15:28:20 EST
Created attachment 155630 [details]
Updated fix patch

Sync'ed patch to HEAD
Reequenced and reworded the prefs.
Comment 13 Darin Wright CLA 2010-01-11 10:36:10 EST
Created attachment 155751 [details]
updated lables

I updated the lables to make them consistent with respect to "entries" vs. "entry", and using property names with single quotes.
Comment 14 Darin Wright CLA 2010-01-11 11:41:33 EST
Ankur, the tests should validate the "buildEntry.key" value as well as the token value, as the key defines which property has the error.

Would it be possible to add a test for the following (when I do this manually, I see an error)?

* Create a new project that uses workspace severity settings
* Delete the "output.." that is generated in build.properties
* Set severity for missing "output.<library>" to "warning".
> warning appears (as it should)
* Set severity for missing "output.<library>" back to "ignore"
> warning remains, but should go away
Comment 15 Ankur Sharma CLA 2010-01-22 07:03:26 EST
(In reply to comment #14)
> Ankur, the tests should validate the "buildEntry.key" value as well as the token
> value, as the key defines which property has the error.

The tests sort of f does that only. The test will match the severity levels of all markers/entry combination (BaseValidator.verifyBuildPropertiesMarkers) after setting the governing preference (using BaseValidator.setPreferences).
Comment 16 Ankur Sharma CLA 2010-01-22 07:05:53 EST
Created attachment 156920 [details]
Test Cases

I am not able to check in o.e.pde.ui.tests
Comment 17 Ankur Sharma CLA 2010-01-22 07:10:40 EST
Created attachment 156922 [details]
Test Projects

The two zips inside this one shall go to tests folder in o.e.pde.ui.tests
o.e.pde.ui.tests
¦
+---tests
    ¦
    +---build.properties
            org.eclipse.pde.tests.build.properties.one.zip
            org.eclipse.pde.tests.build.properties.two.zip
Comment 18 Ankur Sharma CLA 2010-01-22 07:12:26 EST
I am not able to check in the test cases in o.e.ui.tests. Perhaps because I need to create new folder and check-in zips inside it.

Curtis/Darin, can you do it for me. Or if am missing something, do let me know.

thanks,
Ankur..
Comment 19 Darin Wright CLA 2010-01-22 11:46:14 EST
Tests released. Marking fixed. Will open new bugs as required.