[Lang] Ctrl-Z in custom languages

I have an "Create field" intention from custom language, which creates
an new field in an java-class.
The field is correctly created, and the references to it where updated.
But Ctrl-Z does not work from the custom lang file. I must go to the
related java-file and press Ctrl-Z.

When renaming an field, it works. So I assume Ctrl-Z only works when
something was changed in the current file.

Bug or feature?

3 comments
Comment actions Permalink

Hello Sven,

SS> I have an "Create field" intention from custom language, which
SS> creates an new field in an java-class.
SS> The field is correctly created, and the references to it where
SS> updated.
SS> But Ctrl-Z does not work from the custom lang file. I must go to the
SS> related java-file and press Ctrl-Z.
SS> When renaming an field, it works. So I assume Ctrl-Z only works when
SS> something was changed in the current file.

Right. And it doesn't really have much to do with custom languages...

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Ok, is this an wanted behaviour our should I file an bug report?

Dmitry Jemerov (JetBrains) schrieb:

Hello Sven,

SS> I have an "Create field" intention from custom language, which
SS> creates an new field in an java-class.
SS> The field is correctly created, and the references to it where
SS> updated.
SS> But Ctrl-Z does not work from the custom lang file. I must go to the
SS> related java-file and press Ctrl-Z.
SS> When renaming an field, it works. So I assume Ctrl-Z only works when
SS> something was changed in the current file.

Right. And it doesn't really have much to do with custom languages...

0
Comment actions Permalink

Sven Steiniger wrote:

Ok, is this an wanted behaviour our should I file an bug report?


Hmm, since you didn't change anything in the current file, I think the behavior is OK. I
wouldn't want the Undo action to change anything I can't see and what I'm not aware of.

AFAIK, there's a way to make it work by prompting the user to undo a certain action.
Something like CommandProcessor.markCurrentCommandAsComplex().

Sascha

0

Please sign in to leave a comment.