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 28943 - Default Switches dialog does not allow to cancel the command
Summary: Default Switches dialog does not allow to cancel the command
Status: CLOSED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: CVS (show other bugs)
Version: 3.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2002-11-22 13:19 UTC by lmeadors
Modified: 2007-01-04 17:14 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch for review (8.82 KB, patch)
2002-12-08 19:22 UTC, _ mihmax
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lmeadors 2002-11-22 13:19:42 UTC
When creating a cvs filesystem, the default value
for the "User Interface Mode" property is "Only
Default Switches". 

When first executing a cvs command on that
filesystem, a dialog comes up to let you know that
more advanced options are available, but does not
provide a way to cancel the command. 

Why is this bad? If you have been working on a
local versions of files, they can get merged when
you first do an update from netbeans without any
way to stop it short of killing the application
before closing the dialog. Bad, bad netbeans.
Comment 1 Martin Entlicher 2002-11-22 13:49:43 UTC
Changing version to 3.4.
Target Milestone is 4.0 - it will be fixed in dev builds first.
Adding 3.4.1_CANDIDATE keyword - this is a candidate for 3.4.1 release
Comment 2 Martin Entlicher 2002-11-22 14:01:22 UTC
Adding UI keyword.
I need an advice from the UI team about the correct behavior.
The dialog, that informs you about advanced options was not designed
as a confirmation dialog. This is why it has only [Close] button.
What should happen when the user press Esc? Is the [Close] button
sufficient?

To Larry: what do you expect when you do update? You select update,
but want to stop it afterwards? You should think about what you want
to do *before* you do it. Not afterwards.
BTW.: there is a way to kill the running command. Go to Runtime tab,
expand "VCS Commands" and select the appropriate running command.
There's a Kill action on the context menu.
Comment 3 lmeadors 2002-11-22 15:35:50 UTC
> You should think about what you want
> to do *before* you do it. Not afterwards.

Using that argument, it is extravagent to have the DOS format command
confirm you want to erase all information off of your hard drive
before doing it. I mean, if you typed format, you must have wanted to
erase everything! 

More extravagence: the rm command alias as root on a unix system
confirms unless your tell it not to. This is not because people who
have the root password do not think first, but because humans make
mistakes. That is what makes us interesting. :-)

> BTW.: there is a way to kill the running command. 
> Go to Runtime tab, expand "VCS Commands" and 
> select the appropriate running command.
> There's a Kill action on the context menu.

By the time I get there, the command will have completed. :-)

As far as the UI goes, the shortest path would probably be this:

I execute a CVS command, and the dialog comes up to let me know about
the advanced options, with these options:
OK - Run the commmand
Cancel - Do not run the command
Do not tell me again - Checkbox, when checked the dialog never shows
up again.

Ideally, I would like to see it work this way:

I execute a CVS command, and the dialog comes up to let me know about
the advanced options, with these options:
OK - Run the commmand
Cancel - Do not run the command
Do not tell me again - Checkbox, when checked the dialog never shows
up again.
Some way to change the value for "User Interface Mode" and to use that
mode even for this command.
Comment 4 Jiri Kovalsky 2002-11-25 10:51:37 UTC
Hey, I think we're going wrong path. The intention of the dialog is to
inform user that certain filesystem property is set to some value and
all commands will behave accordingly. I propose to show this dialog
once after filesystem is mounted. Then there will be no "Do not show
this again." checkbox. Current solution is vague and could be
understood that default setting affects only the first command. I know
it's not your case ... ;-)
Larry, Gabo, Maxym, Milos, Martin - opinions ? :-)
Comment 5 lmeadors 2002-11-25 14:04:27 UTC
Yeah, I like the proposal from Jiri - very clean and non-destructive.
Comment 6 Martin Entlicher 2002-12-02 16:18:18 UTC
Well, O.K. I can implement this solution in current dev builds if UI
team agree. But I'm not sure it's worth the change, because everything
will change in projects builds.

So the question is: what to do in the projects build?? There will be
no mounting process. Where show the dialog then?

Perhaps we can leave the dialog where it is, but change it to be even
more useful:
- add a button, that will run the command in non-advanced mode,
- add a button, that will run the command in advanced mode,
- add a button, that will cancel the command

Then the bottom of this dialog can look like:

[Run Command] [Run Advanced Command] [Cancel]

Thoughts ??
Comment 7 Jiri Kovalsky 2002-12-02 16:29:18 UTC
I see, but will you always present this dialog ? I hope not, so the
checkbox will change to something like: "Keep this choice for all
commands." and the dialog will annoy user until this is checked and run ?
Comment 8 _ mihmax 2002-12-02 16:31:22 UTC
proposals of Martin+Jiri are 100% OK for me
Comment 9 Jaroslav Tulach 2002-12-03 09:55:14 UTC
Hi. This issue is marked as 3.4.1_CANDIDATE. It means that it should be
integrated into release341 one branch. The plan at
http://www.netbeans.org/devhome/docs/releases/34/index.html expected beta1 to be
produced on Dec01. That did not happen due to a lot of outstanding not
integrated candidates like this one. 

Would it be possible to spend few minutes by backporting this fix? Thank you in
advance.
Comment 10 _ mihmax 2002-12-08 19:22:07 UTC
Created attachment 8208 [details]
Patch for review
Comment 11 _ mihmax 2002-12-08 19:24:33 UTC
Martin and Jiri, I made a patch to do what Martin proposed (against
release341 branch),  please review.

Sincere Max
Comment 12 Martin Entlicher 2002-12-09 19:31:57 UTC
Maxym, thanks for the patch! IMHO it solves the problem well.

I've committed the slightly modified patch (the command is not
executed when the user press ESC and no permanent reference to the
resource bundle (this is recommended so that the resource file can be
freed when not needed)) into the main trunk.

Gabo, Jiri, Larry, please review the fix in the development build from
the main trunk (on Dec 10). If you all agree with this solution, I'll
write to reviewers@netbeans.org and integrate it into the release341
branch.

Thanks, especially to Maxym for providing the patch.

/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.13; previous revision: 1.12
/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/CollectingAction.java,v 
<--  CollectingAction.java
new revision: 1.9; previous revision: 1.8
Comment 13 Jiri Kovalsky 2002-12-10 12:32:04 UTC
Sorry guys, but the checkbox does not work. I left it unchecked and
next time I invoked any command this hint dialog didn't come up. The
same goes for its option in global settings: "Tools|Options", "Source
Creation and Management|Version Control Settings|CVS Client Settings",
"Show Advanced Options Hint".
I don't recommend this fix to 3.4.1. -> reopening the issue.
Comment 14 Jiri Kovalsky 2002-12-10 13:18:27 UTC
Further investigations: global User Interface Mode is changed instead
of filesystem's one. If user manually sets the filesystem property to
"Only Default Switches" and "Show Advanced Options Hint" is True, "Run
Advanced" button does not work.
Comment 15 Martin Entlicher 2002-12-10 13:25:40 UTC
O.K., this is a bug and will be fixed soon.

The first problem you reported with the dialog not showing despite you
didn't check the checkbox is O.K. if you select "Run Advanced". This
sets the advanced mode to true and in this case the dialog has no
reason to show up.
Comment 16 Martin Entlicher 2002-12-10 13:46:02 UTC
O.K., so next version for review is there.
Only the filesystem UI mode is changed.

BTW: Gabo, do you agree with the UI design and it's functionality?

/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/CollectingAction.java,v 
<--  CollectingAction.java
new revision: 1.10; previous revision: 1.9
Comment 17 Jiri Kovalsky 2002-12-11 11:40:22 UTC
Okay, works fine in development build #200212110100 of NetBeans 4.0.
Let's integrate it into 3.4.1. branch.
Comment 18 Martin Entlicher 2002-12-11 16:37:35 UTC
I've got feedback from Gabo about the UI. I've made some further UI
changes to the dialog.

Please review the result in the tomorrow's dev build. If all agree,
I'll merge it into 3.4.1 tomorrow.

/cvs/vcscore/src/org/netbeans/modules/vcscore/actions/ClusteringAction.java,v 
<--  ClusteringAction.java
new revision: 1.4; previous revision: 1.3
/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.14; previous revision: 1.13
/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/CollectingAction.java,v 
<--  CollectingAction.java
new revision: 1.11; previous revision: 1.10
Comment 20 _ mihmax 2002-12-12 11:43:39 UTC
Please, consider some time for integrating these issues to release341 branch
today (12 Dec 2002), OK?
Comment 21 Jiri Kovalsky 2002-12-12 13:09:00 UTC
Uff, I checked the new behaviour and it's getting more and more heavy.
I agree that everything works as was intended but I think that current
solution leads user to the only conclusion: total confusion. I
strongly ask both Maxym and Larry, please look at it and give us your
clear statement. Thanks ! Also if Milos is listening here, please
express your opinion.
BTW, I checked "Set User ..." and clicked left button. However, the
advanced dialog was opened. This is obvious proof that this dialog is
overloaded ... :-(
Comment 22 Milos Kleint 2002-12-12 13:24:30 UTC
hmm, I'm listening. I haven't checked the behaviour, how it works. if
it works, fine with me. I've checked the code (quite quickly though)
and it seems to be ok.
One comment only: I just lately discovered that one can pass HTML to
JLabel and it will format accordingly. That might be more "nice
looking" then the current text area.

however I was never really sure that 
1. the dialog is necessary.
2. that the "default switches only" should be the default. I'd rather
see the  GUIMode as default with some hints about how to run with
default switches only.

Comment 23 Gabriel Tichy 2002-12-12 14:13:15 UTC
To resolve solely the original objection, we only need to use
"[command name]" (=OK) and "Cancel" button instead of old "OK".
To be honest, I think it would be enough, though not so powerful.
Comment 24 _ mihmax 2002-12-13 09:42:57 UTC
2Jiri:
Maybe you are right, and the dialog is overloaded, and the original
proposal was to simply be able to Cancel a command.

2Milos:
I'm also pro GUI by default, but it's because I always use GUI ;-),
maybe there're other opinions too.

Proposal:
Make Dialog simpler: [OK] runs the command, [Cancel] cancels the
command, [Don't show this again] checkbox and _maybe_ [Turn on
Advanced mode] checkbox.

How Sounds?
Comment 25 Milos Kleint 2002-12-13 09:49:28 UTC
sounds even more complicated. :)
Comment 26 _ mihmax 2002-12-13 10:52:05 UTC
Without [Turn Advanced On] is simpler, isn't it?
Comment 27 Milos Kleint 2002-12-13 10:59:31 UTC
sorry, got lost in the bug description. and haven't seen the actual UI.

Comment 28 Jiri Kovalsky 2002-12-13 11:19:15 UTC
Yes, let's have:

1. text: "This is default .. if you want ... CTRL or ..."
2. [ ] Don't show this again
3. [OK]
4. [Cancel]

Larry - satisfied ? Gabo - UI okay ?
Comment 29 lmeadors 2002-12-13 13:31:45 UTC
I am OK with that - my original gripe was that the dialog does not
provide a way to cancel the command.

That is all I wanted. :-)
Comment 30 Martin Entlicher 2002-12-13 18:22:06 UTC
I agree, that the current dialog (in dev builds) is too 
heavyweight with respect to the original.

I like the Maxym & Jirka proposal with one checkbox
[x] Do not show this again
and two buttons [OK] [Cancel].

If the [x] [Turn on Advanced Mode] checkbox is not 
necessary from the ease-of-use point of view I would omit 
it. The user will learn to go into properties or system 
options to customize the filesystem ;-)

So, if we all agree with this, I can implement this on 
Monday and merge it into release341 then.
Comment 31 _ mihmax 2002-12-14 16:05:41 UTC
Yes, agreed,
please implement and commit to trunk and release341 right away.

The code is examined so many times, so I think that no further review
is necessary.
Comment 32 _ mihmax 2002-12-16 17:20:23 UTC
Any progress, Martin?
Comment 33 Gabriel Tichy 2002-12-16 17:22:41 UTC
I just want to remind, that buttons should be called [<name of the
command>] [Cancel] - as I wrote it at 2002-12-12 06:13 PST.
Comment 35 Martin Entlicher 2002-12-16 18:48:45 UTC
The fix is merged into the release341 branch:

/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/CollectingAction.java,v 
<--  CollectingAction.java
new revision: 1.7.22.1; previous revision: 1.7
/cvs/javacvs/src/org/netbeans/modules/cvsclient/actions/Bundle.properties,v 
<--  Bundle.properties
new revision: 1.11.76.1; previous revision: 1.11
Comment 36 Jiri Kovalsky 2003-01-14 10:59:03 UTC
I think the final solution is good. Verified in development build
#200301140100 of NetBeans 4.0.
Comment 37 Quality Engineering 2003-07-01 12:50:31 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.