当前位置: 首页>>代码示例>>Java>>正文


Java ShowSettingsUtil.getInstance方法代码示例

本文整理汇总了Java中com.intellij.openapi.options.ShowSettingsUtil.getInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ShowSettingsUtil.getInstance方法的具体用法?Java ShowSettingsUtil.getInstance怎么用?Java ShowSettingsUtil.getInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.options.ShowSettingsUtil的用法示例。


在下文中一共展示了ShowSettingsUtil.getInstance方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: hyperlinkUpdate

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
  if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
    final String description = event.getDescription();
    if ("enable".equals(description)) {
      KeyboardSettingsExternalizable.getInstance().setNonEnglishKeyboardSupportEnabled(true);
    }
    else if ("settings".equals(description)) {
      final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
      IdeFrame ideFrame = WindowManagerEx.getInstanceEx().findFrameFor(null);
      //util.editConfigurable((JFrame)ideFrame, new StatisticsConfigurable(true));
      util.showSettingsDialog(ideFrame.getProject(), KeymapPanel.class);
    }

    NotificationsConfiguration.getNotificationsConfiguration().changeSettings(LOCALIZATION_GROUP_DISPLAY_ID, NotificationDisplayType.NONE, false, false);
    notification.expire();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:KeyboardInternationalizationNotificationManager.java

示例2: editCodeTemplate

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
public static void editCodeTemplate(@NotNull final String templateId, Project project) {
  final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
  final AllFileTemplatesConfigurable configurable = new AllFileTemplatesConfigurable(project);
  util.editConfigurable(project, configurable, new Runnable() {
    @Override
    public void run() {
      configurable.myTabbedPane.setSelectedIndex(ArrayUtil.indexOf(configurable.myTabs, configurable.myCodeTemplatesList));
      for (FileTemplate template : configurable.myCodeTemplatesList.getTemplates()) {
        if (Comparing.equal(templateId, template.getName())) {
          configurable.myCodeTemplatesList.selectTemplate(template);
          break;
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AllFileTemplatesConfigurable.java

示例3: hyperlinkUpdate

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
@Override
public void hyperlinkUpdate(@Nonnull Notification notification, @Nonnull HyperlinkEvent event) {
  if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
    final String description = event.getDescription();
    if ("enable".equals(description)) {
      KeyboardSettingsExternalizable.getInstance().setNonEnglishKeyboardSupportEnabled(true);
    }
    else if ("settings".equals(description)) {
      final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
      IdeFrame ideFrame = WindowManagerEx.getInstanceEx().findFrameFor(null);
      //util.editConfigurable((JFrame)ideFrame, new StatisticsConfigurable(true));
      util.showSettingsDialog(ideFrame.getProject(), KeymapPanel.class);
    }

    NotificationsConfiguration.getNotificationsConfiguration().changeSettings(LOCALIZATION_GROUP_DISPLAY_ID, NotificationDisplayType.NONE, false, false);
    notification.expire();
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:KeyboardInternationalizationNotificationManager.java

示例4: hyperlinkUpdate

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
@Override
public void hyperlinkUpdate(@NotNull Notification notification, @NotNull HyperlinkEvent event) {
  if (event.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
    final String description = event.getDescription();
    if ("allow".equals(description)) {
      mySettings.setAllowed(true);
      mySettings.setShowNotification(false);
      notification.expire();

      ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
        @Override
        public void run() {
           myStatisticsService.send();
        }
      });
    }
    else if ("decline".equals(description)) {
      mySettings.setAllowed(false);
      mySettings.setShowNotification(false);
      notification.expire();
    }
    else if ("settings".equals(description)) {
      final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
      IdeFrame ideFrame = WindowManagerEx.getInstanceEx().findFrameFor(null);
      util.editConfigurable((JFrame)ideFrame, new StatisticsConfigurable(true));
      notification.expire();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:StatisticsNotificationManager.java

示例5: editCodeTemplate

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
public static void editCodeTemplate(@Nonnull final String templateId, Project project) {
  final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
  final AllFileTemplatesConfigurable configurable = new AllFileTemplatesConfigurable(project);
  util.editConfigurable(project, configurable, () -> {
    configurable.myTabbedPane.setSelectedIndex(ArrayUtil.indexOf(configurable.myTabs, configurable.myCodeTemplatesList));
    for (FileTemplate template : configurable.myCodeTemplatesList.getTemplates()) {
      if (Comparing.equal(templateId, template.getName())) {
        configurable.myCodeTemplatesList.selectTemplate(template);
        break;
      }
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:AllFileTemplatesConfigurable.java

示例6: actionPerformed

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  final Project project = e.getData(CommonDataKeys.PROJECT);
  final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
  util.editConfigurable(project, new CustomizationConfigurable());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CustomizeUIAction.java

示例7: show

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
public static void show(Project project) {
    final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
  util.editConfigurable(project, new OptionsConfigurabe());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:OptionsConfigurabe.java

示例8: actionPerformed

import com.intellij.openapi.options.ShowSettingsUtil; //导入方法依赖的package包/类
public void actionPerformed(AnActionEvent e) {
  final Project project = e.getData(PlatformDataKeys.PROJECT);
  final ShowSettingsUtil util = ShowSettingsUtil.getInstance();
  util.editConfigurable(project, new CustomizationConfigurable());
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:CustomizeUIAction.java


注:本文中的com.intellij.openapi.options.ShowSettingsUtil.getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。