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: | /net/yourip/export/.../f.cpp is not equal /export/.../f.cpp (IDE opens new tab) | ||
---|---|---|---|
Product: | platform | Reporter: | igor_nikiforov <igor_nikiforov> |
Component: | Text | Assignee: | igor_nikiforov <igor_nikiforov> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | alexvsimon, apireviews, DrSobik, issues, jtulach, mmirilovic |
Priority: | P2 | Keywords: | API_REVIEW_FAST |
Version: | 7.4 | ||
Hardware: | All | ||
OS: | Unix | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 234795 | ||
Bug Blocks: | 241991 | ||
Attachments: |
Proposed patch
Proposed patch with CloneableOpenSupportRedirector A patch without OpenSupport.findDataObject |
Description
igor_nikiforov
2013-05-22 14:58:16 UTC
What we technically need is analogue or version of CloneableEditorSupportRedirector which will be called only during opening of document when algorith tries to understand if file is in list of already opened TCs or not. It is data lost. We will try to propose a patch. Created attachment 134945 [details]
Proposed patch
A simple patch what allows SPI implementers to setup filter on specific requests only... This could minimize number of redirect() calls.
Jarda, what do you think? Interesting approach. If that works for you, polish it as an API request and it can (imho) be applied. Created attachment 135020 [details]
Proposed patch with CloneableOpenSupportRedirector
Looks like the proposed approach still is not perfect - it allows to reduce the number of redirection queries, but introduces other problems:
- SPI implementers don't really know what events are important..
- there is no way to 'forget' about 'redirected' editor
How about this approach?
I have introduced a CloneableOpenSupportRedirector that invokes 'redirect' on opening component only. It also gets notifications about closed components.
And.. it gets notification about opened components as well - this is needed for 'restored' opened TCs (when IDE starts)...
Andrew, I like COS redirector more than CES. Btw, patch contains public findDataObject in OpenSupport. Is it really needed? This was the easiest way to get the DataObject (and IMO not *that* bad)... I have no problem removing this... But that will require clients (COSRedirectorImpl) to do more tricks. looks like I was too optimistic ;) Jarda, Vladimir, I don't see a way of getting DataObject from OpenSupport.Env other than using reflection (which I don't like). Do you have ideas? And... maybe we can just introduced the proposed findDataObject()? Jarda, could you, please, take a look? You can't modify OpenSupport to reference to DataObject. Sorry. Bug itself is not invalid your comment is about patch, right? method in OpenSupport is introduced, but not used. So, what about other parts of patch? Are they ok? Thanks! Created attachment 136592 [details]
A patch without OpenSupport.findDataObject
The previous patch looks like an API change request to me. Why don't you guys follow the API review guidelines? If no objections, Igor, please, integrate The patch together with required apichanges.xml modifications is integrated: http://hg.netbeans.org/cnd-main/rev/118c422c781a Integrated into 'main-silver', will be available in build *201308141142* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/118c422c781a User: igor_nikiforov <igor_nikiforov@netbeans.org> Log: Bug 230126 - /net/yourip/export/.../f.cpp is not equal /export/.../f.cpp (IDE opens new tab) - fix. COSRedirecctor implementation, based on CESRedirector: http://hg.netbeans.org/cnd-main/rev/0a0315d3ee72 Stat usage is replaced by Java 7 File API usage. The implementation doesn't look optimal, and it's better to refactor/re-implement it. Integrated into 'main-silver', will be available in build *201308152300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/0a0315d3ee72 User: igor_nikiforov <igor_nikiforov@netbeans.org> Log: Bug 230126 - /net/yourip/export/.../f.cpp is not equal /export/.../f.cpp (IDE opens new tab) - additional fix. *** Bug 234795 has been marked as a duplicate of this bug. *** *** Bug 234795 has been marked as a duplicate of this bug. *** *** Bug 216041 has been marked as a duplicate of this bug. *** Reflection cache added: http://hg.netbeans.org/cnd-main/rev/407e58e8cbd1 Feedback from reporter : Dear developers, the issue was indeed resolved in the pre-release build 201310110001. But in the final release of NB 7.4 the issue still persists... Please, clarity this problem. Kind regards, Oleh Sobeyko Integrated into 'releases/release74', will be available in build *201311111738* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/386280fa241f User: igor_nikiforov <igor_nikiforov@netbeans.org> Log: Bug 230126 - /net/yourip/export/.../f.cpp is not equal /export/.../f.cpp (IDE opens new tab) - additional fix. (transplanted from 407e58e8cbd1139eaf3a1a340507649a526a9a7e) (transplanted from 705484352212f3ac566f99d540b863289ac9baca) verified in NetBeans IDE 7.4 (Build 201311111738) |