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 141894 - [65cat] Build Main Project disabled
Summary: [65cat] Build Main Project disabled
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker with 1 vote (vote)
Assignee: Jan Lahoda
URL:
Keywords: UI
: 140792 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-28 15:48 UTC by ulfzibis
Modified: 2008-09-05 10:30 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
"Build Main Project" greyed (30.45 KB, image/jpeg)
2008-07-28 15:49 UTC, ulfzibis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ulfzibis 2008-07-28 15:48:18 UTC
[ BUILD # : 200807251401 ]
[ JDK VERSION : 1.6.0_07 ]

"What the fuck" ;-) is this:

There is no "Build Main Project" anymore. It's greyed in toolbar AND
in menu.
Comment 1 ulfzibis 2008-07-28 15:49:02 UTC
Created attachment 65812 [details]
"Build Main Project" greyed
Comment 2 Petr Dvorak 2008-07-28 18:17:57 UTC
This is caused by the compile on save feature: http://wiki.netbeans.org/CompileOnSave

All GUI for Compile/Build is removed/disabled when COS is turned on...

You can re-enable the "Build" items in project properties, Build>Compiling (there is a checkbox "Compile on Save").

However, I think there is a small bug.

Steps:

1. Create a new Java Application (main project)
-> COS is on, items are grayed

2. Go to properties, disable COS, confirm properties
-> buttons are not re-enabled immediately, you need to click something else than a project's name in the Projects view
(for example "Source Packages" node)
Comment 3 ulfzibis 2008-07-28 20:27:11 UTC
Oops, I'm the next guy fallen into this trap.
As I must have knew it, because of reading the netCAT mailings, it means to me, that it's not a good idea, to
automatically enable the COS feature.

For me, the COS is more than annoying. It does exactly the same than the old "Build Main Project"
At least, the user should be be asked by a simple dialogue, if a project is first time opened by NB 6.5.
Additionally a check box on the "New Project" wizard would be very nice.

Why not let the "Build Main Project" button enabled, as it remains after the old "Build Main Project"?

What about having a tool tip on such a greyed button saying "Disabled as result of 'Compile on Save' feature"?

Furthermore it overruns the user with time consuming build error messages in cases where compile-single is more reasonable.
Comment 4 Jan Becicka 2008-08-14 09:54:12 UTC
We must evaluate feedback on usability of compile on save. Jano?
Comment 5 Ondrej Langr 2008-08-14 12:09:29 UTC
I agree we need better communicate the change happening with CoS in the UI. 

Keeping the action enabled all the time, yet displaying a simple dialog upon it's invocation would do the trick. The
dialog should say something like: 

-----------------------------------------------------------
<strong>Project is built automatically.</strong>
To change automatic build setup, go to Project Properties.

[ Project Properties... ] [[ Close ]]
-----------------------------------------------------------

The [ Project Properties... ] button should open the project properties with "Compiling" node preselected and the
"Compile on Save" option should probably then be renamed to "Build Automatically on Save", to match the message (for
Java SE projects, minor textual changes may be needed for Java EE projects).
Comment 6 Ondrej Langr 2008-08-14 13:35:17 UTC
Assigning back to issues@java, but keeping an eye on this. Let me know if a mockup or anything else is needed from HIE.
Comment 7 Petr Jiricka 2008-08-14 13:39:34 UTC
Shouldn't the message also somehow refer to the "Clean and Build" action? This action is enabled even with CoS turned
on, and arguably this may be what the user may want to run.
Comment 8 ulfzibis 2008-08-14 14:10:44 UTC
My 2 cc:
-----------------------------------------------------------
<strong>Project XXX will be built automatically (and also after each "Save" action).</strong>
To avoid this, disable automatic build on save in Project Properties.

[ Project Properties... ] [[ Ok ]]
-----------------------------------------------------------

The dialogue should be opened on each recent project before possibly compiling.
Sometimes developers have there project in some half-compiled state for special reasons. This should not automatically
be destroyed on first opening.

Comment 9 Jan Lahoda 2008-08-14 14:26:04 UTC
Nothing happens on project opening, the build/classes is filled on first Run. So showing the dialog on project opening
would be probably more harmful then helpful.
Comment 10 Ondrej Langr 2008-08-15 10:02:57 UTC
I agree we should refer to clean & Build, too, but I'm not sure how exactly to describe in which conditions Clean&Build
should be used. Perhaps something like: 

----------------------------------------------------------------------
<strong>Project is built automatically on incremental basis.</strong>

To build from scratch, use Clean and Build instead. 
To disable automatic build, go to Project Properties.

[ Project Properties... ] [ Clean & Build ] [[ Close ]]
----------------------------------------------------------------------

The title of the message should be kept as short as possible (people don't read, people scan!), so I'd try to avoid
explaining when the project is build, etc. At this point, what user needs to know is WHY s/he can not build as s/he used to.
Comment 11 ulfzibis 2008-08-15 11:13:32 UTC
+1

> Nothing happens on project opening, the build/classes is filled on first Run.

1st time, I was confronted by CoS, was when I imported settings from 6.1 on first start of 6.5. The CoS was enabled
automatically for all "opened" projects, and I don't no, if they would have been build also, if they haven't been before
(Sometimes developers have their project in some half-compiled state for special reasons). So I don't agree with
"nothing happens".
At this point, there should be a message/dialogue to the user about the new behaviour, and a chance to stay at old
behaviour and state.
In other words: "Opening" per import or manually of a project, created from older IDE versions, should display this
dialogue for each project to be updated to new behaviour.
(also if "import" is tweaked by a copy of recent userdir from one dev build to the next candidate.)

Scenario:
1. project is up to date because of CoS enabled
2. edit some lines in a file (having the '*' behind the file name in the tab)
3. click "Build Main Project" or hit F11 --> I this case old behaviour should be processed, instead of doing nothing.
4. "Compile Single" in editor pane's context menu would be very helpful too here. See issue 57703
   (Sometimes developers want their project in some half-compiled state for special reasons.)
Comment 12 Petr Hejl 2008-08-20 12:58:05 UTC
*** Issue 140792 has been marked as a duplicate of this issue. ***
Comment 13 Quality Engineering 2008-08-30 05:35:12 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/e658c6298cbd
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #141894: act according to the return value of BAMI.ensureBuilt.
Comment 14 Jan Becicka 2008-09-05 10:30:43 UTC
This is already fixed.