Bug 195980

Summary: [misc] new Save Action: Update copyright date
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P5 CC: benno.baumgartner
Version: 3.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2007-07-10 08:22:46 EDT
Add a Save Action that updates the copyright date whenever a document is saved. Updating should only be performed in header comments (as defined by the code formatter).

Probably needs a configurable regular expression to match the copyright date, e.g.

Copyright \(c\) (?:\d{4}, )?(\d{4})

for the standard EPL header. The Save Action could then simply replace group 1 of a match with the current year (unless it's the same).
Comment 1 Dani Megert CLA 2007-07-10 09:01:29 EDT
Would be nice indeed but hard to fit just the copyright case and not open a generic replace door here. Also, a single regex find/replace would not work as 
Copyright wxyz becomes Copyright wxyz, 2007.