-
Notifications
You must be signed in to change notification settings - Fork 0
fixing 'edit host configuration' menu item #1456
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
Conversation
…ct being disposed of when menu not open
This isn't quite true - the exceptions occured due to attempting to use a menu (via There was a separate issue relating to the finalizer, which would never have run because the listener itself has a reference back to |
JackEAllen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and works as expected. I can't edit the host configuration on another instrument as to be expected, but can on my own dev instrument setup.
I have left a few nit-picks which I would like to get your opinion on.
base/uk.ac.stfc.isis.ibex.ui.blocks/src/uk/ac/stfc/isis/ibex/ui/blocks/groups/BlocksMenu.java
Outdated
Show resolved
Hide resolved
base/uk.ac.stfc.isis.ibex.ui.blocks/src/uk/ac/stfc/isis/ibex/ui/blocks/groups/BlocksMenu.java
Outdated
Show resolved
Hide resolved
|
When this issue is ready for merging, The changes should be squashed and merged to changes are easier to cherry pick into release. |
base/uk.ac.stfc.isis.ibex.ui.blocks/src/uk/ac/stfc/isis/ibex/ui/blocks/groups/BlocksMenu.java
Outdated
Show resolved
Hide resolved
…rn from createEditBlockLabelAndAction
|
From a quick test, still behaves as expected. |
JackEAllen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍
* fixing 'edit host configuration' menu item - due to listeners on object being disposed of when menu not open * review comments * further review comments, remove editBlockAction as instance var, return from createEditBlockLabelAndAction (cherry picked from commit f05f3dc)
* fixing 'edit host configuration' menu item - due to listeners on object being disposed of when menu not open * review comments * further review comments, remove editBlockAction as instance var, return from createEditBlockLabelAndAction (cherry picked from commit f05f3dc)
The exceptions occurred due to the finalizer method of the BlocksMenu class trying to remove a listener which had already been disposed of if the menu was not open.
There is a slight difference in the way that the 'edit host configuration/component' menu item is now greyed out instead of invisible when a user does not have write access to a block, though I think this is more clear.