@Inject public AppStateTracker( EventBus eventBus, AppContext appContext, AppStateSyncWriter appStateSyncWriter, AppStateManager appStateManager, AppStateBackwardCompatibility appStateBackwardCompatibility) { this.eventBus = eventBus; this.appContext = appContext; this.appStateSyncWriter = appStateSyncWriter; this.appStateManager = appStateManager; this.appStateBackwardCompatibility = appStateBackwardCompatibility; eventBus.addHandler(WorkspaceReadyEvent.getType(), this::onWorkspaceReady); }
private void initResourceManager() { clearProjects(); resourceManager = resourceManagerFactory.newResourceManager(); resourceManager .getWorkspaceProjects() .then( projects -> { rootProjects.clear(); addAll(rootProjects, projects); rootProjects.sort(ResourcePathComparator.getInstance()); eventBus.fireEvent(new WorkspaceReadyEvent(projects)); }) .catchError( error -> { Log.error(AppContextImpl.class, error.getCause()); }); }
@Inject public JavaLanguageExtensionServiceClient( RequestTransmitter requestTransmitter, RequestHandlerConfigurator configurator, RequestTransmitter transmitter, AppContext appContext, EventBus eventBus) { this.requestTransmitter = requestTransmitter; this.configurator = configurator; this.transmitter = transmitter; this.appContext = appContext; eventBus.addHandler(WorkspaceReadyEvent.getType(), e -> subscribe()); }
@Inject public FileWatcherExcludesOperation( EventBus eventBus, PromiseProvider promises, RequestTransmitter requestTransmitter) { this.promises = promises; this.requestTransmitter = requestTransmitter; eventBus.addHandler(WindowActionEvent.TYPE, this); eventBus.addHandler(WorkspaceReadyEvent.getType(), event -> subscribe()); }
@Inject public InitialProjectImporter( ImportProjectNotificationSubscriberFactory subscriberFactory, AppContext appContext, OAuth2AuthenticatorRegistry oAuth2AuthenticatorRegistry, ProjectImportOutputJsonRpcNotifier subscriber, NotificationManager notificationManager, CoreLocalizationConstant locale, AskCredentialsDialog askCredentialsDialog, DialogFactory dialogFactory, PromiseProvider promises, EventBus eventBus) { super(appContext, subscriberFactory); this.oAuth2AuthenticatorRegistry = oAuth2AuthenticatorRegistry; this.subscriber = subscriber; this.notificationManager = notificationManager; this.locale = locale; this.askCredentialsDialog = askCredentialsDialog; this.dialogFactory = dialogFactory; this.promises = promises; eventBus.addHandler(WorkspaceReadyEvent.getType(), e -> importProjects()); }
@Inject public JavaCompilerPreferencePresenter( JavaLocalizationConstant locale, EventBus eventBus, ErrorWarningsView view, PropertyWidgetFactory propertyFactory, @JavaCompilerPreferenceManager PreferencesManager preferencesManager) { super(locale.compilerSetup(), CATEGORY); this.view = view; this.propertyFactory = propertyFactory; this.preferencesManager = preferencesManager; this.widgets = new HashMap<>(); eventBus.addHandler(WorkspaceReadyEvent.getType(), e -> updateErrorWarningsPanel()); fillUpOptions(); }
/** Accepts factory if it is present in context of application */ public void process() { final FactoryImpl factory; if ((factory = appContext.getFactory()) == null) { return; } eventBus.addHandler( WorkspaceReadyEvent.getType(), e -> { if (isImportingStarted) { return; } isImportingStarted = true; notification = notificationManager.notify( localizationConstant.cloningSource(), StatusNotification.Status.PROGRESS, NOT_EMERGE_MODE); performOnAppLoadedActions(factory); startImporting(factory); }); }
registerNative(); eventBus.addHandler(WorkspaceReadyEvent.getType(), e -> fetchCommands()); eventBus.addHandler( ResourceChangedEvent.getType(),