X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fws%2Fjws2%2FJws2Client.java;h=fa43e7c8a7998a3f937bfbace4a788b0ff0e88d5;hb=b2f9a8d7bce642ff4011bc6d49e02bb0569fbb11;hp=e6b4cf577f68d448a0598ef2ac49f17b6c925560;hpb=c9df7697dacf668e97290c57d4d117ac8cc40bc8;p=jalview.git diff --git a/src/jalview/ws/jws2/Jws2Client.java b/src/jalview/ws/jws2/Jws2Client.java index e6b4cf5..fa43e7c 100644 --- a/src/jalview/ws/jws2/Jws2Client.java +++ b/src/jalview/ws/jws2/Jws2Client.java @@ -1,19 +1,20 @@ /* - * Jalview - A Sequence Alignment Editor and Viewer (Version 2.7) - * Copyright (C) 2011 J Procter, AM Waterhouse, J Engelhardt, LM Lui, G Barton, M Clamp, S Searle + * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.1) + * Copyright (C) 2014 The Jalview Authors * * This file is part of Jalview. * * Jalview is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - * + * * Jalview is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty * of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. */ package jalview.ws.jws2; @@ -27,6 +28,7 @@ import jalview.gui.AlignFrame; import jalview.gui.Desktop; import jalview.gui.WebserviceInfo; import jalview.gui.WsJobParameters; +import jalview.util.MessageManager; import jalview.ws.jws2.dm.JabaWsParamSet; import jalview.ws.jws2.jabaws2.Jws2Instance; import jalview.ws.params.WsParamSetI; @@ -45,8 +47,8 @@ public abstract class Jws2Client extends jalview.ws.WSClient protected List paramset; - public Jws2Client(AlignFrame _alignFrame, - WsParamSetI preset, List arguments) + public Jws2Client(AlignFrame _alignFrame, WsParamSetI preset, + List arguments) { alignFrame = _alignFrame; this.preset = preset; @@ -78,6 +80,7 @@ public abstract class Jws2Client extends jalview.ws.WSClient { return processParams(sh, editParams, false); } + protected boolean processParams(Jws2Instance sh, boolean editParams, boolean adjustingExisting) { @@ -89,10 +92,12 @@ public abstract class Jws2Client extends jalview.ws.WSClient sh.paramStore = new JabaParamStore(sh, Desktop.getUserParameterStore()); } - WsJobParameters jobParams = 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("Adjusting parameters for existing Calculation"); + jobParams.setName(MessageManager.getString("label.adjusting_parameters_for_calculation")); } if (!jobParams.showRunDialog()) { @@ -101,8 +106,9 @@ public abstract class Jws2Client extends jalview.ws.WSClient WsParamSetI prset = jobParams.getPreset(); if (prset == null) { - paramset = JabaParamStore.getJabafromJwsArgs(jobParams - .getJobParams()); + paramset = jobParams.isServiceDefaults() ? null : JabaParamStore + .getJabafromJwsArgs(jobParams.getJobParams()); + this.preset = null; } else {