[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Fix Copyrights vs. Advanced Fix Copyrights


That was a really nice writeup on the 2 copyright tools.  I'm not sure if there's any documentation on the tools (if there isn't, perhaps something can be written on the eclipse wiki)  But I know this is the bug where the Advanced Fix Copyrights tool was added:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=77026
And some of the preferences are explained in that bug.

Also, here's something I sent to the wtp-dev mailing list about a month ago regarding the 2 tools:

"Fix Copyrights..."
This action appears in the context menu when you select 1 or more projects in the Package Explorer or Navigator view.  It can only be run on whole projects (not a package/folder/class).  When it runs, it will block your UI, so you will be unable to do anything else in Eclipse.  This action only works with IBM copyright statements.  It will update existing ones and add new ones if there are none.  If it comes across an unknown copyright statement, it will ignore it.  To get the copyright year range accurate, the tool will check every file's cvs history to get the right revision year.


"Advanced Fix Copyrights..."

This action appears in the context menu when you select any resource (project/package/folder/class) but it only appears in the Navigator view.    When it runs, you have the option of running it in the background, so you can do other stuff in Eclipse.  This action has a corresponding preference page ("Copyright Tool") you can use to customize the action.  Some customizations include having your own copyright statement and telling the tool to just use a specific year instead of performing a cvs lookup on every file to get revision history.


Oh, and for both actions, the trailing "..." makes it look like a dialog will pop up or something, requesting more information, but really, when you invoke the action, it starts running immediately.


______________________________
Amy Wu
Structured Source Editor
919.254.0299, T/L 444.0299
amywu@xxxxxxxxxx



"Oberhuber, Martin" <Martin.Oberhuber@xxxxxxxxxxxxx>
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx

05/24/2007 12:02 PM

Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

To
"Cross project issues" <cross-project-issues-dev@xxxxxxxxxxx>
cc
Subject
[cross-project-issues-dev] Fix Copyrights vs. Advanced Fix        Copyrights





Hi all,

as the Europa release is getting closer and closer, it will be
time sometime soon to make a pass over the copyright comments
in the source files, in order to ensure they are there and the
copyright year is updated in case the file was changed in 2007.

You'll certainly all know that the releng.tools package has two
tools for this: "Fix Copyrights" and "Advanced Fix Copyrights".
You get the releng.tools package from any Eclpse Platform Download
page, its near the end of that page.

Since I didn't really find documentation what the two alternative
copyright tools do, and what's the difference between them, I
went and looked at the source code. Find below what I found out.
I'm E-Mailing this to this group for the following reasons:

1. If anybody knows about real documentation of this,
  please let me know!
2. If anybody has a "how-to" explaining how to best do the
  copyright pass, please let me know!
3. If nobody knows, I hope what I found out is helpful for the
  group as a whole.

I know that it's not necessarily time yet to really do the
copyright pass, but I thought that perhaps we'll come up
with some enhancement requests to the tool itself, such
that it can be improved or fixed until the time we'll
really need it (some time around June 28 I guess [just
kidding] :-).

So, here is what I think I found out:

* Fix copyrights
 - Does not use Preferences, uses all hard-coded IBM values
 - only processes copyrights where IBM Corp is on the copyright line
 + Works on .java, .properties, .c, .sh, .bat files
 + Always writes a default ibm copyright text in default format
   - i.e. adds the "and others" string if not there
   - fixes the number of *# characters
   - Changes "Initial Contributors" --> "Contributors"
 + processes Contributors specially
 + Available on Resource and PDE perspectives
 --> Should be renamed to "Fix IBM Copyrights" ?

* Advanced Fix Copyrights
 + Uses the information from the Copyright Preference page
 - Works on .java, .properties files only
 + Adds initial copyrights as per the template if necessary
 - If a comment is already there, only looks for comments which
   have the company name according to the Preference Template
   (Doesn't even do CVS lookups if different than template)
 + Available on Resource perspective only
 - Might remove a copyright owner (IBM in this case) if you have a
String like:
   Copyright (c) 2006, 2007 IBM Corporation, Wind River Systems, Inc.
and others.

Here is what I've been recommending to my group for the
non-IBM copyrights:
1. One member of every participating company to do it
  for their respective company's copyrights
2. With releng.tools installed, go to Window > Preferences
  > Copyright, and enter the default copyright for
  (name-your-company).
3. Then switch to Resource Perspective and do Right-click
  > Advanced Fix Copyrights.
  You can do it for ALL the projects since it will look
  at copyrights matching your template only.
4. Using Team > Synchronize, verify that it did not do
  any harm to the copyrights.

And here is my initial enhancement request:
1. Make "Advanced Fix Copyrights" work on more file types

Cheers,
--
Martin Oberhuber
Wind River Systems, Inc.
Target Management Project Lead, DSDP PMC Member
http://www.eclipse.org/dsdp/tm
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev