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 33117 - ClassCastException from CloneViewAction
Summary: ClassCastException from CloneViewAction
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Terminalemulator (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: _ tboudreau
URL:
Keywords:
Depends on: 33557
Blocks:
  Show dependency tree
 
Reported: 2003-04-22 10:33 UTC by mslama
Modified: 2008-12-23 08:40 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Binary patch of the fix (51.21 KB, application/octet-stream)
2003-04-22 15:51 UTC, _ tboudreau
Details
Patch to OutputTabTerm (1.50 KB, patch)
2003-04-22 15:52 UTC, _ tboudreau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mslama 2003-04-22 10:33:37 UTC
TopComponent
org.netbeans.core.output.OutputTabTerm provides
CloneViewAction but does not implement
TopComponent.Cloneable interface.
Comment 1 mslama 2003-04-22 10:34:34 UTC
Original issue #33110
Comment 2 _ tboudreau 2003-04-22 11:26:24 UTC
Which way should this be solved?
 - Don't provide the actions
 - Add support for cloning the view

I think cloning an output window is probably pretty useless for
the user, so I'm inclined to support option 1.  Cc'ing Jan Rojcek
for HIE input.
Comment 3 Jan Chalupa 2003-04-22 13:11:30 UTC
IMO, the Clone View action shouldn't be available for the Output Tab.
This needs to be fixed for 3.5/S1S5... -> P1.
Comment 4 _ tboudreau 2003-04-22 15:50:23 UTC
Fixed in trunk, org.netbeans.core.output.OutputTabTerm.java
version 1.7.

I removed the Clone action from the array of actions returned
by SystemAction.  It would not be possible to implement 
TopComponent.Cloneable on OutputTabTerm, since it is a public
class and that would be an incompatible change.  Also, the
clone action on output windows is quite useless and shouldn't
be exposed to the user in the first place, IMO.

The real bug may be in TopComponent - it supplies the clone
action whether or not the instance implements 
TopComponent.Cloneable.  

Since docking actions and such appear in the menu, it 
appears that the system menu contents may be altered by other code, so
it doesn't seem safe to make a global 
change to TopComponent to fix this issue, especially not
if we are considering the fix for 3.5.  I have filed issue
33129 regarding this.
Comment 5 _ tboudreau 2003-04-22 15:51:13 UTC
Created attachment 10073 [details]
Binary patch of the fix
Comment 6 _ tboudreau 2003-04-22 15:52:05 UTC
Created attachment 10074 [details]
Patch to OutputTabTerm
Comment 7 mslama 2003-04-22 16:07:53 UTC
I reviewed fix and it is OK.

Winsys adds its own actions (Docking action in this case) to existing
actions provided by TopComponent.getActions() when popup on tab is
created.
Comment 8 Marian Mirilovic 2003-04-22 16:36:20 UTC
patch verified 
Comment 9 _ ttran 2003-04-23 16:47:14 UTC
approved for 3.5
Comment 10 _ tboudreau 2003-04-23 20:14:46 UTC
Integrated into 3.5.
Comment 11 Marian Mirilovic 2003-04-24 09:13:59 UTC
verified in [nb3.5](2003042350)
Comment 12 mslama 2003-05-14 12:34:07 UTC
As issue #33557 is fixed (TopComponent does not provide
CloneViewAction when it does not implement TopComponent.Cloneable
interface in trunk.) it is possible to remove workaround in trunk.

/cvs/core/output/src/org/netbeans/core/output/OutputTabTerm.java,v 
<--  OutputTabTerm.java
new revision: 1.10;
Comment 13 Quality Engineering 2008-12-23 08:40:36 UTC
moving terminal emulator issues to terminalemulator component.
To see the correct version and target milestone of this issue look at Issue
Activity table.