private final SequentialTaskExecutor myRequestsProcessor = new SequentialTaskExecutor(PooledThreadExecutor.INSTANCE);
private final Map<String, ProjectData> myProjectDataMap = Collections.synchronizedMap(new HashMap<String, ProjectData>());
private final RustBuildMessageDispatcher myMessageDispatcher = new RustBuildMessageDispatcher();
public RustBuildManager(final ProjectManager projectManager) {
final Application application = ApplicationManager.getApplication();
IS_UNIT_TEST_MODE = application.isUnitTestMode();
myProjectManager = projectManager;
mySystemCharset = CharsetToolkit.getDefaultSystemCharset();
final String systemPath = PathManager.getSystemPath();
File system = new File(systemPath);
try {
system = system.getCanonicalFile();
}
catch (IOException e) {
LOG.info(e);
}
mySystemDirectory = system;
// projectManager.addProjectManagerListener(new ProjectWatcher());
final MessageBusConnection conn = application.getMessageBus().connect();
conn.subscribe(VirtualFileManager.VFS_CHANGES, new BulkFileListener.Adapter() {
@Override
public void after(@NotNull List<? extends VFileEvent> events) {
if (shouldTriggerMake(events)) {
// scheduleAutoMake();