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 202351 - "--list-groups" switch starts IDE
Summary: "--list-groups" switch starts IDE
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks: 168556
  Show dependency tree
 
Reported: 2011-09-20 12:01 UTC by asenk
Modified: 2011-10-18 18:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description asenk 2011-09-20 12:01:33 UTC
Product Version: NetBeans IDE Dev (Build 201109190600)
Java: 1.7.0; Java HotSpot(TM) Client VM 21.0-b17
System: Linux version 2.6.38-11-generic running on i386; UTF-8; en_US (nb)
User directory: /home/tester/.netbeans/dev
Cache directory: /home/tester/.netbeans/dev/var/cache

When I use "--list-groups" options, my groups are printed into standard output, but the IDE starts.

I think that this switch should work somehow as "--help" switch. That means, that groups will be printed into standard output, and IDE will not start. Then I can choose some Project Group and start IDE with "--open-group NAME" option.
Comment 1 Jesse Glick 2011-10-18 18:20:10 UTC
As far as I know this is impossible given the sendopts API. See bug #168556 comment #14. If I throw new CommandException(0) at the end of GroupOptionProcessor.process with LIST_OPTION, and the IDE _is_ running, the output shows the ugly

Error code: 0
Ignored unknown option: --list-groups

and anyway the full module system is started with all accompanying messages. Basically you cannot add a module-supplied option which avoids starting the full application. (org.netbeans.modules.sendopts.Handler also uses WHEN_EXTRA, not WHEN_BOOT, and --help is anyway hardcoded in core.)