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 12331 - Java and Form module uses EditorSupport
Summary: Java and Form module uses EditorSupport
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jan Becicka
URL:
Keywords: API_REVIEW_FAST
Depends on: 51441 51631
Blocks: 9340 11208 15097 18343 49512
  Show dependency tree
 
Reported: 2001-05-22 12:12 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Proposed patch (34.79 KB, patch)
2005-01-03 15:43 UTC, Jan Becicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-05-22 12:12:07 UTC
...which is deprecated. Please use DataEditorSupport or similar instead.
Comment 1 Svata Dedic 2001-08-24 17:38:47 UTC
Won't be fixed for 3.3
Comment 2 Svata Dedic 2001-11-16 09:48:49 UTC
Changing to a task. Or is using (still) supported deprecated class a 
bug ? I'm not sure that I should mark it as *must have* for 3.4 
though.

Comment 3 Jesse Glick 2001-11-16 10:35:16 UTC
I don't think it's a must-have for 3.4, if it is going to cause
compatibility problems for dependent modules that is.
Comment 4 Svata Dedic 2002-12-04 14:11:33 UTC
Fixed as part of the java -> projects rewrite. Now
CloneableEditorSupport is used.
Comment 5 Jesse Glick 2002-12-04 15:51:46 UTC
Resolved in the projects branch, you mean. Please leave open in the
trunk until it is actually fixed in the trunk.
Comment 6 Jesse Glick 2004-09-13 18:48:45 UTC
In fact was never fixed in the trunk.

4.0 would be the time to do it, IMHO.
Comment 7 Jaroslav Tulach 2004-09-14 17:58:38 UTC
Unbelievable. Will this really be integrated into 4.0? Knowing this
sooner we might save a bunch of work on making core/multiviews work
with EditorSupport.
Comment 8 Martin Matula 2004-09-19 16:34:45 UTC
IMO it is too late to do this for 4.0.
Comment 9 Jaroslav Tulach 2004-11-09 07:11:38 UTC
If started, does that mean the target milestone is 4.1? Is this going
to be just rewrite or you are going to improve the integration APIs a
bit? Will the new class be in public-packages? What will happen to
existing subclasses of the old editorsupport? Is there going to be
some document prior the code or just the code?
Comment 10 Jan Becicka 2004-11-09 08:18:08 UTC
> If started, does that mean the target milestone is 4.1?
Probably yes.
> Is this going to be just rewrite or you are going to improve the
integration APIs a bit? 
Just a rewrite. More precisely this issue is only about JavaEditor,
not about any API (BTW what is integration API?, Java module does not
expose such API). I don't say, that there will be no other improves in
APIs for 4.1. I only say, that I started to work on this issue.
> Will the new class be in public-packages?
No
> What will happen to existing subclasses of the old editorsupport?
I don't know yet.
Comment 11 Jaroslav Tulach 2004-11-09 08:43:13 UTC
Ad. "4.1 milestone" - why not change it, right now it is future?
Ad. "public package" - there are some public packages in java module,
thus I understand your claim that the new editor will be in other
package, which will not be public.
Ad. the rest - I know that there are subclasses of JavaEditor. You
should know what you want to do with them (keep untouched, migrate to
new editor - how if not public!?, etc.).

That is the reason I am asking for a description of the change, before
it will be implemented.
Comment 12 Jan Becicka 2004-11-09 09:10:33 UTC
OK, you are right. This is API change which must satisfy all that
documantation needs.
I only planned minimal change to remove dependency on deprecated class
for 4.1. Now I see, that the fix of this issue will not be just a
rewrite of few classes.
Let this issue be a subject of planing for future releases.

Comment 13 Jaroslav Tulach 2004-11-10 08:49:33 UTC
You misunderstood. The change is needed and is not that big. I just
want to know which way of fixing you are going to choose and why. I am
asking now, as I would not like answer "as that is the way I have just
implemented it".
Comment 14 Martin Matula 2004-11-11 16:56:41 UTC
We should do this for 4.1. Chaning target milestone.
Comment 15 Jan Becicka 2004-11-15 14:32:11 UTC
I chose way of minimal resistance. My intention is to remove
EditorSupport from Java module and replace it with DataEditorSupport.
Further i'm going to find all usages of JavaEditor in other modules
and fix their code or file issues against such modules.

I'm going to consult this change with form developers, since their
module  extends JavaEditor.
Comment 16 Jan Becicka 2004-12-14 13:35:27 UTC
This issue should be fixed for 4.1
Comment 17 Jan Becicka 2004-12-14 13:39:47 UTC
Openide part of this issue is fixed: see issue 51441.
Java part is fixed on branch:
cvs up -r private_javaeditor_noes
java/src/org/netbeans/modules/java/JavaDataObject.java
java/src/org/netbeans/modules/java/JavaEditor.java
java/src/org/netbeans/modules/java/bridge/ElementImpl.java
java/src/org/netbeans/modules/java/bridge/LangEnvImpl.java
java/src/org/netbeans/modules/java/ui/nodes/elements/ElementNode.java
java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java
java/javacore/src/org/netbeans/modules/javacore/parser/ASTProvider.java
form/src/org/netbeans/modules/form/FormEditorSupport.java

Please fix your code on branch and reassing this issue back to me,
I'll do the commit.
Comment 18 Jan Stola 2004-12-20 16:23:54 UTC
> Please fix your code on branch and reassing this issue back to me

I have modified the file
form/src/org/netbeans/modules/form/FormEditorSupport.java.
Reassigning back to java module.
Comment 19 Jan Becicka 2005-01-03 15:42:14 UTC
Work is done on branch. Reviewers, please do API review. I'll attach
the diff. Thanks.
Comment 20 Jan Becicka 2005-01-03 15:43:48 UTC
Created attachment 19439 [details]
Proposed patch
Comment 21 Jaroslav Tulach 2005-01-03 17:31:48 UTC
extractCloneableEditorSupport is a fancy method - would be better to
remove it completely and not just comment it out.

Maybe JavaEditorEnv does not need to be public class. If so, please
hide it completely or by factory method. 

The change is neither source or binary compatible, please state so in
upgrade guide (openide/api/...) with description of what to do when
one faces the problem.

Major version of your module should be increased (to be higher than in
4.0 version). All known module dependencies upgraded to /new or
/old-new if they are not affected by your change.
Comment 22 Jesse Glick 2005-01-04 02:22:04 UTC
Try removing even the import of EditorSupport - so it does not show up
in Find Usages, etc. (I have gotten in the habit of deleting all glob
imports and running Fix Imports on any old classes when patching.)


Nice job removing the final comma from "SynchronizeCodeCookie.class".
:-) Tip: I actually find it helpful to leave a comma after the last
entry in an array constructor, since it means you can add another
entry with a -0/+1 (line) patch rather than a -1/+2 patch.


Patch in createCookie looks useless.


Shouldn't JavaEditor impl CloseCookie and PrintCookie?
Comment 23 Jan Becicka 2005-01-04 12:58:20 UTC
> extractCloneableEditorSupport is a fancy method - would be better to
> remove it completely and not just comment it out.

Done. reloadDocumentTask() removed as well.

> Maybe JavaEditorEnv does not need to be public class. If so, please
> hide it completely or by factory method. 

Done (JavaEditorEnv made private)

> The change is neither source or binary compatible, please state so in
> upgrade guide (openide/api/...) with description of what to do when
> one faces the problem.

I'll do it.

> Major version of your module should be increased (to be higher than 
> in 4.0 version). All known module dependencies upgraded to /new or
> /old-new if they are not affected by your change.

I'll do it.

> Try removing even the import of EditorSupport

Removed

> Patch in createCookie looks useless.

Removed

> Shouldn't JavaEditor impl CloseCookie and PrintCookie?
Yes!!! I've just added it.

Thanks for review.

Comment 24 Jan Becicka 2005-01-10 12:19:49 UTC
No additional commnets - reassigning back.
Comment 25 Jan Becicka 2005-01-10 12:23:11 UTC
Implemented.
Checking in java/src/org/netbeans/modules/java/JavaDataObject.java;
/cvs/java/src/org/netbeans/modules/java/JavaDataObject.java,v  <-- 
JavaDataObject.java
new revision: 1.199; previous revision: 1.198
done
Checking in java/src/org/netbeans/modules/java/JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <-- 
JavaEditor.java
new revision: 1.182; previous revision: 1.181
done
Processing log script arguments...
More commits to come...
Checking in java/src/org/netbeans/modules/java/bridge/ElementImpl.java;
/cvs/java/src/org/netbeans/modules/java/bridge/ElementImpl.java,v  <--
 ElementImpl.java
new revision: 1.24; previous revision: 1.23
done
Checking in java/src/org/netbeans/modules/java/bridge/LangEnvImpl.java;
/cvs/java/src/org/netbeans/modules/java/bridge/LangEnvImpl.java,v  <--
 LangEnvImpl.java
new revision: 1.4; previous revision: 1.3
done
Processing log script arguments...
More commits to come...
Checking in
java/src/org/netbeans/modules/java/ui/nodes/elements/ElementNode.java;
/cvs/java/src/org/netbeans/modules/java/ui/nodes/elements/ElementNode.java,v
 <--  ElementNode.java
new revision: 1.16; previous revision: 1.15
done
Processing log script arguments...
More commits to come...
Checking in
java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  ResourceImpl.java
new revision: 1.56; previous revision: 1.55
done
Processing log script arguments...
More commits to come...
Checking in
java/javacore/src/org/netbeans/modules/javacore/parser/ASTProvider.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/ASTProvider.java,v
 <--  ASTProvider.java
new revision: 1.36; previous revision: 1.35
done
Processing log script arguments...
More commits to come...
Checking in form/src/org/netbeans/modules/form/FormEditorSupport.java;
/cvs/form/src/org/netbeans/modules/form/FormEditorSupport.java,v  <--
 FormEditorSupport.java
new revision: 1.163; previous revision: 1.162
done
Comment 26 Jiri Prox 2005-07-12 08:33:40 UTC
No longer relevant, marked as verified.