-
Notifications
You must be signed in to change notification settings - Fork 13
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
De-static IceAdapter class #64
Conversation
@@ -99,10 +99,10 @@ public void initStaticVariables() { | |||
|
|||
runOnUIThread(() -> { | |||
controller.versionLabel.setText("Version: %s".formatted(IceAdapter.VERSION)); |
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.
why not IceAdapter.getVersion()
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.
Because I ported the old commit and things have changed since then 😛 Will fix
public static void init() { | ||
log.info("Creating RPC server on port {}", IceAdapter.RPC_PORT); | ||
public static void init(int port) { | ||
Debug.RPC_PORT = port; |
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.
Why RPC_PORT not in RPCService?
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.
same as below
loadOptions(iceOptions); | ||
Debug.DELAY_UI_MS = iceOptions.getDelayUi(); | ||
Debug.ENABLE_DEBUG_WINDOW = iceOptions.isDebugWindow(); | ||
Debug.ENABLE_INFO_WINDOW = iceOptions.isInfoWindow(); |
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.
Why do we create a new static variable if we have it in IceOptions?
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.
Will come in a later commit ;) One thing at a time.
Prepare a slow transition from static-everything to dependency injection
a509f31
to
a0aa9ca
Compare
@GodFuper Okay I made all static variables of IceAdapter class private now, with restricted access via (still static) getters. If you look into the original PR, I try to go one class at a time, so the review scope is smaller and I don't intentionally introduce different behavior. |
Prepare a slow transition from static-everything to dependency injection
Stripped out of #38