|
From: indian s. <coo...@gm...> - 2008-02-05 09:03:01
|
hi
Well, now the issue is something else (probably more java specific rather
than jEdit specific but thought may its better to ask here once.
When I am running the project (textArea) using eclipse it is working fine
with proper syntax highlighting etc. but when I build the textArea jar and
trying to run that then though the textArea runs but there is no syntax
highlighting etc. while startup these are the logs. While searching found
out that this might be some 1.6 specific bug & has been resolved but again
not working for me.
This is the problem when I do ModeProvider.loadmode(mode) - if I dont do it
there is no error but then textArea shows no hinghlighting etc.
2:20:35 PM [error] ModeProvider: java.io.IOException: Stream closed
2:20:35 PM [error] ModeProvider: at java.io.BufferedInputStream.getInIfOpen
(Unk
nown Source)
2:20:35 PM [error] ModeProvider: at java.io.BufferedInputStream.fill(Unknown
So
urce)
2:20:35 PM [error] ModeProvider: at java.io.BufferedInputStream.read(Unknown
So
urce)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
EntityManager$RewindableInputStream.read(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
EntityManager.setupCurrentEntity(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
EntityManager.startEntity(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
EntityManager.startDTDEntity(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DTDScannerImpl.setInputSource(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DocumentScannerImpl$DTDDriver.next(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DocumentScannerImpl$PrologDriver.next(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DocumentScannerImpl.next(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
NSDocumentScannerImpl.next(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.impl.XML
DocumentFragmentScannerImpl.scanDocument(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.parsers.
XML11Configuration.parse(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.parsers.
XML11Configuration.parse(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.parsers.
XMLParser.parse(Unknown Source)
2:20:35 PM [error] ModeProvider: at
com.sun.org.apache.xerces.internal.parsers.
AbstractSAXParser.parse(Unknown Source)
2:20:35 PM [error] ModeProvider: at
org.gjt.sp.jedit.syntax.ModeProvider.loadMo
de(ModeProvider.java:163)
2:20:35 PM [error] ModeProvider: at
org.gjt.sp.jedit.syntax.ModeProvider.loadMo
de(ModeProvider.java:206)
2:20:35 PM [error] ModeProvider: at org.gjt.sp.jedit.textarea.TextArea
.<init>(T
extArea.java:164)
2:20:35 PM [error] ModeProvider: at org.gjt.sp.jedit.textarea.TextArea
.<init>(T
extArea.java:71)
2:20:35 PM [error] ModeProvider: at org.gjt.sp.jedit.textarea.TextArea.main
(Tex
tArea.java:6189)
On Feb 4, 2008 10:37 AM, indian scorpio <coo...@gm...> wrote:
>
> hi dude..
>
> now its fine.. Actually problem was that in textArea.java buffer.setMode()
> was not being done. So once I debugged the original code I figured that
> thing and now every thing seems to work fine
> Also another issue was in the build target where IOUtilities.class was not
> being included in the build
>
> thnx
>
>
> On Feb 1, 2008 11:06 PM, Matthieu Casanova <cho...@gm...> wrote:
>
> > Hi, sorry I was on holiday this week. So what's the status ?
> > What is good and what is wrong ?
> > Can I do something ?
> >
> > Matthieu
> >
> > On Jan 29, 2008 6:20 AM, indian scorpio <coo...@gm...>
> > wrote:
> > > Hi Matthieu
> > >
> > > I am sorry for constantly bugging you for my work but it seems I am
> > not able
> > > to make this highlighting thing work.. no matter what.
> > >
> > > I shall be greatly thankful if you can help me out in this thing. I
> > have
> > > some urgent need because of which I had to mail you as you might be
> > having
> > > some idea about what to do.
> > >
> > > Recently I am seeing if tokenhandler etc needs to be implemented but
> > nothing
> > > seems to work for me somehow...!!!
> > >
> > > thanks
> > >
> > >
> > >
> > >
> > > On Jan 25, 2008 6:14 PM, indian scorpio <coo...@gm...>
> > wrote:
> > >
> > > > 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
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
>
>
|