Bug 384844 - Add a current time variable and resolver
Summary: Add a current time variable and resolver
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.2   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 4.3 M1   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2012-07-11 12:35 EDT by Michael Rennie CLA
Modified: 2012-11-05 12:33 EST (History)
3 users (show)

See Also:


Attachments
DtStampVariableResolver.java (830 bytes, application/octet-stream)
2012-07-11 14:14 EDT, Martin Lange CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2012-07-11 12:35:31 EDT
This forum post http://www.eclipse.org/forums/index.php/mv/msg/364813/889417/#msg_889417 got me thinking that we could use a variable that could provide the current time - raw and formatted.

I would envision something like:

{$current_time} and {$current_time:<format>}
Comment 1 Martin Lange CLA 2012-07-11 14:14:01 EDT
I have created the forum post, forgot it and implemented the variable already. 
The source code is attached, have to be added under the extension point org.eclipse.core.variables.dynamicVariables.
Comment 2 Martin Lange CLA 2012-07-11 14:14:27 EDT
Created attachment 218589 [details]
DtStampVariableResolver.java
Comment 3 Curtis Windatt CLA 2012-07-11 15:13:49 EDT
I implemented a similar fix with yyyyMMdd-HHmm as the default format.  You can also provide an argument to change the format.

See my topic branch cwindatt/Bug384844.  I am waiting on another bug before merging.
Comment 5 Curtis Windatt CLA 2012-07-12 15:20:55 EDT
This should be mentioned in the N&N so more people will notice it.
Comment 6 Matt Lachman CLA 2012-11-05 12:33:35 EST
What would be a good procedure to add the "official" solution to my current 4.2 installation?