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.
Summary: | Java and Form module uses EditorSupport | ||
---|---|---|---|
Product: | java | Reporter: | Jesse Glick <jglick> |
Component: | Unsupported | Assignee: | Jan Becicka <jbecicka> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | dkaspar, jstola, jtulach, mkleint, raccah, tpavek |
Priority: | P2 | Keywords: | API_REVIEW_FAST |
Version: | 3.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 51441, 51631 | ||
Bug Blocks: | 9340, 11208, 15097, 18343, 49512 | ||
Attachments: | Proposed patch |
Description
Jesse Glick
2001-05-22 12:12:07 UTC
Won't be fixed for 3.3 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. 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. Fixed as part of the java -> projects rewrite. Now CloneableEditorSupport is used. Resolved in the projects branch, you mean. Please leave open in the trunk until it is actually fixed in the trunk. In fact was never fixed in the trunk. 4.0 would be the time to do it, IMHO. 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. IMO it is too late to do this for 4.0. 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? > 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. 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. 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. 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". We should do this for 4.1. Chaning target milestone. 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. This issue should be fixed for 4.1 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. > 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.
Work is done on branch. Reviewers, please do API review. I'll attach the diff. Thanks. Created attachment 19439 [details]
Proposed patch
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. 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? > 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. No additional commnets - reassigning back. 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 No longer relevant, marked as verified. |