Bug 195980 - [misc] new Save Action: Update copyright date
Summary: [misc] new Save Action: Update copyright date
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P5 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-10 08:22 EDT by Markus Keller CLA
Modified: 2007-07-10 09:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.