|
From: indian s. <coo...@gm...> - 2008-01-25 12:44:39
|
Finally I could make something work without any errors
Changed the textArea.java - TextArea(boolean) constructor by addidng this
line -
mode.setProperty("file", "C:/Documents and
Settings/shlahoti/Desktop/jedit4.3pre12source-bakup/jEdit/modes/java.xml");
After this though there still wasn't any highlighting.
I am now totally clueless about what else can be done...!!!
I believe I am not able to figure how to define a mode for a textArea coz I
feel that this statement
ModeProvider.instance.addMode(mode);
is not enough...
I hope once a mode is associated with textArea it should work fine. As I
said earlier if I do modeprovider.loadMode it throws a stream closed
exception. Shall be thankful for any words of advice on this.
Thanks
On Jan 25, 2008 4:01 PM, indian scorpio <coo...@gm...> wrote:
> 1 more issue I think is this
> ModeProvider.java:183: IOUtilities.closeQuietly(grammar);
> but in build-textArea target you aint including IOUtilities.class
>
> (my stram close problem still remains)
>
>
> On Jan 25, 2008 3:41 PM, indian scorpio <coo...@gm...> wrote:
>
> > Just to be more clear - I am doing this
> > mode.setProperty("file", "<location of some xml file say java.xml>");
> > & later modeProvider.instance.loadmode(mode);
> >
> >
> > On Jan 25, 2008 3:39 PM, indian scorpio <coo...@gm...>
> > wrote:
> >
> > > i m getting IOException: Stream Closed
> > > [error] ModeProvider: at
> > > org.gjt.sp.jedit.syntax.ModeProvider.loadMode(ModeProvider.java:162)
> > > [error] ModeProvider: at
> > > org.gjt.sp.jedit.syntax.ModeProvider.loadMode(ModeProvider.java:205)
> > >
> > > 162: parser.parse(isrc);
> > >
> > > issue probably is parse cannot be resolved
> > >
> > > So sorry for paining you... but... hope you understand :)
> > >
> > > tia
> > >
> > >
> > >
> > > On Jan 25, 2008 3:07 PM, indian scorpio <coo...@gm...>
> > > wrote:
> > >
> > > > thnx dude.. will chk & get back :)
> > > >
> > > >
> > > > On Jan 25, 2008 3:04 PM, Matthieu Casanova <cho...@gm...>
> > > > wrote:
> > > >
> > > > > Hi, you're right, I forgot to remove this dependency on jEdit in
> > > > > ModeProvider.
> > > > > This is done now in SVN
> > > > >
> > > > > Matthieu
> > > > >
> > > > > On Jan 25, 2008 10:26 AM, indian scorpio <coo...@gm...>
> > > > > wrote:
> > > > > > Some other observations -
> > > > > >
> > > > > > 1) modeProvider.load(mode) is resulting in an exception here
> > > > > > Log.log(Log.NOTICE,jEdit.class,"Loading edit mode " +
> > > > > fileName);
> > > > > >
> > > > > > 139: while debugging - jedit cannot be resolved is the message
> > > > > and
> > > > > >
> > > > > > Exception in thread "main" java.lang.NoClassDefFoundError:
> > > > > > org/gjt/sp/jedit/jEdit
> > > > > > at org.gjt.sp.jedit.syntax.ModeProvider.loadMode(
> > > > > ModeProvider.java:139)
> > > > > >
> > > > > > 2) I tried modifying mode("text") (as in textArea constructor)
> > > > > using this
> > > > > > mode.setProperty("indentOpenBrackets", "/*");
> > > > > > mode.setProperty("indentCloseBrackets", "*/");
> > > > > > but in this case also no indentation as such in the textarea.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Jan 25, 2008 1:27 PM, indian scorpio <
> > > > > coo...@gm...> wrote:
> > > > > > > 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
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > >
> >
>
|