Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/DiagramPlugin.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.runtime.diagram.geoshapes/src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/DiagramPlugin.java,v retrieving revision 1.4 diff -u -r1.4 DiagramPlugin.java --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/DiagramPlugin.java 14 Oct 2005 20:58:53 -0000 1.4 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/DiagramPlugin.java 15 Nov 2005 19:30:08 -0000 @@ -11,8 +11,6 @@ package org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal; -import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramResourceManager; -import org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager; import org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin; import org.eclipse.gmf.runtime.emf.core.internal.util.MSLAdapterFactoryManager; import org.eclipse.gmf.runtime.emf.core.internal.util.MSLMetaModelManager; @@ -71,10 +69,4 @@ MSLMetaModelManager.register(NotationPackage.eINSTANCE, null); } - /* (non-Javadoc) - * @see org.eclipse.gmf.runtime.common.ui.plugin.XToolsUIPlugin#getResourceManager() - */ - public AbstractResourceManager getResourceManager() { - return DiagramResourceManager.getInstance(); - } } Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramResourceManager.java =================================================================== RCS file: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramResourceManager.java diff -N src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramResourceManager.java --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramResourceManager.java 14 Nov 2005 16:52:30 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,79 +0,0 @@ -/****************************************************************************** - * Copyright (c) 2004, 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.examples.runtime.diagram.geoshapes.internal.l10n; - -import org.eclipse.core.runtime.Plugin; -import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.DiagramPlugin; -import org.eclipse.gmf.runtime.common.ui.l10n.AbstractUIResourceManager; - - -/** - * A singleton resource manager object that manages string, image, font and - * cursor types of resources for this plug-in - * - * @author qili - */ -public class DiagramResourceManager extends AbstractUIResourceManager { - - /** - * Singleton instance for the resource manager - */ - private static AbstractUIResourceManager resourceManager = - new DiagramResourceManager(); - - /** - * Constructor for DiagramResourceManager. - */ - public DiagramResourceManager() { - super(); - } - - /** - * Return singleton instance of the resource manager - * @return AbstractResourceManager - */ - public static AbstractUIResourceManager getInstance() { - return resourceManager; - } - - /** - * A shortcut method to get localized string - * @param key - resource bundle key. - * @return - localized string value or a key if the bundle does not contain - * this entry - */ - public static String getI18NString(String key) { - return getInstance().getString(key); - } - - /* (non-Javadoc) - * @see org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager#initializeResources() - */ - protected void initializeResources() { - //do nothing - } - - /* (non-Javadoc) - * @see org.eclipse.gmf.runtime.common.ui.l10n.AbstractUIResourceManager#initializeUIResources() - */ - protected void initializeUIResources() { - initializeMessageResources(); - } - - /** - * @see org.eclipse.gmf.runtime.common.core.l10n.AbstractResourceManager#getPlugin() - */ - protected Plugin getPlugin() { - return DiagramPlugin.getInstance(); - } - - } Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/messages.properties =================================================================== RCS file: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/messages.properties diff -N src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/messages.properties --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/messages.properties 12 Sep 2005 21:25:37 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,63 +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 | -#*+------------------------------------------------------------------------+ -# ============================================================================== -# ============================================================================== -# GEO Visualizer General - Translation Instruction: section to be translated -# ============================================================================== - -# --- File creation --- -GEOVisualizer.DefaultGeoshapeDiagramFileName=geoshapediagram -GEOVisualizer.DefaultSavedBrowseDiagramDiagramProject=Saved Browse Diagrams - -# ============================================================================== -# Wizards - Translation Instruction: section to be translated -# ============================================================================== - -# --- Class Diagram Wizard --- -CreationWizard.New_Class_Diagram=New Class Diagram -ClassDiagramWizardPage.Title=Create Class Diagram -ClassDiagramWizardPage.Description=Create a new class diagram. - -# --- Geoshape Diagram Wizard --- -CreationWizard.New_Geoshape_Diagram=New Geoshape Diagram -GeoshapeWizardPage.Title=Create Geoshape Diagram -GeoshapeWizardPage.Description=Create a new geoshape diagram. - -# --- Deployment Diagram Wizard --- -CreationWizard.New_Deployment_Diagram=New Deployment Diagram - -# ============================================================================== -# Dialogs - Translation Instruction: section to be translated -# ============================================================================== - -# --- Topic Diagram --- -GEOVisualizerTopicDiagramEditor.Unable_To_Save_Viz_Diagram_Title=Unable to Save Diagram. -GEOVisualizerTopicDiagramEditor.Unable_To_Save_Viz_Diagram_Text=Unable to save diagram from the current topic diagram. -GEOVisualizerTopicDiagramEditor.Viz_Diagram_Exists=File Exists -GEOVisualizerTopicDiagramEditor.Viz_Diagram_Exists_Text=Cannot overwrite the existing diagram. Please specify a different diagram file name. - -# ============================================================================== -# Exceptions and Errors - Translation Instruction : needs Translation. -# ============================================================================== - -#--- Errors --- -WizardPage.Message.FileExists_ERROR_=The same name already exists. - -#--- Parameter passed here is the serialized form of the VizRef for which visualization failed --- -GEOVisualizerEditor.EDITOR_OPEN_EXC_=Unable to open the editor - -# =========================================================================== -# General Tab related strings - Translation Instruction: needs Translation. -# =========================================================================== - -GeoShapeGeneralDetails.GeoShapeDescriptionLabel.text=Description: -GeoShapeGeneralDetails.GeoShapeDescriptionChangeCommand.text=Description \ No newline at end of file Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/section/GeoShapeGeneralSection.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.runtime.diagram.geoshapes/src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/section/GeoShapeGeneralSection.java,v retrieving revision 1.3 diff -u -r1.3 GeoShapeGeneralSection.java --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/section/GeoShapeGeneralSection.java 12 Sep 2005 21:25:37 -0000 1.3 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/section/GeoShapeGeneralSection.java 15 Nov 2005 19:30:08 -0000 @@ -15,19 +15,9 @@ import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; -import org.eclipse.swt.SWT; -import org.eclipse.swt.custom.CLabel; -import org.eclipse.swt.layout.FormAttachment; -import org.eclipse.swt.layout.FormData; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Text; -import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants; -import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage; - +import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramGeoshapesMessages; import org.eclipse.gmf.runtime.common.core.command.ICommand; import org.eclipse.gmf.runtime.common.core.util.StringStatics; -import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramResourceManager; import org.eclipse.gmf.runtime.diagram.ui.properties.sections.AbstractModelerPropertySection; import org.eclipse.gmf.runtime.diagram.ui.properties.views.TextChangeHelper; import org.eclipse.gmf.runtime.notation.DescriptionStyle; @@ -35,6 +25,15 @@ import org.eclipse.gmf.runtime.notation.NotationPackage; import org.eclipse.gmf.runtime.notation.Style; import org.eclipse.gmf.runtime.notation.View; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CLabel; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Text; +import org.eclipse.wst.common.ui.properties.internal.provisional.ITabbedPropertyConstants; +import org.eclipse.wst.common.ui.properties.internal.provisional.TabbedPropertySheetPage; /** * @author Eliza Tworkowska @@ -44,12 +43,12 @@ extends AbstractModelerPropertySection { // Labels - protected static final String DESCRIPTION_LABEL = DiagramResourceManager - .getI18NString("GeoShapeGeneralDetails.GeoShapeDescriptionLabel.text"); //$NON-NLS-1$ + protected static final String DESCRIPTION_LABEL = + DiagramGeoshapesMessages.GeoShapeGeneralDetailsGeoShapeDescriptionLabel_text; // properties - protected static final String DESCRIPTION = DiagramResourceManager - .getI18NString("GeoShapeGeneralDetails.GeoShapeDescriptionChangeCommand.text"); //$NON-NLS-1$ + protected static final String DESCRIPTION = + DiagramGeoshapesMessages.GeoShapeGeneralDetailsGeoShapeDescriptionChangeCommand_text; // commads - used as a label for Edit -> Undo/Redo, used message format for concatenating strings private static final String DESCRIPTION_PROPERTY_CHANGE_COMMAND_NAME = DESCRIPTION + VALUE_CHANGED_STRING; Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramCreationWizard.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.runtime.diagram.geoshapes/src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramCreationWizard.java,v retrieving revision 1.2 diff -u -r1.2 DiagramCreationWizard.java --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramCreationWizard.java 12 Sep 2005 21:25:37 -0000 1.2 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramCreationWizard.java 15 Nov 2005 19:30:09 -0000 @@ -11,12 +11,12 @@ package org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.wizards; +import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.DiagramPlugin; +import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramGeoshapesMessages; +import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards.EditorCreationWizard; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.ui.IWorkbench; -import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramResourceManager; -import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards.EditorCreationWizard; - /** * @author qili @@ -40,11 +40,8 @@ public void init(IWorkbench workbench, IStructuredSelection sel) { super.init(workbench, sel); - - setWindowTitle(DiagramResourceManager - .getI18NString("CreationWizard.New_Geoshape_Diagram")); //$NON-NLS-1$ - setDefaultPageImageDescriptor(DiagramResourceManager.getInstance() - .getImageDescriptor("wizards/geoshapes_wiz.gif")); //$NON-NLS-1$ + setWindowTitle(DiagramGeoshapesMessages.CreationWizardNewGeoshapeDiagram_label); + setDefaultPageImageDescriptor(DiagramPlugin.imageDescriptorFromPlugin(DiagramPlugin.getPluginId(), "wizards/geoshapes_wiz.gif")); //$NON-NLS-1$ setNeedsProgressMonitor(true); } Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramWizardPage.java =================================================================== RCS file: /cvsroot/technology/org.eclipse.gmf/examples/org.eclipse.gmf.examples.runtime.diagram.geoshapes/src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramWizardPage.java,v retrieving revision 1.3 diff -u -r1.3 DiagramWizardPage.java --- src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramWizardPage.java 14 Nov 2005 16:52:30 -0000 1.3 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/wizards/DiagramWizardPage.java 15 Nov 2005 19:30:09 -0000 @@ -11,7 +11,7 @@ package org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.wizards; -import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramResourceManager; +import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramGeoshapesMessages; import org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.util.GeoShapeDiagramFileCreator; import org.eclipse.gmf.runtime.diagram.ui.resources.editor.ide.wizards.EditorWizardPage; import org.eclipse.gmf.runtime.diagram.ui.resources.editor.util.DiagramFileCreator; @@ -38,18 +38,15 @@ public DiagramWizardPage(IWorkbench aWorkbench, IStructuredSelection selection) { super("GeoshapeDiagramPage", aWorkbench, selection); //$NON-NLS-1$ - this.setTitle(DiagramResourceManager - .getI18NString("GeoshapeWizardPage.Title")); //$NON-NLS-1$ - this.setDescription(DiagramResourceManager - .getI18NString("GeoshapeWizardPage.Description")); //$NON-NLS-1$ + setTitle(DiagramGeoshapesMessages.GeoshapeWizardPage_title); + setDescription(DiagramGeoshapesMessages.GeoshapeWizardPage_description); } /* (non-Javadoc) * @see com.ibm.xtools.viz.ui.internal.wizards.DiagramWizardPage#getDefaultFileName() */ protected String getDefaultFileName() { - return DiagramResourceManager - .getI18NString("GEOVisualizer.DefaultGeoshapeDiagramFileName"); //$NON-NLS-1$; + return DiagramGeoshapesMessages.DefaultGeoshapeDiagramFileName; } /* (non-Javadoc) Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.java =================================================================== RCS file: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.java diff -N src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,49 @@ +/****************************************************************************** + * 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 + ****************************************************************************/ + +package org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n; + +import org.eclipse.osgi.util.NLS; + +/** + * An accessor class for externalized strings. + * + * @author Chris Aniszczyk (zx) + */ +public class DiagramGeoshapesMessages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.gmf.examples.runtime.diagram.geoshapes.internal.l10n.DiagramGeoshapesMessages";//$NON-NLS-1$ + + public static String DefaultGeoshapeDiagramFileName; + public static String DefaultSavedBrowseDiagramDiagramProject; + public static String CreationWizardNewClassDiagram_label; + public static String ClassDiagramWizardPage_title; + public static String ClassDiagramWizardPage_description; + public static String GeoshapeWizardPage_title; + public static String CreationWizardNewGeoshapeDiagram_label; + public static String GeoshapeWizardPage_description; + public static String CreationWizardNewDeploymentDiagram_label; + public static String GEOVisualizerTopicDiagramEditorUnableToSaveVizDiagram_title; + public static String GEOVisualizerTopicDiagramEditorUnableToSaveVizDiagram_text; + public static String GEOVisualizerTopicDiagramEditorVizDiagramExists_label; + public static String GEOVisualizerTopicDiagramEditorVizDiagramExists_text; + public static String WizardPageMessageFileExistsError_label; + public static String GEOVisualizerEditorEditorOpen_label; + public static String GeoShapeGeneralDetailsGeoShapeDescriptionLabel_text; + public static String GeoShapeGeneralDetailsGeoShapeDescriptionChangeCommand_text; + + private DiagramGeoshapesMessages() {} + + static { + NLS.initializeMessages(BUNDLE_NAME, DiagramGeoshapesMessages.class); + } + +} Index: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.properties =================================================================== RCS file: src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.properties diff -N src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.properties --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/org/eclipse/gmf/examples/runtime/diagram/geoshapes/internal/l10n/DiagramGeoshapesMessages.properties 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,63 @@ +# ============================================================================== +#*+------------------------------------------------------------------------+ +#*| 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 | +#*+------------------------------------------------------------------------+ +# ============================================================================== +# ============================================================================== +# GEO Visualizer General - Translation Instruction: section to be translated +# ============================================================================== + +# --- File creation --- +DefaultGeoshapeDiagramFileName=geoshapediagram +DefaultSavedBrowseDiagramDiagramProject=Saved Browse Diagrams + +# ============================================================================== +# Wizards - Translation Instruction: section to be translated +# ============================================================================== + +# --- Class Diagram Wizard --- +CreationWizardNewClassDiagram_label=New Class Diagram +ClassDiagramWizardPage_title=Create Class Diagram +ClassDiagramWizardPage_description=Create a new class diagram. + +# --- Geoshape Diagram Wizard --- +CreationWizardNewGeoshapeDiagram_label=New Geoshape Diagram +GeoshapeWizardPage_title=Create Geoshape Diagram +GeoshapeWizardPage_description=Create a new geoshape diagram. + +# --- Deployment Diagram Wizard --- +CreationWizardNewDeploymentDiagram_label=New Deployment Diagram + +# ============================================================================== +# Dialogs - Translation Instruction: section to be translated +# ============================================================================== + +# --- Topic Diagram --- +GEOVisualizerTopicDiagramEditorUnableToSaveVizDiagram_title=Unable to Save Diagram. +GEOVisualizerTopicDiagramEditorUnableToSaveVizDiagram_text=Unable to save diagram from the current topic diagram. +GEOVisualizerTopicDiagramEditorVizDiagramExists_label=File Exists +GEOVisualizerTopicDiagramEditorVizDiagramExists_text=Cannot overwrite the existing diagram. Please specify a different diagram file name. + +# ============================================================================== +# Exceptions and Errors - Translation Instruction : needs Translation. +# ============================================================================== + +#--- Errors --- +WizardPageMessageFileExistsError_label=The same name already exists. + +#--- Parameter passed here is the serialized form of the VizRef for which visualization failed --- +GEOVisualizerEditorEditorOpen_label=Unable to open the editor + +# =========================================================================== +# General Tab related strings - Translation Instruction: needs Translation. +# =========================================================================== + +GeoShapeGeneralDetailsGeoShapeDescriptionLabel_text=Description: +GeoShapeGeneralDetailsGeoShapeDescriptionChangeCommand_text=Description