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 137022

Summary: Evaluate and use EditorContextDispatcher
Product: soa Reporter: Martin Entlicher <mentlicher>
Component: BPEL DebuggerAssignee: Kirill Sorokin <ksorokin>
Status: RESOLVED WONTFIX    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 137005    
Bug Blocks: 133682    

Description Martin Entlicher 2008-06-11 16:52:44 UTC
In order to improve performance of context switching, EditorContextDispatcher was introduced to provide the current
context and an efficient way to listen on changes concerning files of specific MIME type. See issue #133682 for details.

The proposed changes in other debugger implementations are attached as individual issues at #133682. Since I'm not
familiar with internals of BPEL debugger and which MIME types BPEL debugger use, I did not prepare a diff. I've noticed
that you extract some specific information from TopComponents, but I believe that EditorContextDispatcher can be used to
be notified only when a TopComponent with BPEL file in it's lookup is selected.

Thus please evaluate the use of EditorContextDispatcher and let me know if it needs any changes to suit your specific
needs. Thanks.
Comment 1 Kirill Sorokin 2008-08-08 09:30:02 UTC
Sorry for the late response, I've been working on another project..

As far as I understood the main use of EditorContextDispatcher is to make sure the action provider receives notification
of changes to the editors of the specific mime type. The secondary thing is provide a bunch of utility method related to
the currently edited document.

The only place in BPEL debugger that could be helped by the main use of ECD is in the Breakpoint class, which represents
the action of toggling the breakpoint. But at this time it uses an approach which is not completely based on the mime
type of the current document. Basically the logic is the following:

1) If the opened document is a BPEL document and its opened view pane is the "Source" view: enable unconditionally; return.
2) If the opened document is a BPEL document and its opened view pane is not "Design" view: disable unconditionally; return.
3) If the current node is a BPEL one (note that we don't care about which tc is active -- it could be Navigator for
example) and it has a BPEL "toggle breakpoint" action: enable; otherwise disable.

In other words, we also need to watch for current node changes and alter the enabled state of the Toggle Breakpoint
action accordingly. Unfortunately ECD will not help us in this. Also the utility methods it provides are not exactly
used as is in BPEL debugger -- we use customized analogues.

The bottom line: ECD in its current form will not provide much value add to BPE debugger and I don't think we should
switch to using it now, unless it's not too late to make changes to ECD. 

-> WONTFIX