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 36469 - Trying to run a duplicate copy of NB should show a message before exiting
Summary: Trying to run a duplicate copy of NB should show a message before exiting
Status: VERIFIED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: UI
Depends on:
Blocks: 36472
  Show dependency tree
 
Reported: 2003-10-07 15:34 UTC by pzajac
Modified: 2008-12-22 19:59 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2003-10-07 15:34:04 UTC
If user doesn't know the switch -h, -help or -? of
runide.sh, there is not way how to show help for
this script.

A special situation appears when is ide allready
runned. There should be better to show a short
message about runned ide.
Comment 1 pzajac 2003-10-07 15:46:06 UTC
The http://openide.netbeans.org/proposals/arch/cli.html proposal
contains this text:

It is suggested to pass all launcher commands first, then include a
special marker -- and after that the set of extended commands for the
modules.

    * start --help prints all the regular launcher commands
    * start --help-all starts the NetBeans (without GUI mode) and
print set of all regular and extended commands
    * start -- --open X.java is an example of extended command used to
open a file in a running NetBeans instance
    * start -- --print-scripting-server-port is extended command
provided by the scripting module that would print the port number on
which the scripting module is listening, so it is possible to query it
outside of the running NetBeans 

The listed commands : --help, --help-all, --open, --print are not
available. 

Did exists some support for new commands added by modules? For example
can add build command...

Comment 2 Jesse Glick 2003-10-07 18:07:58 UTC
The part of the proposal mentioning -- to separate "boot" from "init"
commands was not implemented; it was not necessary.

Commands do not yet use getopt-style two hyphens; that is filed as
issue #32053 and will be done later.

-open is implemented, in the utilities module. See issue #31396.

-print-scripting-server-port was never implemented; that was only for
sake of example. Probably no one cares much about that particular
example, but if they did, it could be an RFE in the scripting module.
(Better IMHO would be to remove the scripting telnet server and use
the CLI input and output streams directly.)

-build could be implemented. No one asked for it, and I have no plans
to do it. I don't exactly see the purpose. Anyway it would be an RFE
in core/execution I guess.
Comment 3 Jesse Glick 2003-10-07 18:12:51 UTC
I don't know what you mean that there is no way to show help for the
script.

---%<---
$ ./nbbuild/netbeans/bin/runide.sh -userdir /ram/testme -fnord
Unknown option: -fnord
-?
-help
  Show this help information.
Command-line options:
  -?                    show this help
  -h (or -help)         show launcher-specific options
  -ui <UI class name>   use given UI class as the IDE's Look & Feel
  -fontsize <size>      use given number as the base font size of the
                        IDE user interface, in points (11 default)
                        (but see
http://ui.netbeans.org/docs/ui/themes/themes.html)
  -locale <language[:country[:variant]]> use specified locale
Rarer options (definitely not supported!):
  -branding <token>     use specified branding (- for default)
  -nologging            do not create the log file
  -nosplash             do not show the splash screen
  -nogui                just start up internals, do not show GUI
-open FILE
  Open FILE.
-open FILE:LINE
  Open FILE at line LINE (starting from 1).
$ 
---%<---

What else do you want?

Re. showing a message when the IDE is already running and you pass no
special options besides e.g. userdir - could do. Changing summary to
reflect that.
Comment 4 pzajac 2003-10-08 08:03:46 UTC
Jesse, thanks for your explanation. I tried run ide with:
./runide.sh -userdir /tmp/blah -fnord

It is strange. The ide was  runned normally and no message about
incorrect parametr was shown. Do you have any idea what's wrong?
 
Comment 5 Jesse Glick 2003-10-08 14:58:15 UTC
Please make sure you have current sources (I made some fixes
yesterday) and try again. It will print a message after the IDE is
started. Currently it is not able to detect that the parameter was
unrecognized until *after* the IDE is started, since modules can
participate in handling the command-line arguments and they cannot be
asked until they are loaded.
Comment 6 pzajac 2003-10-09 13:50:09 UTC
I tried it with newest sources and the behaviour is the same as
described in previous comment. 
Comment 7 pzajac 2003-10-10 12:49:23 UTC
I tried it today I haven't saw any problwm with incorrect parameter.
The  error message with help has shown. 

Comment 8 pzajac 2003-10-21 16:40:08 UTC
It works now fine.
Comment 9 pzajac 2003-11-11 14:34:55 UTC
verified