This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 69163 - ClassCastException is thrown when user click on Java, XML, ... button
Summary: ClassCastException is thrown when user click on Java, XML, ... button
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 5.x
Hardware: PC All
: P1 blocker (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
: 69375 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-11-23 10:31 UTC by Petr Blaha
Modified: 2007-11-05 13:44 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stack trace (2.75 KB, text/plain)
2005-11-23 10:32 UTC, Petr Blaha
Details
Better stack trace - first exception. (3.38 KB, text/plain)
2005-11-23 11:00 UTC, Petr Nejedly
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Blaha 2005-11-23 10:31:20 UTC
NetBeans [build 20051122]
Colab module installed from Development Update Center
Steps to reproduce:
1) join a conversation
2) click Java icon (Alt-F3) or HTML, XML icon
ERROR: get ClassCastException and user should restart IDE
Comment 1 Petr Blaha 2005-11-23 10:32:34 UTC
Created attachment 27183 [details]
stack trace
Comment 2 Petr Nejedly 2005-11-23 11:00:13 UTC
Created attachment 27188 [details]
Better stack trace - first exception.
Comment 3 Petr Nejedly 2005-11-23 12:59:56 UTC
This used to work. Some recent change in editor have to cause this.
Collab keeps a JEditorPane and calls setContentType on it from time to time,
which should be legal, I think.

In this particular case, there is JEditorPane set to edit mime "text" (bound to
simple swing's DefaultEditorKit subclass), and then the mime is switched to
"text/html" (bound to editor's kit).
Comment 4 Miloslav Metelka 2005-11-24 12:41:28 UTC
The change that caused this was issue 61103 but it's desirable as it prevents
repainting problems in the editor. I'll fix it in the view hierarchy.
Comment 5 Miloslav Metelka 2005-11-24 13:29:32 UTC
Fixed in trunk:
Checking in libsrc/org/netbeans/editor/DrawEngineLineView.java;
/cvs/editor/libsrc/org/netbeans/editor/DrawEngineLineView.java,v  <-- 
DrawEngineLineView.java
new revision: 1.16; previous revision: 1.15
Comment 6 Petr Nejedly 2005-11-28 09:05:27 UTC
*** Issue 69375 has been marked as a duplicate of this issue. ***
Comment 7 Petr Nejedly 2005-11-28 12:18:39 UTC
I verified the fix, it works OK now.