-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Clean-Up Interactive Mode without changing the class? #114
Comments
This is a good idea. I've often wanted to do something similar, to check whether another developer has run the cleanup. |
Hi ZEAL-IT and Josh, that's indeed a good point – ABAP cleaner starts a "rewrite session" when opening the interactive cleanup, which prevents other people from changing the object in the meantime. A "read only" mode would also be beneficial when looking at legacy code (or any code in non-development systems) which you can't or won't change at that moment: With the cleanup rules applied, the code might simply be easier to read and understand. So, yes, very nice idea – I'd only hesitate a bit about adding another menu item (and shortcut?) for it. For the time being, a quick workaround would be to install the stand-alone version in parallel: You can paste any amount of ABAP code into that just via clipboard, as long as blocks like Kind regards, |
That would be a cool feature too. The code pal would insert a line at the beginning with a checksum or something and an ATC check can check if the comment exists and the checksum is correct |
Haven't thought of the standalone version, thank you! I guess you can't tell if the class is already locked (in that case the edit mode would be fine) or if the class is in read only mode (which it is in Eclipse until you change something) |
+1 (to the general idea of a read-only, not locking mode) |
Hi ZEAL-IT, Josh and Edo, with the next ABAP cleaner release, there will now be a third menu item (hope the menu text + shortcut are intuitive?) This opens the interactive window without locking the object, so you can also call it if someone else locked the object, or you don't have a transport, or you're in the wrong client, or you don't even have development authorization in the system. Inside the ABAP cleaner UI, everything is exactly the same, except that you don't have the "Apply and Close" button and menu, but instead, you only have So whatever you do inside the ABAP cleaner UI, the code in the ADT editor will not be affected. You can nevertheless change ABAP cleaner configuration (selected profile, restriction to ABAP release, activation of rules, rule options etc.) just as you would in the interactive cleanup, and these changes are kept. Another small improvement is that the window title now also shows the ABAP release of the system in which the code editor was opened: Kind regards, |
P.S.: If you have better suggestions for "Preview as Read-Only With ABAP Cleaner…", please let me know. "Show Read-Only Preview of Cleanup With ABAP Cleaner…" would be more precise, but that would be a bit long. I also considered "Preview (Read-Only) With ABAP Cleaner…", but the parentheses look a bit awkward in the menu. Regarding the shortcut, Ctrl+5 would probably also be available, but since this opens the UI, I felt that it is better to have a shortcut that is similar to Ctrl+Shift+4. Anyway, everybody could configure this as needed – and I know, on certain macOS releases, both Ctrl+Shift+4 and Ctrl+Shift+5 are reserved by the system for screenshot(?) functionality. |
Hi Jörg-Michael, |
Hi ZEAL-IT, thanks a lot! I actually changed the menu text again to "Show Read-Only Preview With ABAP Cleaner…", because I felt "Preview as Read-Only" sounded a bit awkward (but I'm obviously not a native speaker). Anyway, I somehow wanted to have "Read-Only" in the text in order to point out the difference to the interactive cleanup – which could of course also be used as a preview, if you close it with "Cancel". Release process is on its way now, so this will be available very soon :-) Kind regards, |
Hi ZEAL-IT, thanks again for this great idea! This is now available with version 1.6.0, which was just released! Kind regards, |
This all makes a lot of sense, thanks a lot! |
Hello,
while I introduced this great functionality to some colleagues, I noticed that even when trying to jump into interactive mode I'm already changing the class, therefore I must be added to the transport request. We want to use the cleaner in Code Reviews, so I would like to see how much the cleaner finds, but in a "read only" mode if that makes sense?
What do you think?
The text was updated successfully, but these errors were encountered: