X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Client.java;h=0f1a25e6fc1e8907c51e3093346d026483a5d894;hb=b19bd11f40441f651012d161f2e61ee7d45a5208;hp=696ddeb4619b245a001be5382539c6145fd9c9ef;hpb=ad15cff29620f960119f80176f1fd443da9f6763;p=jalview.git diff --git a/src/jalview/ws/jws2/Jws2Client.java b/src/jalview/ws/jws2/Jws2Client.java index 696ddeb..0f1a25e 100644 --- a/src/jalview/ws/jws2/Jws2Client.java +++ b/src/jalview/ws/jws2/Jws2Client.java @@ -67,7 +67,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient this.preset = preset; if (preset != null) { - if (!((preset instanceof JabaPreset) || preset instanceof JabaWsParamSet)) + if (!((preset instanceof JabaPreset) + || preset instanceof JabaWsParamSet)) { /* * { this.preset = ((JabaPreset) preset).p; } else if (preset instanceof @@ -78,7 +79,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient * arguments. for (Argument opt : arguments) { newargs.add(opt); } } * paramset = newargs; } else { */ - throw new Error(MessageManager.getString("error.implementation_error_can_only_instantiate_jaba_param_sets")); + throw new Error(MessageManager.getString( + "error.implementation_error_can_only_instantiate_jaba_param_sets")); } } else @@ -104,9 +106,10 @@ public abstract class Jws2Client extends jalview.ws.WSClient sh.paramStore = new JabaParamStore(sh, Desktop.getUserParameterStore()); } - WsJobParameters jobParams = (preset == null && paramset != null && paramset - .size() > 0) ? new WsJobParameters(null, sh, null, paramset) - : new WsJobParameters(sh, preset); + WsJobParameters jobParams = (preset == null && paramset != null + && paramset.size() > 0) + ? new WsJobParameters(null, sh, null, paramset) + : new WsJobParameters(sh, preset); if (adjustingExisting) { jobParams.setName(MessageManager @@ -119,8 +122,9 @@ public abstract class Jws2Client extends jalview.ws.WSClient WsParamSetI prset = jobParams.getPreset(); if (prset == null) { - paramset = jobParams.isServiceDefaults() ? null : JabaParamStore - .getJabafromJwsArgs(jobParams.getJobParams()); + paramset = jobParams.isServiceDefaults() ? null + : JabaParamStore + .getJabafromJwsArgs(jobParams.getJobParams()); this.preset = null; } else @@ -147,9 +151,11 @@ public abstract class Jws2Client extends jalview.ws.WSClient WsURL = serv.hosturl; if (!b) { - return new WebserviceInfo(WebServiceJobTitle, WebServiceJobTitle - + " using service hosted at " + serv.hosturl + "\n" - + (serv.description != null ? serv.description : ""), false); + return new WebserviceInfo(WebServiceJobTitle, + WebServiceJobTitle + " using service hosted at " + + serv.hosturl + "\n" + + (serv.description != null ? serv.description : ""), + false); } return null; } @@ -174,7 +180,6 @@ public abstract class Jws2Client extends jalview.ws.WSClient */ abstract void attachWSMenuEntry(JMenu wsmenu, final Jws2Instance service, final AlignFrame alignFrame); - protected boolean registerAAConWSInstance(final JMenu wsmenu, final Jws2Instance service, final AlignFrame alignFrame) @@ -219,7 +224,7 @@ public abstract class Jws2Client extends jalview.ws.WSClient removeCurrentAAConWorkerFor(aaui, alignFrame); buildCurrentAAConWorkerFor(aaui, alignFrame, service); } - }// ); + } // ); } } } @@ -231,7 +236,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient final JCheckBoxMenuItem aaConEnabled = new JCheckBoxMenuItem( aaui.getAAconToggle()); - aaConEnabled.setToolTipText(JvSwingUtils.wrapTooltip(true, aaui.getAAconToggleTooltip())); + aaConEnabled.setToolTipText( + JvSwingUtils.wrapTooltip(true, aaui.getAAconToggleTooltip())); aaConEnabled.addActionListener(new ActionListener() { @Override @@ -253,10 +259,10 @@ public abstract class Jws2Client extends jalview.ws.WSClient }); wsmenu.add(aaConEnabled); - final JMenuItem modifyParams = new JMenuItem(aaui.getAAeditSettings()); - modifyParams.setToolTipText("
" - + JvSwingUtils.wrapTooltip(false, aaui.getAAeditSettingsTooltip() - + "
") + ""); + final JMenuItem modifyParams = new JMenuItem( + aaui.getAAeditSettings()); + modifyParams.setToolTipText(JvSwingUtils.wrapTooltip(true, + aaui.getAAeditSettingsTooltip())); modifyParams.addActionListener(new ActionListener() { @@ -274,8 +280,9 @@ public abstract class Jws2Client extends jalview.ws.WSClient public void menuSelected(MenuEvent arg0) { // TODO: refactor to the implementing class. - if (alignFrame.getViewport().getAlignment().isNucleotide() ? aaui - .isNa() : aaui.isPr()) + if (alignFrame.getViewport().getAlignment().isNucleotide() + ? aaui.isNa() + : aaui.isPr()) { aaConEnabled.setEnabled(true); modifyParams.setEnabled(true); @@ -379,11 +386,11 @@ public abstract class Jws2Client extends jalview.ws.WSClient { if (service != null) { - if (!service.serviceType.toString().equals( - compbio.ws.client.Services.AAConWS.toString())) + if (!service.serviceType.toString() + .equals(compbio.ws.client.Services.AAConWS.toString())) { - Cache.log - .warn("Ignoring invalid preferred service for AACon calculations (service type was " + Cache.log.warn( + "Ignoring invalid preferred service for AACon calculations (service type was " + service.serviceType + ")"); service = null; } @@ -408,7 +415,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient { // TODO raise dialog box explaining error, and/or open the JABA // preferences menu. - throw new Error(MessageManager.getString("error.no_aacon_service_found")); + throw new Error( + MessageManager.getString("error.no_aacon_service_found")); } return new AAConSettings(true, service, null, null); }