public JBEditorTabs(@Nullable Project project, @NotNull ActionManager actionManager, IdeFocusManager focusManager, @NotNull Disposable parent) { super(project, actionManager, focusManager, parent); Registry.get(TABS_ALPHABETICAL_KEY).addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(RegistryValue value) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { resetTabsCache(); relayout(true, false); } }); } }, parent); }
@Override public void initComponent() { myIsEnabled = Registry.get("ide.tooltip.callout"); myIsEnabled.addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(RegistryValue value) { processEnabled(); } }, ApplicationManager.getApplication()); Toolkit.getDefaultToolkit().addAWTEventListener(this, AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); ActionManager.getInstance().addAnActionListener(new AnActionListener.Adapter() { @Override public void beforeActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) { hideCurrent(null, action, event); } }, ApplicationManager.getApplication()); processEnabled(); }
@Override public final void projectOpened() { Registry.get(REGISTRY_KEY).addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(final RegistryValue value) { myEnabled.set(value.asBoolean()); if (myEnabled.get()) { doEnable(); } } }, myProject); myEnabled = new AtomicBoolean(Registry.is(REGISTRY_KEY) || ApplicationManager.getApplication().isUnitTestMode()); if (myEnabled.get()) { doEnable(); } }
public QuickAccessSettings() { myModifiersValue = Registry.get("actionSystem.quickAccessModifiers"); myModifiersValue.addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(RegistryValue value) { applyModifiersFromRegistry(); } }, ApplicationManager.getApplication()); applyModifiersFromRegistry(); }
public SvnExecutableChecker(@NotNull SvnVcs vcs) { super(vcs.getProject(), getNotificationTitle(), getWrongPathMessage()); myVcs = vcs; Registry.get(SVN_EXECUTABLE_LOCALE_REGISTRY_KEY).addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(@NotNull RegistryValue value) { myVcs.checkCommandLineVersion(); } }, myProject); }
public void initComponent() { myModifiersValue = Registry.get("actionSystem.quickAccessModifiers"); myModifiersValue.addListener(new RegistryValueListener.Adapter() { public void afterValueChanged(RegistryValue value) { applyModifiersFromRegistry(); } }, this); KeymapManager kmMgr = KeymapManager.getInstance(); kmMgr.addKeymapManagerListener(this); activeKeymapChanged(kmMgr.getActiveKeymap()); applyModifiersFromRegistry(); }
public static boolean getUpToDateTelemetryEnabled(@NotNull final Consumer<Boolean> consumer, @NotNull Disposable disposable) { final RegistryValue registryValue = Registry.get("inspectionGadgets.telemetry.enabled"); registryValue.addListener(new RegistryValueListener.Adapter() { @Override public void afterValueChanged(RegistryValue value) { consumer.consume(Boolean.valueOf(value.asBoolean())); } }, disposable); return registryValue.asBoolean(); }