Author: koen.aers(a)jboss.com
Date: 2011-10-20 03:13:34 -0400 (Thu, 20 Oct 2011)
New Revision: 35832
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java
Log:
cleanup
Modified:
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java
===================================================================
---
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java 2011-10-20
02:22:26 UTC (rev 35831)
+++
trunk/forge/plugins/org.jboss.tools.forge.runtime.ext/src/org/jboss/tools/forge/runtime/ext/MetaCommandAction.java 2011-10-20
07:13:34 UTC (rev 35832)
@@ -44,17 +44,9 @@
private void handleHiddenCommand(String text) {
try {
-// FileWriter fileWriter = new
FileWriter("/Users/koen/Temp/handleHiddenCommand.txt", true);
-// BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
-// bufferedWriter.write("handleHiddenCommand(" + text + ")\n");
if ("plugin-candidates-query".equals(text)) {
-// bufferedWriter.write("query is plugin-candidates-query\n");
shell.print(ESCAPE + "plugin-candidates-answer: " + getPluginCandidates() +
ESCAPE);
-// bufferedWriter.write("response sent back to tools\n");
}
-// bufferedWriter.write("about to exit handleHiddenCommand\n");
-// bufferedWriter.flush();
-// fileWriter.close();
} catch (Exception e) {
// ignored
}
@@ -62,35 +54,21 @@
private String getPluginCandidates() {
try {
-// FileWriter fileWriter = new
FileWriter("/Users/koen/Temp/getPluginCandidates.txt", true);
-// BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
-// bufferedWriter.write("getPluginCandidates()\n");
StringBuffer resultBuffer = new StringBuffer();
Map<String, List<PluginMetadata>> plugins = registry.getPlugins();
-// bufferedWriter.write("got the plugins\n");
for (Entry<String, List<PluginMetadata>> entry : plugins.entrySet()) {
-// bufferedWriter.write("processing entry : " + entry.getKey() +
"\n");
for (PluginMetadata pluginMeta : entry.getValue()) {
-// bufferedWriter.write("processing pluginMeta : " +
pluginMeta.getName());
if (pluginMeta.constrantsSatisfied(shell)) {
-// bufferedWriter.write("pluginMeta : " + pluginMeta.getName() + "
satisfies constraints\n");
List<CommandMetadata> commands = pluginMeta.getAllCommands();
-// bufferedWriter.write("got the commands\n");
if (!commands.isEmpty()) {
-// bufferedWriter.write("commands is not empty\n");
resultBuffer.append("p:").append(pluginMeta.getName()).append('
');
-// bufferedWriter.write("result becomes : " + resultBuffer.toString() +
"\n");
for (CommandMetadata commandMeta : commands) {
-// bufferedWriter.write("processing command : " + commandMeta.getName()
+ "\n");
resultBuffer.append("c:").append(commandMeta.getName()).append('
');
-// bufferedWriter.write("result becomes : " + resultBuffer.toString() +
"\n");
}
}
}
}
}
-// bufferedWriter.write("about to return result : " + resultBuffer.toString()
+ "\n");
-// bufferedWriter.flush();
return resultBuffer.toString();
} catch (Exception e) {
return null;
Show replies by date