Say whether the index is attributed in capabilities().
1.1 --- a/server/backend/impl/src/org/netbeans/modules/jackpot30/backend/impl/api/API.java Mon Feb 14 20:43:35 2011 +0100
1.2 +++ b/server/backend/impl/src/org/netbeans/modules/jackpot30/backend/impl/api/API.java Tue Feb 15 18:39:41 2011 +0100
1.3 @@ -384,16 +384,19 @@
1.4 @Path("/capabilities")
1.5 @Produces("text/plain")
1.6 public String capabilities() throws IOException {
1.7 - StringBuilder sb = new StringBuilder();
1.8 + Map<String, Object> result = new HashMap<String, Object>();
1.9 + List<String> methods = new ArrayList<String>(API.class.getDeclaredMethods().length);
1.10
1.11 for (Method m : API.class.getDeclaredMethods()) {
1.12 if (m.isAnnotationPresent(GET.class) && (m.getModifiers() & Modifier.PUBLIC) != 0) {
1.13 - sb.append(m.getName());
1.14 - sb.append("\n");
1.15 + methods.add(m.getName());
1.16 }
1.17 }
1.18
1.19 - return sb.toString();
1.20 + result.put("methods", methods);
1.21 + result.put("attributed", true);
1.22 +
1.23 + return Pojson.save(result);
1.24 }
1.25
1.26 private static FileObject deepestCommonParent(Set<FileObject> roots) {