|
From: indian s. <coo...@gm...> - 2008-01-25 07:57:42
|
Hi
thanks .. again..!!!
This is what I did now but got an error:
1)
- Included mode/** in jar -
<include name="modes/**"/>
- Mode mode = new Mode("java");
ModeProvider modeProvider = ModeProvider.instance;
modeProvider.loadMode(mode);
- error being
Exception in thread "main" java.lang.NoClassDefFoundError:
org/gjt/sp/jedit/jEdit
at org.gjt.sp.jedit.syntax.ModeProvider.loadMode(ModeProvider.java:139)
at org.gjt.sp.jedit.syntax.ModeProvider.loadMode(ModeProvider.java:206)
Here problem seems to be that modeprovider is not able to see the catalof
file and/ or the modes...!!! What else can be done...???
2) Second possible way which seems possible is defining a mode and then
adding it to mode provider.
Mode mode = new Mode("myjava");
mode.setProperty("KEYWORD", arg1)
mode.init();
ModeProvider modeProvider = ModeProvider.instance;
modeProvider.addMode(mode);
I ain't sure even if the code itself is correct
I am not able to check this as of now, but I prefer the other (first) way as
everything can be defined in xml
Is the way I am doing things correct. I found no way of using modeprovider
or mode in text-area so just want to confirm if I ain't required to set Mode
specifically for the textarea and by doing what i did above(!!) things might
work fine.
Thanks
On Jan 24, 2008 7:02 PM, Matthieu Casanova <cho...@gm...> wrote:
> On Jan 24, 2008 1:10 PM, indian scorpio <coo...@gm...> wrote:
> > Hi
> > Thanks...!!!
> > After building as you said.. I have a few doubts (as of now :))
> > - when running the jar, the text area doesn't has any highlighting etc.
> Does
> > it mean all this highlighting, indentation etc stuff needs to be
> implemented
> > when this textArea is used in the application
>
> The edit modes aren't bundled with that jar, in fact maybe we should.
> You have to provide a Mode to your textarea, I think they can be
> loaded using the ModeProvider class.
>
> Matthieu
>
|