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 47316 - Problem in commands execution when pre-command is defined
Summary: Problem in commands execution when pre-command is defined
Status: RESOLVED FIXED
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2004-08-17 15:26 UTC by Martin Entlicher
Modified: 2004-08-18 13:57 UTC (History)
0 users

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 Martin Entlicher 2004-08-17 15:26:49 UTC
Occasionally a command is not executed until some
next command is put into the wait queue.
This happens for commands, which have defined a
pre-command.

It looks like a problem in CommandProcessor and
can be caused by the fix of issue #45464.

I'm not sure yet whether issue #47249 is also
caused by this, but it might be related.
Comment 1 Martin Entlicher 2004-08-17 15:34:23 UTC
How to reproduce:
Run Import & Checkout on a newly created project. Sometimes the
project is only imported and renamed to _orig. The checkout is
executed after you run another command.
Comment 2 Martin Entlicher 2004-08-18 13:57:48 UTC
Fixed in trunk:
The starter loop in CommandProcessor is notified after all command
listeners are processed, so that canRun() implementations can rely on
the listener and update its state before starter loop asks again.

UserCommandTask now spawns pre-commands synchronously and wait for
their finish via CommandListenerso that we're notified sooner.

/cvs/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandTask.java,v
 <--  UserCommandTask.java
new revision: 1.27; previous revision: 1.26

/cvs/vcscore/src/org/netbeans/modules/vcscore/commands/CommandProcessor.java,v
 <--  CommandProcessor.java
new revision: 1.23; previous revision: 1.22