Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 305529 - [Markers] NPE in MarkerFieldEditor if MarkerFieldConfiguration scope is unset
Summary: [Markers] NPE in MarkerFieldEditor if MarkerFieldConfiguration scope is unset
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: IDE (show other bugs)
Version: 3.6   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.6 RC1   Edit
Assignee: Hitesh CLA
QA Contact: Hitesh CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-11 11:32 EST by James Blackburn CLA
Modified: 2010-05-18 03:34 EDT (History)
2 users (show)

See Also:
daniel_megert: review+


Attachments
trivial patch (1.14 KB, patch)
2010-03-11 11:32 EST, James Blackburn CLA
hsoliwal: iplog+
Details | Diff
FixCopyrights V01 (14.02 KB, patch)
2010-05-07 11:37 EDT, Hitesh CLA
no flags Details | Diff
FixCopyrights V02 (1.39 KB, patch)
2010-05-11 05:23 EDT, Hitesh CLA
daniel_megert: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Blackburn CLA 2010-03-11 11:32:39 EST
Created attachment 161763 [details]
trivial patch

org.eclipse.ui.ide.markerSupport -> problemsGeneratorExtension -> markerFieldConfiguration -> scope attribute states:

                  The scope of the grouping 
One of 
ON_ANY: any item in the workbench
ON_SELECTED_ONLY: on the currently selected item
ON_SELECTED_AND_CHILDREN: on the currently selected item and it's children
ON_ANY_IN_SAME_CONTAINER: on any item with the same top level container as the selection.
If this value is not set the value is ON_ANY

And the scope isn't a required attribute.

Unfortunately the code in MarkerFieldFilterGroup#processScope that checks this assumes the element attribute is not null.
Comment 1 Hitesh CLA 2010-04-29 01:28:49 EDT
Thanks for the patch. Released to HEAD.
Comment 2 Hitesh CLA 2010-04-30 09:45:36 EDT
Correcting the target milestone. The fix will be available 3.6RC1 onwards.

Adding Eric for review.
Comment 3 Hitesh CLA 2010-05-04 15:55:15 EDT
I guess I'd be needing a +1 for the patch since it targeted for RC1. I guess I can revert the patch, it has got to be this way or that :)

PS: figured out the flag ...
Comment 4 Dani Megert CLA 2010-05-07 09:56:25 EDT
Hitesh, I reviewed the patch and am fine with fixing this for RC1. However, you need to update the copyright notice and set the iplog+ flag on the patch.

Reopening to fix the remaining issues.
Comment 5 Hitesh CLA 2010-05-07 11:29:40 EDT
Comment on attachment 161763 [details]
trivial patch

Thanks for the reminder,Dani.

Setting iplog flag.
Comment 6 Hitesh CLA 2010-05-07 11:37:11 EDT
Created attachment 167497 [details]
FixCopyrights V01

Patch to update copyright headers for files in org.eclipse.ui.internal.views.markers package. Patch produced by running the 'Fix Copyrights' releng tool . 

Need a review for this one too :).
Thanks.
Comment 7 Dani Megert CLA 2010-05-08 03:23:59 EDT
Hitesh, this bug is only about MarkerFieldFilterGroup. You should not sneak in other changes here ;-)
We normally do a copyright date update in one pass near the end of the release.

Besides that the most important change is not in the patch: it is missing the addition of James into the copyright notice of MarkerFieldFilterGroup.
Comment 8 Hitesh CLA 2010-05-08 22:12:02 EDT
(In reply to comment #7)

I thought about that and am aware of it, but there are folks who would suggest otherwise. Some would argue that bug does not deal with copyrights or is not about the java file or type MarkerFieldFilterGroup… there could be still other arguments ;). For example, adding every contributors name to each file for every bug could result in an annoying bloat in the header.One may suggest we must have a common list of contributors on eclipse site - here again we could have many different opinions . 

But, fair enough. There is no end to learning [English translation, Robert Schumann] - always nice to hear another opinion :).  

PS: I haven’t added my own name to several of the files I’ve modified ;)
Comment 9 Hitesh CLA 2010-05-08 22:49:10 EDT
Not to forget that even comments, suggestions, corrections,jdocs,etc. are contributions, in fact raising a bug itself is a contribution :)

I suggest opening a new bug for copyrights and other potential discussions :).
Comment 10 Dani Megert CLA 2010-05-10 02:38:50 EDT
>PS: I haven’t added my own name to several of the files I’ve modified ;)
Correct. We IBM committers are covered by the company statement which has signed the committer agreement with the foundation (you did not sign paperwork as individual committer). Hence we don't add our names to the copyright statement.

I don't want to be picky but you really have to add the contribution to the copyright notice. That's how it's done. Take a look at e.g. Workbench.java.
Comment 11 Hitesh CLA 2010-05-10 04:33:10 EDT
(In reply to comment #10)
> >PS: I haven’t added my own name to several of the files I’ve modified ;)
>
I was referring to my patches prior to gaining commit rights.

> copyright notice. That's how it's done. Take a look at e.g. Workbench.java.
Sure, if that is how it has been documented to be done or if you say so :).

Surely we have had way more contributions than what is reflected by these copyright headers.
Comment 12 James Blackburn CLA 2010-05-10 04:35:39 EDT
There is a good reason for adding contributors to the header - it helps maintain the IP log: 
http://www.eclipse.org/legal/copyrightandlicensenotice.php
and is recommended practice when committing patches written by a non-committer.

That said, I'm not sure if we follow this 100% in CDT for 'trivial' patches (which is why I didn't add myself to the header when submitting the patch).
If the policy in this project is that a contributor line is required for all non-committer contributions then I'm:
  James Blackburn (Broadcom Corp.)
Comment 13 Hitesh CLA 2010-05-10 04:48:44 EDT
(In reply to comment #12)
>
> That said, I'm not sure if we follow this 100% in CDT for 'trivial' patches
> (which is why I didn't add myself to the header when submitting the patch).

My initial thoughts,exactly. Besides we have bugzilla & CVS to track contributions. Such policies should be followed consistently - this becomes your contribution if you had even suggested it as a comment. 

=>Surely we have had way more contributions than what is reflected by these
=>copyright headers.

I wonder if suggestions,feedback, typos corrections and comments are recorded as well - these can be counted perfectly as contributions from an employed non-committer.

> If the policy in this project is that a contributor line is required for all
> non-committer contributions then I'm:
>   James Blackburn (Broadcom Corp.)

I am absolutely fine with this :), will post an updated patch soon.
Comment 14 Dani Megert CLA 2010-05-10 05:05:28 EDT
>If the policy in this project is that a contributor line is required 
It's not just the Eclipse top-level project. The Committer Due Diligence Guidelines (http://www.eclipse.org/legal/committerguidelines.php) say under "Tracking Contributions":
Tracking of each contribution within a project is very important from a legal point of view.

It says "each" not "non-trivial" or "non-small" ;-). It also says that this typically recorded in the Copyright Notice.
Comment 15 Hitesh CLA 2010-05-11 04:59:18 EDT
FYI

quoting legal:

{INITIAL COPYRIGHT OWNER} is the copyright owner that created the initial content. If the content is subsequently modified and appended to by other copyright owners, the words "and others" are typically appended. So for example: "XYZ Corp." or "XYZ Corp. and others". The words "and others" are used to avoid having to list every copyright owner and because often, most of the content in the file was contributed the by initial copyright owner with subsequent modifications by others being smaller. However especially if the number of copyright owners is small (e.g. two), there is nothing wrong with listing all of them especially if their contributions are more proportionately equal. For example: "XYZ Corp., John Smith, and ABC Enterprises."

>The words "and others" are used to avoid having to list every copyright owner >and because often, most of the content in the file was contributed the by >initial copyright owner with subsequent modifications by others being smaller.
Comment 16 Dani Megert CLA 2010-05-11 05:02:32 EDT
Right, and it also says:

>However especially if the
>number of copyright owners is small (e.g. two), there is nothing wrong with
>listing all of them

;-)

Please just make the change. We've already wasted enough useful time on this.
Comment 17 Hitesh CLA 2010-05-11 05:23:17 EDT
Created attachment 167882 [details]
FixCopyrights V02

:)

Sure, Dani. Could you please review the patch as well. Thanks for the discussion and review.
Comment 18 Dani Megert CLA 2010-05-11 05:33:17 EDT
Hitesh, Bugzilla has a bug when it comes to asking for a review directly on the patch: you cannot choose the reviewer there but only give your personal review (+/-/?) on it. To ask someone for a review you have to do it on the main bug page.
Comment 19 Hitesh CLA 2010-05-11 07:03:30 EDT
(In reply to comment #18)
Yeah noticed it; will use the bug page from now on.

Released the copyright fix to HEAD.
Comment 20 Hitesh CLA 2010-05-18 03:34:31 EDT
Verified by code inspection in I20100516-0800.