You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/09/28 16:33:00 UTC
svn commit: r699825 -
/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Author: jdillon
Date: Sun Sep 28 07:32:59 2008
New Revision: 699825
URL: http://svn.apache.org/viewvc?rev=699825&view=rev
Log:
Make init() public, eh, why not
Added a bunch of TODOs
Modified:
geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
Modified: geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java?rev=699825&r1=699824&r2=699825&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java (original)
+++ geronimo/gshell/trunk/gshell-wisdom/gshell-wisdom-core/src/main/java/org/apache/geronimo/gshell/wisdom/shell/ShellImpl.java Sun Sep 28 07:32:59 2008
@@ -103,9 +103,8 @@
return true;
}
- @SuppressWarnings({"UnusedDeclaration"})
@PostConstruct
- private void init() {
+ public void init() {
eventManager.addListener(new EventListener() {
public void onEvent(Event event) throws Exception {
assert event != null;
@@ -123,12 +122,22 @@
}
public Variables getVariables() {
+ //
+ // TODO: Each shell should really have its own variables, using the apps vars as its parents
+ // but before we do that we need to implement a general ShellContextHolder to allow
+ // detached components access in the threads context.
+ //
+
return application.getVariables();
}
};
branding = application.getModel().getBranding();
+ //
+ // TODO: Populate variables with some defaults, like the username/hostname/etc.
+ //
+
loadProfileScripts();
}
}
@@ -248,6 +257,13 @@
return new Prompter() {
Renderer renderer = new Renderer();
+ //
+ // TODO: Need to create a PatternPrompter, which can use interpolation of a variable to render the prompt
+ // so the following variable value would set the same prompt as we are hardcoding here:
+ //
+ // set gshell.prompt="@|bold ${application.username}|@${application.localHost.hostName}:@|bold ${application.branding.name}|> "
+ //
+
public String prompt() {
assert applicationManager != null;
Application app = applicationManager.getApplication();