Examples of Context


Examples of com.google.appengine.tools.cloudstorage.RetryHelper.Context

    return new RetryParams.Builder();
  }

  private static void verifyRequestTimeoutMillisForCurrentAttempt(RetryParams params,
      int value, double timeout) {
    Context ctx = mock(Context.class);
    stub(ctx.getAttemptNumber()).toReturn(value);
    RetryHelper.setContext(ctx);
    assertEquals(timeout, params.getRequestTimeoutMillisForCurrentAttempt(), 1);
    RetryHelper.setContext(null);
  }
View Full Code Here

Examples of com.google.collide.client.code.autocomplete.AutocompleteProposals.Context

    helper.setup(path, "get", 0, 3, false);
    autocompleter.findAutocompletions(helper.editor.getSelection(), CTRL_SPACE);
    AutocompleteProposal functionProposal = new CodeGraphProposal("getFoo",
        path, true);
    AutocompleteResult commonResult = autocompleter.computeAutocompletionResult(
        new ProposalWithContext(SyntaxType.NONE, functionProposal, new Context("get")));
    assertTrue("result type", commonResult instanceof DefaultAutocompleteResult);
    DefaultAutocompleteResult result = (DefaultAutocompleteResult) commonResult;
    assertEquals("jump length", 7, result.getJumpLength());
    assertEquals("autocompletion text", "getFoo()", result.getAutocompletionText());
  }
View Full Code Here

Examples of com.google.enterprise.connector.manager.Context

    return instantiator;
  }

  private Instantiator createRealInstantiator() {
    Context.refresh();
    Context context = Context.getInstance();
    context.setStandaloneContext(APPLICATION_CONTEXT,
        Context.DEFAULT_JUNIT_COMMON_DIR_PATH);
    SpringInstantiator si = (SpringInstantiator) context.getRequiredBean(
        "Instantiator", SpringInstantiator.class);
    si.init();

    // Instantiate a couple of connectors.
    addConnector(si, "connectorA", "TestConnectorA",
View Full Code Here

Examples of com.google.gerrit.sshd.SshScope.Context

  public void start(Environment env) throws IOException {
    try {
      if (caller.get() instanceof PeerDaemonUser) {
        parseCommandLine();

        final Context ctx = callingContext.subContext(newSession(), join(args));
        final Context old = sshScope.set(ctx);
        try {
          final BaseCommand cmd = dispatcher.get();
          cmd.setArguments(args.toArray(new String[args.size()]));
          provideStateTo(cmd);
          atomicCmd.set(cmd);
View Full Code Here

Examples of com.google.gwt.cell.client.Cell.Context

   */
  public void testRender() {
    Cell<T> cell = createCell();
    T value = createCellValue();
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, null);
    cell.render(context, value, sb);
    assertEquals(getExpectedInnerHtml(), sb.toSafeHtml().asString());
  }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.Context

  }

  @Override
  public final void endVisit(JStatement x, Context ctx) {
    if (ctx.canInsert()) {
      Context popped = currentDeclarationInsertionPoint.pop();
      assert popped == ctx;
    }
    super.endVisit(x, ctx);
  }
View Full Code Here

Examples of com.google.gwt.i18n.server.MessageCatalogFactory.Context

    // generator runs so they can save state.  One problem is knowing
    // when the last generator has been run.
    Writer catWriter = null;
    try {
      String catalogName = genPath + msgCatFactory.getExtension();
      Context ctx = new MessageCatalogContextImpl(
          context, logger);
      MessageInterface msgIntf = new TypeOracleMessageInterface(
          LocaleUtils.getLocaleFactory(), targetClass, resourceList);
      catWriter = msgCatFactory.getWriter(ctx, catalogName);
      if (catWriter == null) {
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.Context

   * other code necessary to support it.  Produces a list of helper methods that
   * still need to be written.
   */
  void writeBindingGetter(Key<?> key, Binding binding, GinScope scope,
      List<InjectorMethod> helperMethodsOutput) {
    Context bindingContext = binding.getContext();

    SourceSnippetBuilder getterBuilder = new SourceSnippetBuilder();
    SourceSnippet creationStatements;
    String getter = nameGenerator.getGetterMethodName(key);

View Full Code Here

Examples of com.google.javascript.jscomp.mozilla.rhino.Context

  public static Node parse(StaticSourceFile sourceFile,
                           String sourceString,
                           Config config,
                           ErrorReporter errorReporter,
                           Logger logger) throws IOException {
    Context cx = Context.enter();
    cx.setErrorReporter(errorReporter);
    cx.setLanguageVersion(Context.VERSION_1_5);
    CompilerEnvirons compilerEnv = new CompilerEnvirons();
    compilerEnv.initFromContext(cx);
    compilerEnv.setRecordingComments(true);
    compilerEnv.setRecordingLocalJsDocComments(true);
    // ES5 specifically allows trailing commas
View Full Code Here

Examples of com.googlecode.gaal.analysis.api.Context

            String delimiter, int windowSize) {
        Filter<EmbeddedInterval> contextFilter = new SimpleContextFilter(0.5, 1);
        Iterable<EmbeddedInterval> contextExtractor = new EmbeddedContextExtractor(lst, corpus, intervalSetBuilder,
                contextFilter, windowSize);
        for (EmbeddedInterval embeddedInterval : contextExtractor) {
            Context context = new EmbeddedContext(embeddedInterval);
            Interval interval = embeddedInterval.getEmbeddingInterval();
            double leftRightContextRatio = (double) embeddedInterval.size() / interval.size();
            System.out.printf("%s %s %s\n", corpus.toString(context.leftSequence(), delimiter),
                    corpus.toString(embeddedInterval.fillerIterator(), delimiter),
                    corpus.toString(context.rightSequence(), delimiter));
            System.out.printf("ratio:%.2f\n", leftRightContextRatio);
        }
    }
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.