本文整理匯總了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();
}