當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。