|
From: <cr...@us...> - 2009-06-08 10:07:40
|
Revision: 5562
http://jnode.svn.sourceforge.net/jnode/?rev=5562&view=rev
Author: crawley
Date: 2009-06-08 10:07:38 +0000 (Mon, 08 Jun 2009)
Log Message:
-----------
Parameter rename
Modified Paths:
--------------
trunk/fs/src/fs/org/jnode/fs/nfs/command/NFSHostNameArgument.java
trunk/fs/src/fs/org/jnode/partitions/command/IBMPartitionTypeArgument.java
trunk/shell/src/shell/org/jnode/shell/ArgumentCompleter.java
trunk/shell/src/shell/org/jnode/shell/CommandLine.java
trunk/shell/src/shell/org/jnode/shell/bjorne/AssignmentArgument.java
trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompletable.java
trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompleter.java
trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java
trunk/shell/src/shell/org/jnode/shell/bjorne/SetFlagArgument.java
trunk/shell/src/shell/org/jnode/shell/command/test/SuiteCommand.java
trunk/shell/src/shell/org/jnode/shell/help/CommandLineElement.java
trunk/shell/src/shell/org/jnode/shell/syntax/AliasArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/Argument.java
trunk/shell/src/shell/org/jnode/shell/syntax/CountryArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/DeviceArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/EnumArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/FileArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/IntegerArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/KeyboardLayoutArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/LanguageArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/Log4jLoggerArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/LongArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/MappedArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/MuParser.java
trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/PropertyNameArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/ShellPropertyNameArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/ThreadNameArgument.java
trunk/shell/src/shell/org/jnode/shell/syntax/URLArgument.java
Modified: trunk/fs/src/fs/org/jnode/fs/nfs/command/NFSHostNameArgument.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/nfs/command/NFSHostNameArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/fs/src/fs/org/jnode/fs/nfs/command/NFSHostNameArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -43,7 +43,7 @@
super(name, flags, new String[0], description);
}
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
int index = partial.indexOf(':');
if (index <= 0) {
return;
@@ -88,7 +88,7 @@
for (int i = 0; i < exportEntryList.size(); i++) {
ExportEntry exportEntry = exportEntryList.get(i);
if (exportEntry.getDirectory().startsWith(partialDirectory)) {
- completion.addCompletion(hostName + ":" + exportEntry.getDirectory());
+ completions.addCompletion(hostName + ":" + exportEntry.getDirectory());
}
}
}
Modified: trunk/fs/src/fs/org/jnode/partitions/command/IBMPartitionTypeArgument.java
===================================================================
--- trunk/fs/src/fs/org/jnode/partitions/command/IBMPartitionTypeArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/fs/src/fs/org/jnode/partitions/command/IBMPartitionTypeArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -50,12 +50,12 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
partial = partial.toLowerCase();
for (IBMPartitionTypes pt : IBMPartitionTypes.values()) {
String code = Integer.toHexString(pt.getCode());
if (code.startsWith(partial)) {
- completion.addCompletion(code);
+ completions.addCompletion(code);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/ArgumentCompleter.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/ArgumentCompleter.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/ArgumentCompleter.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -49,10 +49,10 @@
}
}
- public void complete(CompletionInfo completion, CommandShell shell) {
- argument.complete(completion, token == null ? "" : token.text, 0);
+ public void complete(CompletionInfo completions, CommandShell shell) {
+ argument.complete(completions, token == null ? "" : token.text, 0);
if (token != null) {
- completion.setCompletionStart(token.start);
+ completions.setCompletionStart(token.start);
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/CommandLine.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/CommandLine.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/CommandLine.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -587,7 +587,7 @@
return cmdInfo;
}
- public void complete(CompletionInfo completion, CommandShell shell) throws CompletionException {
+ public void complete(CompletionInfo completions, CommandShell shell) throws CompletionException {
String cmd = (commandToken == null) ? "" : commandToken.text.trim();
if (!cmd.equals("") && (argumentTokens.length > 0 || argumentAnticipated)) {
CommandInfo ci;
@@ -627,7 +627,7 @@
syntaxes = new SyntaxBundle(cmd, bundle.createDefaultSyntax());
}
try {
- bundle.complete(this, syntaxes, completion);
+ bundle.complete(this, syntaxes, completions);
} catch (CommandSyntaxException ex) {
throw new CompletionException("Command syntax problem", ex);
}
@@ -636,7 +636,7 @@
// as an AliasArgument.
ArgumentCompleter ac = new ArgumentCompleter(
new AliasArgument("cmdName", Argument.SINGLE), commandToken);
- ac.complete(completion, shell);
+ ac.complete(completions, shell);
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/AssignmentArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/AssignmentArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/AssignmentArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -56,14 +56,14 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
int pos = partial.indexOf('=');
if (pos != -1) {
return;
}
for (String varName : context.getVariableNames()) {
if (varName.startsWith(partial)) {
- completion.addCompletion(varName, true);
+ completions.addCompletion(varName, true);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompletable.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompletable.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompletable.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -26,7 +26,7 @@
public interface BjorneCompletable {
- void complete(CompletionInfo completion, BjorneContext context,
+ void complete(CompletionInfo completions, BjorneContext context,
CommandShell shell, boolean argumentAnticipated)
throws CompletionException;
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompleter.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompleter.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/BjorneCompleter.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -49,10 +49,10 @@
}
@Override
- public void complete(CompletionInfo completion, CommandShell shell) throws CompletionException {
+ public void complete(CompletionInfo completions, CommandShell shell) throws CompletionException {
if (endToken == null) {
if (penultimateToken == null) {
- completeCommandWord(completion, shell, new BjorneToken(""));
+ completeCommandWord(completions, shell, new BjorneToken(""));
return;
}
endToken = penultimateToken;
@@ -62,9 +62,9 @@
BjorneToken[] words = command.getWords();
if (words.length > 1 && words[words.length - 1] == penultimateToken) {
boolean argumentAnticipated = penultimateToken.end < endToken.end;
- command.complete(completion, context, shell, argumentAnticipated);
+ command.complete(completions, context, shell, argumentAnticipated);
} else if (words.length == 1 && words[0] == penultimateToken && penultimateToken.end < endToken.end) {
- command.complete(completion, context, shell, true);
+ command.complete(completions, context, shell, true);
}
}
String partial;
@@ -73,12 +73,12 @@
if (penultimateToken == null || penultimateToken.end < endToken.end) {
partial = "";
expectedSet = endExpectedSet;
- completion.setCompletionStart(endToken.start);
+ completions.setCompletionStart(endToken.start);
token = endToken;
} else {
partial = penultimateToken.unparse();
expectedSet = penultimateExpectedSet | endExpectedSet;
- completion.setCompletionStart(penultimateToken.start);
+ completions.setCompletionStart(penultimateToken.start);
token = penultimateToken;
}
if (!partial.equals(token.getText())) {
@@ -109,38 +109,38 @@
case TOK_ASSIGNMENT:
ArgumentCompleter ac = new ArgumentCompleter(
new AssignmentArgument("?", context, Argument.MANDATORY, null), token);
- ac.complete(completion, shell);
+ ac.complete(completions, shell);
break;
case TOK_FOR_WORD:
case TOK_FILE_NAME:
// Complete against the file system namespace
ac = new ArgumentCompleter(
new FileArgument("?", Argument.MANDATORY, null), token);
- ac.complete(completion, shell);
+ ac.complete(completions, shell);
break;
case TOK_COMMAND_NAME:
// Complete against the command/alias/function namespaces
- completeCommandWord(completion, shell, token);
+ completeCommandWord(completions, shell, token);
break;
default:
String candidate = BjorneToken.toString(i);
if (candidate.startsWith(partial)) {
- completion.addCompletion(candidate);
+ completions.addCompletion(candidate);
}
}
}
}
- private void completeCommandWord(CompletionInfo completion, CommandShell shell, BjorneToken token) {
+ private void completeCommandWord(CompletionInfo completions, CommandShell shell, BjorneToken token) {
// FIXME ... do aliases and functions ...
for (String builtinName : BjorneInterpreter.BUILTINS.keySet()) {
if (builtinName.startsWith(token.text)) {
- completion.addCompletion(builtinName);
+ completions.addCompletion(builtinName);
}
}
ArgumentCompleter ac = new ArgumentCompleter(
new AliasArgument("?", Argument.MANDATORY, null), token);
- ac.complete(completion, shell);
+ ac.complete(completions, shell);
}
public void setEndToken(BjorneToken endToken) {
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -129,7 +129,7 @@
}
@Override
- public void complete(CompletionInfo completion, CommandShell shell) throws CompletionException {
+ public void complete(CompletionInfo completions, CommandShell shell) throws CompletionException {
// TODO Auto-generated method stub
}
Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/SetFlagArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/bjorne/SetFlagArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/bjorne/SetFlagArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -54,12 +54,12 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
if (("-" + flagCh).startsWith(partial)) {
- completion.addCompletion("-" + flagCh);
+ completions.addCompletion("-" + flagCh);
}
if (("+" + flagCh).startsWith(partial)) {
- completion.addCompletion("+" + flagCh);
+ completions.addCompletion("+" + flagCh);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/command/test/SuiteCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/test/SuiteCommand.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/command/test/SuiteCommand.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -97,11 +97,11 @@
super(label, flags, description);
}
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
Set<String> availCategories = TestManager.getInstance().getCategories();
for (String availCategory : availCategories) {
if (availCategory.startsWith(partial)) {
- completion.addCompletion(availCategory);
+ completions.addCompletion(availCategory);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/help/CommandLineElement.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/help/CommandLineElement.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/help/CommandLineElement.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -46,7 +46,7 @@
public abstract String format();
public abstract void describe(HelpFactory help, PrintWriter out);
- public abstract void complete(CompletionInfo completion, String partial);
+ public abstract void complete(CompletionInfo completions, String partial);
/**
* Indicates if the element is satisfied.
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/AliasArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/AliasArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/AliasArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -56,7 +56,7 @@
return value.text;
}
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
try {
// get the alias manager
final AliasManager aliasMgr =
@@ -65,7 +65,7 @@
// collect matching aliases
for (String alias : aliasMgr.aliases()) {
if (alias.startsWith(partial)) {
- completion.addCompletion(alias);
+ completions.addCompletion(alias);
}
}
} catch (NameNotFoundException ex) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/Argument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/Argument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/Argument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -440,13 +440,13 @@
* @param completion the CompletionInfo object for registering any completions.
* @param partial the argument string to be completed.
*/
- public final void complete(CompletionInfo completion, String partial, int flags) {
+ public final void complete(CompletionInfo completions, String partial, int flags) {
if (isSet() && !isMultiple()) {
throw new SyntaxMultiplicityException("this argument cannot be repeated");
}
flags = (flags & ~NONOVERRIDABLE_FLAGS) | this.flags;
checkFlags(flags);
- doComplete(completion, partial, flags);
+ doComplete(completions, partial, flags);
}
/**
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/CountryArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/CountryArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/CountryArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -50,10 +50,10 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
for (String country : validCountries) {
if (country.startsWith(partial)) {
- completion.addCompletion(country);
+ completions.addCompletion(country);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/DeviceArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/DeviceArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/DeviceArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -70,7 +70,7 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
final DeviceManager devMgr = getDeviceManager();
// collect matching devices
@@ -80,7 +80,7 @@
}
final String devId = dev.getId();
if (devId.startsWith(partial)) {
- completion.addCompletion(devId);
+ completions.addCompletion(devId);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/EnumArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/EnumArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/EnumArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -69,11 +69,11 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
for (E e : clazz.getEnumConstants()) {
String eName = e.name();
if (eName.startsWith(partial)) {
- completion.addCompletion(eName);
+ completions.addCompletion(eName);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/FileArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/FileArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/FileArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -114,7 +114,7 @@
}
@Override
- public void doComplete(final CompletionInfo completion,
+ public void doComplete(final CompletionInfo completions,
final String partial, final int flags) {
// Get last full directory from the partial pathname.
final int idx = partial.lastIndexOf(File.separatorChar);
@@ -155,9 +155,9 @@
String name = prefix + n;
if (name.startsWith(partial)) {
if (new File(f, n).isDirectory()) {
- completion.addCompletion(name + File.separatorChar, true);
+ completions.addCompletion(name + File.separatorChar, true);
} else {
- completion.addCompletion(name);
+ completions.addCompletion(name);
}
}
}
@@ -170,12 +170,12 @@
int tmp = partial.length() - idx;
if ((tmp == 3 && partial.endsWith("..")) ||
(tmp == 2 && partial.endsWith("."))) {
- completion.addCompletion(partial + File.separatorChar, true);
+ completions.addCompletion(partial + File.separatorChar, true);
}
// Add "-" as a possible completion?
if (partial.length() == 0 && (flags & HYPHEN_IS_SPECIAL) != 0) {
- completion.addCompletion("-");
+ completions.addCompletion("-");
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/IntegerArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/IntegerArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/IntegerArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -68,14 +68,14 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
// FIXME ... maybe someone could figure out how to partial
// completion efficiently when max - min is large?
if (max - min >= 0 && max - min < COMPLETION_THRESHOLD) {
for (int i = min; i <= max; i++) {
String candidate = Integer.toString(i);
if (candidate.startsWith(partial)) {
- completion.addCompletion(candidate);
+ completions.addCompletion(candidate);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/KeyboardLayoutArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/KeyboardLayoutArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/KeyboardLayoutArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -51,13 +51,13 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
try {
KeyboardLayoutManager mgr = InitialNaming.lookup(KeyboardLayoutManager.NAME);
// collect matching devices
for (String layout : mgr.layouts()) {
if (layout.startsWith(partial)) {
- completion.addCompletion(layout);
+ completions.addCompletion(layout);
}
}
} catch (NameNotFoundException ex) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/LanguageArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/LanguageArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/LanguageArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -50,10 +50,10 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
for (String language : validLanguages) {
if (language.startsWith(partial)) {
- completion.addCompletion(language);
+ completions.addCompletion(language);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/Log4jLoggerArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/Log4jLoggerArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/Log4jLoggerArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -56,12 +56,12 @@
* Complete against existing logger names.
*/
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
Enumeration<?> en = LogManager.getCurrentLoggers();
while (en.hasMoreElements()) {
String loggerName = ((Logger) en.nextElement()).getName();
if (loggerName.startsWith(partial)) {
- completion.addCompletion(loggerName);
+ completions.addCompletion(loggerName);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/LongArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/LongArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/LongArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -69,7 +69,7 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
// FIXME ... maybe someone could figure out how to partial
// completion efficiently when max - min is large?
if (max - min >= 0 && max - min < COMPLETION_THRESHOLD) {
@@ -77,7 +77,7 @@
String candidate = Long.toString(i);
System.err.println("Testing completion '" + candidate + "'");
if (candidate.startsWith(partial)) {
- completion.addCompletion(candidate);
+ completions.addCompletion(candidate);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/MappedArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/MappedArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/MappedArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -62,13 +62,13 @@
* Complete partial against the domain of the valueMap.
*/
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
if (caseInsensitive) {
partial = partial.toLowerCase();
}
for (String str : valueMap.keySet()) {
if (str.startsWith(partial)) {
- completion.addCompletion(str);
+ completions.addCompletion(str);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/MuParser.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/MuParser.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/MuParser.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -108,10 +108,10 @@
* @param bundle the container for Argument objects; e.g. provided by the command.
* @throws CommandSyntaxException
*/
- public void parse(MuSyntax rootSyntax, CompletionInfo completion,
+ public void parse(MuSyntax rootSyntax, CompletionInfo completions,
SymbolSource<Token> source, ArgumentBundle bundle)
throws CommandSyntaxException, SyntaxFailureException {
- parse(rootSyntax, completion, source, bundle, DEFAULT_STEP_LIMIT);
+ parse(rootSyntax, completions, source, bundle, DEFAULT_STEP_LIMIT);
}
/**
@@ -127,7 +127,7 @@
* means that there is no limit.
* @throws CommandSyntaxException
*/
- public synchronized void parse(MuSyntax rootSyntax, CompletionInfo completion,
+ public synchronized void parse(MuSyntax rootSyntax, CompletionInfo completions,
SymbolSource<Token> source, ArgumentBundle bundle, int stepLimit)
throws CommandSyntaxException, SyntaxFailureException {
// FIXME - deal with syntax error messages and completion
@@ -166,7 +166,7 @@
if (DEBUG) {
log.debug("exhausted syntax stack too soon");
}
- } else if (completion != null && !backtrackStack.isEmpty()) {
+ } else if (completions != null && !backtrackStack.isEmpty()) {
if (DEBUG) {
log.debug("try alternatives for completion");
}
@@ -193,11 +193,11 @@
String symbol = ((MuSymbol) syntax).getSymbol();
token = source.hasNext() ? source.next() : null;
- if (completion == null || source.hasNext()) {
+ if (completions == null || source.hasNext()) {
backtrack = token == null || !token.text.equals(symbol);
} else {
if (token == null) {
- completion.addCompletion(symbol);
+ completions.addCompletion(symbol);
backtrack = true;
} else if (source.whitespaceAfterLast()) {
if (!token.text.equals(symbol)) {
@@ -205,8 +205,8 @@
}
} else {
if (symbol.startsWith(token.text)) {
- completion.addCompletion(symbol);
- completion.setCompletionStart(token.start);
+ completions.addCompletion(symbol);
+ completions.setCompletionStart(token.start);
}
backtrack = true;
}
@@ -220,7 +220,7 @@
try {
if (source.hasNext()) {
token = source.next();
- if (completion == null || source.hasNext() || source.whitespaceAfterLast()) {
+ if (completions == null || source.hasNext() || source.whitespaceAfterLast()) {
arg.accept(token, flags);
if (!backtrackStack.isEmpty()) {
backtrackStack.getFirst().argsModified.add(arg);
@@ -229,13 +229,13 @@
}
}
} else {
- arg.complete(completion, token.text, flags);
- completion.setCompletionStart(token.start);
+ arg.complete(completions, token.text, flags);
+ completions.setCompletionStart(token.start);
backtrack = true;
}
} else {
- if (completion != null) {
- arg.complete(completion, "", flags);
+ if (completions != null) {
+ arg.complete(completions, "", flags);
}
backtrack = true;
}
@@ -353,7 +353,7 @@
}
// If we are still backtracking and we are out of choices ...
if (backtrack) {
- if (completion == null) {
+ if (completions == null) {
throw new CommandSyntaxException("ran out of alternatives", argFailures);
} else {
if (DEBUG) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/PluginArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -40,7 +40,7 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
try {
// get the plugin manager
final PluginManager piMgr = InitialNaming.lookup(PluginManager.NAME);
@@ -49,7 +49,7 @@
for (PluginDescriptor descr : piMgr.getRegistry()) {
final String id = descr.getId();
if (id.startsWith(partial)) {
- completion.addCompletion(id);
+ completions.addCompletion(id);
}
}
} catch (NameNotFoundException ex) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/PropertyNameArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/PropertyNameArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/PropertyNameArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -55,12 +55,12 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
Properties ps = AccessController.doPrivileged(new GetPropertiesAction());
for (Object key : ps.keySet()) {
String name = (String) key;
if (name.startsWith(partial)) {
- completion.addCompletion(name);
+ completions.addCompletion(name);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/ShellPropertyNameArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/ShellPropertyNameArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/ShellPropertyNameArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -53,12 +53,12 @@
}
@Override
- public void doComplete(CompletionInfo completion, String partial, int flags) {
+ public void doComplete(CompletionInfo completions, String partial, int flags) {
try {
for (Object key : ShellUtils.getCurrentShell().getProperties().keySet()) {
String name = (String) key;
if (name.startsWith(partial)) {
- completion.addCompletion(name);
+ completions.addCompletion(name);
}
}
} catch (NameNotFoundException ex) {
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/ThreadNameArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/ThreadNameArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/ThreadNameArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -51,7 +51,7 @@
* Complete the 'partial' against the names of all existing Thread objects
* by traversing the ThreadGroup / Thread hierarchy from its root.
*/
- public void doComplete(final CompletionInfo completion, final String partial, final int flags) {
+ public void doComplete(final CompletionInfo completions, final String partial, final int flags) {
ThreadGroup grp = Thread.currentThread().getThreadGroup();
while (grp.getParent() != null) {
grp = grp.getParent();
@@ -60,21 +60,21 @@
final ThreadGroup grp_f = grp;
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
- findList(grp_f, partial, completion);
+ findList(grp_f, partial, completions);
return null;
}
});
}
- private void findList(ThreadGroup grp, String partial, CompletionInfo completion) {
+ private void findList(ThreadGroup grp, String partial, CompletionInfo completions) {
final Thread[] ts = new Thread[grp.activeCount()];
grp.enumerate(ts);
for (Thread t : ts) {
if (t != null) {
final String name = t.getName();
if (name.startsWith(partial)) {
- completion.addCompletion(name);
+ completions.addCompletion(name);
}
}
}
@@ -82,7 +82,7 @@
grp.enumerate(gs);
for (ThreadGroup g : gs) {
if (g != null) {
- findList(g, partial, completion);
+ findList(g, partial, completions);
}
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/syntax/URLArgument.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/syntax/URLArgument.java 2009-06-08 09:43:59 UTC (rev 5561)
+++ trunk/shell/src/shell/org/jnode/shell/syntax/URLArgument.java 2009-06-08 10:07:38 UTC (rev 5562)
@@ -62,7 +62,7 @@
}
@Override
- public void doComplete(final CompletionInfo completion, final String partial, final int flags) {
+ public void doComplete(final CompletionInfo completions, final String partial, final int flags) {
try {
// If 'partial' is a well-formed "file:" URL with no host, port,
// user or query, do completion on the path component.
@@ -78,7 +78,7 @@
for (String c : myCompletion.getCompletions()) {
// (Kludge - the 'true' argument prevents an extra space
// character from being appended to the completions.)
- completion.addCompletion("file:" + c, true);
+ completions.addCompletion("file:" + c, true);
}
}
} catch (MalformedURLException ex) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|