You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Jon Brisbin <jo...@gmail.com> on 2008/12/17 23:37:00 UTC
I implemented a JLine-based TUI for Felix
Sorry for the x-post between dev and users...
I don't like the default text UIs for Felix or Equinox, so I decided
to write my own, based on JLine. I made it Felix-specific for the time
being, since I'm checking for specific commands. But I'm thinking in
the next incarnation, I'll make it OSGi-generic.
Besides file-based (~/.felix_history) history support, there is also
tab completion for Felix commands. I have to say: it is *so* nice to
have tab completion and history support in stock Felix. Right now, I'm
working on tab completion for the install command (so it will prompt
you for files as you're typing your "file:/" url!) and support for
searching for implemented interfaces (so you can have tab completion
when typing in filters).
I would love to share this with the community and possibly get it
included in the main distro (JLine is included as an embedded
dependency and the code is very small and light-weight). I was ready
to use ServiceMix just for the GShell integration, but then I looked
at how much RAM gshell takes up (I plan on deploying my OSGi app onto
a memory-limited Ubuntu slice) and the dependencies and decided that
plain JLine was the way to go.
Is there any interest in this text ui for plain-jane, stock Felix?
Thanks!
Jon Brisibn
http://jbrisbin.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by João Assunção <jo...@joaoassuncao.com>.
I also vote in 1)
On Thu, Dec 18, 2008 at 3:35 PM, Stuart McCulloch <mc...@gmail.com> wrote:
> 2008/12/18 Richard S. Hall <he...@ungoverned.org>
>
>> Stuart McCulloch wrote:
>>
>>> 2008/12/18 Jon Brisbin <jo...@gmail.com>
>>>
>>>
>>>> On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
>>>>
>>>> I guess the question is, do people think it would be worth it?
>>>> I'm deploying in a server environment, so this was written with a
>>>> ServiceMix-like environment in mind. I can confirm that, for me, it is
>>>> hugely beneficial and time-saving. I can use all the keyboard shortcuts
>>>> I'm
>>>> used to (CTL-A/E/D/K) and the history support across restarts is
>>>> extremely
>>>> helpful.
>>>>
>>>
>>> sounds good to me, I think we should offer a JLine version of the shell as
>>> it does make the user experience a lot better
>>>
>>> perhaps we could adapt the simple shell to check for some sort of JLine
>>> extension bundle at startup, and then fall back to the current behaviour
>>> if
>>> no extension is found?
>>>
>>
>> Yes, that would be another approach. Is it feasible? Also, does it even
>> make sense given the braindead simpleness of shell.tui?
>>
>> It seems there are three options:
>>
>> 1. Merge with shell.tui and implement some sort of fallback for
>> platforms where JLine doesn't work.
>> 2. Create a separate shell.jline bundle.
>> 3. Modify shell.tui to be extensible in some way and create a
>> shell.jline bundle using this extension mechanism.
>>
>> Any opinions on which approach might make the most sense?
>>
>> If we followed (1), it would become the new default shell UI for Felix by
>> definition. If we follow (2) or (3), then we'd still need to decide if is
>> should be the default shell UI.
>>
>
> true, and 1) also means you only have one bundle to deal with - I think it
> makes sense as long as no-one objects to the extra Kb
>
> so +1 from me for adding JLine support to the current TUI shell
>
> Part of me leans toward (1) since we already have enough subprojects that
>> releasing them all is becoming time consuming. Further, I would guess that
>> really small devices are typically not going to want a textual UI. Also, it
>> is just nice not to have to mess with having to choose which bundles to
>> deploy. However, I also see the benefits of not merging. So, it is somewhat
>> of a toss up.
>>
>> -> richard
>>
>> FWIW I was really ready to go to ServiceMix kernel for the shell. I liked
>>>
>>>
>>>> the way the app deployed in stock Felix better (much less memory use),
>>>> but
>>>> the development cycle I've found my self in--NetBeans/Maven...compile,
>>>> then
>>>> do an update 42--makes working with a readline-like shell a lot more
>>>> productive. I'm back and forth between NB and the shell a lot. Using
>>>> stock
>>>> Felix, there's no auto-reload like using some other fancy-pants server
>>>> environments like dm Server or ServiceMix. :)
>>>>
>>>>
>>>>
>>>
>>> if you install the FileInstall bundle (
>>> http://felix.apache.org/site/apache-felix-file-install.html) you can get
>>> basic auto-updates :)
>>>
>>> I don't know what the implications are for non-server, non-desktop
>>>
>>>
>>>> applications, but it's interesting that someone else was thinking along
>>>> the
>>>> same lines I was (great minds and all, right? ;).
>>>>
>>>>
>>>>
>>>>> Of course, there is also another possibility, which is to not to merge
>>>>> it,
>>>>> but create a separate shell UI bundle.
>>>>>
>>>>>
>>>>>
>>>> This would be the best solution, IMHO. This would give the developer a
>>>> choice of the more portable basic UI or a more developer-friendly one.
>>>> I'm
>>>> probably going to turn the shell off entirely in production, so which
>>>> bundle
>>>> the shell is in doesn't really matter much (whether the existing TUI one
>>>> or
>>>> a new JLINEUI one). I was mainly interested in development-time
>>>> productivity.
>>>>
>>>> Thanks!
>>>>
>>>> Jon Brisibn
>>>> http://jbrisbin.com
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> Cheers, Stuart
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by Stuart McCulloch <mc...@gmail.com>.
2008/12/18 Richard S. Hall <he...@ungoverned.org>
> Stuart McCulloch wrote:
>
>> 2008/12/18 Jon Brisbin <jo...@gmail.com>
>>
>>
>>> On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
>>>
>>> I guess the question is, do people think it would be worth it?
>>> I'm deploying in a server environment, so this was written with a
>>> ServiceMix-like environment in mind. I can confirm that, for me, it is
>>> hugely beneficial and time-saving. I can use all the keyboard shortcuts
>>> I'm
>>> used to (CTL-A/E/D/K) and the history support across restarts is
>>> extremely
>>> helpful.
>>>
>>
>> sounds good to me, I think we should offer a JLine version of the shell as
>> it does make the user experience a lot better
>>
>> perhaps we could adapt the simple shell to check for some sort of JLine
>> extension bundle at startup, and then fall back to the current behaviour
>> if
>> no extension is found?
>>
>
> Yes, that would be another approach. Is it feasible? Also, does it even
> make sense given the braindead simpleness of shell.tui?
>
> It seems there are three options:
>
> 1. Merge with shell.tui and implement some sort of fallback for
> platforms where JLine doesn't work.
> 2. Create a separate shell.jline bundle.
> 3. Modify shell.tui to be extensible in some way and create a
> shell.jline bundle using this extension mechanism.
>
> Any opinions on which approach might make the most sense?
>
> If we followed (1), it would become the new default shell UI for Felix by
> definition. If we follow (2) or (3), then we'd still need to decide if is
> should be the default shell UI.
>
true, and 1) also means you only have one bundle to deal with - I think it
makes sense as long as no-one objects to the extra Kb
so +1 from me for adding JLine support to the current TUI shell
Part of me leans toward (1) since we already have enough subprojects that
> releasing them all is becoming time consuming. Further, I would guess that
> really small devices are typically not going to want a textual UI. Also, it
> is just nice not to have to mess with having to choose which bundles to
> deploy. However, I also see the benefits of not merging. So, it is somewhat
> of a toss up.
>
> -> richard
>
> FWIW I was really ready to go to ServiceMix kernel for the shell. I liked
>>
>>
>>> the way the app deployed in stock Felix better (much less memory use),
>>> but
>>> the development cycle I've found my self in--NetBeans/Maven...compile,
>>> then
>>> do an update 42--makes working with a readline-like shell a lot more
>>> productive. I'm back and forth between NB and the shell a lot. Using
>>> stock
>>> Felix, there's no auto-reload like using some other fancy-pants server
>>> environments like dm Server or ServiceMix. :)
>>>
>>>
>>>
>>
>> if you install the FileInstall bundle (
>> http://felix.apache.org/site/apache-felix-file-install.html) you can get
>> basic auto-updates :)
>>
>> I don't know what the implications are for non-server, non-desktop
>>
>>
>>> applications, but it's interesting that someone else was thinking along
>>> the
>>> same lines I was (great minds and all, right? ;).
>>>
>>>
>>>
>>>> Of course, there is also another possibility, which is to not to merge
>>>> it,
>>>> but create a separate shell UI bundle.
>>>>
>>>>
>>>>
>>> This would be the best solution, IMHO. This would give the developer a
>>> choice of the more portable basic UI or a more developer-friendly one.
>>> I'm
>>> probably going to turn the shell off entirely in production, so which
>>> bundle
>>> the shell is in doesn't really matter much (whether the existing TUI one
>>> or
>>> a new JLINEUI one). I was mainly interested in development-time
>>> productivity.
>>>
>>> Thanks!
>>>
>>> Jon Brisibn
>>> http://jbrisbin.com
>>>
>>>
>>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Cheers, Stuart
Re: I implemented a JLine-based TUI for Felix
Posted by Jon Brisbin <jo...@gmail.com>.
On Dec 18, 2008, at 9:46 AM, Karl Pauls wrote:
> We need to make sure it works under windows. I did integrate jline a
> couple of times but it never really worked under windows. Other then
> that, I would be happy with any usability improvement to the current
> shell :-)
I fired up a Windows XP virtual machine and tested it in a command
shell in a freshly-unzipped download of Felix 1.4.0. It seems to work
as expected. Completion, history, and input/output all seem to work
fine.
Thanks!
Jon Brisibn
http://jbrisbin.com
Re: I implemented a JLine-based TUI for Felix
Posted by Karl Pauls <ka...@gmail.com>.
We need to make sure it works under windows. I did integrate jline a
couple of times but it never really worked under windows. Other then
that, I would be happy with any usability improvement to the current
shell :-)
regards,
Karl
On Thu, Dec 18, 2008 at 4:11 PM, Richard S. Hall <he...@ungoverned.org> wrote:
> Stuart McCulloch wrote:
>>
>> 2008/12/18 Jon Brisbin <jo...@gmail.com>
>>
>>
>>>
>>> On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
>>>
>>> I guess the question is, do people think it would be worth it?
>>> I'm deploying in a server environment, so this was written with a
>>> ServiceMix-like environment in mind. I can confirm that, for me, it is
>>> hugely beneficial and time-saving. I can use all the keyboard shortcuts
>>> I'm
>>> used to (CTL-A/E/D/K) and the history support across restarts is
>>> extremely
>>> helpful.
>>>
>>
>>
>> sounds good to me, I think we should offer a JLine version of the shell as
>> it does make the user experience a lot better
>>
>> perhaps we could adapt the simple shell to check for some sort of JLine
>> extension bundle at startup, and then fall back to the current behaviour
>> if
>> no extension is found?
>>
>
> Yes, that would be another approach. Is it feasible? Also, does it even make
> sense given the braindead simpleness of shell.tui?
>
> It seems there are three options:
>
> 1. Merge with shell.tui and implement some sort of fallback for
> platforms where JLine doesn't work.
> 2. Create a separate shell.jline bundle.
> 3. Modify shell.tui to be extensible in some way and create a
> shell.jline bundle using this extension mechanism.
>
> Any opinions on which approach might make the most sense?
>
> If we followed (1), it would become the new default shell UI for Felix by
> definition. If we follow (2) or (3), then we'd still need to decide if is
> should be the default shell UI.
>
> Part of me leans toward (1) since we already have enough subprojects that
> releasing them all is becoming time consuming. Further, I would guess that
> really small devices are typically not going to want a textual UI. Also, it
> is just nice not to have to mess with having to choose which bundles to
> deploy. However, I also see the benefits of not merging. So, it is somewhat
> of a toss up.
>
> -> richard
>
>> FWIW I was really ready to go to ServiceMix kernel for the shell. I liked
>>
>>>
>>> the way the app deployed in stock Felix better (much less memory use),
>>> but
>>> the development cycle I've found my self in--NetBeans/Maven...compile,
>>> then
>>> do an update 42--makes working with a readline-like shell a lot more
>>> productive. I'm back and forth between NB and the shell a lot. Using
>>> stock
>>> Felix, there's no auto-reload like using some other fancy-pants server
>>> environments like dm Server or ServiceMix. :)
>>>
>>>
>>
>> if you install the FileInstall bundle (
>> http://felix.apache.org/site/apache-felix-file-install.html) you can get
>> basic auto-updates :)
>>
>> I don't know what the implications are for non-server, non-desktop
>>
>>>
>>> applications, but it's interesting that someone else was thinking along
>>> the
>>> same lines I was (great minds and all, right? ;).
>>>
>>>
>>>>
>>>> Of course, there is also another possibility, which is to not to merge
>>>> it,
>>>> but create a separate shell UI bundle.
>>>>
>>>>
>>>
>>> This would be the best solution, IMHO. This would give the developer a
>>> choice of the more portable basic UI or a more developer-friendly one.
>>> I'm
>>> probably going to turn the shell off entirely in production, so which
>>> bundle
>>> the shell is in doesn't really matter much (whether the existing TUI one
>>> or
>>> a new JLINEUI one). I was mainly interested in development-time
>>> productivity.
>>>
>>> Thanks!
>>>
>>> Jon Brisibn
>>> http://jbrisbin.com
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Karl Pauls
karlpauls@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Stuart McCulloch wrote:
> 2008/12/18 Jon Brisbin <jo...@gmail.com>
>
>
>> On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
>>
>> I guess the question is, do people think it would be worth it?
>>
>> I'm deploying in a server environment, so this was written with a
>> ServiceMix-like environment in mind. I can confirm that, for me, it is
>> hugely beneficial and time-saving. I can use all the keyboard shortcuts I'm
>> used to (CTL-A/E/D/K) and the history support across restarts is extremely
>> helpful.
>>
>
>
> sounds good to me, I think we should offer a JLine version of the shell as
> it does make the user experience a lot better
>
> perhaps we could adapt the simple shell to check for some sort of JLine
> extension bundle at startup, and then fall back to the current behaviour if
> no extension is found?
>
Yes, that would be another approach. Is it feasible? Also, does it even
make sense given the braindead simpleness of shell.tui?
It seems there are three options:
1. Merge with shell.tui and implement some sort of fallback for
platforms where JLine doesn't work.
2. Create a separate shell.jline bundle.
3. Modify shell.tui to be extensible in some way and create a
shell.jline bundle using this extension mechanism.
Any opinions on which approach might make the most sense?
If we followed (1), it would become the new default shell UI for Felix
by definition. If we follow (2) or (3), then we'd still need to decide
if is should be the default shell UI.
Part of me leans toward (1) since we already have enough subprojects
that releasing them all is becoming time consuming. Further, I would
guess that really small devices are typically not going to want a
textual UI. Also, it is just nice not to have to mess with having to
choose which bundles to deploy. However, I also see the benefits of not
merging. So, it is somewhat of a toss up.
-> richard
> FWIW I was really ready to go to ServiceMix kernel for the shell. I liked
>
>> the way the app deployed in stock Felix better (much less memory use), but
>> the development cycle I've found my self in--NetBeans/Maven...compile, then
>> do an update 42--makes working with a readline-like shell a lot more
>> productive. I'm back and forth between NB and the shell a lot. Using stock
>> Felix, there's no auto-reload like using some other fancy-pants server
>> environments like dm Server or ServiceMix. :)
>>
>>
>
> if you install the FileInstall bundle (
> http://felix.apache.org/site/apache-felix-file-install.html) you can get
> basic auto-updates :)
>
> I don't know what the implications are for non-server, non-desktop
>
>> applications, but it's interesting that someone else was thinking along the
>> same lines I was (great minds and all, right? ;).
>>
>>
>>> Of course, there is also another possibility, which is to not to merge it,
>>> but create a separate shell UI bundle.
>>>
>>>
>> This would be the best solution, IMHO. This would give the developer a
>> choice of the more portable basic UI or a more developer-friendly one. I'm
>> probably going to turn the shell off entirely in production, so which bundle
>> the shell is in doesn't really matter much (whether the existing TUI one or
>> a new JLINEUI one). I was mainly interested in development-time
>> productivity.
>>
>> Thanks!
>>
>> Jon Brisibn
>> http://jbrisbin.com
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by Stuart McCulloch <mc...@gmail.com>.
2008/12/18 Jon Brisbin <jo...@gmail.com>
>
> On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
>
> I guess the question is, do people think it would be worth it?
>>
>
> I'm deploying in a server environment, so this was written with a
> ServiceMix-like environment in mind. I can confirm that, for me, it is
> hugely beneficial and time-saving. I can use all the keyboard shortcuts I'm
> used to (CTL-A/E/D/K) and the history support across restarts is extremely
> helpful.
sounds good to me, I think we should offer a JLine version of the shell as
it does make the user experience a lot better
perhaps we could adapt the simple shell to check for some sort of JLine
extension bundle at startup, and then fall back to the current behaviour if
no extension is found?
FWIW I was really ready to go to ServiceMix kernel for the shell. I liked
> the way the app deployed in stock Felix better (much less memory use), but
> the development cycle I've found my self in--NetBeans/Maven...compile, then
> do an update 42--makes working with a readline-like shell a lot more
> productive. I'm back and forth between NB and the shell a lot. Using stock
> Felix, there's no auto-reload like using some other fancy-pants server
> environments like dm Server or ServiceMix. :)
>
if you install the FileInstall bundle (
http://felix.apache.org/site/apache-felix-file-install.html) you can get
basic auto-updates :)
I don't know what the implications are for non-server, non-desktop
> applications, but it's interesting that someone else was thinking along the
> same lines I was (great minds and all, right? ;).
>
>> Of course, there is also another possibility, which is to not to merge it,
>> but create a separate shell UI bundle.
>>
>
> This would be the best solution, IMHO. This would give the developer a
> choice of the more portable basic UI or a more developer-friendly one. I'm
> probably going to turn the shell off entirely in production, so which bundle
> the shell is in doesn't really matter much (whether the existing TUI one or
> a new JLINEUI one). I was mainly interested in development-time
> productivity.
>
> Thanks!
>
> Jon Brisibn
> http://jbrisbin.com
>
--
Cheers, Stuart
Re: I implemented a JLine-based TUI for Felix
Posted by Jon Brisbin <jo...@gmail.com>.
On Dec 18, 2008, at 8:07 AM, Richard S. Hall wrote:
> I guess the question is, do people think it would be worth it?
I'm deploying in a server environment, so this was written with a
ServiceMix-like environment in mind. I can confirm that, for me, it is
hugely beneficial and time-saving. I can use all the keyboard
shortcuts I'm used to (CTL-A/E/D/K) and the history support across
restarts is extremely helpful. FWIW I was really ready to go to
ServiceMix kernel for the shell. I liked the way the app deployed in
stock Felix better (much less memory use), but the development cycle
I've found my self in--NetBeans/Maven...compile, then do an update 42--
makes working with a readline-like shell a lot more productive. I'm
back and forth between NB and the shell a lot. Using stock Felix,
there's no auto-reload like using some other fancy-pants server
environments like dm Server or ServiceMix. :)
I don't know what the implications are for non-server, non-desktop
applications, but it's interesting that someone else was thinking
along the same lines I was (great minds and all, right? ;).
>
> Of course, there is also another possibility, which is to not to
> merge it, but create a separate shell UI bundle.
This would be the best solution, IMHO. This would give the developer a
choice of the more portable basic UI or a more developer-friendly one.
I'm probably going to turn the shell off entirely in production, so
which bundle the shell is in doesn't really matter much (whether the
existing TUI one or a new JLINEUI one). I was mainly interested in
development-time productivity.
Thanks!
Jon Brisibn
http://jbrisbin.com
Re: I implemented a JLine-based TUI for Felix
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Jon Brisbin wrote:
> I used Java 1.5 generics in places, though those sections could
> probably be back-ported.
Do generic just get compiled out? If so, then the real issue would just
be targeting the bytecode to 1.3. If not, then yes.
> JLine uses stty on POSIX and a native Win method to get unbuffered
> input. I'm guessing using the Bundle-NativeCode manifest header of
> "/jline/jline.dll" will work. I'm a Mac user and don't get within 6
> miles of a PC, so I'm not much help there. :)
Yes, we would have to try to do this. Because the web page says that
JLine tries to dynamically extract the DLL and put it into a temporary
place where it can load it from, but this wouldn't work well under OSGi.
> JLine has an UnsupportedTerminal type, which it returns if it's not
> POSIX or Windows. A simple check for this could default it to a
> System.in read like in the TUI. The command completion relies on
> JLine, though.
If it can fallback to the simple approach for unsupported platforms,
then that would be reasonable.
This doesn't come without cost, though. Currently, shell.tui.jar is
about 12k. If I remember correctly, the JLine JAR is around 80k. So,
this is a substantial increase in size, although small in general by
today's standards on the desktop.
I guess the question is, do people think it would be worth it?
Of course, there is also another possibility, which is to not to merge
it, but create a separate shell UI bundle.
-> richard
>
> I have to say...the completion and history support makes one just flat
> productive. :)
>
> Thanks!
>
> Jon Brisbin
> http://jbrisbin.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by João Assunção <jo...@joaoassuncao.com>.
Hi,
Funny thing. Last night I also changed the TUI code to include JLine support.
It only supports history and command name completion, but it can
handle non standard commands.
It doesn't support argument completion because for that it's required
to parse the command usage,
and it's not guaranteed that everyone follows the same convention.
Anyway, if the user types "file:/" it provides filename completion.
I only tested it in Linux, but I will try it in Windows tonight . It
doesn't work in Eclipse shell :-(
I also want to congratulate the author of the felix shell code since
it was really easy to integrate JLine.
On Thu, Dec 18, 2008 at 2:09 AM, Jon Brisbin <jo...@gmail.com> wrote:
>
> On Dec 17, 2008, at 5:54 PM, Richard S. Hall wrote:
>
>> The JLine web page says it only depends on Java 1.2 and is licensed under
>> BSD. So, both of those sound really good.
>
> I used Java 1.5 generics in places, though those sections could probably be
> back-ported.
>
>> It does say that it requires a native library under Windows, which could
>> be problematic. Did you port this to use OSGi's bundle native library
>> mechanism? It seems like it targets Windows and POSIX platforms, so it
>> probably won't on other platforms.
>
> JLine uses stty on POSIX and a native Win method to get unbuffered input.
> I'm guessing using the Bundle-NativeCode manifest header of
> "/jline/jline.dll" will work. I'm a Mac user and don't get within 6 miles of
> a PC, so I'm not much help there. :)
>
> JLine has an UnsupportedTerminal type, which it returns if it's not POSIX or
> Windows. A simple check for this could default it to a System.in read like
> in the TUI. The command completion relies on JLine, though.
>
> I have to say...the completion and history support makes one just flat
> productive. :)
>
> Thanks!
>
> Jon Brisbin
> http://jbrisbin.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by Jon Brisbin <jo...@gmail.com>.
On Dec 17, 2008, at 5:54 PM, Richard S. Hall wrote:
> The JLine web page says it only depends on Java 1.2 and is licensed
> under BSD. So, both of those sound really good.
I used Java 1.5 generics in places, though those sections could
probably be back-ported.
> It does say that it requires a native library under Windows, which
> could be problematic. Did you port this to use OSGi's bundle native
> library mechanism? It seems like it targets Windows and POSIX
> platforms, so it probably won't on other platforms.
JLine uses stty on POSIX and a native Win method to get unbuffered
input. I'm guessing using the Bundle-NativeCode manifest header of "/
jline/jline.dll" will work. I'm a Mac user and don't get within 6
miles of a PC, so I'm not much help there. :)
JLine has an UnsupportedTerminal type, which it returns if it's not
POSIX or Windows. A simple check for this could default it to a
System.in read like in the TUI. The command completion relies on
JLine, though.
I have to say...the completion and history support makes one just flat
productive. :)
Thanks!
Jon Brisbin
http://jbrisbin.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: I implemented a JLine-based TUI for Felix
Posted by "Richard S. Hall" <he...@ungoverned.org>.
The JLine web page says it only depends on Java 1.2 and is licensed
under BSD. So, both of those sound really good.
It does say that it requires a native library under Windows, which could
be problematic. Did you port this to use OSGi's bundle native library
mechanism? It seems like it targets Windows and POSIX platforms, so it
probably won't on other platforms.
It definitely sounds interesting.
-> richard
Jon Brisbin wrote:
> Sorry for the x-post between dev and users...
>
> I don't like the default text UIs for Felix or Equinox, so I decided
> to write my own, based on JLine. I made it Felix-specific for the time
> being, since I'm checking for specific commands. But I'm thinking in
> the next incarnation, I'll make it OSGi-generic.
>
> Besides file-based (~/.felix_history) history support, there is also
> tab completion for Felix commands. I have to say: it is *so* nice to
> have tab completion and history support in stock Felix. Right now, I'm
> working on tab completion for the install command (so it will prompt
> you for files as you're typing your "file:/" url!) and support for
> searching for implemented interfaces (so you can have tab completion
> when typing in filters).
>
> I would love to share this with the community and possibly get it
> included in the main distro (JLine is included as an embedded
> dependency and the code is very small and light-weight). I was ready
> to use ServiceMix just for the GShell integration, but then I looked
> at how much RAM gshell takes up (I plan on deploying my OSGi app onto
> a memory-limited Ubuntu slice) and the dependencies and decided that
> plain JLine was the way to go.
>
> Is there any interest in this text ui for plain-jane, stock Felix?
>
> Thanks!
>
> Jon Brisibn
> http://jbrisbin.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org