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 241991 - handle CloneableOpenSupportRedirector based redirections
Summary: handle CloneableOpenSupportRedirector based redirections
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords: 8.0_HR_FIX, API_REVIEW_FAST
Depends on: 230126
Blocks: 241692 242357
  Show dependency tree
 
Reported: 2014-02-17 09:17 UTC by Vladimir Voskresensky
Modified: 2014-02-26 14:51 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch (2.82 KB, patch)
2014-02-17 09:18 UTC, Vladimir Voskresensky
Details | Diff
patch with test (14.20 KB, patch)
2014-02-17 14:57 UTC, Vladimir Voskresensky
Details | Diff
proposed changes (22.11 KB, patch)
2014-02-19 17:56 UTC, Vladimir Voskresensky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2014-02-17 09:17:05 UTC
after fixing issue #230126 the CloneableOpenSupportRedirector was introduced, but implementation was not complete as seen from problems described in issue #241692.

there is a common patern in user code:
 CloneableEditorSupport ces = ...;
 ces.edit();
 JEditorPane[] panes = ces.getOpenedPanes();
 if (panes != null) panes[0].setPosition(offset);

if redirect has happened => ces.getOpenedPanes(); is still null now, although file is activated in IDE
Comment 1 Vladimir Voskresensky 2014-02-17 09:18:16 UTC
Created attachment 145290 [details]
proposed patch
Comment 2 Vladimir Voskresensky 2014-02-17 14:57:57 UTC
Created attachment 145311 [details]
patch with test

updated implementation to pass functionality of CESRedirector based logic
Comment 3 Vladimir Voskresensky 2014-02-18 13:37:17 UTC
Please, review. I'd like to integrate before clone
Comment 4 Vladimir Voskresensky 2014-02-18 13:40:39 UTC
btw, may be it's better to have in implementation of open():
this.beforeRedirect(redirected);
redirected.open();
this.afterRedirect(redirected);

?
Comment 5 Jaroslav Tulach 2014-02-18 13:47:44 UTC
Y01 Versioning, dependencies, javadoc, @since, apichanges, etc. is missing

Y02 redirectedOpen Javadoc could have a sentence what starts with capital letter and does not use three letter abbrevations

Y03 The diff does not show that, but I expect CloneableEditorSupportRedirectorTest.java is not modified, but copied to new file, which is then modified. OK.
Comment 6 Vladimir Voskresensky 2014-02-18 14:11:15 UTC
(In reply to Jaroslav Tulach from comment #5)
> Y01 Versioning, dependencies, javadoc, @since, apichanges, etc. is missing
Sure, will add

> 
> Y02 redirectedOpen Javadoc could have a sentence what starts with capital
> letter and does not use three letter abbrevations
Ok

> 
> Y03 The diff does not show that, but I expect
> CloneableEditorSupportRedirectorTest.java is not modified, but copied to new
> file, which is then modified. OK.
I think diff shows "hg copy" or I miss something:
copy from openide.text/test/unit/src/org/openide/text/CloneableEditorSupportRedirectorTest.java
copy to openide.text/test/unit/src/org/openide/text/CloneableEditorSupportCOSRedirectorTest.java
--- a/openide.text/test/unit/src/org/openide/text/CloneableEditorSupportRedirectorTest.java
+++ b/openide.text/test/unit/src/org/openide/text/CloneableEditorSupportCOSRedirectorTest.java
Comment 7 Vladimir Voskresensky 2014-02-19 17:56:20 UTC
Created attachment 145411 [details]
proposed changes

updated patch based on comments and one more test method
Comment 8 Vladimir Voskresensky 2014-02-19 17:58:10 UTC
please, review. I'm going to integrate tomorrow into trunk and release80 branch. Thanks
Comment 9 Vladimir Voskresensky 2014-02-20 15:54:13 UTC
integrated into trunk:
http://hg.netbeans.org/cnd-main/rev/e018e41bc949 (to be transplanted into 8.0 as well)
http://hg.netbeans.org/cnd-main/rev/e091ed5f3bc1 (versions)
Comment 10 Quality Engineering 2014-02-21 03:08:49 UTC
Integrated into 'main-silver', will be available in build *201402210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e091ed5f3bc1
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #241991 - handle CloneableOpenSupportRedirector based redirections
- update versions
Comment 11 Vladimir Voskresensky 2014-02-21 10:35:56 UTC
when transplant into release80 we need to update versions of:
openide.options/manifest.mf
xml/manifest.mf
openide.loaders/manifest.mf
xml.multiview/nbproject/project.properties
properties/manifest.mf
openide.text/manifest.mf
openide.windows/manifest.mf
Comment 12 soldatov 2014-02-21 15:11:12 UTC
verified in NetBeans IDE Dev (Build cnd-main-501-on-20140221) build
Comment 13 Vladimir Voskresensky 2014-02-21 15:48:09 UTC
transplanted:
http://hg.netbeans.org/releases/rev/e5f3a068d90f
versions:
http://hg.netbeans.org/releases/rev/ff63bd84048d
Comment 14 Quality Engineering 2014-02-22 06:13:16 UTC
Integrated into 'main-silver', will be available in build *201402220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/8767c58a90bf
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: update versions after inc in trunk and transplant into 80 fix of #241991 - handle CloneableOpenSupportRedirector based redirections
Comment 15 Quality Engineering 2014-02-25 01:36:14 UTC
Integrated into 'releases/release80', will be available in build *201402242200* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/e5f3a068d90f
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #241991 - handle CloneableOpenSupportRedirector based redirections
- added afterRedirect
- map fields after redirected COS/CES
(transplanted from e018e41bc94955c017fc096f25e6e3576d7ed178)