Examples of StringResult


Examples of org.eclipse.swtbot.swt.finder.results.StringResult

   * Gets the current selection text.
   *
   * @return the selection in the styled text
   */
  public String getSelection() {
    return syncExec(new StringResult() {
      public String run() {
        return widget.getSelectionText();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

   *
   * @param line the line number, 0 based.
   * @return the text on the given line number, without the line delimiters.
   */
  public String getTextOnLine(final int line) {
    return syncExec(new StringResult() {
      public String run() {
        return widget.getContent().getLine(line);
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

    clickXY(cellBounds.x + (cellBounds.width / 2), cellBounds.y + (cellBounds.height / 2));
    return this;
  }

  public String getText() {
    return syncExec(new StringResult() {
      public String run() {
        return widget.getText();
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

    if (column == 0) {
      return getText();
    }
    int columnCount = new SWTBotTree(tree).columnCount();
    Assert.isLegal(column < columnCount, java.text.MessageFormat.format("The column index ({0}) is more than the number of column({1}) in the tree.", column, columnCount)); //$NON-NLS-1$
    return syncExec(new StringResult() {
      public String run() {
        return widget.getText(column);
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

    Assert.isLegal(row < rowCount, "The row number (" + row + ") is more than the number of rows(" + rowCount + ") in the tree."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
    Assert.isLegal(column < columnCount, "The column number (" + column + ") is more than the number of column(" + columnCount //$NON-NLS-1$ //$NON-NLS-2$
        + ") in the tree."); //$NON-NLS-1$

    return syncExec(new StringResult() {
      public String run() {
        TreeItem item = widget.getItem(row);
        return item.getText(column);
      }
    });
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

   * Attempts to select the current item.
   *
   * @return the current selection in the combo box.
   */
  public String selection() {
    return syncExec(new StringResult() {
      public String run() {
        return widget.getItem(widget.getSelectionIndex());
      }
    });
  }
View Full Code Here

Examples of org.eclipse.swtbot.swt.finder.results.StringResult

   * @return the cell at the location specified by the row and column
   */
  public String cell(final int row, final int column) {
    assertIsLegalCell(row, column);

    return syncExec(new StringResult() {
      public String run() {
        TableItem item = widget.getItem(row);
        return item.getText(column);
      }
    });
View Full Code Here

Examples of org.glassfish.admin.rest.provider.StringResult

ActionReport actionReport = __resourceUtil.runCommand(commandName, properties, RestService.getHabitat());

ActionReport.ExitCode exitCode = actionReport.getActionExitCode();

StringResult results = new StringResult(commandName, __resourceUtil.getMessage(actionReport), options());
if (exitCode == ActionReport.ExitCode.SUCCESS) {
results.setStatusCode(200); /*200 - ok*/
} else {
results.setStatusCode(400); /*400 - bad request*/
results.setIsError(true);
results.setErrorMessage(actionReport.getMessage());
}

return results;

} catch (Exception e) {
View Full Code Here

Examples of org.infinispan.cli.interpreter.result.StringResult

      XSiteAdminOperations xsiteAdmin = cache.getAdvancedCache().getComponentRegistry().getComponent(XSiteAdminOperations.class);
      for (Option opt : options) {
         switch (opt.toEnum(Options.class)) {
         case STATUS: {
            String status = siteName == null ? xsiteAdmin.status() : xsiteAdmin.siteStatus(siteName);
            return new StringResult(status);
         }
         case ONLINE: {
            if (siteName != null) {
               return new StringResult(xsiteAdmin.bringSiteOnline(siteName));
            } else {
               throw log.siteNameNotSpecified();
            }
         }
         case OFFLINE: {
            if (siteName != null) {
               return new StringResult(xsiteAdmin.takeSiteOffline(siteName));
            } else {
               throw log.siteNameNotSpecified();
            }
         }
         }
View Full Code Here

Examples of org.milyn.payload.StringResult

    public void receive(Object object,
                        PipelineContext context) {
        this.smooks.setClassLoader( context.getClassLoader() );
        Object result = null;
        try {
            StringResult stringResult = new StringResult();
            ExecutionContext executionContext = this.smooks.createExecutionContext();

            this.smooks.filter( new JavaSource( object ),
                                stringResult,
                                executionContext );

            result = stringResult.getResult();
        } catch ( Exception e ) {
            handleException( this,
                             object,
                             e );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.