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 26667 - Size and Last Modified property added to DataNode
Summary: Size and Last Modified property added to DataNode
Alias: None
Product: platform
Classification: Unclassified
Component: Data Systems (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jesse Glick
Keywords: UI
Depends on:
Reported: 2002-08-21 07:05 UTC by _ hair
Modified: 2008-12-23 14:31 UTC (History)
2 users (show)

See Also:
Exception Reporter:

Code patch to implement additional properties (1.08 KB, patch)
2002-08-21 07:07 UTC, _ hair
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description _ hair 2002-08-21 07:05:25 UTC
Both the size and last modified properties are
fundamental in platform applications in concern
with exploring filesystems.

FileObject has two methods getSize() and
lastModified() so the values are ready at hand,
but are currently not being shown in the
DataNode's propertySheet.

Could we please add these properties.
Comment 1 _ hair 2002-08-21 07:07:52 UTC
Created attachment 7151 [details]
Code patch to implement additional properties
Comment 2 Jesse Glick 2003-01-14 16:19:05 UTC
The patch as attached has a number of problems, but the idea seems
reasonable to me, and would be trivial to implement.

The question is more whether these attributes are useful enough for
most users that they deserve a space in the property sheet for every
file - possibly consuming space and introducing scrollbars making it
harder to see more important properties, or being visually
distracting. Possibly the answer depends on usage in an IDE vs.
another type of application. Maybe could be on another tab? Suggest it
go to nbui.

Note: the Template property is on every file in the main property
sheet, which seems dumb; only actually needed on nodes under Templates
in the Options window!
Comment 3 Marian Mirilovic 2003-03-13 13:42:13 UTC
Changed owner David S. -> David K.
Comment 4 David Konecny 2003-04-30 13:36:17 UTC
Jano, what HIE think about this? Reassign back to me.
Comment 5 jrojcek 2003-06-11 16:57:59 UTC
The idea of showing the attributes is good. I think it might be useful
in some situations. The only problem I see here is the well know 1:n
DataObject:FileObject mapping.

What should we show for bundle nodes, form nodes, class (java+class)
Comment 6 _ hair 2003-06-11 17:55:16 UTC
For multiple file mappings: the combined size, and the latest last
modified date, would be ideal.

But it would be fine simply to only include these properties for
DataNodes that are only mapped to one file.
Comment 7 Jesse Glick 2003-06-18 01:24:09 UTC
IMHO only the primary file need be shown. For *.class files, no one
cares what the size + last modified is, and for *.form files, oh well.
Those are the only common use cases.

I would be happy to make a fresh patch if there is any interest.
Comment 8 everready 2003-06-18 02:21:34 UTC
Yes, there is definite interest here. We would like to 
even extend the use of the date/size property as a method 
to base sorting of files in the Explorer.
Comment 9 Jesse Glick 2003-09-09 19:00:32 UTC
Have patch.
Comment 10 Jesse Glick 2003-09-09 21:02:30 UTC
1.102 core/www/plans/plan.xml
1.7   openide/loaders/
1.3   openide/loaders/api/apichanges.xml
1.5   openide/loaders/src/org/openide/loaders/
1.11  openide/loaders/src/org/openide/loaders/
1.5   openide/loaders/src/org/openide/loaders/
1.4   openide/loaders/src/org/openide/loaders/
1.5   openide/loaders/src/org/openide/loaders/
1.3   openide/loaders/src/org/openide/loaders/
Comment 11 Jesse Glick 2003-09-09 21:09:47 UTC

1. Adds a prop "All Files" listing the files in the object (usually
just one, except for compiled Java sources etc.), usually by absolute
path name.

2. Adds a prop "File Size" (in bytes).

3. Adds a prop "Modification Time" (date and day).

4. Suppresses the prop "Template" except for files actually in the
"Templates" folder in Options.

5. Adds folder sorting modes "By Modification Time" (newer to older,
but folders still first and alphabetical) and "By File Size" (bigger
to smaller, again only for files).

6. These new sorting modes are dynamic - e.g. if you append a bunch of
stuff to a file and save it, it may be moved up in the list.
Comment 12 pzajac 2003-09-10 09:29:26 UTC
cool feature. Verified in 20030920200
Comment 13 _ tboudreau 2003-09-18 18:09:29 UTC
I notice you're using StringArrayEditor for the "all files" editor.
It might be nicer to use another editor - specifically, if you provide
an array of files, I could make the custom editor for read only files able
to display the last modified date, etc. along with the file names in
a table.

Since at least for the C/C++ IDE's, some users in a usability study
didn't believe their code had really been compiled, this would allow
some way of verifying the up-to-dateness of, for example, a compiled
file hidden by a DataObject.
Comment 14 Jesse Glick 2003-09-20 04:48:33 UTC
Re. File[] - won't work in general; entries might not be files on 

Re. displaying modification time for secondary files, e.g. *.class: 
IMHO this is obscure enough that it does not merit a GUI in the IDE. 
If you feel so uncomfortable that you are compelled to double-check 
that a compilation worked, (1) the compilation GUI is poor and 
should be fixed some other way, (2) you can always display such 
information in a native file browser. The last-mod of the primary 
file, conversely, could be useful on a day-to-day basis, since it 
says when the file was last edited.

Use nbui if you disagree of course.
Comment 15 Patrick Keegan 2004-03-04 22:46:27 UTC
Adding note to What's New section of relnotes. Removing RELNOTE
keyword since this won't need to be tracked afterwards
Comment 16 Quality Engineering 2008-12-23 14:31:12 UTC
This issue had *3 votes* before move to platform component