-
Notifications
You must be signed in to change notification settings - Fork 14
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
Provide error message if unsupported protocol was used #113
Conversation
Actually, in Insight I should not just pass on the error message, but use something more helpful for the user. I'll change that. |
@@ -62,6 +62,7 @@ | |||
import javax.swing.event.DocumentListener; | |||
|
|||
import org.openmicroscopy.shoola.env.config.OMEROInfo; | |||
import org.openmicroscopy.shoola.env.config.Registry; |
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.
something is not quite right in this class.
env.*
classes should not have leaked in this more general package.
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 like I introduced these imports when overhauling the login screen / server editor. Hm, gonna need quite some workarounds to get rid off them.
Just moved the |
It looks like it wasn't build with my gateway PR ome/omero-gateway-java#34 then. With that PR it will then say "XYZ is not supported". Thought the merge build contains all open PRs of all repositories? |
I will try again. I used yesterday's server build since I could not log in to merge-ci |
The dialog pops up twice with the same message if you click ok the first time |
Moving of the login package to util has probably caused that one looses all the previous server settings because the java prefs location is determinded by the classname. I'll add another commit to fix that. |
@mtbc when the server name is entered, there is no interaction with the gateway at that stage |
The problem with the previous server list being lost is indeed due to moving the ServerEditor class into a different package. Shall I just close the PR? Not worth spending lots of time on this. |
Let's fix the protocol error notification problem in this PR |
Added a simple workaround to load the old server list. This can simply be removed again in a later release. |
Preferences prefs = Preferences.userNodeForPackage(ServerEditor.class); | ||
List<String> servers = getServersFromPrefs(prefs); | ||
|
||
// Workaround to load old preferences (remove again in next release): |
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.
That's only true if the user definitely installs this version, correct?
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.
That's true... maybe 'next release' is a bit too optimistic.
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.
It's a bit pity that one needs the class to really exist to load the Preferences, afaik not possible to just load by name.
I will include that PR and prepare a release of gateway next week. Then bump the version |
Small problem I noticed The latest server is not remember e.g.
|
Sorry, totally missed the last comment. I'll have a look at the issue today. |
I think the issue #113 (comment) was introduced with #66 . Trying to find out how, then I can fix it in this PR. |
#113 (comment) should be hopefully fixed now by the last commit. |
The latest server is selected. The last commit works. |
There was some weird code which had the effect the ActionListener was added multiple times. So this should be fixed now too. |
Looks good now |
See Gateway PR ome/omero-gateway-java#34 , respectively issue ome/omero-gateway-java#33 .
Test
Check that 'normal' login (hostname) and websocket login still works.
Check that you get a sensible error message if you try something like 'smb://someserver.org' .