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 49512 - CloneableEditorSupport.edit() does not open JavaEditor for form files
Summary: CloneableEditorSupport.edit() does not open JavaEditor for form files
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on: 12331
Blocks: 49252
  Show dependency tree
 
Reported: 2004-09-24 07:34 UTC by Jan Becicka
Modified: 2008-12-22 22:42 UTC (History)
1 user (show)

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 Jan Becicka 2004-09-24 07:34:34 UTC
Not sure, where is the problem. Openide? Form? Or
Java?
Well, I have some form opened in form editor and I
have some PositionRef.

PositionRef pos = ...
CloneableEditorSupport
editSupp=pos.getCloneableEditorSupport();

editSupp.edit();

editSupp.getOpenedPanes() returns null - edit()
simply does not open text editor. But this works
for any other objects except form files.
Comment 1 Jan Stola 2004-09-24 13:36:54 UTC
CloneableEditorSupport.edit() results in a call to
CloneableEditorSupport.getOpenedPanes() that calls
MultiViewCloneableTopComponent.getEditorPane().
The last method unfortunately doesn't return the pane
because the element with the pane has not been created, yet.
Reassigning to multiview for evaluation.

Note that we cannot override the edit() method to fix
this problem, because we inherit from JavaEditor
that extends EditorSupport instead of DataEditorSupport.
It uses delegation to CloneableEditorSupport and therefore
the underlaying CloneableEditorSupport is unreachable
to us. So, one possibility to fix this problem
is to rewrite JavaEditor to extend DataEditorSupport ;-).

To jBecicka: The cookies should work fine. You could
use them as a workaround.
Comment 2 Milos Kleint 2004-09-24 13:44:29 UTC
I agree with jstola. The JavaEditor stuff should not use the
deprecated EditorSupport. The EditorSupport->CloneableEditorSupport
bridge in javaEditor has caused us major ain when making the
multiviews work with form.
I try to check for a workaround.
Comment 3 Milos Kleint 2004-10-01 15:23:52 UTC
No workaround apart from the one suggested by jstola.
One maybe one could duplicate the delegation to EditorSupport.Del in
EditorSupport in FormEditorSupport and have their own delegate that
could be made working with multiview. However I haven't really checked.\
A clean solution would be to rewrite JavaEditor to extend
CloneableEditorSupport instead of the deprecated EditorSupport.

closing as wontfix. (or shall I keep it open and reassign to java?)