@Test void testTryResolvePositive() { assertEquals(DOCUMENTATION_TEXT, provider.tryResolve(LABEL)); }
@Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); }
SnippetCompletion implements Completion { @Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); } }
SnippetCompletion implements Completion { @Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); } @Inject  SnippetCompletion(@Named("Snippets") CompletionStorage snippets); }
SnippetCompletion implements Completion { @Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); } @Inject  SnippetCompletion(@Named("Snippets") CompletionStorage snippets); @Nonnull @Override Collection<String> getCompletionSource(MyDocumentModel document); @Nullable @Override String tryResolve(@Nonnull String label); @Nonnull @Override String getSortOrderPrefix(); @Nonnull @Override CompletionItem customize(@Nonnull CompletionItem item); @Nonnull @Override CompletionItemKind getKind(); }
SnippetCompletion implements Completion { @Nullable @Override public String tryResolve(@Nonnull String label) { return Optional.ofNullable(snippets.getInformationFor(label)) .map(string -> string.replaceAll("[${\\d:}]", "")) .orElse(null); } @Inject  SnippetCompletion(@Named("Snippets") CompletionStorage snippets); @Nonnull @Override Collection<String> getCompletionSource(MyDocumentModel document); @Nullable @Override String tryResolve(@Nonnull String label); @Nonnull @Override String getSortOrderPrefix(); @Nonnull @Override CompletionItem customize(@Nonnull CompletionItem item); @Nonnull @Override CompletionItemKind getKind();  }