+ private String getSelectedInputToken()
+ {
+ if (iprms.getSelectedIndex() > -1)
+ {
+ String toktoedit = (String) iprms.getSelectedValue();
+ toktoedit = toktoedit.substring(0, toktoedit.indexOf(" "));
+ return toktoedit;
+ }
+ return null;
+ }
+
+ @Override
+ protected void iprmListSelection_doubleClicked()
+ {
+ String toktoedit = getSelectedInputToken();
+ if (toktoedit != null)
+ {
+ InputType toedit = currentservice.getInputParams().get(toktoedit);
+ String oldParam = toktoedit;
+ RestInputParamEditDialog dialog = new RestInputParamEditDialog(this,
+ currentservice, toedit);
+ if (dialog.wasUpdated())
+ {
+ currentservice.getInputParams().remove(oldParam);
+ currentservice.getInputParams().put(dialog.current.token,
+ dialog.current);
+ initGuiWith(currentservice);
+ }
+
+ }
+ }
+
+ @Override
+ protected void iprmsAdd_actionPerformed(ActionEvent e)
+ {
+ RestInputParamEditDialog dialog = new RestInputParamEditDialog(this,
+ currentservice,
+ "param" + (1 + currentservice.getInputParams().size()));
+ if (dialog.wasUpdated())
+ {
+ currentservice.getInputParams().put(dialog.current.token,
+ dialog.current);
+ initGuiWith(currentservice);
+ }
+
+ }
+
+ @Override
+ protected void iprmsRem_actionPerformed(ActionEvent e)
+ {
+ String toktoedit = getSelectedInputToken();
+ if (toktoedit != null)
+ {
+ currentservice.getInputParams().remove(toktoedit);
+ initGuiWith(currentservice);
+
+ }
+ }
+
+ @Override
+ protected void rdata_rightClicked(MouseEvent mouse)
+ {
+ final int rdatasel = rdata.getSelectedIndex();
+ if (rdatasel > -1)
+ {
+ JPopupMenu popup = new JPopupMenu(
+ MessageManager.getString("label.select_return_type"));
+ for (final JvDataType type : JvDataType.values())
+ {
+ popup.add(new JMenuItem(type.name()))
+ .addActionListener(new ActionListener()
+ {
+
+ @Override
+ public void actionPerformed(ActionEvent e)
+ {
+ currentservice.getResultDataTypes().set(rdatasel, type);
+ initGuiWith(currentservice);
+ rdata.setSelectedIndex(rdatasel);
+ }
+ });
+ }
+ popup.show(rdata, mouse.getX(), mouse.getY());
+ }
+ }
+
+ @Override
+ protected void rdataAdd_actionPerformed(ActionEvent e)
+ {
+ int p;
+ if ((p = rdata.getSelectedIndex()) > -1)