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 78994 - Confusing annotation of project's root node
Summary: Confusing annotation of project's root node
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Krauskopf
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-23 17:22 UTC by Peter Pis
Modified: 2006-10-23 15:48 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Pis 2006-06-23 17:22:47 UTC
NetBeans IDE Dev (Build 200606221800)
1.5.0_07; Java HotSpot(TM) Client VM 1.5.0_07-b03
Windows XP version 5.1 running on x86
en_GB (nb); Cp1252

Steps:
1. Create new project (Enterprise -> Enterprise Application - EA)
2. Switch to Favorites view and add there folder with source for new created
project.
3. Import it into repository.
4. Then switch to "Projects" view and select "EJB module" (part of application)
and create new e.g. new Webservice.

Also the root of entire application is marked with blue badge. But "Show
Changes" doesn't show anything if it's being performed on entire application
from "Projects"/"Files" view. Also commit is disabled.

If "Show Chnages" is performed on "EJB module" directly then everything is ok. 

Problem of source groups for "Projects" and "Files" view.

If you use "Favorites" view then everything works as expected.
Comment 1 Maros Sandor 2006-07-11 13:04:36 UTC
In a layout like this:

EnterpriseApplication
   EnterpriseApplication-ejb
   EnterpriseApplication-war
   nbproject
   src
   build.xml

When generating badges, the "EnterpriseApplication" node (in Projects view) says
it represents the whole "EnterpriseApplication" folder so the badge is there
correctly (the change is in the EnterpriseApplication-ejb folder).
If the "EnterpriseApplication" project node is not supposed to indicate changes
in its subprojects, it must only ask for annotations for set of files it
directly represents (nbproject, src, build.xml in this case).
Responsible class here is J2eeArchiveLogicalViewProvider. Assigning to j2ee for
evaluation.
Comment 2 Lukas Jungmann 2006-07-11 13:45:38 UTC
Petere, can I ask you to let us know, how Module suite project from API support
behaves? That project type is similar to earproject: both can be empty or "wrap"
other projects. That means that behaviour should be also the same.

One more question - what to do if the project layout is for example like this:

EnterpriseApplication
   EnterpriseApplication-ejb
   nbproject
   src
   build.xml
EnterpriseApplication-war
   nbproject
   ...
Comment 3 Martin Krauskopf 2006-07-18 09:59:09 UTC
cf. issue #71834. If you agree with comments there I think that the only problem
is that there is the cvs-badge in the project view even when there is actually
nothing to commit.
Comment 4 Martin Krauskopf 2006-07-18 09:59:54 UTC
BTW the suite and module projects behaves exactly in the same way (by design).
Comment 5 Martin Krauskopf 2006-07-19 15:45:14 UTC
This is a general bug of all project types (ear, war, ejb, ac). Even of
j2seproject. The badging mechanism is too simple. It is there for, maybe, few
years. Lowering to P4. But it does not mean to not fixing it for 5.5. Fix should
not be so hard, I think. CCing other owners, but I'll probably fix it for all
project types at once.
Comment 6 Peter Pis 2006-07-19 15:59:02 UTC
Yes, it's a general bug. But why should be the priority of this issue decreased
again. It can be confusing for many users. Bagde indicates that there are some
changes inside the project, but they can't be caught. ("CVS | Show Changes" on
project context - doesn't involve any modifications). For me it's P3. 
Comment 7 Martin Krauskopf 2006-07-19 16:07:09 UTC
> But why should be the priority of this issue decreased again.

Because it's the first time it is filed in so long time I suppose it does not
bother users almost at all.

> .....For me it's P3.

Ok.
Comment 8 Martin Krauskopf 2006-07-20 08:56:10 UTC
Working on earproject...
Comment 9 Martin Krauskopf 2006-07-20 09:19:14 UTC
Fixed for earproject:

  test/unit/ui/J2eeArchiveLogicalViewProviderTest.java; new;
  ui/J2eeArchiveLogicalViewProvider.java; 1.7.2.2.2.7 -> 1.7.2.2.2.8;

Petre could you file similar issues for other project types (war, ejb, ac, j2se,
...) - if you do not have time I'll do so.

Since it is the same case when you create e.g.

ejbproject1
 \_ejbproject2

and commit ejbproject1, the badge will leave on ejbproject1 in project view as
with earproject did and "show changes" on ejbproject1 shows nothing (because
ejbproject2 is not commited).
But for single-project-types it is not such an issue I think thus P4 is enough
for "singles". Please CC me there and/or point those issue here for similar fix.
Thanks.
Now I would rather concentrate on more imporant bugs for 5.5.
Comment 10 Peter Pis 2006-08-04 09:54:14 UTC
Reopen. "Projects" view is fine, But "Files" view still suffers...
Comment 11 Martin Krauskopf 2006-08-04 10:06:34 UTC
Files view is supposed to be annotated if any of a subproject - if the
subproject's root directory is at the same time subfolder of the main project's
directory; is not commited yet. Since it is a Files View and should behave as
"cvs up" on the command line IMO.
CCing Tomas since I suppose you will reopen the same bug also in j2seproject, so
let's discuss it on one place.
Comment 12 Martin Krauskopf 2006-08-04 10:08:09 UTC
> Since it is a Files View and should behave as "cvs up" on the command line IMO.

...and thus giving the user both opportunities from within the IDE easily.
Comment 13 Peter Pis 2006-08-04 10:52:22 UTC
But also context commands are not as expected. User can't do e.g. "CVS | Revert
Modifications". IMHO, in "Files" view projects should be treated as directories
only. Then all necessary cvs commands would be available.
Comment 14 Martin Krauskopf 2006-08-04 11:18:21 UTC
> IMHO, in "Files" view projects should be treated as directories only. Then all
> necessary cvs commands would be available.

I agree with that and though that it works in that way. I think the problem is
in Files View that it handles directories according to their project owner - but
it is probably problem of Files View itself, not sure. If yes a new bug for
Files View should be filed to prevent more confustion here. Anybody knows how
this exactly works? Maros?
Also is there any specification what is the right way?
Comment 15 Maros Sandor 2006-08-04 11:45:56 UTC
The process is not that trivial, stop by if you need more detailed info. So, in
my opinion what happens: the node in Files view contains a Project in its lookup
=> booom.
Comment 16 Martin Krauskopf 2006-08-09 14:46:12 UTC
So in the end this issue is really fixed. We talked together with Maros and
Milan and agreed that only Files View is able to affect this behaviour with
current APIs and implementation on all sides. So all similar issue like this one
may be closed and new issue in Files View will be filed. (These issues may make
a dependency on it for notification). Milan are you going to fill it? I'll
otherwise.
Comment 17 Peter Pis 2006-08-09 15:22:24 UTC
Ok, verified.
Comment 18 Milan Kubec 2006-08-14 14:01:04 UTC
I filed the issue #82364.