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.
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.
Created attachment 93288 [details] The patch that adds DocumentUtilities.getDocumentTimestamp()
Please review. It's a trivial change requested by the java editor. Tomas Zezula can give more details about usecases.
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).
The patch is OK. Thanks Vito
Thanks for review. http://hg.netbeans.org/jet-main/rev/a58d0b982b21
http://hg.netbeans.org/jet-main/rev/314bc1838eda
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