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 84781 - Main Project Configuration combo fails to show newly add configs
Summary: Main Project Configuration combo fails to show newly add configs
Status: CLOSED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: RANDOM
: 84588 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-13 11:13 UTC by Marian Mirilovic
Modified: 2007-03-28 11:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
message.log (18.54 KB, text/plain)
2006-09-15 08:56 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2006-09-13 11:13:32 UTC
NB Dev (200609121800), JDK 6.0 (b98) , Linux Ubuntu / Gnome

Steps to reproduce:
- run IDE
- create J2SE project
- push "Customize" from Main Project Configuration menu combo box
- setup your own configuration
- push Ok
-> the list still contains only <default> and customize items
-> the <defualt> is shown by default
-> actually it works fine, but it just isn't shown
Comment 1 Jesse Glick 2006-09-13 23:43:07 UTC
I managed to reproduce it once or twice, long enough to see that it was a
problem in J2SEConfigurationProvider, but can no longer reproduce it at all.
When it fails, some file change event is not being delivered. Was never able to
reproduce it if it worked the first time in an IDE session; nor for subsequently
created projects. Might be timing-dependent. Do you have any reliable method of
reproduction?
Comment 2 Jesse Glick 2006-09-13 23:44:27 UTC
BTW if you can reliably reproduce please run with

-J-Dorg.netbeans.modules.project.ui.actions.ActiveConfigAction.level=0
-J-Dorg.netbeans.modules.java.j2seproject.J2SEConfigurationProvider.level=0

and attach log.
Comment 3 Marian Mirilovic 2006-09-14 08:23:53 UTC
Jesse, 
I run it with your switches and reproduced the problem without any problems, but
I don't see any additional logging ;(

Have I missed something ?

bin/netbeans -userdir MY_USERDIR -jdkhome JDK6_0
-J-Dorg.netbeans.modules.project.ui.actions.ActiveConfigAction.level=0
-J-Dorg.netbeans.modules.java.j2seproject.J2SEConfigurationProvider.level=0

I tried NB Dev (200609131800), JDK 1.6.0 (b98)
Comment 4 Jiri Prox 2006-09-14 08:28:39 UTC
*** Issue 84588 has been marked as a duplicate of this issue. ***
Comment 5 Jesse Glick 2006-09-14 19:47:41 UTC
Try a dev build made *after* I posted the comment in which I described the
(newly added) logging flags.
Comment 6 Jesse Glick 2006-09-15 00:08:29 UTC
Still no success reproducing (Linux / JDK 5). I do

1. rm -rfv /tmp/testud14; /space/src/nb_all/nbbuild/netbeans/bin/netbeans
--userdir /tmp/testud14
-J-Dorg.netbeans.modules.project.ui.actions.ActiveConfigAction.level=1000
-J-Dorg.netbeans.modules.java.j2seproject.J2SEConfigurationProvider.level=1000
-J-Dnetbeans.projects.dir=/tmp/test84781

(Here setting log level to 1000 to disable logging, in case the logging itself
causes the bug to not appear!)

Hit Enter to accept license.

2. C-S-N

3. Hit Enter twice to make a new j2seproject

4. A-B F C to open props dlg w/ configs

5. A-N x ENTER ENTER to make a new config 'x' and accept

Configs toolbar displays 'x' as expected.
Comment 7 Marian Mirilovic 2006-09-15 08:56:10 UTC
Created attachment 33984 [details]
message.log
Comment 8 Marian Mirilovic 2006-09-15 09:17:42 UTC
Jesse, I attached the log file. 
I hadn't been able to reproduce it with the same steps to reproduce, but after a
short time I got it once again, it looks like you need to open/cancel Configs
customizer and project's properties.
Comment 9 Jesse Glick 2006-09-15 13:50:06 UTC
Yes, this is the same log pattern as I got when I managed to reproduce before.
Around the time that

FINER [org.netbeans.modules.java.j2seproject.J2SEConfigurationProvider]:
Refiring config -> activeConfiguration

is printed, there ought to also be lines like

FINEST [org.netbeans.modules.java.j2seproject.J2SEConfigurationProvider]:
Received
FileEvent[src=/home/marian/NetBeansProjects/JavaApplication10/nbproject,file=/home/marian/NetBeansProjects/JavaApplication10/nbproject/configs,time=...,expected=false]
FINER [org.netbeans.modules.java.j2seproject.J2SEConfigurationProvider]: Firing
configurations: [] -> [newcfg]
FINER [org.netbeans.modules.project.ui.actions.ActiveConfigAction]:
configurationsListChanged: [J2SEConfigurationProvider.Config[null,<default>],
J2SEConfigurationProvider.Config[newcfg,newcfg]]
FINER [org.netbeans.modules.project.ui.actions.ActiveConfigAction]:
activeConfigurationChanged: J2SEConfigurationProvider.Config[newcfg,newcfg]

The "Received..." is the critical event; it means the Filesystems API is
notifying j2seproject of the new nbproject/configs folder.

There are probably various workarounds I could put in to force a refresh at
appropriate times, but I would like to first be able to reproduce so I at least
know whether there is in fact a bug in Filesystems.

I just added some more logging:

Checking in J2SEConfigurationProvider.java;
/shared/data/ccvs/repository/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEConfigurationProvider.java,v
 <--  J2SEConfigurationProvider.java
new revision: 1.4; previous revision: 1.3
done

If you can reproduce with the next continuous build, attach a new log; hopefully
that will be enough to tell whether the bug is in projects or Filesystems.
Comment 10 Jesse Glick 2006-11-20 21:03:12 UTC
Still reproducible or not?
Comment 11 Marian Mirilovic 2006-11-21 09:43:30 UTC
Jesse, I can't reproduce it any more.
Comment 12 Jesse Glick 2006-11-21 18:13:06 UTC
Hmm. Well if you ever see it again, try the extra logging.
Comment 13 Marian Mirilovic 2007-03-28 11:56:01 UTC
verified / closed