コード例 #1
0
 public final void handleBuildMessage(CmdlineRemoteProto.Message.BuilderMessage msg) {
   switch (msg.getType()) {
     case BUILD_EVENT:
       handleBuildEvent(msg.getBuildEvent());
       break;
     case COMPILE_MESSAGE:
       handleCompileMessage(msg.getCompileMessage());
       break;
   }
 }
コード例 #2
0
 @Nullable
 @Override
 public Future<Callbacks.ConstantAffection> request(
     String ownerClassName,
     String fieldName,
     int accessFlags,
     boolean fieldRemoved,
     boolean accessChanged) {
   final CmdlineRemoteProto.Message.BuilderMessage.ConstantSearchTask.Builder task =
       CmdlineRemoteProto.Message.BuilderMessage.ConstantSearchTask.newBuilder();
   task.setOwnerClassName(ownerClassName);
   task.setFieldName(fieldName);
   task.setAccessFlags(accessFlags);
   task.setIsAccessChanged(accessChanged);
   task.setIsFieldRemoved(fieldRemoved);
   final ConstantSearchFuture future = new ConstantSearchFuture(BuildSession.this);
   final ConstantSearchFuture prev =
       mySearchTasks.put(new Pair<String, String>(ownerClassName, fieldName), future);
   if (prev != null) {
     prev.setDone();
   }
   Channels.write(
       myChannel,
       CmdlineProtoUtil.toMessage(
           mySessionId,
           CmdlineRemoteProto.Message.BuilderMessage.newBuilder()
               .setType(CmdlineRemoteProto.Message.BuilderMessage.Type.CONSTANT_SEARCH_TASK)
               .setConstantSearchTask(task.build())
               .build()));
   return future;
 }