buildship icon indicating copy to clipboard operation
buildship copied to clipboard

Undo and redo in build script editor applies to most recent opened file

Open TheKodeToad opened this issue 3 years ago • 1 comments

Expected Behavior

Undo and redo should apply in the focused editor.

Current Behavior

Undo and redo applies to the most recently opened editor.

Context

I often open multiple build scripts, and switch back to earlier tabs. This means if I make a mistake in a build script, and try to undo it, it doesn't work. This usually leads to either rewriting a fairly significant portion of the script, or closing and reopening the editor to revert to the last save.

Steps to Reproduce

In this case, it's pretty much project agnostic.

  1. Create two .gradle files.
  2. Open both of them.
  3. Edit the first script.
  4. Edit the second script.
  5. Return to the first script, and press Ctrl+Z.
  6. Observe that the undo has been applied in the second editor.

Your Environment

Gradle version (probably) doesn't matter since the Gradle editor seems to be fairly minimal. Eclipse version is 2022-06 for Java Developers. I've had this issue since updating to 2020-03. It stopped occuring after downgrading to 2019-12.

TheKodeToad avatar Jul 15 '22 15:07 TheKodeToad

Experiencing the same issue.

finrod2002 avatar Sep 14 '22 07:09 finrod2002

Same here, annoying!!!

Workaround: Open in text editor :/

sebpaul avatar Dec 22 '22 11:12 sebpaul

You can also use the Groovy development plugin's editor.

TheKodeToad avatar Dec 22 '22 13:12 TheKodeToad

You can also use the Groovy development plugin's editor.

...when it is installed. It is not part of Buildship or of any Eclipse distribution I use.

sebpaul avatar Dec 22 '22 15:12 sebpaul

You can also use the Groovy development plugin's editor.

...when it is installed. It is not part of Buildship or of any Eclipse distribution I use.

Yes, this certainly needs fixing.

TheKodeToad avatar Dec 22 '22 15:12 TheKodeToad

I'm using Buildship 3.1.6 and undo/redo are completely disabled in the build.gradle editor. Even the menu items under the Edit menu are disabled. This seems like a pretty major defect in the editor - I mean undo/redo is pretty much required functionality in any text editor. Is this being worked on? Have any of the contributors responded to this report?

erizzo avatar Apr 14 '23 19:04 erizzo

@donat can you or any other members of the dev team comment on this issue?

erizzo avatar Apr 19 '23 15:04 erizzo

I am also using Buildship 3.1.6 with Eclipse IDE for Enterprise Java and Web Developers, Version: 2022-12 (4.26.0). Undo works for me, but only in the last opened Gradle-Editor. So be sure to close any other build scripts before editing another one ;)

Am Mi., 19. Apr. 2023 um 17:58 Uhr schrieb Eric Rizzo < @.***>:

@donat https://github.com/donat can you or any other members of the dev team comment on this issue?

— Reply to this email directly, view it on GitHub https://github.com/eclipse/buildship/issues/1188#issuecomment-1514981404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAXMBPUAE7TRLAPDWOINMXDXCADQTANCNFSM53V565JQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

sebpaul avatar Apr 20 '23 07:04 sebpaul

I was also able to reproduce it. It seems like the editor implementation class has either the wrong superclass or something is off in its configuration.

I don't have the capacity to investigate right now. At the same time, if anyone from the community can help out with a pull request I'll be happy to review it.

donat avatar Apr 20 '23 12:04 donat