A method getCommandNames() added. This is necessary to be able to find the list of all supported command names.
The VcsCommandsProvider will use it.
1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Tue Mar 19 18:03:46 2002 +0000
1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java Tue Mar 19 19:37:38 2002 +0000
1.3 @@ -3845,6 +3845,19 @@
1.4 return (VcsCommand) commandsByName.get(name);
1.5 }
1.6
1.7 + /**
1.8 + * Get the list of all command names.
1.9 + * @return The list of all command names.
1.10 + */
1.11 + public String[] getCommandNames() {
1.12 + if (commandsByName == null) {
1.13 + Node commands = getCommands();
1.14 + if (commands == null) return new String[0];
1.15 + setCommands (commands);
1.16 + }
1.17 + return (String[]) commandsByName.keySet().toArray(new String[commandsByName.size()]);
1.18 + }
1.19 +
1.20 private void addCmdActionsToSupporter() {
1.21 for (Iterator it = commandsByName.values().iterator(); it.hasNext(); ) {
1.22 VcsCommand cmd = (VcsCommand) it.next();