Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

ADT SDK Extending Where-Used Results in SearchView

Former Member
0 Kudos
108

Hello,

I'm trying to extend the Result-List of the Where-used-List in the Search-View to allow editing (simple find/replace) the found occurrences.


I have created a Plug-In with dependencies on com.sap.adt.ris.whereused and com.sap.adt.ris.whereused.ui but now I'm a bit lost.

Can anyone give me some basic kickstart information on how the Where-Used Implementation is designed to work and where I could possibly hook-into/extend to gain basically the following:

- means to enter search-term and replacement-term

- means to select the occurrences to edit (checkbox?)

- means to trigger the refactoring process (menu-item?)
  is it a good idea to depend on com.sap.adt.refactoring as well?

- perhaps some basic preview functionality

- rest-service on abap side to transform the code and use a transport-request

or just: please make the where-used-list occurrences editable!

Thanks in advance!

Kai

1 ACCEPTED SOLUTION

sebastian_wolf
Product and Topic Expert
Product and Topic Expert
0 Kudos
74

Hi Kai,

do I get you right, that you want to perform some mass operations (refactoring, search and replace etc.) on a given result for the where-used list, i.e. directly change the code from the where-used list result?

If this is the case, I'm very sorry to tell you that this is currently not supported and I also don't see any viable means of handling that properly (you mentioned the transport management for example) in an add-on. You need to open each and every result individually and perform a refresh (Run the current search again (F5)) from the result list in order to get it updated.

By the way: Which refactoring/change do you need to perform? Maybe we can help you out with other means...

Best regards, Sebastian

3 REPLIES 3

sebastian_wolf
Product and Topic Expert
Product and Topic Expert
0 Kudos
75

Hi Kai,

do I get you right, that you want to perform some mass operations (refactoring, search and replace etc.) on a given result for the where-used list, i.e. directly change the code from the where-used list result?

If this is the case, I'm very sorry to tell you that this is currently not supported and I also don't see any viable means of handling that properly (you mentioned the transport management for example) in an add-on. You need to open each and every result individually and perform a refresh (Run the current search again (F5)) from the result list in order to get it updated.

By the way: Which refactoring/change do you need to perform? Maybe we can help you out with other means...

Best regards, Sebastian

0 Kudos
74

Hi Sebastian,

thank you for the Feedback.

I have several Interfaces with the following method-signature:

get_foobar EXPORTING e_new TYPE ...

                                          e_old TYPE ...

I want to extend these Interfaces in the following way:

get_foobar_new RETURNING r_new

get_foobar_old RETURNING r_old

Each Interface is used in approx. 10 sources and I have 20 Interfaces, which makes at least 200 calls to the Interfaces.

With search&replace I could easily transform the call to get_foobar to get_foobar_new & get_foobar_old, if only I had something to search/replace on

Any idea on how to do this refactoring somewhat efficiently?

Thanks,

Kai

0 Kudos
74

Hi Kai,

wow, this is really a big refactoring task. However, I'm terribly sorry to tell you that there is not that much beyond the thing I mentioned which we can do for you at the moment. Maybe you can use the "implement unimplemented methods" quick fix for the implementation of the new interface methods. But this will of course only work in the implementing classes and not in the classes that call the original method.

However, we will discuss how we can address such issues better in the future.

Best regards, Sebastian