for (String c : DEFAULT_COMPLETIONS) { if (c.startsWith(userText)) { res.add(Completions.of("\"" + c + '/', NbBundle.getMessage(ActionProcessor.class, "HINT_" + c)));
public static Iterable<Completion> getCompletionsFilterTenantLogicExclusion() { Collection<Completion> colecaoRetorno = Collections.emptyList(); colecaoRetorno.add(Completions.of("@Filter(name = Constant.TENANT)")); return colecaoRetorno; }
private static final Completion methodOf(String method) { ResourceBundle rb = ResourceBundle.getBundle("org.netbeans.html.json.impl.Bundle"); return Completions.of('"' + method + '"', rb.getString("MSG_Completion_" + method)); }
private static final Completion methodOf(String method) { ResourceBundle rb = ResourceBundle.getBundle("org.apidesign.html.json.impl.Bundle"); return Completions.of('"' + method + '"', rb.getString("MSG_Completion_" + method)); }
@Override public Iterable<? extends Completion> getCompletions(Element e, AnnotationMirror annotation, ExecutableElement member, String userText ) { StringBuilder sb = new StringBuilder(); if (e.getKind() == ElementKind.METHOD && member.getSimpleName().contentEquals("args")) { ExecutableElement ee = (ExecutableElement) e; String sep = ""; sb.append("{ "); for (VariableElement ve : ee.getParameters()) { sb.append(sep).append('"').append(ve.getSimpleName()) .append('"'); sep = ", "; } sb.append(" }"); return Collections.nCopies(1, Completions.of(sb.toString())); } return null; }
@Override public Iterable<? extends Completion> getCompletions(Element e, AnnotationMirror annotation, ExecutableElement member, String userText ) { StringBuilder sb = new StringBuilder(); if (e.getKind() == ElementKind.METHOD && member.getSimpleName().contentEquals("args")) { ExecutableElement ee = (ExecutableElement) e; String sep = ""; sb.append("{ "); for (VariableElement ve : ee.getParameters()) { sb.append(sep).append('"').append(ve.getSimpleName()) .append('"'); sep = ", "; } sb.append(" }"); return Collections.nCopies(1, Completions.of(sb.toString())); } return null; }
@Override public Iterable<? extends Completion> getCompletions(Element e, AnnotationMirror annotation, ExecutableElement member, String userText ) { StringBuilder sb = new StringBuilder(); if (e.getKind() == ElementKind.METHOD && member.getSimpleName().contentEquals("args")) { ExecutableElement ee = (ExecutableElement) e; String sep = ""; sb.append("{ "); for (VariableElement ve : ee.getParameters()) { sb.append(sep).append('"').append(ve.getSimpleName()) .append('"'); sep = ", "; } sb.append(" }"); return Collections.nCopies(1, Completions.of(sb.toString())); } return null; }
private List<Completion> list(File root, File from, String suffix) { File[] children = from.listFiles(); StringBuilder path = new StringBuilder(); if (children != null) { ArrayList<Completion> completions = new ArrayList<Completion>(); for (final File child : children) { if (child.getName().startsWith(suffix)) { foo(path, root, child); if (child.isDirectory()) { path.append('/'); } completions.add(Completions.of(path.toString())); } } Collections.sort(completions, Tools.COMPLETION_COMPARATOR); return completions; } else { return Collections.emptyList(); } }
private List<Completion> list(File root, File from, String suffix) { File[] children = from.listFiles(); StringBuilder path = new StringBuilder(); if (children != null) { ArrayList<Completion> completions = new ArrayList<Completion>(); for (final File child : children) { if (child.getName().startsWith(suffix)) { foo(path, root, child); if (child.isDirectory()) { path.append('/'); } completions.add(Completions.of(path.toString())); } } Collections.sort(completions, Tools.COMPLETION_COMPARATOR); return completions; } else { return Collections.emptyList(); } }
for (String id : pp.ids()) { if (id.startsWith(userText)) { cc.add(Completions.of("\"" + id + "\"", id));