本文整理匯總了Java中com.intellij.CommonBundle.message方法的典型用法代碼示例。如果您正苦於以下問題:Java CommonBundle.message方法的具體用法?Java CommonBundle.message怎麽用?Java CommonBundle.message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.CommonBundle
的用法示例。
在下文中一共展示了CommonBundle.message方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: formatDuration
import com.intellij.CommonBundle; //導入方法依賴的package包/類
@NotNull
public static String formatDuration(long delta) {
StringBuilder buf = new StringBuilder();
for (int i = 0; i < DENOMINATORS.length; i++) {
long denominator = DENOMINATORS[i];
int n = (int)(delta / denominator);
if (n != 0) {
buf.append(composeDurationMessage(PERIODS[i], n));
buf.append(' ');
delta = delta % denominator;
}
}
if (buf.length() == 0) return CommonBundle.message("date.format.less.than.a.minute");
return buf.toString().trim();
}
示例2: formatBetweenDates
import com.intellij.CommonBundle; //導入方法依賴的package包/類
@NotNull
public static String formatBetweenDates(long d1, long d2) {
long delta = Math.abs(d1 - d2);
if (delta == 0) return CommonBundle.message("date.format.right.now");
int n = -1;
int i;
for (i = 0; i < DENOMINATORS.length; i++) {
long denominator = DENOMINATORS[i];
if (delta >= denominator) {
n = (int)(delta / denominator);
break;
}
}
if (d2 > d1) {
if (n <= 0) {
return CommonBundle.message("date.format.a.few.moments.ago");
}
else {
return someTimeAgoMessage(PERIODS[i], n);
}
}
else if (d2 < d1) {
if (n <= 0) {
return CommonBundle.message("date.format.in.a.few.moments");
}
else {
return composeInSomeTimeMessage(PERIODS[i], n);
}
}
return "";
}
示例3: getDoNotShowMessage
import com.intellij.CommonBundle; //導入方法依賴的package包/類
@Override
@NotNull
public String getDoNotShowMessage() {
// This is the text to set in the checkbox.
return CommonBundle.message("dialog.options.do.not.show");
}
示例4: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
@NotNull
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) {
return CommonBundle.message(BUNDLE, key, params);
}
示例5: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = "de.halirutan.keypromoterx.messages.KeyPromoterBundle") String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例6: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例7: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message( @PropertyKey(resourceBundle = BUNDLE) String key, Object... params )
{
return CommonBundle.message( ResourceBundle.getBundle( BUNDLE ), key, params );
}
示例8: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = "main.resource.Messages") String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例9: createKeymapButtonsPanel
import com.intellij.CommonBundle; //導入方法依賴的package包/類
private JPanel createKeymapButtonsPanel() {
final JPanel panel = new JPanel();
panel.setBorder(BorderFactory.createEmptyBorder(0, 8, 0, 0));
panel.setLayout(new GridBagLayout());
myCopyButton = new JButton(new AbstractAction(KeyMapBundle.message("copy.keymap.button")) {
@Override
public void actionPerformed(ActionEvent e) {
copyKeymap();
}
});
Insets insets = new Insets(2, 2, 2, 2);
myCopyButton.setMargin(insets);
final GridBagConstraints gc =
new GridBagConstraints(GridBagConstraints.RELATIVE, 0, 1, 1, 0, 0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 5, 0, 0), 0, 0);
panel.add(myCopyButton, gc);
myResetToDefault = new JButton(CommonBundle.message("button.reset"));
myResetToDefault.setMargin(insets);
panel.add(myResetToDefault, gc);
myDeleteButton = new JButton(new AbstractAction(KeyMapBundle.message("delete.keymap.button")) {
@Override
public void actionPerformed(ActionEvent e) {
deleteKeymap();
}
});
myDeleteButton.setMargin(insets);
gc.weightx = 1;
panel.add(myDeleteButton, gc);
IdeFrame ideFrame = IdeFocusManager.getGlobalInstance().getLastFocusedFrame();
if (ideFrame != null && KeyboardSettingsExternalizable.isSupportedKeyboardLayout(ideFrame.getComponent()))
{
String displayLanguage = ideFrame.getComponent().getInputContext().getLocale().getDisplayLanguage();
myNonEnglishKeyboardSupportOption = new JCheckBox(new AbstractAction(displayLanguage + " " + KeyMapBundle.message("use.non.english.keyboard.layout.support")) {
@Override
public void actionPerformed(ActionEvent e) {
KeyboardSettingsExternalizable.getInstance().setNonEnglishKeyboardSupportEnabled(myNonEnglishKeyboardSupportOption.isSelected());
}
});
myNonEnglishKeyboardSupportOption.setSelected(KeyboardSettingsExternalizable.getInstance().isNonEnglishKeyboardSupportEnabled());
panel.add(myNonEnglishKeyboardSupportOption, gc);
}
myResetToDefault.addActionListener(new ActionListener() {
@Override
public void actionPerformed(@NotNull ActionEvent e) {
resetKeymap();
}
});
return panel;
}
示例10: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例11: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = PATH_TO_BUNDLE) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例12: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@PropertyKey(resourceBundle = "com.sylvanaar.idea.errorreporting.PluginErrorReportSubmitterBundle") String key,
Object... params) {
return CommonBundle.message(OUR_BUNDLE, key, params);
}
示例13: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@NotNull @PropertyKey(resourceBundle = BUNDLE_NAME) String key, @NotNull Object... params) {
return CommonBundle.message(getBundle(), key, params);
}
示例14: getString
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String getString(String key, Object... params) {
return CommonBundle.message(BUNDLE, key, params);
}
示例15: message
import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String message(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) {
return CommonBundle.message(BUNDLE, key, params);
}