// javadoc inherited
  public GenericPolicyCreationPage createPolicyCreationPage(IStructuredSelection selection) {

    String policyTypeName = EclipseCommonMessages.getLocalizedPolicyName(elementName);

    GenericPolicyCreationPage page =
        new GenericPolicyCreationPage(policyTypeName, policyExtension, selection);

    MessageFormat format;
    String args[] = {policyTypeName};
    format = new MessageFormat(RESOURCE_BUNDLE.getString(titleKey));
    String title = format.format(args);

    format = new MessageFormat(RESOURCE_BUNDLE.getString(messageKey));
    String message = format.format(args);

    format = new MessageFormat(RESOURCE_BUNDLE.getString(descriptionKey));
    String description = format.format(args);

    page.setTitle(title);
    page.setMessage(message);
    page.setDescription(description);

    ImageDescriptor id = ABPlugin.getImageDescriptor(icon);
    page.setImageDescriptor(id);

    return page;
  }
示例#2
0
 /**
  * Get a keyed property message as an Integer. This method delegates to
  * EclipseCommonMessages.getInteger().
  *
  * @param key The message key.
  * @return The message or null if no message is found.
  */
 public static Integer getInteger(String key) {
   return EclipseCommonMessages.getInteger(getResourceBundle(), key);
 }
示例#3
0
 /**
  * Get a keyed property message as a String. This method delegates to
  * EclipseCommonMessages.getString().
  *
  * @param key The message key.
  * @return The message or null if no message is found.
  */
 public static String getString(String key) {
   return EclipseCommonMessages.getString(getResourceBundle(), key);
 }