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: | UndoRedo is not supported | ||
---|---|---|---|
Product: | platform | Reporter: | Peter Zavadsky <pzavadsky> |
Component: | Navigator | Assignee: | apireviews <apireviews> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | dsimonek, jglick, jlahoda, mfukala, samaresh, tzezula |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | diff of proposed patch |
Description
Peter Zavadsky
2007-03-16 23:05:04 UTC
Will try to do Milestone 9. Cool. I was thinking a bit about it. Would be actually the 1st suggestion possible.? Taking into account that there are probably only two implementations of that interface, and both are in our hands (java, outline). Would be the incompatible change (added method to the interface) OK for this case? I thought about extra interface NavigatorPanelWithUndo extends NavigatorPanel. Unfortunately there are more API users (ant, xml). We will see what API reviewers will say... I'd like to ask for fast track review of this API change. Basically, I'm adding NavigatorPanelWithUndo interface which extends NavigatorPanel and has only one method UndoRedo getUndoRedo(). The only question is probably if method 2) suggested by pzavadsky wouldn't be better? I'll attach diff of all materials needed for review. Created attachment 40270 [details]
diff of proposed patch
Samaresh is now owner of the XML modules. IMHO the solution #1 proposed by Petr could work as well if we are confident that noone outside netbeans implemented the API, which is not probable. I must admit that I do not like the solution with NavigatorPanelWithUndo much, but seems to me to be the best solution if do not want #1. Prrr, probability does not count[1], this is stable API and adding methods into interfaces in stable API is not NetBeans habit. Adding new interface looks fine to me. Alternative to it is to find the UndoRedo inside lookup, but that is imho uglier. [1] moreover I believe a lot of people unknown to us implemented this interface - Geertjan blogged about it => means everyone knows how to use it I don't know if you were waiting for my comment. If yes, I am perfectly OK with the Dafe's extended interface solution. Petr, I was waiting for one week fast track review time limit, which passed today. So integrated into main trunk along with the tests, api changes and javadoc documentation, enjoy... cvs server: scheduling file `NavigatorPanelWithUndo.java' for addition cvs server: use 'cvs commit' to add this file permanently Checking in core/navigator/src/org/netbeans/modules/navigator/NavigatorController.java; /cvs/core/navigator/src/org/netbeans/modules/navigator/NavigatorController.java,v <-- NavigatorController.java new revision: 1.18; previous revision: 1.17 done Checking in core/navigator/src/org/netbeans/modules/navigator/NavigatorTC.java; /cvs/core/navigator/src/org/netbeans/modules/navigator/NavigatorTC.java,v <-- NavigatorTC.java new revision: 1.13; previous revision: 1.12 done Checking in core/navigator/apichanges.xml; /cvs/core/navigator/apichanges.xml,v <-- apichanges.xml new revision: 1.5; previous revision: 1.4 done Checking in core/navigator/arch.xml; /cvs/core/navigator/arch.xml,v <-- arch.xml new revision: 1.12; previous revision: 1.11 done Checking in core/navigator/manifest.mf; /cvs/core/navigator/manifest.mf,v <-- manifest.mf new revision: 1.7; previous revision: 1.6 done Checking in core/navigator/test/unit/src/org/netbeans/modules/navigator/NavigatorTCTest.java; /cvs/core/navigator/test/unit/src/org/netbeans/modules/navigator/NavigatorTCTest.java,v <-- NavigatorTCTest.java new revision: 1.8; previous revision: 1.7 done RCS file: /cvs/core/navigator/src/org/netbeans/spi/navigator/NavigatorPanelWithUndo.java,v done Checking in core/navigator/src/org/netbeans/spi/navigator/NavigatorPanelWithUndo.java; /cvs/core/navigator/src/org/netbeans/spi/navigator/NavigatorPanelWithUndo.java,v <-- NavigatorPanelWithUndo.java initial revision: 1.1 done Checking in ide/golden/deps.txt; /cvs/ide/golden/deps.txt,v <-- deps.txt new revision: 1.514; previous revision: 1.513 done Checking in core/navigator/test/unit/src/org/netbeans/modules/navigator/resources/testCorrectCallsOfNavigatorPanelMethodsLayer.xml; /cvs/core/navigator/test/unit/src/org/netbeans/modules/navigator/resources/testCorrectCallsOfNavigatorPanelMethodsLayer.xml,v <-- testCorrectCallsOfNavigatorPanelMethodsLayer.xml new revision: 1.5; previous revision: 1.4 done Checking in core/navigator/nbproject/project.xml; /cvs/core/navigator/nbproject/project.xml,v <-- project.xml new revision: 1.6; previous revision: 1.5 done Checking in core/navigator/nbproject/project.properties; /cvs/core/navigator/nbproject/project.properties,v <-- project.properties new revision: 1.9; previous revision: 1.8 I see. I will try it out as soon as we get the change over. Thanks. The API is working for me. Thanks! Pleasure also on my side :-) Btw it seems that writing tests is really effective, especially for newly created APIs. I thought differently several years ago :-) |