public static void reloadMessages() { NLS.initializeMessages(BUNDLE_NAME, Messages.class); } }
public static void setKeyringFile(String file) { if (keyringFile != null) throw new IllegalStateException(NLS.bind(Messages.auth_alreadySpecified, keyringFile)); keyringFile = file; }
/** * Returns the result of converting a list of comma-separated tokens into an array * * @return the array of string tokens * @param prop the initial comma-separated string */ private static String[] getArrayFromList(String prop, String separator) { return ManifestElement.getArrayFromList(prop, separator); }
/** * Add an attribute to this manifest element. * * @param key the key of the attribute * @param value the value of the attribute */ private void addAttribute(String key, String value) { attributes = addTableValue(attributes, key, value); }
/** * Returns an array of values for the specified attribute or * <code>null</code> if the attribute does not exist. * * @param key the attribute key to return the values for * @return the array of attribute values or <code>null</code> * @see #getAttribute(String) */ public String[] getAttributes(String key) { return getTableValues(attributes, key); }
/** * Return an enumeration of directive keys for this manifest element or * <code>null</code> if there are none. * * @return the enumeration of directive keys or <code>null</code> */ public Enumeration<String> getDirectiveKeys() { return getTableKeys(directives); }
/** * Bind the given message's substitution locations with the given string values. * * @param message the message to be manipulated * @param bindings An array of objects to be inserted into the message * @return the manipulated String * @throws IllegalArgumentException if the text appearing within curly braces in the given message does not map to an integer */ public static String bind(String message, Object[] bindings) { return internalBind(message, bindings, null, null); }
public Void run() { load(baseName, clazz); return null; } });
String msg = NLS.bind(PrefsMessages.preferences_fileNotFound, path.toOSString()); throw new CoreException(new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, 1, msg, null)); service.importPreferences(input); } catch (FileNotFoundException e) { String msg = NLS.bind(PrefsMessages.preferences_fileNotFound, path.toOSString()); throw new CoreException(new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, 1, msg, e)); } finally {
/** * Returns the result of converting a list of comma-separated tokens into an array. * * @return the array of string tokens or <code>null</code> if there are none * @param stringList the initial comma-separated string */ public static String[] getArrayFromList(String stringList) { String[] result = getArrayFromList(stringList, ","); //$NON-NLS-1$ return result.length == 0 ? null : result; }
/** * Add a directive to this manifest element. * * @param key the key of the attribute * @param value the value of the attribute */ private void addDirective(String key, String value) { directives = addTableValue(directives, key, value); }
/** * Returns an array of values for the specified attribute or * <code>null</code> if the attribute does not exist. * * @param key the attribute key to return the values for * @return the array of attribute values or <code>null</code> * @see #getAttribute(String) */ public String[] getAttributes(String key) { return getTableValues(attributes, key); }
/** * Returns an enumeration of attribute keys for this manifest element or * <code>null</code> if none exist. * * @return the enumeration of attribute keys or null if none exist. */ public Enumeration<String> getKeys() { return getTableKeys(attributes); }
/** * Bind the given message's substitution locations with the given string values. * * @param message the message to be manipulated * @param bindings An array of objects to be inserted into the message * @return the manipulated String * @throws IllegalArgumentException if the text appearing within curly braces in the given message does not map to an integer */ public static String bind(String message, Object[] bindings) { return internalBind(message, bindings, null, null); }
fos.getFD().sync(); } catch (IOException e) { String message = NLS.bind(PrefsMessages.preferences_errorWriting, file, e.getMessage()); IStatus status = new Status(IStatus.ERROR, PrefsMessages.OWNER_NAME, IStatus.ERROR, message, e); throw new CoreException(status);
public FilteredSourcePackage(String name, BundleLoader supplier, String includes, String excludes) { super(name, supplier); this.includes = includes != null ? ManifestElement.getArrayFromList(includes) : null; this.excludes = excludes != null ? ManifestElement.getArrayFromList(excludes) : null; }
/** * Add a directive to this manifest element. * * @param key the key of the attribute * @param value the value of the attribute */ private void addDirective(String key, String value) { directives = addTableValue(directives, key, value); }
String message = NLS.bind(Messages.plugin_shutdownProblems, descriptor.getUniqueIdentifier()); IStatus status = new Status(IStatus.ERROR, Platform.PI_RUNTIME, IStatus.ERROR, message, exception); InternalPlatform.getDefault().log(status);
/** * Returns the result of converting a list of comma-separated tokens into an array. * * @return the array of string tokens or <code>null</code> if there are none * @param stringList the initial comma-separated string */ public static String[] getArrayFromList(String stringList) { String[] result = getArrayFromList(stringList, ","); //$NON-NLS-1$ return result.length == 0 ? null : result; }
public Plugin(IPluginDescriptor descriptor) { Assert.isNotNull(descriptor); Assert.isTrue(!CompatibilityHelper.hasPluginObject(descriptor), NLS.bind(Messages.plugin_deactivatedLoad, this.getClass().getName(), descriptor.getUniqueIdentifier() + " is not activated")); //$NON-NLS-1$ this.descriptor = descriptor; InternalPlatform.start(bundle); } catch (BundleException e) { String message = NLS.bind(Messages.plugin_startupProblems, descriptor.getUniqueIdentifier()); IStatus status = new Status(IStatus.ERROR, Platform.PI_RUNTIME, IStatus.ERROR, message, e); InternalPlatform.getDefault().log(status);