Re: Packages node UI spec - underspecified and hard to read

Svata Dedic <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.projects.devel
Organization CollabNet Hosting
Message-ID <[email protected]>
cL wrote:
> Svata et al:
>>
>> * Dynamic behaviour of collapsing
>> If last data item in a level is deleted, should the structure collapse
>> into a single node ?
> 
> it should collapse only if the parent of the node is the collapsed node.
> 
Shouldn't it also collapse if the now empty package is a direct child of 
Packages node ?

[snip]
>>
>> * Rename, Delete, Copy, Cut: these actions is not present in the
>> [individual] Package node's action list. Will they not be there ?
> 
> 
> they should all be there and rather straight forward: the act on nodes 
> even if the node is a composite of more than one thing. so 
> rename/delete/copy/cut on a collapsed node manipulates all packages that 
> node represents -a warning box will prompt the user in the case of 
> delete and cut since everything contained will also be affected.
> 
Presence - OK, see comments for individual operations below.

Re. rename: OK, that is relatively easy (with the exception in the next 
bullet). For the others I do not think that you answered the question, 
or got the point of it

>>
>> * Rename: What the user should see in "Rename" dialog ?
>> Full package's name or just the last component ? If the former,
>> how exactly will the rename operation proceed, if the user
>> changes names of more components of the full package's name,
>> enters fewers components or more components ?
> 
> it shouldn't matter if the user enters fewer or more components 
> -whatever belonged in the outer most package still belongs in the outer 
> most package regardless of what it is called. so if the collapsed node 
> is o.nb.m.f.g and it gets renamed to o.nb.m.f.b.f the whatever was in g 
> is now in f and the additional components are created on disk.
> 
Well, you did not answer the question. You gave a specific example, but 
not a specification of how a "rename" operation is supposed to be 
working with the folders and files on user's harddrive.
I think you should define the effect of "Rename" UI operation precisely:
- when and which levels are renamed
- when a new directory is created
- when a folder is removed
- when contents of a folder will be moved to parent/child

>>
>> * What will "delete" operation on the node do ? Delete everything from
>> the topmost folder(s) collapsed into the node ? Delete only folders
>> that correspond to the last component ? Different "delete" action UI ? 
>> How
>> it should look ?
> 
> if you delete a package then you delete its contents. deleting the 
> collapsed node will delete everything it contains -this is why we'll 
> warn the user.
> 
I don't think the explanation is clear enough for me ;-) Assuming, 
there's a node "org.netbeans.modules.java", what will be deleted ? 
Folder(s) "org/netbeans/modules/java" and its(their) contents, or folder 
"org" and everything below ?

Technically content of the package "org.netbeans.modules.java" is only 
contents of folder "org/netbeans/modules/java" and its subfolders, NOT 
"org", "org/netbeans" or "org/netbeans/modules". Also the term "package 
org.netbeans.modules.java" equals to "list of folders 
org/netbeans/modules/java that are present under Java Roots in the order 
of their corresponding Roots".
Outer packages (org, org.netbeans, org.netbeans.modules) do not belong 
to contents of package org.netbeans.modules.java

 From your answer it would seem that even the (empty) parent packages 
should be deleted.

> What should be done when the node is destroyed programmatically (abstract
>> delete action for the node) ?
> 
> 
> same thing but i'll need a more concrete example.
> 
See javadoc for org.openide.nodes.Node.destroy(), that is the most 
concrete example. Nobody knows who and when will call the method since 
it is an API.

>>
>> * How exactly will Paste action work on the collapsed node ? Paste into
>> folder that correspond to the last collapsed component ? Give the user a
>> choice when there's more matching folders ? Offer a choice to paste to
>> any level of the collapsed structure ?
> 
> i imagine we'll need to go the route of the last option and provide a 
> little dialog that lets the user specify where to paste the object. if 
> there are multiple Java Roots making up the collapsed node the user 
> would need to choose which to use and which package level to paste into.
> 
> something like:
> 
> +-------------------------------------------+
> |                                           |
> +-------------------------------------------+
> |                                           |
> | Select the location to past the file to.  |
> |                                           |
> | Package: |_o.nb.m.f.b___________________| |
> |                                           |
> | Root: |_c:\this\root\thanks___________|V| |
> |                                           |
> |                         [ Ok ] [ Cancel ] |
> +-------------------------------------------+
> 
> Packages default is the last level in the collapsed structure
> 
> Root default is the first root in the active b.t. (? -not sure about 

What is "active build target" ? There's no such thing AFAIK. There's 
"project default build target" (inf spec 7.2.1), but there's no 
guaranteee that it is "Compiled Classes"-type build target or that you 
can infer exactly one or "the first" Compiled Classes-type build target 
from it.

>>
>> * What will "Copy" and "Cut" operations do on a collapsed structure:
>> - entire structure from the topmost folder(s) will be copied
> 
> it should grab the whole thing

So if I have a package "foo.bar" and want to copy over contents of 
"com.blurb", what's the user procedure which ends with a new package 
"foo.bar.blurb" which has contents of "com.blurb" copied in ?
> 
>> - only the lowest level will be copied
>> - how to handle multiple merged folders ?
> 
> for copy it shouldn't matter since what is being copied is a package 
> structure (o.nb.m.f.b) and not a specific location. when it is pasted it 
> the package structure that gets pasted.
> 
Consider a situation with 2 java source roots:
src1/com/sun/
	Foo.java
src2/com/sun/
	bar.xml

What is "the package structure" in this example ? Do you mean that when 
data is copied, the output will will merge into one physical location ?

Now what to do when there are conflicting resources for Copy/Cut ? Or 
just resources with the same filename sitting in the same package, but 
different folders ? Which file gets ultimately copied ? The first one, 
last one ?

> for cut -and delete too -the warning will need to prompt the user to 
> select where to cut/delete from if it's merged.
> 
> +-------------------------------------------+
> |                                           |
> +-------------------------------------------+
> |                                           |
> | Cutting [Deleting] the packages will       |
> | remove the package and its contents.      |
> |                                           |
> | The selected package exists in multiple   |
> | Java Roots, please choose from where it   |
> | should be cut [deleted].                  |
> |                                           |
> | Root: |_All Occurances________________|V| |
> |                                           |
> |                         [ Ok ] [ Cancel ] |
> +-------------------------------------------+
> 
> the root choices are:
> 
> -All Occurances -cuts/deletes from all java roots (default)
> -java roots -as many roots that fit the criteria.

So does it mean that when the user issues "cut" ("delete") but selects 
just one Java Root, the Cutted (Deleted) object will remain onscreen, 
and will be cut (deleted) only partially ?

Quoting from another answer near the beginning of the e-mail:
 > if you delete a package then you delete its contents. deleting the
 > collapsed node will delete everything it contains -this is why we'll

That somehow contradicts to the chooser ascii-arted above, which allows 
a partial deletion.


-Svata
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.