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 209745 - CloneableEditorSupportRedirector prevents using VCS
Summary: CloneableEditorSupportRedirector prevents using VCS
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on: 51690 209992 210541 211034
Blocks:
  Show dependency tree
 
Reported: 2012-03-19 14:59 UTC by Alexander Simon
Modified: 2012-04-11 16:43 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
CES redirector patch (1.30 KB, patch)
2012-03-22 10:40 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2012-03-19 14:59:15 UTC
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.
Comment 1 Vladimir Voskresensky 2012-03-20 10:56:56 UTC
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
Comment 2 Alexander Simon 2012-03-22 10:40:42 UTC
Created attachment 117063 [details]
CES redirector patch

needed API changes
Comment 3 Alexander Simon 2012-03-22 10:43:18 UTC
Jarda,
Could you review API changes?
Comment 4 Vladimir Voskresensky 2012-03-22 13:01:28 UTC
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
Comment 5 Alexander Simon 2012-03-22 14:30:31 UTC
(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.
Comment 6 Jaroslav Tulach 2012-03-22 16:51:04 UTC
(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?
Comment 7 Alexander Simon 2012-03-22 18:32:29 UTC
(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.
Comment 8 Alexander Simon 2012-03-22 18:58:39 UTC
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?
Comment 9 Alexander Simon 2012-03-30 11:54:22 UTC
fixed, revision 7673