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


Java Configurable.getDisplayName方法代码示例

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


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

示例1: warn

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
static void warn(Configurable configurable, String action, long time) {
  if (ApplicationManager.getApplication().isDispatchThread()) {
    time = System.currentTimeMillis() - time;
    int threshold = Registry.intValue("ide.settings.configurable.loading.threshold", 0);
    if (0 < threshold && threshold < time) {
      String name = configurable.getDisplayName();
      String id = ConfigurableVisitor.ByID.getID(configurable);
      LOG.warn(String.valueOf(time) + " ms to " + action + " '" + name + "' id=" + id);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ConfigurableCardPanel.java

示例2: init

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
private void init(Configurable configurable, @Nullable Project project) {
  String name = configurable == null ? null : configurable.getDisplayName();
  String title = CommonBundle.settingsTitle();
  if (project != null && project.isDefault()) title = "Default " + title;
  setTitle(name == null ? title : name.replace('\n', ' '));
  init();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SettingsDialog.java

示例3: createDefaultContent

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
private JComponent createDefaultContent(Configurable configurable) {
  JComponent content = new JPanel(new BorderLayout());
  content.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
  String key = configurable == null ? null : ConfigurableVisitor.ByID.getID(configurable) + ".settings.description";
  String description = key == null ? null : getString(configurable, key);
  if (description == null) {
    description = "Select configuration element in the tree to edit its settings";
    content.add(BorderLayout.CENTER, new JLabel(description, SwingConstants.CENTER));
    content.setPreferredSize(JBUI.size(800, 600));
  }
  else {
    content.add(BorderLayout.NORTH, new JLabel(description));
    if (configurable instanceof Configurable.Composite) {
      Configurable.Composite composite = (Configurable.Composite)configurable;

      JPanel panel = new JPanel();
      panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
      content.add(BorderLayout.CENTER, panel);
      panel.add(Box.createVerticalStrut(10));
      for (final Configurable current : composite.getConfigurables()) {
        LinkLabel label = new LinkLabel(current.getDisplayName(), null) {
          @Override
          public void doClick() {
            openLink(current);
          }
        };
        label.setBorder(BorderFactory.createEmptyBorder(1, 17, 3, 1));
        panel.add(label);
      }
    }
  }
  return content;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:34,代码来源:ConfigurableEditor.java

示例4: fillConfigurablesIds

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
private void fillConfigurablesIds(String pathToParent, Configurable[] configurables) {
  for (Configurable configurable : configurables) {
    if (configurable instanceof SearchableConfigurable) {
      final String id = ((SearchableConfigurable)configurable).getId();
      String name = configurable.getDisplayName();
      if (pathToParent != null) {
        name = pathToParent + " -> " + name;
      }
      myConfigurables.put(id, name);
      if (configurable instanceof SearchableConfigurable.Parent) {
        fillConfigurablesIds(name, ((SearchableConfigurable.Parent)configurable).getConfigurables());
      }
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:SearchEverywhereAction.java

示例5: createTitleString

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
private static String createTitleString(Configurable configurable) {
  String displayName = configurable.getDisplayName();
  LOG.assertTrue(displayName != null, configurable.getClass().getName());
  return displayName.replaceAll("\n", " ");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SingleConfigurableEditor.java

示例6: createDimensionKey

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
protected static String createDimensionKey(Configurable configurable) {
  String displayName = configurable.getDisplayName();
  displayName = displayName.replaceAll("\n", "_").replaceAll(" ", "_");
  return "#" + displayName;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SingleConfigurableEditor.java

示例7: getConfigurableDisplayName

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
private static String getConfigurableDisplayName(final Configurable c) {
  final String name = c.getDisplayName();
  return name != null ? name : "{ Unnamed Page:" + c.getClass().getSimpleName() + " }";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:OptionsTree.java

示例8: getName

import com.intellij.openapi.options.Configurable; //导入方法依赖的package包/类
/**
 * Returns a name that will be added to all option names.
 * This implementation returns the display name of the configurable.
 *
 * @param configurable the configurable to process
 * @return a main prefix or {@code null} to ignore
 */
protected String getName(Configurable configurable) {
  return configurable.getDisplayName();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:ConfigurableOptionsTopHitProvider.java


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