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 111912 - ClassCastException when enable/disable the preview
Summary: ClassCastException when enable/disable the preview
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrey Yamkovoy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-03 15:07 UTC by Alexandr Scherbatiy
Modified: 2007-09-27 11:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2007-08-03 15:07:40 UTC
build: M0
NB: 6.0

Steps to reproduce:
 - Create a JavaFX application
 - Copy the following code to the JavaFX editor
   -----------------------------------------------
            import javafx.ui.*;

            Frame {
              title : "Frame"
              width: 100
              height: 100
              content: Label { text : "Hello World!" }
              visible: true

            }
   -----------------------------------------------
  - Disable the preview
  - Run the application
  - Enable/disable the preview some times
    The exceptions pops up:
java.lang.ClassCastException: org.netbeans.core.output2.OutputDocument cannot  be cast to
org.netbeans.modules.editor.javafx.FXDocument
    at org.netbeans.modules.editor.javafx.FXKit$ToggleFXPreviewExecution.actionPerformed(FXKit.java:629)
    at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:266)
Comment 1 Alexandr Scherbatiy 2007-08-07 11:47:47 UTC
Enable/Disable the preview some times
The ClassCastException pops up:
java.lang.ClassCastException: org.netbeans.modules.editor.NbEditorDocument cannot be cast to
org.netbeans.modules.javafx.editor.JavaFXDocument
  at org.netbeans.modules.javafx.editor.JavaFXEditorKit$ToggleFXPreviewExecution.actionPerformed(JavaFXEditorKit.java:97)
  at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:266)
  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
Comment 2 Alexei Mokeev 2007-08-29 11:44:14 UTC
Has to be fixed. Andrey, please check
Comment 3 Alexei Mokeev 2007-08-30 08:28:16 UTC
Fixed for Beta1 milestone
Comment 4 Alexandr Scherbatiy 2007-09-27 11:35:53 UTC
Verified in Netbeans 6.0 Beta1 with JavaFX plugin version 1.0.2