-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Refector: MainMenuHandler: action handlers takes ActionEvent object #1055
Closed
miurahr
wants to merge
13
commits into
master
from
topic/miurahr/editor/menu-item-by-editor-properties-listener
Closed
Refector: MainMenuHandler: action handlers takes ActionEvent object #1055
miurahr
wants to merge
13
commits into
master
from
topic/miurahr/editor/menu-item-by-editor-properties-listener
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
miurahr
changed the title
Refector: MainMenuHanlder: avoid reference to a MainWindow object to improve object-oriented paradigm
Refector: MainMenuHandler: avoid reference to a MainWindow object to improve object-oriented paradigm
Jun 13, 2024
- extend invokeAction to take ActionEvent - extend several methods Signed-off-by: Hiroshi Miura <[email protected]>
Signed-off-by: Hiroshi Miura <[email protected]>
- unbundle a menu object from MainWindow class for unit test Signed-off-by: Hiroshi Miura <[email protected]>
- hide field and add getters - allow a future refactoring Signed-off-by: Hiroshi Miura <[email protected]>
Signed-off-by: Hiroshi Miura <[email protected]>
Signed-off-by: Hiroshi Miura <[email protected]>
miurahr
force-pushed
the
topic/miurahr/editor/menu-item-by-editor-properties-listener
branch
from
June 14, 2024 05:07
fdde568
to
6645fd0
Compare
miurahr
commented
Jun 14, 2024
miurahr
changed the title
Refector: MainMenuHandler: avoid reference to a MainWindow object to improve object-oriented paradigm
Refector: MainMenuHandler: give ActionEvent object to action handlers
Jun 14, 2024
miurahr
changed the title
Refector: MainMenuHandler: give ActionEvent object to action handlers
Refector: MainMenuHandler: action handlers takes ActionEvent object
Jun 14, 2024
Move initMainMenu static method from Core to MainWindowUI utility class. Signed-off-by: Hiroshi Miura <[email protected]>
miurahr
commented
Jun 14, 2024
- All handler takes ActionEvent as argument - Rewrite invokeAction call by new one - Keep backward compatible invokeAction(String action, int modifier) Signed-off-by: Hiroshi Miura <[email protected]>
- Replace mainWindow object access in menu handler with Core.getMainWindow() - Add default MainWindowMenuHandler constructor w/o argument - Remove mainWindow field in handler - Remove redundant override in test codes Signed-off-by: Hiroshi Miura <[email protected]>
- MainWindowUI.createSearchWindow - MainWindowUI.findInProjectReuseLastWindow - MainWindowUI.getTrimmedSelectedTextInMainWindow - MainWindowUI.projectExit - MainWindowUI.projectRestart - MainWindowUI.prepareForExit Signed-off-by: Hiroshi Miura <[email protected]>
- use MainWindowMenuHandler for the test Signed-off-by: Hiroshi Miura <[email protected]>
- drop BaseMainWindowMenuHandler because acceptance test can be implemented with MainWindowMenuHandler Signed-off-by: Hiroshi Miura <[email protected]>
There are too many refactoring in single PR. It is required to split into series of Pull-Requests. |
…roperties-listener
this is over-engineered, so I think I can close here and raise another PR in proper size. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request type
refactor
Which ticket is resolved?
What does this PR change?
MainMenuHandler
: avoid direct reference to real MainWindow object when getting a menu item status of action event occurred, by passing ActionEvent object to handler method, by usingActionEvent#getSource
.Core
as a private to allow further refactoring.MainWindowMenu
inCore
and put it in private fieldCore#getMainMenu
and changeMainWindow#getMainMenu
to proxy itOther information