當前位置: 首頁>>代碼示例>>Java>>正文


Java CommonBundle.message方法代碼示例

本文整理匯總了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();
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:DateFormatUtil.java

示例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 "";
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:35,代碼來源:DateFormatUtil.java

示例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");
}
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:7,代碼來源:GlobalPropertyBasedDoNotAskOption.java

示例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);
}
 
開發者ID:xylo,項目名稱:intellij-postfix-templates,代碼行數:5,代碼來源:PostfixTemplatesBundle.java

示例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);
}
 
開發者ID:halirutan,項目名稱:IntelliJ-Key-Promoter-X,代碼行數:4,代碼來源:KeyPromoterBundle.java

示例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);
}
 
開發者ID:medvector,項目名稱:educational-plugin,代碼行數:4,代碼來源:KotlinTwitterBundle.java

示例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 );
}
 
開發者ID:manifold-systems,項目名稱:manifold-ij,代碼行數:5,代碼來源:ManBundle.java

示例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);
}
 
開發者ID:aurimasniekis,項目名稱:idea-php-psr4-namespace-detector,代碼行數:4,代碼來源:MessageBundle.java

示例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;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:50,代碼來源:KeymapPanel.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:EclipseBundle.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:PropertiesBundle.java

示例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);
}
 
開發者ID:internetisalie,項目名稱:lua-for-idea,代碼行數:5,代碼來源:PluginErrorReportSubmitterBundle.java

示例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);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:AndroidJpsBundle.java

示例14: getString

import com.intellij.CommonBundle; //導入方法依賴的package包/類
public static String getString(String key, Object... params) {
    return CommonBundle.message(BUNDLE, key, params);
}
 
開發者ID:vsch,項目名稱:MissingInActions,代碼行數:4,代碼來源:Bundle.java

示例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);
}
 
開發者ID:vsch,項目名稱:MissingInActions,代碼行數:4,代碼來源:Bundle.java


注:本文中的com.intellij.CommonBundle.message方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。