Index: src/org/netbeans/modules/vcscore/VcsFileSystem.java =================================================================== RCS file: /cvs/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java,v retrieving revision 1.207.2.12 diff -c -r1.207.2.12 VcsFileSystem.java *** src/org/netbeans/modules/vcscore/VcsFileSystem.java 22 Apr 2003 14:03:08 -0000 1.207.2.12 --- src/org/netbeans/modules/vcscore/VcsFileSystem.java 23 Apr 2003 11:03:03 -0000 *************** *** 3949,3954 **** --- 3949,3955 ---- throw (UserQuestionException) ErrorManager.getDefault().annotate( new UserQuestionException(message) { public void confirmed() { + CommandTask exec = null; synchronized (editCommandExecutors) { CommandTask executor = (CommandTask) editCommandExecutors.get(filePath); if (executor != null) { *************** *** 3962,3999 **** command.setFiles(new FileObject[] { findResource(name) }); boolean customized = VcsManager.getDefault().showCustomizer(command); if (customized) { ! CommandTask exec = command.execute(); if (exec != null) { editCommandExecutors.put(filePath, exec); - try { - exec.waitFinished(0); - } catch (InterruptedException iex) { - // Interrupted, so we continue... - } } } } } } }, g("EXC_CannotDeleteReadOnly", file.toString())); } else { ! if (!editCommandExecutors.containsKey(filePath)) { ! CommandSupport cmd = getCommandSupport("EDIT"); ! Command command = cmd.createCommand(); ! command.setFiles(new FileObject[] { findResource(name) }); ! boolean customized = VcsManager.getDefault().showCustomizer(command); ! if (customized) { ! CommandTask exec = command.execute(); ! if (exec != null) { ! editCommandExecutors.put(filePath, exec); ! try { ! exec.waitFinished(0); ! } catch (InterruptedException iex) { ! // Interrupted, so we continue... } } } } } } } --- 3963,4007 ---- command.setFiles(new FileObject[] { findResource(name) }); boolean customized = VcsManager.getDefault().showCustomizer(command); if (customized) { ! exec = command.execute(); if (exec != null) { editCommandExecutors.put(filePath, exec); } } } } + if (exec != null) { + try { + exec.waitFinished(0); + } catch (InterruptedException iex) { + // Interrupted, so we continue... + } + } } }, g("EXC_CannotDeleteReadOnly", file.toString())); } else { ! CommandTask exec = null; ! synchronized (editCommandExecutors) { ! if (!editCommandExecutors.containsKey(filePath)) { ! CommandSupport cmd = getCommandSupport("EDIT"); ! Command command = cmd.createCommand(); ! command.setFiles(new FileObject[] { findResource(name) }); ! boolean customized = VcsManager.getDefault().showCustomizer(command); ! if (customized) { ! exec = command.execute(); ! if (exec != null) { ! editCommandExecutors.put(filePath, exec); } } } } + if (exec != null) { + try { + exec.waitFinished(0); + } catch (InterruptedException iex) { + // Interrupted, so we continue... + } + } } } } *************** *** 4019,4024 **** --- 4027,4033 ---- else message = g("MSG_LockFileCh"); throw new UserQuestionException(message) { public void confirmed() { + CommandTask exec = null; synchronized (lockCommandExecutors) { CommandTask executor = (CommandTask) lockCommandExecutors.get(filePath); if (executor != null) { *************** *** 4032,4067 **** command.setFiles(new FileObject[] { findResource(name) }); boolean customized = VcsManager.getDefault().showCustomizer(command); if (customized) { ! CommandTask exec = command.execute(); if (exec != null) { lockCommandExecutors.put(filePath, exec); - try { - exec.waitFinished(0); - } catch (InterruptedException iex) { - // Interrupted, so we continue... - } } } } } - } - }; - } else { - if (!lockCommandExecutors.containsKey(filePath)) { - CommandSupport cmd = getCommandSupport("LOCK"); - Command command = cmd.createCommand(); - command.setFiles(new FileObject[] { findResource(name) }); - boolean customized = VcsManager.getDefault().showCustomizer(command); - if (customized) { - CommandTask exec = command.execute(); if (exec != null) { - lockCommandExecutors.put(filePath, exec); try { exec.waitFinished(0); } catch (InterruptedException iex) { // Interrupted, so we continue... } } } } } --- 4041,4083 ---- command.setFiles(new FileObject[] { findResource(name) }); boolean customized = VcsManager.getDefault().showCustomizer(command); if (customized) { ! exec = command.execute(); if (exec != null) { lockCommandExecutors.put(filePath, exec); } } } } if (exec != null) { try { exec.waitFinished(0); } catch (InterruptedException iex) { // Interrupted, so we continue... } } + } + }; + } else { + CommandTask exec = null; + synchronized (lockCommandExecutors) { + if (!lockCommandExecutors.containsKey(filePath)) { + CommandSupport cmd = getCommandSupport("LOCK"); + Command command = cmd.createCommand(); + command.setFiles(new FileObject[] { findResource(name) }); + boolean customized = VcsManager.getDefault().showCustomizer(command); + if (customized) { + exec = command.execute(); + if (exec != null) { + lockCommandExecutors.put(filePath, exec); + } + } + } + } + if (exec != null) { + try { + exec.waitFinished(0); + } catch (InterruptedException iex) { + // Interrupted, so we continue... } } }