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.
CloneableEditorSupportRedirector prevents using VCS such as clearcase and ade. It redirect requests to "read only" files that lay under links. VCS interceptor is excluded from editor support operations. As result files cannot be made writable.
It have to be fixed in CESRedirectorImpl: for requested file first time instead of returning canonical one original path have to be used and path/canonical/inode is remembered
Created attachment 117063 [details] CES redirector patch needed API changes
Jarda, Could you review API changes?
can we replace code in CloneableEditorSupportRedirector.redirect CloneableEditorSupport ces = r.redirect(one.getLookup()); to CloneableEditorSupport ces = r.redirect(new ProxyLookup(Lookups.singleton(one), one.getLookup())); ? does it solve the problem of getting original CloneableEditorSupport? Then no API change is needed
(In reply to comment #4) > can we replace code in CloneableEditorSupportRedirector.redirect > CloneableEditorSupport ces = r.redirect(one.getLookup()); > to > CloneableEditorSupport ces = r.redirect(new ProxyLookup(Lookups.singleton(one), > one.getLookup())); > ? > does it solve the problem of getting original CloneableEditorSupport? > Then no API change is needed It works.
(In reply to comment #2) > Created attachment 117063 [details] > CES redirector patch > needed API changes Using Lookups.fixed is definitely wrong. ProxyLookup is better. It is still an API change, so please follow the regular procedure and make sure the future behavior is guaranteed with a test. Anyway are you sure you need this change, as... (In reply to comment #0) > CloneableEditorSupportRedirector prevents using VCS such as clearcase and ade. > It redirect requests to "read only" files that lay under links. > VCS interceptor is excluded from editor support operations. > As result files cannot be made writable. ...the implementation is in your class CESRedirectorImpl. Maybe you can just make it more clever?
(In reply to comment #6) > ...the implementation is in your class CESRedirectorImpl. Maybe you can just > make it more clever? unfortunately redirector cannot get CES from DObj because it results in infinite recursion due to incorrect calling virtual method in TES constructor.
I mean code: protected TextEditorSupport(XMLDataObjectLook xmlDO, Env env, String mime_type) { super((DataObject)xmlDO, null, env); setMIMEType(mime_type); initTimer(); initListeners(); } Probably you can fix this bug?
fixed, revision 7673