Package org.eclipse.ecf.remoteservices.ui.RemoteMethod

Examples of org.eclipse.ecf.remoteservices.ui.RemoteMethod.Parameter


      public Image getColumnImage(Object element, int columnIndex) {
        return null;
      }

      public String getColumnText(Object element, int columnIndex) {
        final Parameter p = (Parameter) element;
        if (columnIndex == 0) {
          final String name = p.getParameter().getName();
          if (name.charAt(0) == 'j') {
            // this is java.lang.String
            return "String"; //$NON-NLS-1$
          } else {
            return name;
          }
        } else {
          return p.getArgument();
        }
      }

      public void addListener(ILabelProviderListener listener) {
      }

      public void dispose() {
      }

      public boolean isLabelProperty(Object element, String property) {
        return true;
      }

      public void removeListener(ILabelProviderListener listener) {
      }
    });
    parametersViewer.setCellEditors(new CellEditor[] { null,
        new TextCellEditor(parametersViewer.getTable()) });
    parametersViewer.setCellModifier(new ICellModifier() {
      public boolean canModify(Object element, String property) {
        return property.equals(COLUMN_PROPERTIES[1]);
      }

      public Object getValue(Object element, String property) {
        return ((Parameter) element).getArgument();
      }

      public void modify(Object element, String property, Object value) {
        if (property.equals(COLUMN_PROPERTIES[1])) {
          if (element instanceof TableItem) {
            final TableItem item = ((TableItem) element);
            final Parameter p = (Parameter) item.getData();
            final String argument = (String) value;
            p.setArgument(argument);
            item.setText(1, argument);
          }
        }
      }
    });
View Full Code Here

TOP

Related Classes of org.eclipse.ecf.remoteservices.ui.RemoteMethod.Parameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.