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.
Use case - user runs Find Usages in BPEL project. Some usages are reported in BPEL process. Results show up in usages window. If user double clicks on the item in the usages window, the default action is to open BPEL source view, give this window focus, and place current position at the line of source code that has the usage. But what if user wants to see where this sis used in the Design view instead of the source view? Recommendation - add a context menu action "Go To Diagram" on the Find Usages node. Counter argument - is this really worth it? Most of the find usage cases involve variable, correlation sets, properties, operations. Things which are not visible on diagram anyway. This is why we decided to default to source code int he first place. Also, as user selects node in Find Usages view, the corresponding node in the Navigator view is indicated automatically. This may be sufficient for this use case. Opinions? I am not sure this is worth pursuing unless more compelling arguments are forthcoming.
UI issue
Alexey, need reevaluate this.
Items in the usages view is extension of SimpleRefactoringElementImplementation (default implementation of RefactoringElementImplementation, package org.netbeans.modules.refactoring.spi). It has only one method for navigation: openInEditor(), there are no API to add custom actions. Request: please provide API to add custom actions which will be shown in popup menu.
Vladimir, please provide more detailed explanation what is needed from API/refactoring team.
More details: Interface RefactoringElementImplementation should have method Action [] getCustomActions() Element in find usags tree should have popup menu with default action "Open In Editor" + custom actions.
Adding methods to interface is not backward compatible, but we can use probably getLookup() to hold actions.
Fixed. http://hg.netbeans.org/main/rev/92c9988ffd54 in your Refactoring Element Implementation do: getLookup() { return Lookups.fixed(new OpenInEditor(), new WhateverAction()); } class OpenInEditor extends AbstractAction { public OpenInEditor() { super("Open In Editor"); } public actionPerformed(..) { openInEditor(); } } etc...
thank you for fixing refactoring api. reopen and reassign for fixing in bpel.
fixed: 41d223fc0a94
Integrated into 'main-golden', available in NB_Trunk_Production #195 build Changeset: http://hg.netbeans.org/main/rev/92c9988ffd54 User: Jan Becicka <jbecicka@netbeans.org> Log: #88942: Should Find Usages have a Go To Diagram action option?