@NotNull private FlutterDaemonController controllerFor(String projectDir,String deviceId){
synchronized (myLock) {
    FlutterDaemonController newController=new FlutterDaemonController(projectDir);
    myControllers.add(newController);
    newController.addListener(myListener);
    return newController;
  }
}

@ NotNull private FlutterDaemonController controllerFor ( String projectDir , String deviceId ) { synchronized ( myLock ) { FlutterDaemonController newController = new FlutterDaemonController ( projectDir ) ; myControllers . add ( newController ) ; newController . addListener ( myListener ) ; return newController ; } }
scan the list of controllers to see if an existing controller can be reused . if not , create a new one . controllers can be reused if the directory is the same . if a controller is found that matches directory and device then terminate the app on that device and select that controller . nb : currently controllers are not shared due to limitations of the debugger .
