Examples of abbreviate()


Examples of ch.qos.logback.classic.pattern.TargetLengthBasedClassNameAbbreviator.abbreviate()

  @Test
  public void testShortName() {
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello";
      assertEquals(name, abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello.world";
      assertEquals(name, abbreviator.abbreviate(name));
View Full Code Here

Examples of ch.qos.logback.classic.pattern.TargetLengthBasedClassNameAbbreviator.abbreviate()

      assertEquals(name, abbreviator.abbreviate(name));
    }
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(100);
      String name = "hello.world";
      assertEquals(name, abbreviator.abbreviate(name));
    }
  }

  @Test
  public void testNoDot() {
View Full Code Here

Examples of ch.qos.logback.classic.pattern.TargetLengthBasedClassNameAbbreviator.abbreviate()

  @Test
  public void testNoDot() {
    TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
    String name = "hello";
    assertEquals(name, abbreviator.abbreviate(name));
  }

  @Test
  public void testOneDot() {
    {
View Full Code Here

Examples of ch.qos.logback.classic.pattern.TargetLengthBasedClassNameAbbreviator.abbreviate()

  @Test
  public void testOneDot() {
    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "hello.world";
      assertEquals("h.world", abbreviator.abbreviate(name));
    }

    {
      TargetLengthBasedClassNameAbbreviator abbreviator = new TargetLengthBasedClassNameAbbreviator(1);
      String name = "h.world";
View Full Code Here

Examples of com.google.caja.reporting.MessageContext.abbreviate()

      scriptContent.add(Pair.pair(scriptText, isrc));
      mc.addInputSource(isrc);
      script.getParentNode().removeChild(script);
    }
    for (Pair<String, InputSource> script : scriptContent) {
      inputs.add(new Executor.Input(script.a, mc.abbreviate(script.b)));
    }

    // Set up the DOM.  env.js requires that location be set to a URI before it
    // creates a DOM.  Since it fetches HTML via java.net.URL and passes it off
    // to the org.w3c parser, we use a content: URL which is handled by handlers
View Full Code Here

Examples of org.eclipse.egit.ui.internal.commit.RepositoryCommit.abbreviate()

      RepositoryCommit commit = (RepositoryCommit) element;
      RevCommit revCommit = commit.getRevCommit();

      styled.append(MessageFormat.format(
          UIText.CommitResultLabelProvider_SectionMessage,
          commit.abbreviate(), revCommit.getShortMessage()));

      PersonIdent author = revCommit.getAuthorIdent();
      if (author != null)
        styled.append(MessageFormat.format(
            UIText.CommitResultLabelProvider_SectionAuthor,
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

            RepositoryBuilder builder = new RepositoryBuilder();
            Repository repository = builder.findGitDir(baseDir).readEnvironment().build();
            ObjectId objectId = repository.resolve(Constants.HEAD);
            if (objectId != null) {
                transformer.setParameter("repository.commit", objectId.getName());
                transformer.setParameter("repository.commit.short", objectId.abbreviate(abbrevLen).name());
                return true;
            } else {
                log.warn("Could not determine current repository commit hash.");
                return false;
            }
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

        outw.print(CLIText.get().nothingToSquash);
      outw.println(CLIText.get().alreadyUpToDate);
      break;
    case FAST_FORWARD:
      ObjectId oldHeadId = oldHead.getObjectId();
      outw.println(MessageFormat.format(CLIText.get().updating, oldHeadId
          .abbreviate(7).name(), result.getNewHead().abbreviate(7)
          .name()));
      outw.println(result.getMergeStatus().toString());
      break;
    case CHECKOUT_CONFLICT:
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

        outw.print(CLIText.get().nothingToSquash);
      outw.println(CLIText.get().alreadyUpToDate);
      break;
    case FAST_FORWARD:
      ObjectId oldHeadId = oldHead.getObjectId();
      outw.println(MessageFormat.format(CLIText.get().updating, oldHeadId
          .abbreviate(7).name(), result.getNewHead().abbreviate(7)
          .name()));
      outw.println(result.getMergeStatus().toString());
      break;
    case CHECKOUT_CONFLICT:
View Full Code Here

Examples of org.eclipse.jgit.lib.ObjectId.abbreviate()

  @Test
  public void testAbbreviateOnEmptyRepository() throws IOException {
    ObjectId id = id("9d5b926ed164e8ee88d3b8b1e525d699adda01ba");

    assertEquals(id.abbreviate(2), reader.abbreviate(id, 2));
    assertEquals(id.abbreviate(7), reader.abbreviate(id, 7));
    assertEquals(id.abbreviate(8), reader.abbreviate(id, 8));
    assertEquals(id.abbreviate(10), reader.abbreviate(id, 10));
    assertEquals(id.abbreviate(16), reader.abbreviate(id, 16));
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.