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.
|Summary:||It is impossible DnD packages inside one source group in Project View|
|Product:||java||Reporter:||Marian Mirilovic <mmirilovic>|
|Component:||Project||Assignee:||Tomas Zezula <tzezula>|
|Severity:||blocker||CC:||jglick, jrojcek, jtulach, juhrik, tzezula|
|Issue Type:||DEFECT||Exception Reporter:|
|Bug Depends on:|
Description Marian Mirilovic 2004-08-13 07:06:10 UTC
[nb_dev](200408121800), [jdk1.5.0](b62) caused by fix issue 47086 (dataloss) Steps to reproduce: - run IDE - open/create java project - create packages x and y - create classes inside both packages - try to DnD package x inside package y -> DnD cursor shows possibility, but after drop package to the destination package nothing happens BTW: this operation is enabled in Files View P2: I think this must be fixed for Beta 2 / FCS
Comment 1 Jan Becicka 2004-08-13 07:52:26 UTC
It is correct IMHO, it does not make sense to DND package inside one source group. > BTW: this operation is enabled in Files View What? There are no packages in Files View. The bug is, that DND cursor shows possibility.
Comment 2 Marian Mirilovic 2004-08-13 08:00:19 UTC
>> BTW: this operation is enabled in Files View >What? There are no packages in Files View. right, there are folders ... > It is correct IMHO, it does not make sense to DND package inside one source group. Sorry, I don't think so ... - My package structure is: + x ClassX.java + y ClassY.java - I want move y inside x : + x ClassX.java +x. y ClassY.java This is impossible now !
Comment 3 Jaromir Uhrik 2004-08-13 08:24:32 UTC
Marian is right. It is really nonsence to disable copy/paste (DnD) action. There must! be possibility to move items in the tree 'cause the user is used to have such functionality in other tree based applications. Imagine that there is no possibility to move folder "x" to folder "y" in Windows Explorer:-). This is as for me the similar case -> P1.
Comment 4 Jan Becicka 2004-08-13 08:41:25 UTC
It depends on what is your definition of move. If you move y to x, there will not be package "y" any more: there will be a new package "x.y". This is not move, but rename IMO. You can do this by Refactoring | Rename. "...to move items in the tree 'cause..." I thought, that Package View does not represent tree structure. ;) But I surrender :) Let this issue be P0. I never used DND, I don't care :) If you think it is that important, it probably is.
Comment 5 Martin Matula 2004-08-13 08:49:33 UTC
Guys, just to support Honza's position. Imagine you have packages: org.netbeans.modules.java org.netbeans.modules.editor Now I drag o.n.m.editor and drop it to o.n.m.java. Does this mean the result should be: org.netbeans.modules.java org.netbeans.modules.java.org.netbeans.modules.editor ?? Does it make any sense to you? It seems to me that if we chosen to use the flattened package view, then we should be consistent and not mix packages with folders. You can still d'n'd folders in Files view. But I am not a UI guy, anyway, P1 seems to be too much...
Comment 6 Jaromir Uhrik 2004-08-13 09:26:52 UTC
Enabled/disabled paste actions was the thing that led me probably to little wrong view to the packages. I was confused from the following fact: prj1 --Source Packages --x --x.java --y --y.java prj2 -Source Packages --x --x.java I am able to invoke copy "prj1|Source Packages|y" and paste on "prj2|Source Packages|x" (although I missed that paste on "prj1|Source Packages" is actually done). My final opinion is that the paste action on "prj2|Source Packages|x" must be disabled too as in prj1. Only "prj2|Source Packages" (and things like "Test Packages" of course) must have paste action enabled. Or am I wrong? Returning the priority back to ->P2.
Comment 7 Petr Hrebejk 2004-08-13 10:32:03 UTC
He sould decide. IMO what should be not disabled is to drag package into it's own source group root and into any of it't parents. Tomas implemented the D'n'D, plase take care of it.
Comment 8 Jesse Glick 2004-08-13 18:21:30 UTC
I think Jano should comment on this. There needs to be a carefully written spec for what different operations on the package view should actually do. Judging by experience, different people have very different expectations of how it should work, so we cannot rely on individual guesses or piece-by-piece bugfixes, IMHO.
Comment 9 Tomas Zezula 2004-08-16 12:14:39 UTC
I've talked about copy/cut (the same problem) with Jano and he decided to allow only copy/cut between different source groups. The DND should probably behave in the same way.
Comment 10 Jesse Glick 2004-08-16 22:26:03 UTC
So it sounds like this is WONTFIX? After all, you can rename packages, and you can D&D folders in Files. The semantics of D&D in the package list is not exactly obvious.
Comment 11 Tomas Zezula 2004-08-17 09:25:48 UTC
Yes it seems to be WANTFIX. But I am rather waiting for Jano's comments.
Comment 12 jrojcek 2004-08-17 13:19:32 UTC
We present source packages as a list, not as a hierarchical tree structure. That is why we don't allow to DnD a package inside another package. The user should be able to DnD a package into another Source/Test Packages Folder in the same project or in another project (if there is any).
Comment 13 Tomas Zezula 2004-08-17 17:35:10 UTC
I did some changes to let cut/copy behave as Jano described. The refactoring also adds some fatures into copy/move. Someone from refactoring should verify them with Jano's comments and close it as WANTFIX. Checking in src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java; /cvs/java/project/src/org/netbeans/spi/java/project/support/ui/PackageViewChildren.java,v <-- PackageViewChildren.java new revision: 1.28; previous revision: 1.27 done
Comment 14 Jan Becicka 2004-08-18 09:06:16 UTC
DnD is implemented according to ui spec. As I mentioned before, it does not make sense to DND package inside one source group.
Comment 15 Marian Mirilovic 2004-08-18 14:18:51 UTC
I don't agree , but ok, wait for release .... and I wonder who will explain this to users (especially difference between Files View and Projects View and possibility to files handling in both views).... BUT If you prohibit DnD .. it's up to you, my question is Why cursor shows possibility to drop , when drop is prohibited (nothing happens after dropping down - means we've action without feedback) ?
Comment 16 Tomas Zezula 2004-08-18 15:26:29 UTC
As Jano described above he package view is not a tree but a list it is quite obvious that copy should behave differently than in the tree. E.g. Sources --org.netbeans.api.java.classpath --org.netbeans.api.java.queries Coping the package under the single compilation root is a nonsence, you will get something like: org.netbeans.api.java.classpath.org.netbeans.api.java.queries and I am pretty sure that you don't want to get this.
Comment 17 Marian Mirilovic 2004-08-18 15:29:12 UTC
2 Tomas, as I said above, disagree, but ok Now, this issue is about changing cursor if there is no possibility drop files/packages .
Comment 18 Petr Hrebejk 2004-08-18 15:46:41 UTC
So why Jesse? And is it still P2?
Comment 19 Petr Hrebejk 2004-08-18 15:51:08 UTC
And how about changing the Summary of the bug? It is cearly worng.
Comment 20 Tomas Zezula 2004-08-18 16:32:00 UTC
The cursor is fixed. The rest is WANTFIX.
Comment 21 Marian Mirilovic 2004-08-25 13:53:36 UTC
The cursor - verified, rest - no comment