12-22-2008 9:51 PM
Hi,
Do you if it's possible to implement custom code (add new functionalities) in new abap editor and new debugger, and how ? I didn't find any doc about that, nor any user exit, and it's impossible to implement implicit enhancement options as they are basis tools.
Thx a lot !
sandra
12-22-2008 9:54 PM
I am not sure whether I understand. You mean that you want to add custom code to the New Editor itself?
=> a "customized editor".
12-22-2008 10:02 PM
I mean, how to add new functionalities to the new abap editor. For example, add a new option in the context menu, or refactoring options, or perform static checks for proving no error, etc.
12-22-2008 10:15 PM
so, the new editor appearance wouldn't change, only new custom options would be added in the context menu that I could implement.
For example, I saw in the old editor that there was a WB_PROCESS_FCODE badi that we might use to handle F1 key or double-click on a word in the abap source currently displayed in the editor, unfortunately it is reserved to sap.
12-22-2008 10:27 PM
I am "talking" from memory now, but in the bottom right hand corner there is a little "+" icon.
You can set a lot of additional options there.
Why would you want to change the F1? Do ABAP statements behave differently in your system than the other ABAP systems?
Or is this a customer where-used-list?
12-22-2008 11:01 PM
Hi Sandra,
Although, I've never done this before, even never tried
But i digged little bit in ABAP code which is responsible for the F1 help.
F1 event is handled by Class CL_WB_EDITOR and attribute CL_GUI_ABAPEDIT
See the below SAP Code which getting triggered behind the F1 help.
Methods event_handler_f1
For Event f1 of cl_gui_abapedit
Importing sender.
METHOD event_handler_f1.
* FOR EVENT DBLCLICK OF C_TEXTEDITOR_CONTROL.
CALL METHOD sender->get_selection_pos
IMPORTING
from_line = g_editor_handle->cursor-index
from_pos = g_editor_handle->cursor-offset
to_line = to_line
to_pos = to_pos.
CALL METHOD cl_gui_cfw=>flush
EXCEPTIONS
cntl_system_error = 1
cntl_error = 2.
* cursor-index = from_line.
* cursor-offset = to_pos.
g_editor_handle->cursor-state = 'L'.
CALL METHOD cl_gui_cfw=>set_new_ok_code
EXPORTING
new_code = 'ED_HELP'.
ENDMETHOD. "c_event_receiver_new
Even I believe you may able handle (F1) with class CL_WB_EDITOR, but not sure about how you call your custom help?
Just open any program in new ABAP Editor and activate the Debugging with /H and Do F1 on any keyword, just move on in debug for a while you will come to know-how the F1 is handled.
12-22-2008 11:12 PM
I strongly suspect that Sandra already knows that... or am I missing something here?
For the new bugger, there is now also "layered debugging" andf "terminal debugging". Why would someone want a cooler tool than that?
Cheers,
Julius
Edited by: Julius Bussche on Dec 23, 2008 12:12 AM
12-22-2008 11:13 PM
The F1 was an example. Why I ask this question, is just because I'd like to work on static analysis (not the simple code inspector) and that would be easier to be able to select a few lines from inside the source editor, instead of creating an external program to which pass include name, line from and line to, and then run it. For example, the option "refactor | extract source" (select a block of lines and transform them into a new routine) I saw in a 2006 presentation was very interesting, and this is this kind of thing I'd like to work on.
12-22-2008 11:16 PM
Yes, Might be we are missing something here!
Actually i got the impression,that Implementation(Go-live) of Sandra's current project is successfully over, And he want to leave some intended "Custom" bug out there
@Sandra:Am i Right?:-)
12-22-2008 11:17 PM
Yes, I know that, I digged a little bit too. Thank you Amit anyway. In fact I am surprised that there is none enhancement possible for these editors. I thought I missed something obvious, but it seems that these editors can't be enhanced, except by a modification of the standard. So an external program might be the best option to analyze abap code.
12-22-2008 11:18 PM
12-22-2008 11:29 PM
12-22-2008 11:50 PM
Nice concept, but it was not my question here (and I'd prefer to talk about [static code analysis|http://en.wikipedia.org/wiki/Static_code_analysis] concept (note: it's not the code inspector))
my question is answered : it's not possible.