This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179501 - Add timestamp to a document
Summary: Add timestamp to a document
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: issues@editor
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2010-01-14 07:01 UTC by Vitezslav Stejskal
Modified: 2010-01-24 08:37 UTC (History)
1 user (show)

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
The patch that adds DocumentUtilities.getDocumentTimestamp() (4.12 KB, patch)
2010-01-14 07:04 UTC, Vitezslav Stejskal
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vitezslav Stejskal 2010-01-14 07:01:56 UTC
Allow modules to get a timestamp of the last document modification. It is somewhat similar to a document version available through DocumentUtilities.getDocumentVersion(), but the timestamp can be used for comparing with timestamps on files.
Comment 1 Vitezslav Stejskal 2010-01-14 07:04:43 UTC
Created attachment 93288 [details]
The patch that adds DocumentUtilities.getDocumentTimestamp()
Comment 2 Vitezslav Stejskal 2010-01-14 07:06:01 UTC
Please review. It's a trivial change requested by the java editor. Tomas Zezula can give more details about usecases.
Comment 3 Tomas Zezula 2010-01-14 07:13:25 UTC
The timestamp is needed by the SourceFileObject to return the last modification time of the file which is modified in the editor. Currently it returns System.currentTimeMillis() (always use the source file). When user switches to different file the IDE generates a sig file for this modified file but the javac still uses the modified file which causes performance degradation and problems when the file is modified by annotation processor(s).
Comment 4 Tomas Zezula 2010-01-14 07:14:54 UTC
The patch is OK.
Thanks Vito
Comment 5 Vitezslav Stejskal 2010-01-15 00:57:10 UTC
Thanks for review.
http://hg.netbeans.org/jet-main/rev/a58d0b982b21
Comment 6 Vitezslav Stejskal 2010-01-15 01:30:35 UTC
http://hg.netbeans.org/jet-main/rev/314bc1838eda
Comment 7 Quality Engineering 2010-01-24 08:37:03 UTC
Integrated into 'main-golden', will be available in build *201001240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a58d0b982b21
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #179501: adding timestamps to BaseDocument