Java Code Examples for com.intellij.notification.impl.NotificationsConfigurationImpl#getInstanceImpl()

The following examples show how to use com.intellij.notification.impl.NotificationsConfigurationImpl#getInstanceImpl() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SystemNotificationsImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void notify(@Nonnull String notificationName, @Nonnull String title, @Nonnull String text) {
  if (NotificationsConfigurationImpl.getInstanceImpl().SYSTEM_NOTIFICATIONS && !myApplication.isActive()) {
    Notifier notifier = myNotifier.getValue();
    if (notifier != null) {
      notifier.notify(notificationName, title, text);
    }
  }
}
 
Example 2
Source File: AppearanceOptionsTopHitProvider.java    From consulo with Apache License 2.0 5 votes vote down vote up
static BooleanOptionDescription notifications(String option, String field) {
  return new PublicFieldBasedOptionDescription(option, "reference.settings.ide.settings.notifications", field) {
    @Override
    public Object getInstance() {
      return NotificationsConfigurationImpl.getInstanceImpl();
    }
  };
}
 
Example 3
Source File: NotificationsConfigurablePanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public boolean isModified() {
  final List<SettingsWrapper> list = myTable.getAllSettings();
  for (SettingsWrapper settingsWrapper : list) {
    if (settingsWrapper.hasChanged()) {
      return true;
    }
  }

  NotificationsConfigurationImpl configuration = NotificationsConfigurationImpl.getInstanceImpl();
  return configuration.SHOW_BALLOONS != myDisplayBalloons.isSelected() ||
         configuration.SYSTEM_NOTIFICATIONS != mySystemNotifications.isSelected();
}
 
Example 4
Source File: NotificationsConfigurablePanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public void apply() {
  final List<SettingsWrapper> list = myTable.getAllSettings();
  for (SettingsWrapper settingsWrapper : list) {
    settingsWrapper.apply();
  }

  NotificationsConfigurationImpl configuration = NotificationsConfigurationImpl.getInstanceImpl();
  configuration.SHOW_BALLOONS = myDisplayBalloons.isSelected();
  configuration.SYSTEM_NOTIFICATIONS = mySystemNotifications.isSelected();
}
 
Example 5
Source File: NotificationsConfigurablePanel.java    From consulo with Apache License 2.0 5 votes vote down vote up
public void reset() {
  final List<SettingsWrapper> list = myTable.getAllSettings();
  for (SettingsWrapper settingsWrapper : list) {
    settingsWrapper.reset();
  }

  NotificationsConfigurationImpl configuration = NotificationsConfigurationImpl.getInstanceImpl();
  myDisplayBalloons.setSelected(configuration.SHOW_BALLOONS);
  mySystemNotifications.setSelected(configuration.SYSTEM_NOTIFICATIONS);

  myTable.invalidate();
  myTable.repaint();
}
 
Example 6
Source File: ConsoleLogToolWindowFactory.java    From aem-ide-tooling-4-intellij with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSelected(AnActionEvent e) {
    return NotificationsConfigurationImpl.getInstanceImpl().SHOW_BALLOONS;
}
 
Example 7
Source File: ConsoleLogToolWindowFactory.java    From aem-ide-tooling-4-intellij with Apache License 2.0 4 votes vote down vote up
@Override
public void setSelected(AnActionEvent e, boolean state) {
    NotificationsConfigurationImpl.getInstanceImpl().SHOW_BALLOONS = state;
}
 
Example 8
Source File: EventLogToolWindowFactory.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isSelected(AnActionEvent e) {
  return NotificationsConfigurationImpl.getInstanceImpl().SHOW_BALLOONS;
}
 
Example 9
Source File: EventLogToolWindowFactory.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Override
public void setSelected(AnActionEvent e, boolean state) {
  NotificationsConfigurationImpl.getInstanceImpl().SHOW_BALLOONS = state;
}