Closed GoogleCodeExporter closed 8 years ago
I do not have the source with me right now, but i tested with the 0.9.4 binary
download, pasted the attached file, and it worked fine. Did you build your
copy?
From what version?
Original comment by ayman.al...@gmail.com
on 29 Jan 2009 at 5:29
No, I'm using the official version.
I set the text inside of a SwingWorker. Maybe a timing effect.
I will use the sources instead of the binary to make further investigations
Original comment by oliver.b...@gmail.com
on 30 Jan 2009 at 9:20
I have done some tests.
And I can reproduce the error in the attached test application. Just start the
Test.class with the binary distribution and click on the button.
The application will freez.
Original comment by oliver.b...@gmail.com
on 30 Jan 2009 at 10:42
Attachments:
I will not be able to test for the next few days. In your main method, can you
enclose the new "Test().setVisible(true);" call inside of invokeLater, just
like the
SyntaxTester. I had another issue, and this sorted it out.
Original comment by ayman.al...@gmail.com
on 30 Jan 2009 at 2:26
Hi, I changed the main method to show the JFrame in the invokeLater without any
success.
I also tried to use a different content type without any success.
Original comment by oliver.b...@gmail.com
on 2 Feb 2009 at 2:00
I have another concern. the setText method on a pane should not be used. It
actually breaks down the String, and causes the the Document to reparse
repeatedly,
and partially. These partial parses may be why it did hang. A better
alternative is
to use the pane's read method. This creates a new document and is much faster.
Original comment by ayman.al...@gmail.com
on 3 Feb 2009 at 8:56
I replaced the setString as follows:
// String text = readFromFile("AxisTest.wsdl");
pane.read(new FileReader("AxisTest.wsdl"), null);
That sorted it out. It's probably a Swing EDT issue.
Original comment by ayman.al...@gmail.com
on 3 Feb 2009 at 9:25
The above test caused incorrect line numbers to be displayed this will be
firxed with
next release.
Original comment by ayman.al...@gmail.com
on 3 Feb 2009 at 9:43
Thank you for the solution.
I have changed the setTest to the read method. Even if it is a little bit
strange
because I don't read the content out of a stream. So I use a StringReader to
make
this possible.
Will the setText method generally not be available? Or is this just a behaviour
of
the actual version?
Original comment by oliver.b...@gmail.com
on 3 Feb 2009 at 10:19
setText will still be available as I do not change anything in the JEditorPane
itself. The preferred method is using a read to read from a file or to set the
text
to a large string, or from a file.
setText should work. It does in the SyntaxTester.
There is a bug in your code that has to do with threads and EDT that is,
unfortunately, beyond me for now.
Original comment by ayman.al...@gmail.com
on 3 Feb 2009 at 11:48
Original issue reported on code.google.com by
oliver.b...@gmail.com
on 29 Jan 2009 at 3:18Attachments: