本文整理汇总了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);
}
}
}
示例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();
}
示例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;
}
示例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());
}
}
}
}
示例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", " ");
}
示例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;
}
示例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() + " }";
}
示例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();
}