{
if (sh.paramStore == null)
{
- sh.paramStore = new JabaParamStore(sh, Desktop.getUserParameterStore());
+ sh.paramStore = new JabaParamStore(sh,
+ Desktop.getUserParameterStore());
}
WsJobParameters jobParams = new WsJobParameters(sh, preset);
if (!jobParams.showRunDialog())
rmsawsmenu.add(msawsmenu);
calcName = "";
}
+ boolean hasparams = false;
+ try
+ {
+ hasparams = (service.getRunnerConfig().getArguments().size() > 0);
+ } catch (Exception e)
+ {
+ }
do
{
if (submitGaps == true)
rmsawsmenu.add(msawsmenu);
}
final boolean withGaps = submitGaps;
+
JMenuItem method = new JMenuItem(calcName + "Defaults");
method.setToolTipText("Align with default settings");
}
});
msawsmenu.add(method);
- method = new JMenuItem(calcName + "Edit and run ...");
- method.setToolTipText("View and change the parameters before alignment.");
-
- method.addActionListener(new ActionListener()
+ if (hasparams)
{
- public void actionPerformed(ActionEvent e)
- {
- AlignmentView msa = alignFrame.gatherSequencesForAlignment();
- new MsaWSClient(service, null, null, true, alignFrame.getTitle(),
- msa, withGaps, true, alignFrame.getViewport()
- .getAlignment().getDataset(), alignFrame);
+ // only add these menu options if the service has user-modifiable arguments
+ method = new JMenuItem(calcName + "Edit and run ...");
+ method.setToolTipText("View and change the parameters before alignment.");
- }
- });
- msawsmenu.add(method);
- List<WsParamSetI> presets = service.getParamStore().getPresets();
- if (presets != null && presets.size() > 0)
- {
- JMenu presetlist = new JMenu(calcName + "Presets");
+ method.addActionListener(new ActionListener()
+ {
+ public void actionPerformed(ActionEvent e)
+ {
+ AlignmentView msa = alignFrame.gatherSequencesForAlignment();
+ new MsaWSClient(service, null, null, true, alignFrame
+ .getTitle(), msa, withGaps, true, alignFrame
+ .getViewport().getAlignment().getDataset(), alignFrame);
- for (final WsParamSetI preset : presets)
+ }
+ });
+ msawsmenu.add(method);
+ List<WsParamSetI> presets = service.getParamStore().getPresets();
+ if (presets != null && presets.size() > 0)
{
- final JMenuItem methodR = new JMenuItem(preset.getName());
- methodR.setToolTipText("<html><p>"+JvSwingUtils.wrapTooltip("<strong>"
- + (preset.isModifiable() ? "User Preset"
- : "Service Preset") + "</strong><br/>"
- + preset.getDescription() + "</p>")+"</html>");
- methodR.addActionListener(new ActionListener()
+ JMenu presetlist = new JMenu(calcName + "Presets");
+
+ for (final WsParamSetI preset : presets)
{
- public void actionPerformed(ActionEvent e)
+ final JMenuItem methodR = new JMenuItem(preset.getName());
+ methodR.setToolTipText("<html><p>"
+ + JvSwingUtils.wrapTooltip("<strong>"
+ + (preset.isModifiable() ? "User Preset"
+ : "Service Preset") + "</strong><br/>"
+ + preset.getDescription() + "</p>") + "</html>");
+ methodR.addActionListener(new ActionListener()
{
- AlignmentView msa = alignFrame.gatherSequencesForAlignment();
- new MsaWSClient(service, preset, alignFrame.getTitle(), msa,
- false, true, alignFrame.getViewport().getAlignment()
- .getDataset(), alignFrame);
+ public void actionPerformed(ActionEvent e)
+ {
+ AlignmentView msa = alignFrame
+ .gatherSequencesForAlignment();
+ new MsaWSClient(service, preset, alignFrame.getTitle(),
+ msa, false, true, alignFrame.getViewport()
+ .getAlignment().getDataset(), alignFrame);
- }
+ }
- });
- presetlist.add(methodR);
+ });
+ presetlist.add(methodR);
+ }
+ msawsmenu.add(presetlist);
}
- msawsmenu.add(presetlist);
}
if (!submitGaps && canSubmitGaps())
{