Can someone help me out with menu logic in EditorWindow?

I embarked on what I thought would be a super-simple exercise in changing some of the Help menu entries in the Editor to point at more updated files, more meaningful files, etc, etc. “How Hard Could It Be”???

But I’ve discovered that EditorWindow.java uses some kind of menu-indirection control system thing… AND I don’t think it’s actually working properly.

PROBLEM #1 - In the current “working” version, the 3rd menu entry is supposed to say “Reference Manual” but it instead displays the string “Component Help”. (Also I don’t understand why the code for that 3rd menu entry is done in a weird different way from e.g. the first entry. It’s got like a GIF and stuff except that I never see a gif come up when I look at the actual menu).

PROBLEM #2 - If I decide to put in NEW entries, every single one of them displays the string “Help” as the menu item instead of the string I pass, even though I enter a normal new Editor.ModuleEditor.blah_blah_blah thing and put an entry in properties.

PROBLEM #3 - Why are there apparently two copies of e.g. Editor.properties in our project tree? Which is the one I’m supposed to use?

Any help most appreciated.

Brian

Thus spake Cattlesquat:

PROBLEM #3 - Why are there apparently two copies of e.g.
Editor.properties in our project tree? Which is the one I’m supposed to
use?

Are the two you’re seeing

vassal-app/src/main/resources/VASSAL/i18n/Editor.properties
vassal-app/target/classes/VASSAL/i18n/Editor.properties

?

The former is the one which is checked in, the latter is the one which
gets copied to a staging area during builds and is not checked in.

Edit the one in src.


J.

Thus spake Cattlesquat:

PROBLEM #2 - If I decide to put in NEW entries, every single one of them
displays the string “Help” as the menu item instead of the string I
pass, even though I enter a normal new
Editor.ModuleEditor.blah_blah_blah thing and put an entry in properties.

Related to #3: Are you sure you’ve edited the right properties file?


J.

Thus spake Cattlesquat:

I embarked on what I thought would be a super-simple exercise in
changing some of the Help menu entries in the Editor to point at more
updated files, more meaningful files, etc, etc. “How Hard Could It
Be”???

But I’ve discovered that EditorWindow.java uses some kind of
menu-indirection control system thing… AND I don’t think it’s actually
working properly.

PROBLEM #1 - In the current “working” version, the 3rd menu entry is
supposed to say “Reference Manual” but it instead displays the string
“Component Help”. (Also I don’t understand why the code for that 3rd
menu entry is done in a weird different way from e.g. the first entry.
It’s got like a GIF and stuff except that I never see a gif come up when
I look at the actual menu).

Something is definitely not right there. The only place where
Editor.ModuleEditor.component_help is used is in ConfigureTree. It
looks like that’s somehow clobbering the other menu entry, but I don’t
see how exactly on a quick look.


J.

Okay, I was editing the one in the “src” tree, and indeed it turns out my changes have migrated over to the other one, so THAT part’s now not confusing.

But yeah, the other more confounding stuff is still a problem. I started putting my new stuff “just following the pattern of what was there”, and then it wasn’t working so then I looked at what was already there and discovered it isn’t-quite-exactly-working either.

I have not played in this pool before, can’t help sorry.

This is now straightened out. PR #164 for details & fix.