Package com.google.collide.dto.server.DtoServerImpls

Examples of com.google.collide.dto.server.DtoServerImpls.GetWorkspaceMetaDataResponseImpl


    vertx.eventBus()
        .registerHandler(addressBase + ".getMetaData", new Handler<Message<JsonObject>>() {
            @Override
          public void handle(final Message<JsonObject> requestEvent) {
            final GetWorkspaceMetaDataResponseImpl metaData =
                GetWorkspaceMetaDataResponseImpl.make()
                    .setRunTarget(runTarget).setWorkspaceName(webRoot);

            if (lastOpenedFileId != null) {
              // Resolve file to a path.
              vertx.eventBus().send("tree.getCurrentPaths", new JsonObject().putArray(
                  "resourceIds", new JsonArray().addString(lastOpenedFileId)),
                  new Handler<Message<JsonObject>>() {
                      @Override
                    public void handle(Message<JsonObject> event) {
                      List<String> openFiles = new ArrayList<String>();
                      openFiles.add((String) event.body.getArray("paths").toArray()[0]);
                      metaData.setLastOpenFiles(openFiles);
                      requestEvent.reply(Dto.wrap(metaData));
                    }
                  });
            }
          }
View Full Code Here

TOP

Related Classes of com.google.collide.dto.server.DtoServerImpls.GetWorkspaceMetaDataResponseImpl

Copyright © 2018 www.massapicom. 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.