Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedBooleanPropertyDescriptor.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services.properties/src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedBooleanPropertyDescriptor.java,v retrieving revision 1.3 diff -u -r1.3 ExtendedBooleanPropertyDescriptor.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedBooleanPropertyDescriptor.java 12 Oct 2005 15:57:22 -0000 1.3 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedBooleanPropertyDescriptor.java 27 Oct 2005 16:13:15 -0000 @@ -11,12 +11,10 @@ package org.eclipse.gmf.runtime.common.ui.services.properties.extended; +import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.LabelProvider; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; - - /** * @author Tauseef A. Israr * Created on: Sep 9, 2002 @@ -24,10 +22,6 @@ public class ExtendedBooleanPropertyDescriptor extends ExtendedComboboxPropertyDescriptor { - private static final String TRUE = PSFResourceManager.getI18NString("ExtendedBooleanPropertyDescriptor.True"); //$NON-NLS-1$ - - private static final String FALSE = PSFResourceManager.getI18NString("ExtendedBooleanPropertyDescriptor.False"); //$NON-NLS-1$ - /** * Constructor for ExtendedBooleanPropertyDescriptor. * @@ -35,7 +29,10 @@ * @param displayName */ public ExtendedBooleanPropertyDescriptor(Object id, String displayName) { - super(id, displayName, new String[] { FALSE, TRUE }); + super(id, displayName, new String[] { + CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_False, + CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_True + }); } /** @@ -46,9 +43,9 @@ public String getText(Object object) { if (object instanceof Integer) { if (((Integer) object).intValue() == 0) - return FALSE; + return CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_False; else if (((Integer) object).intValue() == 1) - return TRUE; + return CommonUiServicesPropertiesMessages.ExtendedBooleanPropertyDescriptor_True; } return (String) getBlank(); } Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedPropertyDescriptor.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services.properties/src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedPropertyDescriptor.java,v retrieving revision 1.2 diff -u -r1.2 ExtendedPropertyDescriptor.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedPropertyDescriptor.java 12 Sep 2005 21:26:40 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedPropertyDescriptor.java 27 Oct 2005 16:13:15 -0000 @@ -11,12 +11,11 @@ package org.eclipse.gmf.runtime.common.ui.services.properties.extended; +import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages; import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.ui.views.properties.IPropertySource; import org.eclipse.ui.views.properties.PropertyDescriptor; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; - /** * @author Tauseef A. Israr Created on: Sep 9, 2002 */ @@ -24,10 +23,6 @@ extends PropertyDescriptor implements IExtendedPropertyDescriptor { - /** Blank extended property descriptor. */ - public static final String BLANK = PSFResourceManager - .getI18NString("ExtendedPropertyDescriptor.blank"); //$NON-NLS-1$ - private IPropertySource propertySource; private boolean dirty = false; @@ -80,7 +75,7 @@ * @see org.eclipse.gmf.runtime.common.ui.services.properties.extended.IExtendedPropertyDescriptor#getBlank() */ public Object getBlank() { - return BLANK; + return CommonUiServicesPropertiesMessages.ExtendedPropertyDescriptor_blank; } /** Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedTextPropertyDescriptor.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services.properties/src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedTextPropertyDescriptor.java,v retrieving revision 1.2 diff -u -r1.2 ExtendedTextPropertyDescriptor.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedTextPropertyDescriptor.java 12 Sep 2005 21:26:40 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/ExtendedTextPropertyDescriptor.java 27 Oct 2005 16:13:15 -0000 @@ -13,6 +13,7 @@ import java.text.MessageFormat; +import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.viewers.CellEditor; import org.eclipse.jface.viewers.TextCellEditor; @@ -21,8 +22,6 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; - /** * @author Tauseef A. Israr * Created on: Sep 9, 2002 @@ -31,11 +30,6 @@ extends ExtendedPropertyDescriptor { /** - * The title of the dialog box. - */ - private static String DIALOG_TITLE = PSFResourceManager.getI18NString("ExtendedTextPropertyDescriptor.PropertiesViewErrorDialog.Title"); //$NON-NLS-1$ - - /** * Constructor for ExtendedTextPropertyDescriptor. * @param id * @param displayName @@ -108,7 +102,7 @@ if (!newValidState) { MessageDialog.openError( Display.getCurrent().getActiveShell(), - DIALOG_TITLE, + CommonUiServicesPropertiesMessages.ExtendedTextPropertyDescriptor_PropertiesViewErrorDialog_Title, getErrorMessage()); fireCancelEditor(); } else { Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/PropertySource.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services.properties/src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/PropertySource.java,v retrieving revision 1.2 diff -u -r1.2 PropertySource.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/PropertySource.java 12 Sep 2005 21:26:40 -0000 1.2 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/extended/PropertySource.java 27 Oct 2005 16:13:15 -0000 @@ -20,7 +20,7 @@ import org.eclipse.ui.views.properties.IPropertyDescriptor; import org.eclipse.gmf.runtime.common.ui.services.properties.ICompositePropertySource; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; +import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages; /** * @author Tauseef A. Israr Created on: Aug 27, 2002 @@ -29,12 +29,6 @@ public class PropertySource implements IExtendedPropertySource { /** - * externalized error message - */ - protected static final String PROPERTY_ID_DESCRIPTOR_ERROR = PSFResourceManager - .getI18NString("PropertySource._ERROR_.descriptorError"); //$NON-NLS-1$ - - /** * refernce to the model element to whose properties are represented by this * propertysource instance */ @@ -109,7 +103,7 @@ public Object getEditableValue() { if (isDirty()) { setDirty(false); - return ExtendedPropertyDescriptor.BLANK; + return CommonUiServicesPropertiesMessages.ExtendedPropertyDescriptor_blank; } if (getElement() == null && enclosed != null) return enclosed.getEditableValue(); @@ -180,8 +174,8 @@ Object[] args = new Object[1]; args[0] = id; - String message = MessageFormat.format(PROPERTY_ID_DESCRIPTOR_ERROR, - args); + String message = MessageFormat.format(CommonUiServicesPropertiesMessages.PropertySource__ERROR__descriptorError, + args); assert null != propertyDescriptor : message; if (propertyDescriptor.isDirty()) { @@ -369,7 +363,7 @@ if (value == null) return true; if (value instanceof String) { - if (((String) value).equals(ExtendedPropertyDescriptor.BLANK)) + if (((String) value).equals(CommonUiServicesPropertiesMessages.ExtendedPropertyDescriptor_blank)) return false; } return true; Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/PSFCommonUIPlugin.java =================================================================== RCS file: /home/technology/org.eclipse.gmf/plugins/org.eclipse.gmf.runtime.common.ui.services.properties/src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/PSFCommonUIPlugin.java,v retrieving revision 1.3 diff -u -r1.3 PSFCommonUIPlugin.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/PSFCommonUIPlugin.java 4 Oct 2005 20:19:36 -0000 1.3 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/PSFCommonUIPlugin.java 27 Oct 2005 16:13:15 -0000 @@ -11,9 +11,7 @@ package org.eclipse.gmf.runtime.common.ui.services.properties.internal; -import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; import org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.PSFResourceManager; /** * The main plugin class to be used in the desktop. @@ -50,15 +48,4 @@ public static String getPluginId() { return getDefault().getSymbolicName(); } - - /** - * Retrieves the resource manager for this plug-in. - * - * @return The resource manager for this plug-in. - * - * @see org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin#getResourceManager() - */ - public AbstractResourceManager getResourceManager() { - return PSFResourceManager.getInstance(); - } } \ No newline at end of file Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/PSFResourceManager.java =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/PSFResourceManager.java diff -N src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/PSFResourceManager.java --- src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/PSFResourceManager.java 12 Sep 2005 21:26:40 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,79 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2005 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - ****************************************************************************/ -/* - * Created on Apr 28, 2004 - * - * TODO To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n; - -import org.eclipse.core.runtime.Plugin; - -import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; -import org.eclipse.gmf.runtime.common.ui.services.properties.internal.PSFCommonUIPlugin; - - -/** - * Common UI Properties Service Framework Resource manager object - * - * @author nbalaba - */ -public final class PSFResourceManager - extends AbstractResourceManager { - - /** - * Singleton instance of the resource manager. - */ - private static PSFResourceManager instance = new PSFResourceManager(); - - /** - * Initializes me. - */ - private PSFResourceManager() { - super(); - } - - /** - * Retrieves the singleton instance of this resource manager. - * - * @return The singleton resource manager. - */ - public static PSFResourceManager getInstance() { - return instance; - } - - /** - * Retrieves internationalized string. - * - * @param key string key - * @return internationalized string - */ - public static String getI18NString(String key){ - return getInstance().getString(key); - - } - - // implements the inherited method - protected void initializeResources() { - initializeMessageResources(); - } - - /** - * Convenience method to obtain my plug-in instance. - * - * @return my plug-in - */ - protected Plugin getPlugin() { - return PSFCommonUIPlugin.getDefault(); - } - -} Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/messages.properties =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/messages.properties diff -N src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/messages.properties --- src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/messages.properties 12 Sep 2005 21:26:40 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,51 +0,0 @@ -# ============================================================================== -#*+------------------------------------------------------------------------+ -#*| Copyright (c) 2005 IBM Corporation and others. | -#*| All rights reserved. This program and the accompanying materials | -#*| are made available under the terms of the Eclipse Public License v1.0 | -#*| which accompanies this distribution, and is available at | -#*| http://www.eclipse.org/legal/epl-v10.html | -#*| | -#*| Contributors: | -#*| IBM Corporation - initial API and implementation | -#*+------------------------------------------------------------------------+ -# ============================================================================== - - -# Properties View values -# RGB is short for Red, Green, Blue and {0},{1},{2} contains the red, green, and blue values respectively. -ExtendedColorPropertyLabelProvider.RGBValue = RGB ({0},{1},{2}) - -# Properties View values -# Properties View boolean values -ExtendedBooleanPropertyDescriptor.True = True -ExtendedBooleanPropertyDescriptor.False = False - -# the blank value for a cell -ExtendedPropertyDescriptor.blank= - -# properties view error dialog title -ExtendedTextPropertyDescriptor.PropertiesViewErrorDialog.Title=Properties Error - -# Error getting the property descriptor -# {0} = Property ID -PropertySource._ERROR_.descriptorError= IRJA0287E Error. The property of given id {0} exists without a descriptor - - -# Properties View error messages -CellValidatorFactory.InvalidIntegerFormat = Invalid integer format. -CellValidatorFactory.InvalidPositiveZeroInclusiveIntegerFormat = Invalid integer format. Value must be greater than or equal to 0. -CellValidatorFactory.InvalidPositiveZeroExclusiveIntegerFormat = Invalid integer format. Value must be greater than or equal to 1. -CellValidatorFactory.InvalidNegativeZeroInclusiveIntegerFormat = Invalid integer format. Value must be less than or equal to 0. -CellValidatorFactory.InvalidNegativeZeroExclusiveIntegerFormat = Invalid integer format. Value must be less than or equal to -1. -CellValidatorFactory.InvalidRealFormat=Invalid real format. -CellValidatorFactory.InvalidByteFormat=Invalid byte format. -CellValidatorFactory.InvalidFloatFormat=Invalid float format. -CellValidatorFactory.InvalidLongFormat=Invalid long format. -CellValidatorFactory.InvalidShortFormat=Invalid short format. -CellValidatorFactory.InvalidCharFormat=Invalid char format. - -# properties dialog title -PropertyPageCellEditor.PropertiesDialog.title=Properties - - Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.java =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.java diff -N src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n; + +import org.eclipse.osgi.util.NLS; + +public final class CommonUiServicesPropertiesMessages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.gmf.runtime.common.ui.services.properties.internal.l10n.CommonUiServicesPropertiesMessages";//$NON-NLS-1$ + + private CommonUiServicesPropertiesMessages() { + // Do not instantiate + } + + public static String ExtendedColorPropertyLabelProvider_RGBValue; + public static String ExtendedBooleanPropertyDescriptor_True; + public static String ExtendedBooleanPropertyDescriptor_False; + public static String ExtendedPropertyDescriptor_blank; + public static String ExtendedTextPropertyDescriptor_PropertiesViewErrorDialog_Title; + public static String PropertySource__ERROR__descriptorError; + public static String CellValidatorFactory_InvalidIntegerFormat; + public static String CellValidatorFactory_InvalidPositiveZeroInclusiveIntegerFormat; + public static String CellValidatorFactory_InvalidPositiveZeroExclusiveIntegerFormat; + public static String CellValidatorFactory_InvalidNegativeZeroInclusiveIntegerFormat; + public static String CellValidatorFactory_InvalidNegativeZeroExclusiveIntegerFormat; + public static String CellValidatorFactory_InvalidRealFormat; + public static String CellValidatorFactory_InvalidByteFormat; + public static String CellValidatorFactory_InvalidFloatFormat; + public static String CellValidatorFactory_InvalidLongFormat; + public static String CellValidatorFactory_InvalidShortFormat; + public static String CellValidatorFactory_InvalidCharFormat; + public static String PropertyPageCellEditor_PropertiesDialog_title; + + static { + NLS.initializeMessages(BUNDLE_NAME, CommonUiServicesPropertiesMessages.class); + } +} Index: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.properties =================================================================== RCS file: src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.properties diff -N src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/runtime/common/ui/services/properties/internal/l10n/CommonUiServicesPropertiesMessages.properties 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,51 @@ +# ============================================================================== +#*+------------------------------------------------------------------------+ +#*| Copyright (c) 2005 IBM Corporation and others. | +#*| All rights reserved. This program and the accompanying materials | +#*| are made available under the terms of the Eclipse Public License v1.0 | +#*| which accompanies this distribution, and is available at | +#*| http://www.eclipse.org/legal/epl-v10.html | +#*| | +#*| Contributors: | +#*| IBM Corporation - initial API and implementation | +#*+------------------------------------------------------------------------+ +# ============================================================================== + + +# Properties View values +# RGB is short for Red, Green, Blue and {0},{1},{2} contains the red, green, and blue values respectively. +ExtendedColorPropertyLabelProvider_RGBValue = RGB ({0},{1},{2}) + +# Properties View values +# Properties View boolean values +ExtendedBooleanPropertyDescriptor_True = True +ExtendedBooleanPropertyDescriptor_False = False + +# the blank value for a cell +ExtendedPropertyDescriptor_blank= + +# properties view error dialog title +ExtendedTextPropertyDescriptor_PropertiesViewErrorDialog_Title=Properties Error + +# Error getting the property descriptor +# {0} = Property ID +PropertySource__ERROR__descriptorError= IRJA0287E Error. The property of given id {0} exists without a descriptor + + +# Properties View error messages +CellValidatorFactory_InvalidIntegerFormat = Invalid integer format. +CellValidatorFactory_InvalidPositiveZeroInclusiveIntegerFormat = Invalid integer format. Value must be greater than or equal to 0. +CellValidatorFactory_InvalidPositiveZeroExclusiveIntegerFormat = Invalid integer format. Value must be greater than or equal to 1. +CellValidatorFactory_InvalidNegativeZeroInclusiveIntegerFormat = Invalid integer format. Value must be less than or equal to 0. +CellValidatorFactory_InvalidNegativeZeroExclusiveIntegerFormat = Invalid integer format. Value must be less than or equal to -1. +CellValidatorFactory_InvalidRealFormat=Invalid real format. +CellValidatorFactory_InvalidByteFormat=Invalid byte format. +CellValidatorFactory_InvalidFloatFormat=Invalid float format. +CellValidatorFactory_InvalidLongFormat=Invalid long format. +CellValidatorFactory_InvalidShortFormat=Invalid short format. +CellValidatorFactory_InvalidCharFormat=Invalid char format. + +# properties dialog title +PropertyPageCellEditor_PropertiesDialog_title=Properties + +