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.

View | Details | Raw Unified | Return to bug 57771
Collapse All | Expand All

(-)UserCommandTask.java (-3 / +6 lines)
Lines 517-532 Link Here
517
                    public void run() {
517
                    public void run() {
518
                        // Run the commands asynchronously, we're called under locks that
518
                        // Run the commands asynchronously, we're called under locks that
519
                        // execute in some necessary precustomization might want to acquire.
519
                        // execute in some necessary precustomization might want to acquire.
520
                        Command[] commands = new Command[preCommands.length];
520
                        for (int i = 0; i < preCommands.length; i++) {
521
                        for (int i = 0; i < preCommands.length; i++) {
521
                            Command preCmd = getProvider().createCommand(preCommands[i]);
522
                            Command preCmd = getProvider().createCommand(preCommands[i]);
522
                            if (preCmd != null) {
523
                            if (preCmd != null) {
523
                                ((VcsDescribedCommand) preCmd).setAdditionalVariables(executor.getVariables());
524
                                ((VcsDescribedCommand) preCmd).setAdditionalVariables(executor.getVariables());
524
                                synchronized (tasks) {
525
                                commands[i] = preCmd;
525
                                    tasks.add(preCmd.execute());
526
                                }
527
                            }
526
                            }
528
                        }
527
                        }
529
                        synchronized (tasks) {
528
                        synchronized (tasks) {
529
                            for (int i = 0; i < commands.length; i++) {
530
                                if (commands[i] == null) continue;
531
                                tasks.add(commands[i].execute());
532
                            }
530
                            preCommandsExecuted = true;
533
                            preCommandsExecuted = true;
531
                        }
534
                        }
532
                    }
535
                    }

Return to bug 57771