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 69466 - Fix the CloneableEditorSupport.wrapEditorComponent() flawed API
Summary: Fix the CloneableEditorSupport.wrapEditorComponent() flawed API
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: apireviews
URL:
Keywords: API, API_REVIEW
Depends on:
Blocks:
 
Reported: 2005-11-28 16:07 UTC by Andrei Badea
Modified: 2008-12-22 17:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed change (10.42 KB, text/plain)
2005-11-28 16:13 UTC, Andrei Badea
Details
Proposed compatible change (11.19 KB, text/plain)
2005-11-29 23:30 UTC, Andrei Badea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Badea 2005-11-28 16:07:25 UTC
There is a flaw in the CloneableEditorSupport.wrapEditorComponent() method I
introduced in issue 60922. This method was introduced to allow the editor
component of a CloneableEditor to be wrapped in a more complicated UI. It gets a
Component containing the editor pane and is expected to return a Component which
contains the first one. The returned component is added to the CloneableEditor.

However, because wrapEditorComponent() is in CloneableEditorSupport and doesn't
know anything about CloneableEditor, it is impossible to map the returned
component to the CloneableEditor this component is added to. I see three ways to
fix this:

- the method could be removed from CES and added to CE

- the method in CES could be deprecated and a new one added to CE

- a new method with a CE parameter could be added to CES 

The first solution is the most clean one IMO. I don't know if it's possible to
make an incompatible change at this point. If yes, I would like to implement it
cf. the attached diff.
Comment 1 Andrei Badea 2005-11-28 16:13:41 UTC
Created attachment 27349 [details]
Proposed change
Comment 2 Andrei Badea 2005-11-29 23:29:08 UTC
Yarda showed me today the API change can be made compatibly by adding a
wrapEditorComponent() method to CloneableEditor which delegates to CES.wEC(). 

Yarda also convinced me that I don't really need this API change for what I need
to do in the SQL editor. Considering the API change can be done compatibly later
and that it maybe won't be needed at all for the features in promo-G, I don't
see a reason to push it now. 

I'm attaching an updated diff though, it will be helpful if I decide to reopen
later.

Yardo, thanks for your help!
Comment 3 Andrei Badea 2005-11-29 23:30:12 UTC
Created attachment 27406 [details]
Proposed compatible change