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 220480

Summary: "Run Project" button grayed-out after running a Project Configuration
Product: projects Reporter: Ainu
Component: Generic Projects UIAssignee: Tomas Stupka <tstupka>
Status: REOPENED ---    
Severity: normal CC: tzezula
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 213034    
Bug Blocks:    
Attachments: IDE log

Description Ainu 2012-10-20 15:38:09 UTC
I use Netbeans to run several programs concurrently (e.g. Client and Server). On previous versions, I just selected each Configuration in the Project Configuration list and clicked "Play" (Run Project). In the new version, however, the "play" button is grayed out after one configuration is launched (Server, for example), and it does not come back to "green" if I select another configuration (Client, for example). To do so, I'm forced to switch between the code tabs, which reenables the "play" button.

I believe this bug is a simple UI problem, but it is quite annoying. 



Product Version = NetBeans IDE 7.2.1 (Build 201210100934)
Operating System = Mac OS X version 10.8.2 running on x86_64
Java; VM; Vendor = 1.6.0_37
Runtime = Java HotSpot(TM) 64-Bit Server VM 20.12-b01-434
Comment 1 Ainu 2012-10-20 15:38:18 UTC
Created attachment 126240 [details]
IDE log
Comment 2 Milos Kleint 2012-10-29 13:50:45 UTC
can you provide some screenshots for the problem? I'm not recognizing the problem from the description. What project type are your projects? Is it more projects or just one?
Comment 3 Ainu 2012-10-29 14:18:14 UTC
Hi, thank you for your answer. I just recorded a video to illustrate this small problem: 

https://dl.dropbox.com/u/6937698/Bug.mp4

As you can see, it is just an annoying misbehavior from the GUI, as we must swap among the tabs to reactivate the "play" button. In the previous versions (up to 7.1, at least), we simply had to select another Configuration and click "play". Also, this happens no matter if I'm working with one or several open projects.

I also observed the same problem on my student's computers, and they are using windows 7, with the last Netbeans version.
Comment 4 Milos Kleint 2012-10-29 14:38:45 UTC
thank you, 

just to sum up the video
1. one project, 2 configurations each with a separate main class
2. after clicking run in toolbar, the main class from configuration Server keeps on running. Run toolbar button gets disabled
3. after switching configuration to Client (and different main class) in toolbar, the Run toolbar button stays disabled. That's the main point of this issue.
4. After switching between java editors, the Run button gets enabled in toolbar.
Comment 5 Ainu 2012-10-29 14:42:49 UTC
Yes, that's it!
thank you !


(In reply to comment #4)
> thank you, 
> 
> just to sum up the video
> 1. one project, 2 configurations each with a separate main class
> 2. after clicking run in toolbar, the main class from configuration Server
> keeps on running. Run toolbar button gets disabled
> 3. after switching configuration to Client (and different main class) in
> toolbar, the Run toolbar button stays disabled. That's the main point of this
> issue.
> 4. After switching between java editors, the Run button gets enabled in
> toolbar.
Comment 6 Milos Kleint 2012-11-30 11:07:04 UTC
this issue is more or less a consequence of fixing issue 206208 (and issue 71515). When build is run, we disable the relevant action, the things that enable it again is a change of context (different file, node selected) or end of the build execution. Unfortunately a change of configuration is not considered a change of context and therefore the enablement is not recalculated..

affected codebase: ProjectAction.runSequentially(), ProjectAction.refresh()..
Comment 7 sparkee 2013-10-23 15:29:47 UTC
I can state this happens in Linux and Windows also.

I would like to add my vote to fixing this problem.  Changing the project configuration really should re-enable the run button.  It is a real annoyance having to go make a "context" change each time I want to run a second, third, fourth, etc. application.

Alternatively, why disable the button after running the program in the first place? To me, it would be preferable to leave it enabled, and then when somebody goes to run a configuration that has already been run a second time, just put up a confirmation dialog asking if they really want to do that - and let them answer yes or no.
Comment 8 Martin Balin 2016-07-07 08:39:30 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 9 Ainu 2016-07-07 17:06:43 UTC
After suggestion, I downloaded the last 8.2 development version (netbeans-trunk-nightly-201607070002-javaee-macosx) but the context change bug remains. Hence, I reopened it once again.
Comment 10 tschneider 2017-02-24 20:55:43 UTC
Is there any update on the status of a fix for this?  (It was reported over 4 years ago!)

It's been bugging me for YEARS, so I remained using NetBeans 8.1 for too long, but I'll probably be forced to move to NetBeans 8.2 soon.

Thanks.
Comment 11 Eusebius 2017-03-04 09:34:04 UTC
The bug is still there in the latest 8.2 bundle, and it's really annoying.

The button should not be grayed out at all after a run, event for the same configuration. In client-server or p2p applications, you often need to run several instances of the exact same configuration.