/** * Converts a font data array to a string. The string representation is * that of asString(FontData) seperated by ';' * * @param value The font data. * @return The string representation of the font data arra. */ public static String asString(FontData[] value) { StringBuffer buffer = new StringBuffer(); for (int i = 0; i < value.length; i++) { buffer.append(asString(value[i])); if (i != value.length - 1) { buffer.append(FONT_SEPARATOR); } } return buffer.toString(); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Rectangle value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Rectangle value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, RGB value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Point value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Point value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Rectangle value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, RGB value) { store.setDefault(name, StringConverter.asString(value)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, RGB value) { store.setDefault(name, StringConverter.asString(value)); }
public static Color colorFromRGB(RGB rgb) { if (rgb == null) return null; return colorFromString(StringConverter.asString(rgb)); }
/** * Sets the default value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new default value of the preference */ public static void setDefault(IPreferenceStore store, String name, Point value) { store.setDefault(name, StringConverter.asString(value)); }
private static String colorToString(int red, int green, int blue) { return StringConverter.asString(new RGB(red, green, blue)); } }
public boolean close() { fSettings.put(SETTINGS_VISIBILITY_MODIFIER, StringConverter.asString(fVisibilityModifier)); fSettings.put(SETTINGS_FINAL_MODIFIER, StringConverter.asString(fFinal)); fSettings.put(SETTINGS_SYNCHRONIZED_MODIFIER, StringConverter.asString(fSynchronized)); if (fCurrentPositionIndex == 0 || fCurrentPositionIndex == 1) { fSettings.put(SETTINGS_INSERTPOSITION, StringConverter.asString(fCurrentPositionIndex)); } fSettings.put(SETTINGS_COMMENTS, fGenerateComment); return super.close(); }
private boolean performColorOk() { for (Map.Entry<ColorDefinition, RGB> entry : colorPreferencesToSet.entrySet()) { String key = createPreferenceKey(entry.getKey()); String rgbString = StringConverter.asString(entry.getValue()); String storeString = getPreferenceStore().getString(key); if (!rgbString.equals(storeString)) getPreferenceStore().setValue(key, rgbString); } colorValuesToSet.clear(); colorPreferencesToSet.clear(); return true; }
@Override public boolean close() { Point point= getShell().getSize(); fSettings.put(PREF_USER_LIBRARY_LOADSAVE_SIZE, StringConverter.asString(point)); return super.close(); }
public boolean close() { Point point= getShell().getSize(); fSettings.put(PREF_USER_LIBRARY_LOADSAVE_SIZE, StringConverter.asString(point)); return super.close(); }
@Override public boolean close() { Point point= getShell().getSize(); fSettings.put(PREF_USER_LIBRARY_LOADSAVE_SIZE, StringConverter.asString(point)); return super.close(); }
/** * Sets the current value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new current value of the preference */ public static void setValue(IPreferenceStore store, String name, Point value) { Point oldValue = getPoint(store, name); if (oldValue == null || !oldValue.equals(value)) { store.putValue(name, StringConverter.asString(value)); store.firePropertyChangeEvent(name, oldValue, value); } }
/** * Sets the current value of the preference with the given name * in the given preference store. * * @param store the preference store * @param name the name of the preference * @param value the new current value of the preference */ public static void setValue(IPreferenceStore store, String name, Point value) { Point oldValue = getPoint(store, name); if (oldValue == null || !oldValue.equals(value)) { store.putValue(name, StringConverter.asString(value)); store.firePropertyChangeEvent(name, oldValue, value); } }
public static final String asString(RulePreferenceData data) { String position = Base64.encode(Integer.toString(data.getPosition())); String checked = Base64.encode(Boolean.toString(data.isEnabled())); String rule = Base64.encode(data.getRuleName()); String background = Base64.encode(StringConverter.asString(data.getBackgroundColor())); String foreground = Base64.encode(StringConverter.asString(data.getForegroundColor())); String value = Base64.encode(data.getRuleValue()); String matchMode = Base64.encode(data.getMatchMode()); String caseInsensitive = Base64.encode(Boolean.toString(data.isCaseInsensitive())); return position + VALUE_DELIMITER + checked + VALUE_DELIMITER + rule + VALUE_DELIMITER + background + VALUE_DELIMITER + foreground + VALUE_DELIMITER + value + VALUE_DELIMITER + matchMode + VALUE_DELIMITER + caseInsensitive; }