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

Summary: Add timestamp to a document
Product: editor Reporter: Vitezslav Stejskal <vstejskal>
Component: -- Other --Assignee: issues@editor <issues>
Status: RESOLVED FIXED    
Severity: normal CC: tzezula
Priority: P3 Keywords: API, API_REVIEW_FAST
Version: 6.x   
Hardware: PC   
OS: Windows XP   
Issue Type: TASK Exception Reporter:
Attachments: The patch that adds DocumentUtilities.getDocumentTimestamp()

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