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 140443 - [65cat] AssertionError at org.netbeans.modules.project.ui.actions.ActiveConfigAction.performAction
Summary: [65cat] AssertionError at org.netbeans.modules.project.ui.actions.ActiveConfi...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Projects UI (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kubec
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on: 145314
Blocks:
  Show dependency tree
 
Reported: 2008-07-17 05:03 UTC by Michel Graciano
Modified: 2008-08-28 06:33 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 77555


Attachments
stacktrace (891 bytes, text/plain)
2008-07-17 05:03 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-07-17 05:03:24 UTC
Build: NetBeans IDE Dev (Build 200807040101)
VM: Java HotSpot(TM) Client VM, 10.0-b23, Java(TM) SE Runtime Environment, 1.6.0_07-b06
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
Fired when executed by Quick search
Comment 1 Michel Graciano 2008-07-17 05:03:35 UTC
Created attachment 64791 [details]
stacktrace
Comment 2 Milan Kubec 2008-08-27 10:57:40 UTC
Fixed.

http://hg.netbeans.org/main/rev/bf637c88ffc3
Comment 3 Jesse Glick 2008-08-27 15:30:10 UTC
The root problem is the fact that we misuse javax.swing.Action for things which are some kind of GUI controls but for
which actionPerformed makes no sense - classes which are just placeholders for a Presenter.* or ContextAwareAction
implementation. This is an API flaw which manifests itself in other ways, e.g. the fact that you can apparently make a
keybinding for something which cannot possibly be invoked in this way. Since we cannot retrofit javax.swing.Action with
a superinterface giving just display name information, is there some other solution? For example,

  setValue(SomeNBAPI.PHONY_ACTION, true);

to mark an "action" as not really being an action, so that GUI such as Quick Search would not even offer it as a
directly invocable object? Or perhaps a special runtime exception so that you could write

public boolean isEnabled() {throw new PhonyActionException(this);}
public void actionPerformed(ActionEvent ev) {throw new PhonyActionException(this);}

(neatly providing a readable body for these methods, rather than using asserts), where Quick Search etc. would know to
check for PAE?
Comment 4 Quality Engineering 2008-08-28 06:33:20 UTC
Integrated into 'main-golden', available in build *200808280201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/bf637c88ffc3
User: Milan Kubec <mkubec@netbeans.org>
Log: #140443: beep instead of assertion error when invoking action that is not to be invoked