Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 186844 Details for
Bug 331260
Implement an extensible translation service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch alternative v.2 - model update & usage
patch translation model 2.txt (text/plain), 189.76 KB, created by
Oleg Besedin
on 2011-01-14 14:20:35 EST
(
hide
)
Description:
Patch alternative v.2 - model update & usage
Filename:
MIME Type:
Creator:
Oleg Besedin
Created:
2011-01-14 14:20:35 EST
Size:
189.76 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.e4.demo.contacts >Index: Application.e4xmi >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/examples/org.eclipse.e4.demo.contacts/Application.e4xmi,v >retrieving revision 1.17 >diff -u -r1.17 Application.e4xmi >--- Application.e4xmi 1 Dec 2010 19:06:49 -0000 1.17 >+++ Application.e4xmi 14 Jan 2011 19:08:12 -0000 >@@ -1,25 +1,25 @@ > <?xml version="1.0" encoding="ASCII"?> > <application:Application xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:application="http://www.eclipse.org/ui/2010/UIModel/application" xmlns:basic="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic" xmlns:menu="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" xsi:schemaLocation="http://www.eclipse.org/ui/2010/UIModel/application/ui/basic http://www.eclipse.org/ui/2010/UIModel/application#//ui/basic http://www.eclipse.org/ui/2010/UIModel/application/ui/menu http://www.eclipse.org/ui/2010/UIModel/application#//ui/menu" xmi:id="_GRxcMXk5Ed-55voCTyIpVQ"> >- <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="_SeXUAe8EEd6FC9cDb6iV7g" label="e4 Contacts Demo" x="20" y="20" width="700" height="480"> >+ <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="_SeXUAe8EEd6FC9cDb6iV7g" label="%windowTitle" x="20" y="20" width="700" height="480"> > <children xsi:type="basic:PartSashContainer" xmi:id="_SeXUCu8EEd6FC9cDb6iV7g" elementId="_SeXUCu8EEd6FC9cDb6iV7g" horizontal="true"> > <children xsi:type="basic:PartStack" xmi:id="_SeXUC-8EEd6FC9cDb6iV7g" elementId="_SeXUC-8EEd6FC9cDb6iV7g" containerData="30"> >- <children xsi:type="basic:Part" xmi:id="_SeXUDO8EEd6FC9cDb6iV7g" elementId="ContactsView" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.ListView" label="Contacts List" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/folder_user.png" tooltip="List of Contacts"/> >+ <children xsi:type="basic:Part" xmi:id="_SeXUDO8EEd6FC9cDb6iV7g" elementId="ContactsView" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.ListView" label="%contactsList" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/folder_user.png" tooltip="%contactsTooltip"/> > </children> > <children xsi:type="basic:PartStack" xmi:id="_SeXUDe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.partstacks.second" containerData="70"> >- <children xsi:type="basic:Part" xmi:id="DetailsView" elementId="DetailsView" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.DetailsView" label="Details" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/report_user.png" tooltip="Contact Details"/> >+ <children xsi:type="basic:Part" xmi:id="DetailsView" elementId="DetailsView" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.views.DetailsView" label="%partDetails" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/report_user.png" tooltip="%detailsTooltip"/> > </children> > </children> > <mainMenu xmi:id="menu:org.eclipse.ui.main.menu" elementId="menu:org.eclipse.ui.main.menu"> >- <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="File"> >- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEO8EEd6FC9cDb6iV7g" elementId="_SeXUEO8EEd6FC9cDb6iV7g" label="Save" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" command="contacts.save"/> >- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEe8EEd6FC9cDb6iV7g" elementId="_SeXUEe8EEd6FC9cDb6iV7g" label="Delete" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" command="contacts.delete"/> >- <children xsi:type="menu:DirectMenuItem" xmi:id="_SeXUEu8EEd6FC9cDb6iV7g" elementId="_SeXUEu8EEd6FC9cDb6iV7g" label="Direct Exit" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler"/> >- <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="Exit" command="contacts.exit"/> >+ <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="%fileMenu"> >+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEO8EEd6FC9cDb6iV7g" elementId="_SeXUEO8EEd6FC9cDb6iV7g" label="%menuLabelSave" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" command="contacts.save"/> >+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUEe8EEd6FC9cDb6iV7g" elementId="_SeXUEe8EEd6FC9cDb6iV7g" label="%menuLabelDelete" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/user_delete.png" command="contacts.delete"/> >+ <children xsi:type="menu:DirectMenuItem" xmi:id="_SeXUEu8EEd6FC9cDb6iV7g" elementId="_SeXUEu8EEd6FC9cDb6iV7g" label="%menuLabelDirectExit" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.ExitHandler"/> >+ <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="%menuLabelExit" command="contacts.exit"/> > </children> > </mainMenu> > <trimBars xmi:id="_SeXUAu8EEd6FC9cDb6iV7g" elementId="_SeXUAu8EEd6FC9cDb6iV7g"> > <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="toolbar:org.eclipse.ui.main.toolbar"> >- <children xsi:type="menu:DirectToolItem" xmi:id="_SeXUBO8EEd6FC9cDb6iV7g" elementId="_SeXUBO8EEd6FC9cDb6iV7g" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" tooltip="Save" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler"/> >+ <children xsi:type="menu:DirectToolItem" xmi:id="_SeXUBO8EEd6FC9cDb6iV7g" elementId="_SeXUBO8EEd6FC9cDb6iV7g" label="" iconURI="platform:/plugin/org.eclipse.e4.demo.contacts/icons/silk/disk.png" tooltip="%toolbarSaveTooltip" contributionURI="platform:/plugin/org.eclipse.e4.demo.contacts/org.eclipse.e4.demo.contacts.handlers.SaveHandler"/> > </children> > </trimBars> > </children> >Index: build.properties >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/examples/org.eclipse.e4.demo.contacts/build.properties,v >retrieving revision 1.4 >diff -u -r1.4 build.properties >--- build.properties 16 Apr 2010 17:28:17 -0000 1.4 >+++ build.properties 14 Jan 2011 19:08:12 -0000 >@@ -10,4 +10,6 @@ > css/,\ > splash.bmp,\ > plugin_customization.ini,\ >- vcards/ >+ vcards/,\ >+ plugin_ru.properties,\ >+ plugin.properties >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/examples/org.eclipse.e4.demo.contacts/META-INF/MANIFEST.MF,v >retrieving revision 1.15 >diff -u -r1.15 MANIFEST.MF >--- META-INF/MANIFEST.MF 24 Jun 2010 14:19:44 -0000 1.15 >+++ META-INF/MANIFEST.MF 14 Jan 2011 19:08:12 -0000 >@@ -24,12 +24,14 @@ > org.eclipse.e4.ui.bindings;bundle-version="0.9.0", > org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0", > org.eclipse.e4.ui.css.swt;bundle-version="0.9.1", >- org.eclipse.e4.ui.di;bundle-version="0.9.0" >+ org.eclipse.e4.ui.di;bundle-version="0.9.0", >+ org.eclipse.e4.core.services;bundle-version="0.9.1" > Bundle-ActivationPolicy: lazy > Bundle-Vendor: Eclipse.org > Import-Package: javax.annotation;version="1.0.0", > javax.inject;version="1.0.0" > Bundle-Activator: org.eclipse.e4.demo.contacts.BundleActivatorImpl > Export-Package: org.eclipse.e4.demo.contacts.model >+Bundle-Localization: plugin > > >Index: plugin.properties >=================================================================== >RCS file: plugin.properties >diff -N plugin.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,21 @@ >+############################################################################### >+# Copyright (c) 2011 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 >+############################################################################### >+fileMenu = &File >+partDetails = Details >+contactsList = Contacts List >+menuLabelSave = &Save >+menuLabelDelete = &Delete >+menuLabelDirectExit = Direct E&xit >+menuLabelExit = &Exit >+windowTitle = e4 Contacts Demo >+contactsTooltip = List of Contacts >+detailsTooltip = Contact Details >+toolbarSaveTooltip = Save >Index: plugin_ru.properties >=================================================================== >RCS file: plugin_ru.properties >diff -N plugin_ru.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ plugin_ru.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,22 @@ >+############################################################################### >+# Copyright (c) 2011 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 >+############################################################################### >+fileMenu = &\u0424\u0430\u0439\u043B >+partDetails = \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E >+contactsList = \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B >+menuLabelSave = &\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C >+menuLabelDelete = &\u0423\u0434\u0430\u043B\u0438\u0442\u044C >+menuLabelDirectExit = &\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u044B\u0445\u043E\u0434 >+menuLabelExit = &\u0412\u044B\u0445\u043E\u0434 >+windowTitle = e4 \u0417\u0430\u043F\u0438\u0441\u043D\u0430\u044F \u043A\u043D\u0438\u0436\u043A\u0430 >+contactsTooltip = \u0421\u043F\u0438\u0441\u043E\u043A \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043E\u0432 >+detailsTooltip = \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0430\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u0435 >+toolbarSaveTooltip = \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C >+ >Index: src/org/eclipse/e4/demo/contacts/model/internal/BinaryTranslatorProvider.java >=================================================================== >RCS file: src/org/eclipse/e4/demo/contacts/model/internal/BinaryTranslatorProvider.java >diff -N src/org/eclipse/e4/demo/contacts/model/internal/BinaryTranslatorProvider.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/e4/demo/contacts/model/internal/BinaryTranslatorProvider.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,31 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 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.e4.demo.contacts.model.internal; >+ >+import org.eclipse.e4.core.services.translation.TranslationService; >+ >+public class BinaryTranslatorProvider extends TranslationService { >+ >+ @Override >+ public String translate(String key, String contributorURI) { >+ if (key == null) >+ return null; >+ char[] charArray = key.toCharArray(); >+ StringBuffer tmp = new StringBuffer(); >+ tmp.append("0x"); >+ for(int i = 0; i < charArray.length; i++) { >+ int value = charArray[i]; >+ tmp.append(Integer.toHexString(value)); >+ } >+ return tmp.toString(); >+ } >+ >+} >Index: src/org/eclipse/e4/demo/contacts/model/internal/ModelLifeCycleExtension.java >=================================================================== >RCS file: src/org/eclipse/e4/demo/contacts/model/internal/ModelLifeCycleExtension.java >diff -N src/org/eclipse/e4/demo/contacts/model/internal/ModelLifeCycleExtension.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/e4/demo/contacts/model/internal/ModelLifeCycleExtension.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,34 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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.e4.demo.contacts.model.internal; >+ >+import javax.inject.Inject; >+import org.eclipse.e4.core.contexts.ContextInjectionFactory; >+import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.core.services.translation.TranslationService; >+import org.eclipse.e4.ui.model.application.MApplication; >+import org.eclipse.e4.ui.workbench.lifecycle.ProcessRemovals; >+ >+public class ModelLifeCycleExtension { >+ >+ @Inject >+ public ModelLifeCycleExtension() { >+ // placeholder >+ } >+ >+ @ProcessRemovals >+ public void overrideTranslation(MApplication application) { >+ IEclipseContext appContext = application.getContext(); >+ BinaryTranslatorProvider translationService = ContextInjectionFactory.make(BinaryTranslatorProvider.class, appContext); >+ appContext.set(TranslationService.class, translationService); >+ } >+ >+} >#P org.eclipse.e4.ui.model.workbench >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/META-INF/MANIFEST.MF,v >retrieving revision 1.17 >diff -u -r1.17 MANIFEST.MF >--- META-INF/MANIFEST.MF 25 Jun 2010 19:59:17 -0000 1.17 >+++ META-INF/MANIFEST.MF 14 Jan 2011 19:08:12 -0000 >@@ -8,7 +8,8 @@ > Bundle-Vendor: %providerName > Bundle-Localization: plugin > Bundle-RequiredExecutionEnvironment: J2SE-1.5 >-Export-Package: org.eclipse.e4.ui.model.application; >+Export-Package: org.eclipse.e4.ui.model;x-friends:="org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.workbench", >+ org.eclipse.e4.ui.model.application; > x-friends:="org.eclipse.e4.ui.workbench, > org.eclipse.e4.ui.workbench.addons.swt, > org.eclipse.e4.ui.workbench.renderers.swt, >@@ -87,7 +88,7 @@ > org.eclipse.e4.ui.model.fragment;x-friends:="org.eclipse.e4.ui.workbench", > org.eclipse.e4.ui.model.fragment.impl;x-friends:="org.eclipse.e4.ui.workbench", > org.eclipse.e4.ui.model.fragment.util;x-internal:=true, >- org.eclipse.e4.ui.model.internal;x-internal:=true >+ org.eclipse.e4.ui.model.internal;x-friends:="org.eclipse.e4.ui.workbench" > Require-Bundle: org.eclipse.core.runtime, > org.eclipse.emf.ecore;visibility:=reexport, > org.eclipse.emf.ecore.xmi;visibility:=reexport, >Index: model/UIElements.ecore >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore,v >retrieving revision 1.78 >diff -u -r1.78 UIElements.ecore >--- model/UIElements.ecore 10 Jan 2011 16:04:48 -0000 1.78 >+++ model/UIElements.ecore 14 Jan 2011 19:08:12 -0000 >@@ -152,15 +152,11 @@ > eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="UILabel" abstract="true" interface="true"> >+ <eOperations name="getLocalizedLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> >+ <eOperations name="getLocalizedTooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="iconURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="tooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="localLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" >- transient="true"/> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="localTooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" >- transient="true"/> >- <eStructuralFeatures xsi:type="ecore:EAttribute" name="localImage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="ElementContainer" abstract="true" > eSuperTypes="#//ui/UIElement"> >Index: src/org/eclipse/e4/ui/model/LocalizationHelper.java >=================================================================== >RCS file: src/org/eclipse/e4/ui/model/LocalizationHelper.java >diff -N src/org/eclipse/e4/ui/model/LocalizationHelper.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/e4/ui/model/LocalizationHelper.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,94 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 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.e4.ui.model; >+ >+import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.core.services.translation.TranslationService; >+import org.eclipse.e4.ui.model.application.MApplicationElement; >+import org.eclipse.e4.ui.model.application.ui.MUIElement; >+import org.eclipse.e4.ui.model.application.ui.MUILabel; >+import org.eclipse.e4.ui.model.internal.ModelUtils; >+ >+/** >+ * This class provides set of utility method that can be useful in typical >+ * localization scenarios. >+ */ >+final public class LocalizationHelper { >+ >+ private LocalizationHelper() { >+ // prevents instantiation >+ } >+ >+ /** >+ * Returns localized label for the specified element using locale information >+ * from its context. >+ * @param element the element >+ * @return localized element's label, or <code>null</code> if no label can be found >+ */ >+ public static String getLocalizedLabel(MUIElement element) { >+ if (!(element instanceof MUILabel)) >+ return null; >+ String key = ((MUILabel)element).getLabel(); >+ if (key == null) >+ return null; >+ return getLocalized(key, element); >+ } >+ >+ /** >+ * Returns localized tooltip for the specified element using locale information >+ * from its context. >+ * @param element the element >+ * @return localized element's tooltip, or <code>null</code> if no tooltip can be found >+ */ >+ public static String getLocalizedTooltip(MUIElement element) { >+ if (!(element instanceof MUILabel)) >+ return null; >+ String key = ((MUILabel)element).getTooltip(); >+ if (key == null) >+ return null; >+ return getLocalized(key, element); >+ } >+ >+ /** >+ * Returns localized string for the key using locale information specified >+ * in the element's context. >+ * <p> >+ * This method may return <code>null</code> if the context can not be found >+ * for the model element. >+ * </p> >+ * @param key the key >+ * @param element the model element >+ * @return localized key, or <code>null</code> if context information can not >+ * be found for the model element >+ */ >+ public static String getLocalized(String key, MUIElement element) { >+ IEclipseContext context = ModelUtils.getContainingContext(element); >+ if (context == null) >+ return null; >+ return getLocalized(key, element, context); >+ } >+ >+ /** >+ * Returns localized string for the key from the application element using translation >+ * service from the context. >+ * @param key the key >+ * @param element the model element >+ * @param context the context >+ * @return localized key >+ */ >+ public static String getLocalized(String key, MApplicationElement element, IEclipseContext context) { >+ TranslationService translation = context.get(TranslationService.class); >+ if (translation == null) >+ return key; >+ return translation.translate(key, element.getContributorURI()); >+ } >+ >+} >Index: src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/BasicPackageImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/BasicPackageImpl.java,v >retrieving revision 1.8 >diff -u -r1.8 BasicPackageImpl.java >--- src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/BasicPackageImpl.java 10 Jan 2011 16:04:48 -0000 1.8 >+++ src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/BasicPackageImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -138,40 +138,13 @@ > public static final int PART_DESCRIPTOR__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART_DESCRIPTOR__LOCAL_LABEL = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART_DESCRIPTOR__LOCAL_TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART_DESCRIPTOR__LOCAL_IMAGE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 5; >- >- /** > * The feature id for the '<em><b>Handlers</b></em>' containment reference list. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__HANDLERS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 6; >+ public static final int PART_DESCRIPTOR__HANDLERS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 3; > > /** > * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list. >@@ -180,7 +153,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__BINDING_CONTEXTS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 7; >+ public static final int PART_DESCRIPTOR__BINDING_CONTEXTS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 4; > > /** > * The feature id for the '<em><b>Allow Multiple</b></em>' attribute. >@@ -189,7 +162,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__ALLOW_MULTIPLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 8; >+ public static final int PART_DESCRIPTOR__ALLOW_MULTIPLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 5; > > /** > * The feature id for the '<em><b>Category</b></em>' attribute. >@@ -198,7 +171,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__CATEGORY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 9; >+ public static final int PART_DESCRIPTOR__CATEGORY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 6; > > /** > * The feature id for the '<em><b>Menus</b></em>' containment reference list. >@@ -207,7 +180,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__MENUS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 10; >+ public static final int PART_DESCRIPTOR__MENUS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 7; > > /** > * The feature id for the '<em><b>Toolbar</b></em>' containment reference. >@@ -216,7 +189,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__TOOLBAR = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 11; >+ public static final int PART_DESCRIPTOR__TOOLBAR = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 8; > > /** > * The feature id for the '<em><b>Closeable</b></em>' attribute. >@@ -225,7 +198,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__CLOSEABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 12; >+ public static final int PART_DESCRIPTOR__CLOSEABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 9; > > /** > * The feature id for the '<em><b>Dirtyable</b></em>' attribute. >@@ -234,7 +207,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__DIRTYABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 13; >+ public static final int PART_DESCRIPTOR__DIRTYABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 10; > > /** > * The feature id for the '<em><b>Contribution URI</b></em>' attribute. >@@ -243,7 +216,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__CONTRIBUTION_URI = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 14; >+ public static final int PART_DESCRIPTOR__CONTRIBUTION_URI = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 11; > > /** > * The feature id for the '<em><b>Description</b></em>' attribute. >@@ -252,7 +225,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR__DESCRIPTION = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 15; >+ public static final int PART_DESCRIPTOR__DESCRIPTION = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 12; > > /** > * The number of structural features of the '<em>Part Descriptor</em>' class. >@@ -261,7 +234,7 @@ > * @generated > * @ordered > */ >- public static final int PART_DESCRIPTOR_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 16; >+ public static final int PART_DESCRIPTOR_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 13; > > /** > * The meta object id for the '{@link org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer <em>Part Descriptor Container</em>}' class. >Index: src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/PartDescriptorImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/PartDescriptorImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 PartDescriptorImpl.java >--- src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/PartDescriptorImpl.java 18 Dec 2010 09:24:54 -0000 1.6 >+++ src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/PartDescriptorImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -42,9 +42,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getHandlers <em>Handlers</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getBindingContexts <em>Binding Contexts</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#isAllowMultiple <em>Allow Multiple</em>}</li> >@@ -122,66 +119,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -428,69 +365,6 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE, oldLocalImage, localImage)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ > public List<MHandler> getHandlers() { > if (handlers == null) { > handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART_DESCRIPTOR__HANDLERS); >@@ -694,6 +568,22 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >+ */ >+ public String getLocalizedLabel() { >+ throw new UnsupportedOperationException("Please use LocalizationHelper"); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ */ >+ public String getLocalizedTooltip() { >+ throw new UnsupportedOperationException("Please use LocalizationHelper"); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> > * @generated > */ > @Override >@@ -723,12 +613,6 @@ > return getIconURI(); > case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: > return getTooltip(); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: >- return getLocalLabel(); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: >- return getLocalImage(); > case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS: > return getHandlers(); > case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS: >@@ -771,15 +655,6 @@ > case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: > setTooltip((String)newValue); > return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS: > getHandlers().clear(); > getHandlers().addAll((Collection<? extends MHandler>)newValue); >@@ -834,15 +709,6 @@ > case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS: > getHandlers().clear(); > return; >@@ -891,12 +757,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS: > return handlers != null && !handlers.isEmpty(); > case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS: >@@ -933,9 +793,6 @@ > case BasicPackageImpl.PART_DESCRIPTOR__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case BasicPackageImpl.PART_DESCRIPTOR__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -966,9 +823,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART_DESCRIPTOR__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART_DESCRIPTOR__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1003,12 +857,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", bindingContexts: "); //$NON-NLS-1$ > result.append(bindingContexts); > result.append(", allowMultiple: "); //$NON-NLS-1$ >Index: src/org/eclipse/e4/ui/model/application/ui/MUILabel.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/MUILabel.java,v >retrieving revision 1.4 >diff -u -r1.4 MUILabel.java >--- src/org/eclipse/e4/ui/model/application/ui/MUILabel.java 17 Dec 2010 20:40:30 -0000 1.4 >+++ src/org/eclipse/e4/ui/model/application/ui/MUILabel.java 14 Jan 2011 19:08:12 -0000 >@@ -22,9 +22,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}</li> > * </ul> > * </p> > * >@@ -108,78 +105,19 @@ > void setTooltip(String value); > > /** >- * Returns the value of the '<em><b>Local Label</b></em>' attribute. > * <!-- begin-user-doc --> >- * <p> >- * If the meaning of the '<em>Local Label</em>' attribute isn't clear, >- * there really should be more of a description here... >- * </p> >- * <!-- end-user-doc --> >- * @return the value of the '<em>Local Label</em>' attribute. >- * @see #setLocalLabel(String) >- * @model transient="true" >- * @generated >- */ >- String getLocalLabel(); >- >- /** >- * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @param value the new value of the '<em>Local Label</em>' attribute. >- * @see #getLocalLabel() >- * @generated >- */ >- void setLocalLabel(String value); >- >- /** >- * Returns the value of the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <p> >- * If the meaning of the '<em>Local Tooltip</em>' attribute isn't clear, >- * there really should be more of a description here... >- * </p> >- * <!-- end-user-doc --> >- * @return the value of the '<em>Local Tooltip</em>' attribute. >- * @see #setLocalTooltip(String) >- * @model transient="true" >- * @generated >- */ >- String getLocalTooltip(); >- >- /** >- * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @param value the new value of the '<em>Local Tooltip</em>' attribute. >- * @see #getLocalTooltip() >- * @generated >- */ >- void setLocalTooltip(String value); >- >- /** >- * Returns the value of the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <p> >- * If the meaning of the '<em>Local Image</em>' attribute isn't clear, >- * there really should be more of a description here... >- * </p> > * <!-- end-user-doc --> >- * @return the value of the '<em>Local Image</em>' attribute. >- * @see #setLocalImage(Object) >- * @model transient="true" >+ * @model kind="operation" > * @generated > */ >- Object getLocalImage(); >+ String getLocalizedLabel(); > > /** >- * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @param value the new value of the '<em>Local Image</em>' attribute. >- * @see #getLocalImage() >+ * @model kind="operation" > * @generated > */ >- void setLocalImage(Object value); >+ String getLocalizedTooltip(); > > } // MUILabel >Index: src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AdvancedPackageImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AdvancedPackageImpl.java,v >retrieving revision 1.14 >diff -u -r1.14 AdvancedPackageImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AdvancedPackageImpl.java 10 Jan 2011 16:04:47 -0000 1.14 >+++ src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AdvancedPackageImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -393,40 +393,13 @@ > public static final int PERSPECTIVE__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PERSPECTIVE__LOCAL_LABEL = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PERSPECTIVE__LOCAL_TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PERSPECTIVE__LOCAL_IMAGE = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5; >- >- /** > * The feature id for the '<em><b>Context</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int PERSPECTIVE__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6; >+ public static final int PERSPECTIVE__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3; > > /** > * The feature id for the '<em><b>Variables</b></em>' attribute list. >@@ -435,7 +408,7 @@ > * @generated > * @ordered > */ >- public static final int PERSPECTIVE__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7; >+ public static final int PERSPECTIVE__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4; > > /** > * The feature id for the '<em><b>Properties</b></em>' map. >@@ -444,7 +417,7 @@ > * @generated > * @ordered > */ >- public static final int PERSPECTIVE__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8; >+ public static final int PERSPECTIVE__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5; > > /** > * The feature id for the '<em><b>Windows</b></em>' containment reference list. >@@ -453,7 +426,7 @@ > * @generated > * @ordered > */ >- public static final int PERSPECTIVE__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9; >+ public static final int PERSPECTIVE__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6; > > /** > * The number of structural features of the '<em>Perspective</em>' class. >@@ -462,7 +435,7 @@ > * @generated > * @ordered > */ >- public static final int PERSPECTIVE_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10; >+ public static final int PERSPECTIVE_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7; > > /** > * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl <em>Perspective Stack</em>}' class. >@@ -800,40 +773,13 @@ > public static final int AREA__TOOLTIP = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int AREA__LOCAL_LABEL = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int AREA__LOCAL_TOOLTIP = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int AREA__LOCAL_IMAGE = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 5; >- >- /** > * The number of structural features of the '<em>Area</em>' class. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int AREA_FEATURE_COUNT = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 6; >+ public static final int AREA_FEATURE_COUNT = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 3; > > /** > * <!-- begin-user-doc --> >Index: src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AreaImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AreaImpl.java,v >retrieving revision 1.3 >diff -u -r1.3 AreaImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AreaImpl.java 17 Dec 2010 21:13:37 -0000 1.3 >+++ src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AreaImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -10,6 +10,7 @@ > */ > package org.eclipse.e4.ui.model.application.ui.advanced.impl; > >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.ui.MUILabel; > import org.eclipse.e4.ui.model.application.ui.advanced.MArea; > import org.eclipse.e4.ui.model.application.ui.basic.impl.PartSashContainerImpl; >@@ -28,9 +29,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalImage <em>Local Image</em>}</li> > * </ul> > * </p> > * >@@ -98,66 +96,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated >@@ -242,64 +180,17 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated > */ >- public Object getLocalImage() { >- return localImage; >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); > } > > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @generated > */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_IMAGE, oldLocalImage, localImage)); >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); > } > > /** >@@ -316,12 +207,6 @@ > return getIconURI(); > case AdvancedPackageImpl.AREA__TOOLTIP: > return getTooltip(); >- case AdvancedPackageImpl.AREA__LOCAL_LABEL: >- return getLocalLabel(); >- case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case AdvancedPackageImpl.AREA__LOCAL_IMAGE: >- return getLocalImage(); > } > return super.eGet(featureID, resolve, coreType); > } >@@ -343,15 +228,6 @@ > case AdvancedPackageImpl.AREA__TOOLTIP: > setTooltip((String)newValue); > return; >- case AdvancedPackageImpl.AREA__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case AdvancedPackageImpl.AREA__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > } > super.eSet(featureID, newValue); > } >@@ -373,15 +249,6 @@ > case AdvancedPackageImpl.AREA__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case AdvancedPackageImpl.AREA__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case AdvancedPackageImpl.AREA__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > } > super.eUnset(featureID); > } >@@ -400,12 +267,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case AdvancedPackageImpl.AREA__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case AdvancedPackageImpl.AREA__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case AdvancedPackageImpl.AREA__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > } > return super.eIsSet(featureID); > } >@@ -422,9 +283,6 @@ > case AdvancedPackageImpl.AREA__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case AdvancedPackageImpl.AREA__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case AdvancedPackageImpl.AREA__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case AdvancedPackageImpl.AREA__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case AdvancedPackageImpl.AREA__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -443,9 +301,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.AREA__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.AREA__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.AREA__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return AdvancedPackageImpl.AREA__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return AdvancedPackageImpl.AREA__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return AdvancedPackageImpl.AREA__LOCAL_IMAGE; > default: return -1; > } > } >@@ -468,12 +323,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(')'); > return result.toString(); > } >Index: src/org/eclipse/e4/ui/model/application/ui/advanced/impl/PerspectiveImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/advanced/impl/PerspectiveImpl.java,v >retrieving revision 1.6 >diff -u -r1.6 PerspectiveImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/advanced/impl/PerspectiveImpl.java 17 Dec 2010 21:13:37 -0000 1.6 >+++ src/org/eclipse/e4/ui/model/application/ui/advanced/impl/PerspectiveImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -14,6 +14,7 @@ > import java.util.List; > import java.util.Map; > import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl; > import org.eclipse.e4.ui.model.application.impl.StringToStringMapImpl; > import org.eclipse.e4.ui.model.application.ui.MContext; >@@ -46,9 +47,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getContext <em>Context</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getVariables <em>Variables</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getProperties <em>Properties</em>}</li> >@@ -120,66 +118,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The default value of the '{@link #getContext() <em>Context</em>}' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -316,69 +254,6 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE, oldLocalImage, localImage)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ > public IEclipseContext getContext() { > return context; > } >@@ -434,6 +309,22 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >+ */ >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ */ >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> > * @generated > */ > @Override >@@ -461,12 +352,6 @@ > return getIconURI(); > case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: > return getTooltip(); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: >- return getLocalLabel(); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: >- return getLocalImage(); > case AdvancedPackageImpl.PERSPECTIVE__CONTEXT: > return getContext(); > case AdvancedPackageImpl.PERSPECTIVE__VARIABLES: >@@ -498,15 +383,6 @@ > case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: > setTooltip((String)newValue); > return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case AdvancedPackageImpl.PERSPECTIVE__CONTEXT: > setContext((IEclipseContext)newValue); > return; >@@ -542,15 +418,6 @@ > case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case AdvancedPackageImpl.PERSPECTIVE__CONTEXT: > setContext(CONTEXT_EDEFAULT); > return; >@@ -581,12 +448,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case AdvancedPackageImpl.PERSPECTIVE__CONTEXT: > return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context); > case AdvancedPackageImpl.PERSPECTIVE__VARIABLES: >@@ -611,9 +472,6 @@ > case AdvancedPackageImpl.PERSPECTIVE__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case AdvancedPackageImpl.PERSPECTIVE__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -640,9 +498,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.PERSPECTIVE__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.PERSPECTIVE__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.PERSPECTIVE__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE; > default: return -1; > } > } >@@ -673,12 +528,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", context: "); //$NON-NLS-1$ > result.append(context); > result.append(", variables: "); //$NON-NLS-1$ >Index: src/org/eclipse/e4/ui/model/application/ui/basic/impl/BasicPackageImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/impl/BasicPackageImpl.java,v >retrieving revision 1.14 >diff -u -r1.14 BasicPackageImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/basic/impl/BasicPackageImpl.java 10 Jan 2011 16:04:48 -0000 1.14 >+++ src/org/eclipse/e4/ui/model/application/ui/basic/impl/BasicPackageImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -392,40 +392,13 @@ > public static final int PART__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 8; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 10; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int PART__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 11; >- >- /** > * The feature id for the '<em><b>Handlers</b></em>' containment reference list. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int PART__HANDLERS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 12; >+ public static final int PART__HANDLERS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9; > > /** > * The feature id for the '<em><b>Dirty</b></em>' attribute. >@@ -434,7 +407,7 @@ > * @generated > * @ordered > */ >- public static final int PART__DIRTY = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 13; >+ public static final int PART__DIRTY = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 10; > > /** > * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list. >@@ -443,7 +416,7 @@ > * @generated > * @ordered > */ >- public static final int PART__BINDING_CONTEXTS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 14; >+ public static final int PART__BINDING_CONTEXTS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 11; > > /** > * The feature id for the '<em><b>Menus</b></em>' containment reference list. >@@ -452,7 +425,7 @@ > * @generated > * @ordered > */ >- public static final int PART__MENUS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 15; >+ public static final int PART__MENUS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 12; > > /** > * The feature id for the '<em><b>Toolbar</b></em>' containment reference. >@@ -461,7 +434,7 @@ > * @generated > * @ordered > */ >- public static final int PART__TOOLBAR = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 16; >+ public static final int PART__TOOLBAR = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 13; > > /** > * The feature id for the '<em><b>Closeable</b></em>' attribute. >@@ -470,7 +443,7 @@ > * @generated > * @ordered > */ >- public static final int PART__CLOSEABLE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 17; >+ public static final int PART__CLOSEABLE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 14; > > /** > * The feature id for the '<em><b>Description</b></em>' attribute. >@@ -479,7 +452,7 @@ > * @generated > * @ordered > */ >- public static final int PART__DESCRIPTION = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 18; >+ public static final int PART__DESCRIPTION = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 15; > > /** > * The number of structural features of the '<em>Part</em>' class. >@@ -488,7 +461,7 @@ > * @generated > * @ordered > */ >- public static final int PART_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 19; >+ public static final int PART_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 16; > > /** > * The feature id for the '<em><b>Element Id</b></em>' attribute. >@@ -689,33 +662,6 @@ > public static final int INPUT_PART__TOOLTIP = PART__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int INPUT_PART__LOCAL_LABEL = PART__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int INPUT_PART__LOCAL_TOOLTIP = PART__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int INPUT_PART__LOCAL_IMAGE = PART__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Handlers</b></em>' containment reference list. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1256,40 +1202,13 @@ > public static final int WINDOW__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int WINDOW__LOCAL_LABEL = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int WINDOW__LOCAL_TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int WINDOW__LOCAL_IMAGE = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5; >- >- /** > * The feature id for the '<em><b>Context</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int WINDOW__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6; >+ public static final int WINDOW__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3; > > /** > * The feature id for the '<em><b>Variables</b></em>' attribute list. >@@ -1298,7 +1217,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7; >+ public static final int WINDOW__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4; > > /** > * The feature id for the '<em><b>Properties</b></em>' map. >@@ -1307,7 +1226,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8; >+ public static final int WINDOW__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5; > > /** > * The feature id for the '<em><b>Handlers</b></em>' containment reference list. >@@ -1316,7 +1235,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__HANDLERS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9; >+ public static final int WINDOW__HANDLERS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6; > > /** > * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list. >@@ -1325,7 +1244,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__BINDING_CONTEXTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10; >+ public static final int WINDOW__BINDING_CONTEXTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7; > > /** > * The feature id for the '<em><b>Main Menu</b></em>' containment reference. >@@ -1334,7 +1253,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__MAIN_MENU = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 11; >+ public static final int WINDOW__MAIN_MENU = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8; > > /** > * The feature id for the '<em><b>X</b></em>' attribute. >@@ -1343,7 +1262,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__X = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 12; >+ public static final int WINDOW__X = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9; > > /** > * The feature id for the '<em><b>Y</b></em>' attribute. >@@ -1352,7 +1271,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__Y = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 13; >+ public static final int WINDOW__Y = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10; > > /** > * The feature id for the '<em><b>Width</b></em>' attribute. >@@ -1361,7 +1280,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__WIDTH = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 14; >+ public static final int WINDOW__WIDTH = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 11; > > /** > * The feature id for the '<em><b>Height</b></em>' attribute. >@@ -1370,7 +1289,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__HEIGHT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 15; >+ public static final int WINDOW__HEIGHT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 12; > > /** > * The feature id for the '<em><b>Windows</b></em>' containment reference list. >@@ -1379,7 +1298,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 16; >+ public static final int WINDOW__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 13; > > /** > * The feature id for the '<em><b>Shared Elements</b></em>' containment reference list. >@@ -1388,7 +1307,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW__SHARED_ELEMENTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 17; >+ public static final int WINDOW__SHARED_ELEMENTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 14; > > /** > * The number of structural features of the '<em>Window</em>' class. >@@ -1397,7 +1316,7 @@ > * @generated > * @ordered > */ >- public static final int WINDOW_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 18; >+ public static final int WINDOW_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 15; > > /** > * The feature id for the '<em><b>Element Id</b></em>' attribute. >@@ -1562,33 +1481,6 @@ > public static final int TRIMMED_WINDOW__TOOLTIP = WINDOW__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TRIMMED_WINDOW__LOCAL_LABEL = WINDOW__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TRIMMED_WINDOW__LOCAL_TOOLTIP = WINDOW__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TRIMMED_WINDOW__LOCAL_IMAGE = WINDOW__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Context</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >Index: src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java,v >retrieving revision 1.12 >diff -u -r1.12 PartImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java 8 Jan 2011 13:37:44 -0000 1.12 >+++ src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java 14 Jan 2011 19:08:12 -0000 >@@ -14,6 +14,7 @@ > import java.util.List; > import java.util.Map; > import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.MContribution; > import org.eclipse.e4.ui.model.application.commands.MBindings; > import org.eclipse.e4.ui.model.application.commands.MHandler; >@@ -61,9 +62,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getHandlers <em>Handlers</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#isDirty <em>Dirty</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getBindingContexts <em>Binding Contexts</em>}</li> >@@ -228,66 +226,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -573,69 +511,6 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_IMAGE, oldLocalImage, localImage)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ > public List<MHandler> getHandlers() { > if (handlers == null) { > handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART__HANDLERS); >@@ -776,6 +651,22 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >+ */ >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ */ >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> > * @generated > */ > @Override >@@ -823,12 +714,6 @@ > return getIconURI(); > case BasicPackageImpl.PART__TOOLTIP: > return getTooltip(); >- case BasicPackageImpl.PART__LOCAL_LABEL: >- return getLocalLabel(); >- case BasicPackageImpl.PART__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case BasicPackageImpl.PART__LOCAL_IMAGE: >- return getLocalImage(); > case BasicPackageImpl.PART__HANDLERS: > return getHandlers(); > case BasicPackageImpl.PART__DIRTY: >@@ -884,15 +769,6 @@ > case BasicPackageImpl.PART__TOOLTIP: > setTooltip((String)newValue); > return; >- case BasicPackageImpl.PART__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case BasicPackageImpl.PART__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case BasicPackageImpl.PART__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case BasicPackageImpl.PART__HANDLERS: > getHandlers().clear(); > getHandlers().addAll((Collection<? extends MHandler>)newValue); >@@ -956,15 +832,6 @@ > case BasicPackageImpl.PART__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case BasicPackageImpl.PART__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case BasicPackageImpl.PART__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case BasicPackageImpl.PART__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case BasicPackageImpl.PART__HANDLERS: > getHandlers().clear(); > return; >@@ -1016,12 +883,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case BasicPackageImpl.PART__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case BasicPackageImpl.PART__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case BasicPackageImpl.PART__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case BasicPackageImpl.PART__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case BasicPackageImpl.PART__HANDLERS: > return handlers != null && !handlers.isEmpty(); > case BasicPackageImpl.PART__DIRTY: >@@ -1078,9 +939,6 @@ > case BasicPackageImpl.PART__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case BasicPackageImpl.PART__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case BasicPackageImpl.PART__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case BasicPackageImpl.PART__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case BasicPackageImpl.PART__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case BasicPackageImpl.PART__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1148,9 +1006,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.PART__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.PART__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.PART__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1204,12 +1059,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", dirty: "); //$NON-NLS-1$ > result.append(dirty); > result.append(", bindingContexts: "); //$NON-NLS-1$ >Index: src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 WindowImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java 4 Nov 2010 19:41:25 -0000 1.5 >+++ src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -14,6 +14,7 @@ > import java.util.List; > import java.util.Map; > import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.commands.MBindings; > import org.eclipse.e4.ui.model.application.commands.MHandler; > import org.eclipse.e4.ui.model.application.commands.MHandlerContainer; >@@ -51,9 +52,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getContext <em>Context</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getVariables <em>Variables</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getProperties <em>Properties</em>}</li> >@@ -133,66 +131,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The default value of the '{@link #getContext() <em>Context</em>}' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -449,69 +387,6 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_IMAGE, oldLocalImage, localImage)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ > public IEclipseContext getContext() { > return context; > } >@@ -730,6 +605,22 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >+ */ >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ */ >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> > * @generated > */ > @Override >@@ -763,12 +654,6 @@ > return getIconURI(); > case BasicPackageImpl.WINDOW__TOOLTIP: > return getTooltip(); >- case BasicPackageImpl.WINDOW__LOCAL_LABEL: >- return getLocalLabel(); >- case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case BasicPackageImpl.WINDOW__LOCAL_IMAGE: >- return getLocalImage(); > case BasicPackageImpl.WINDOW__CONTEXT: > return getContext(); > case BasicPackageImpl.WINDOW__VARIABLES: >@@ -816,15 +701,6 @@ > case BasicPackageImpl.WINDOW__TOOLTIP: > setTooltip((String)newValue); > return; >- case BasicPackageImpl.WINDOW__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case BasicPackageImpl.WINDOW__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case BasicPackageImpl.WINDOW__CONTEXT: > setContext((IEclipseContext)newValue); > return; >@@ -887,15 +763,6 @@ > case BasicPackageImpl.WINDOW__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case BasicPackageImpl.WINDOW__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case BasicPackageImpl.WINDOW__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case BasicPackageImpl.WINDOW__CONTEXT: > setContext(CONTEXT_EDEFAULT); > return; >@@ -950,12 +817,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case BasicPackageImpl.WINDOW__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case BasicPackageImpl.WINDOW__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case BasicPackageImpl.WINDOW__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case BasicPackageImpl.WINDOW__CONTEXT: > return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context); > case BasicPackageImpl.WINDOW__VARIABLES: >@@ -996,9 +857,6 @@ > case BasicPackageImpl.WINDOW__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case BasicPackageImpl.WINDOW__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case BasicPackageImpl.WINDOW__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case BasicPackageImpl.WINDOW__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case BasicPackageImpl.WINDOW__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1037,9 +895,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.WINDOW__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.WINDOW__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.WINDOW__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.WINDOW__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.WINDOW__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.WINDOW__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1082,12 +937,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", context: "); //$NON-NLS-1$ > result.append(context); > result.append(", variables: "); //$NON-NLS-1$ >Index: src/org/eclipse/e4/ui/model/application/ui/impl/UiPackageImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/impl/UiPackageImpl.java,v >retrieving revision 1.10 >diff -u -r1.10 UiPackageImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/impl/UiPackageImpl.java 10 Jan 2011 16:04:48 -0000 1.10 >+++ src/org/eclipse/e4/ui/model/application/ui/impl/UiPackageImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -362,40 +362,13 @@ > public static final int UI_LABEL__TOOLTIP = 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int UI_LABEL__LOCAL_LABEL = 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int UI_LABEL__LOCAL_TOOLTIP = 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int UI_LABEL__LOCAL_IMAGE = 5; >- >- /** > * The number of structural features of the '<em>UI Label</em>' class. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int UI_LABEL_FEATURE_COUNT = 6; >+ public static final int UI_LABEL_FEATURE_COUNT = 3; > > /** > * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class. >@@ -1615,48 +1588,6 @@ > } > > /** >- * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}'. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @return the meta object for the attribute '<em>Local Label</em>'. >- * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel() >- * @see #getUILabel() >- * @generated >- */ >- public EAttribute getUILabel_LocalLabel() { >- return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(3); >- } >- >- >- /** >- * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}'. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @return the meta object for the attribute '<em>Local Tooltip</em>'. >- * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip() >- * @see #getUILabel() >- * @generated >- */ >- public EAttribute getUILabel_LocalTooltip() { >- return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(4); >- } >- >- >- /** >- * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}'. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @return the meta object for the attribute '<em>Local Image</em>'. >- * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage() >- * @see #getUILabel() >- * @generated >- */ >- public EAttribute getUILabel_LocalImage() { >- return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(5); >- } >- >- >- /** > * Returns the meta object for class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</em>}'. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1879,9 +1810,6 @@ > createEAttribute(uiLabelEClass, UI_LABEL__LABEL); > createEAttribute(uiLabelEClass, UI_LABEL__ICON_URI); > createEAttribute(uiLabelEClass, UI_LABEL__TOOLTIP); >- createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_LABEL); >- createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_TOOLTIP); >- createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_IMAGE); > > elementContainerEClass = createEClass(ELEMENT_CONTAINER); > createEReference(elementContainerEClass, ELEMENT_CONTAINER__CHILDREN); >@@ -2004,9 +1932,10 @@ > initEAttribute(getUILabel_Label(), ecorePackage.getEString(), "label", null, 0, 1, MUILabel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > initEAttribute(getUILabel_IconURI(), ecorePackage.getEString(), "iconURI", null, 0, 1, MUILabel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ > initEAttribute(getUILabel_Tooltip(), ecorePackage.getEString(), "tooltip", null, 0, 1, MUILabel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ >- initEAttribute(getUILabel_LocalLabel(), ecorePackage.getEString(), "localLabel", null, 0, 1, MUILabel.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ >- initEAttribute(getUILabel_LocalTooltip(), ecorePackage.getEString(), "localTooltip", null, 0, 1, MUILabel.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ >- initEAttribute(getUILabel_LocalImage(), ecorePackage.getEJavaObject(), "localImage", null, 0, 1, MUILabel.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ >+ >+ addEOperation(uiLabelEClass, ecorePackage.getEString(), "getLocalizedLabel", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ >+ >+ addEOperation(uiLabelEClass, ecorePackage.getEString(), "getLocalizedTooltip", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$ > > initEClass(elementContainerEClass, MElementContainer.class, "ElementContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ > g1 = createEGenericType(elementContainerEClass_T); >@@ -2244,30 +2173,6 @@ > public static final EAttribute UI_LABEL__TOOLTIP = eINSTANCE.getUILabel_Tooltip(); > > /** >- * The meta object literal for the '<em><b>Local Label</b></em>' attribute feature. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public static final EAttribute UI_LABEL__LOCAL_LABEL = eINSTANCE.getUILabel_LocalLabel(); >- >- /** >- * The meta object literal for the '<em><b>Local Tooltip</b></em>' attribute feature. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public static final EAttribute UI_LABEL__LOCAL_TOOLTIP = eINSTANCE.getUILabel_LocalTooltip(); >- >- /** >- * The meta object literal for the '<em><b>Local Image</b></em>' attribute feature. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public static final EAttribute UI_LABEL__LOCAL_IMAGE = eINSTANCE.getUILabel_LocalImage(); >- >- /** > * The meta object literal for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >Index: src/org/eclipse/e4/ui/model/application/ui/menu/impl/ItemImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/impl/ItemImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 ItemImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/menu/impl/ItemImpl.java 4 Nov 2010 19:41:25 -0000 1.5 >+++ src/org/eclipse/e4/ui/model/application/ui/menu/impl/ItemImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -10,6 +10,7 @@ > */ > package org.eclipse.e4.ui.model.application.ui.menu.impl; > >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.ui.MUILabel; > import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl; > import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl; >@@ -29,9 +30,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isEnabled <em>Enabled</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isSelected <em>Selected</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getType <em>Type</em>}</li> >@@ -102,66 +100,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The default value of the '{@link #isEnabled() <em>Enabled</em>}' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -308,69 +246,6 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_IMAGE, oldLocalImage, localImage)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ > public boolean isEnabled() { > return enabled; > } >@@ -432,6 +307,22 @@ > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >+ */ >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ */ >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> > * @generated > */ > @Override >@@ -443,12 +334,6 @@ > return getIconURI(); > case MenuPackageImpl.ITEM__TOOLTIP: > return getTooltip(); >- case MenuPackageImpl.ITEM__LOCAL_LABEL: >- return getLocalLabel(); >- case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case MenuPackageImpl.ITEM__LOCAL_IMAGE: >- return getLocalImage(); > case MenuPackageImpl.ITEM__ENABLED: > return isEnabled(); > case MenuPackageImpl.ITEM__SELECTED: >@@ -476,15 +361,6 @@ > case MenuPackageImpl.ITEM__TOOLTIP: > setTooltip((String)newValue); > return; >- case MenuPackageImpl.ITEM__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case MenuPackageImpl.ITEM__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case MenuPackageImpl.ITEM__ENABLED: > setEnabled((Boolean)newValue); > return; >@@ -515,15 +391,6 @@ > case MenuPackageImpl.ITEM__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case MenuPackageImpl.ITEM__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case MenuPackageImpl.ITEM__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case MenuPackageImpl.ITEM__ENABLED: > setEnabled(ENABLED_EDEFAULT); > return; >@@ -551,12 +418,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case MenuPackageImpl.ITEM__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case MenuPackageImpl.ITEM__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case MenuPackageImpl.ITEM__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case MenuPackageImpl.ITEM__ENABLED: > return enabled != ENABLED_EDEFAULT; > case MenuPackageImpl.ITEM__SELECTED: >@@ -579,9 +440,6 @@ > case MenuPackageImpl.ITEM__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case MenuPackageImpl.ITEM__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case MenuPackageImpl.ITEM__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case MenuPackageImpl.ITEM__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case MenuPackageImpl.ITEM__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -600,9 +458,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.ITEM__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.ITEM__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.ITEM__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MenuPackageImpl.ITEM__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MenuPackageImpl.ITEM__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MenuPackageImpl.ITEM__LOCAL_IMAGE; > default: return -1; > } > } >@@ -625,12 +480,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", enabled: "); //$NON-NLS-1$ > result.append(enabled); > result.append(", selected: "); //$NON-NLS-1$ >Index: src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuElementImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuElementImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 MenuElementImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuElementImpl.java 18 Dec 2010 08:58:24 -0000 1.5 >+++ src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuElementImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -10,6 +10,7 @@ > */ > package org.eclipse.e4.ui.model.application.ui.menu.impl; > >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.ui.MUILabel; > import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl; > import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl; >@@ -28,9 +29,6 @@ > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getMnemonics <em>Mnemonics</em>}</li> > * </ul> > * </p> >@@ -99,66 +97,6 @@ > protected String tooltip = TOOLTIP_EDEFAULT; > > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- >- /** > * The default value of the '{@link #getMnemonics() <em>Mnemonics</em>}' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -265,50 +203,8 @@ > * <!-- end-user-doc --> > * @generated > */ >- public String getLocalLabel() { >- return localLabel; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalLabel(String newLocalLabel) { >- String oldLocalLabel = localLabel; >- localLabel = newLocalLabel; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL, oldLocalLabel, localLabel)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public String getLocalTooltip() { >- return localTooltip; >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public void setLocalTooltip(String newLocalTooltip) { >- String oldLocalTooltip = localTooltip; >- localTooltip = newLocalTooltip; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip)); >- } >- >- /** >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- */ >- public Object getLocalImage() { >- return localImage; >+ public String getMnemonics() { >+ return mnemonics; > } > > /** >@@ -316,32 +212,27 @@ > * <!-- end-user-doc --> > * @generated > */ >- public void setLocalImage(Object newLocalImage) { >- Object oldLocalImage = localImage; >- localImage = newLocalImage; >+ public void setMnemonics(String newMnemonics) { >+ String oldMnemonics = mnemonics; >+ mnemonics = newMnemonics; > if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE, oldLocalImage, localImage)); >+ eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__MNEMONICS, oldMnemonics, mnemonics)); > } > > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @generated > */ >- public String getMnemonics() { >- return mnemonics; >+ public String getLocalizedLabel() { >+ return LocalizationHelper.getLocalizedLabel(this); > } > > /** > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >- * @generated > */ >- public void setMnemonics(String newMnemonics) { >- String oldMnemonics = mnemonics; >- mnemonics = newMnemonics; >- if (eNotificationRequired()) >- eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__MNEMONICS, oldMnemonics, mnemonics)); >+ public String getLocalizedTooltip() { >+ return LocalizationHelper.getLocalizedTooltip(this); > } > > /** >@@ -358,12 +249,6 @@ > return getIconURI(); > case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: > return getTooltip(); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: >- return getLocalLabel(); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: >- return getLocalImage(); > case MenuPackageImpl.MENU_ELEMENT__MNEMONICS: > return getMnemonics(); > } >@@ -387,15 +272,6 @@ > case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: > setTooltip((String)newValue); > return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case MenuPackageImpl.MENU_ELEMENT__MNEMONICS: > setMnemonics((String)newValue); > return; >@@ -420,15 +296,6 @@ > case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case MenuPackageImpl.MENU_ELEMENT__MNEMONICS: > setMnemonics(MNEMONICS_EDEFAULT); > return; >@@ -450,12 +317,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case MenuPackageImpl.MENU_ELEMENT__MNEMONICS: > return MNEMONICS_EDEFAULT == null ? mnemonics != null : !MNEMONICS_EDEFAULT.equals(mnemonics); > } >@@ -474,9 +335,6 @@ > case MenuPackageImpl.MENU_ELEMENT__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case MenuPackageImpl.MENU_ELEMENT__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -495,9 +353,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.MENU_ELEMENT__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.MENU_ELEMENT__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.MENU_ELEMENT__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE; > default: return -1; > } > } >@@ -520,12 +375,6 @@ > result.append(iconURI); > result.append(", tooltip: "); //$NON-NLS-1$ > result.append(tooltip); >- result.append(", localLabel: "); //$NON-NLS-1$ >- result.append(localLabel); >- result.append(", localTooltip: "); //$NON-NLS-1$ >- result.append(localTooltip); >- result.append(", localImage: "); //$NON-NLS-1$ >- result.append(localImage); > result.append(", mnemonics: "); //$NON-NLS-1$ > result.append(mnemonics); > result.append(')'); >Index: src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuPackageImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuPackageImpl.java,v >retrieving revision 1.27 >diff -u -r1.27 MenuPackageImpl.java >--- src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuPackageImpl.java 10 Jan 2011 16:04:48 -0000 1.27 >+++ src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuPackageImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -257,40 +257,13 @@ > public static final int ITEM__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int ITEM__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int ITEM__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int ITEM__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int ITEM__ENABLED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6; >+ public static final int ITEM__ENABLED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3; > > /** > * The feature id for the '<em><b>Selected</b></em>' attribute. >@@ -299,7 +272,7 @@ > * @generated > * @ordered > */ >- public static final int ITEM__SELECTED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 7; >+ public static final int ITEM__SELECTED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4; > > /** > * The feature id for the '<em><b>Type</b></em>' attribute. >@@ -308,7 +281,7 @@ > * @generated > * @ordered > */ >- public static final int ITEM__TYPE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 8; >+ public static final int ITEM__TYPE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5; > > /** > * The number of structural features of the '<em>Item</em>' class. >@@ -317,7 +290,7 @@ > * @generated > * @ordered > */ >- public static final int ITEM_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9; >+ public static final int ITEM_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6; > > /** > * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.HandledItemImpl <em>Handled Item</em>}' class. >@@ -474,33 +447,6 @@ > public static final int HANDLED_ITEM__TOOLTIP = ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -718,40 +664,13 @@ > public static final int MENU_ELEMENT__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ELEMENT__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ELEMENT__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ELEMENT__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> > * @generated > * @ordered > */ >- public static final int MENU_ELEMENT__MNEMONICS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6; >+ public static final int MENU_ELEMENT__MNEMONICS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3; > > /** > * The number of structural features of the '<em>Element</em>' class. >@@ -760,7 +679,7 @@ > * @generated > * @ordered > */ >- public static final int MENU_ELEMENT_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 7; >+ public static final int MENU_ELEMENT_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4; > > /** > * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuItemImpl <em>Item</em>}' class. >@@ -917,33 +836,6 @@ > public static final int MENU_ITEM__TOOLTIP = ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1143,33 +1035,6 @@ > public static final int MENU_SEPARATOR__TOOLTIP = MENU_ELEMENT__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_SEPARATOR__LOCAL_LABEL = MENU_ELEMENT__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_SEPARATOR__LOCAL_TOOLTIP = MENU_ELEMENT__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU_SEPARATOR__LOCAL_IMAGE = MENU_ELEMENT__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1342,33 +1207,6 @@ > public static final int MENU__TOOLTIP = MENU_ELEMENT__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU__LOCAL_LABEL = MENU_ELEMENT__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU__LOCAL_TOOLTIP = MENU_ELEMENT__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int MENU__LOCAL_IMAGE = MENU_ELEMENT__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1740,33 +1578,6 @@ > public static final int POPUP_MENU__TOOLTIP = MENU__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int POPUP_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int POPUP_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int POPUP_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -1993,33 +1804,6 @@ > public static final int DIRECT_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -2246,33 +2030,6 @@ > public static final int HANDLED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -2499,33 +2256,6 @@ > public static final int TOOL_ITEM__TOOLTIP = ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TOOL_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TOOL_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int TOOL_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -3178,33 +2908,6 @@ > public static final int HANDLED_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_TOOL_ITEM__LOCAL_LABEL = TOOL_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_TOOL_ITEM__LOCAL_TOOLTIP = TOOL_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int HANDLED_TOOL_ITEM__LOCAL_IMAGE = TOOL_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -3431,33 +3134,6 @@ > public static final int DIRECT_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_TOOL_ITEM__LOCAL_LABEL = TOOL_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_TOOL_ITEM__LOCAL_TOOLTIP = TOOL_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int DIRECT_TOOL_ITEM__LOCAL_IMAGE = TOOL_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -3848,33 +3524,6 @@ > public static final int RENDERED_MENU__TOOLTIP = MENU__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -4646,33 +4295,6 @@ > public static final int RENDERED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int RENDERED_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -4881,33 +4503,6 @@ > public static final int OPAQUE_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Enabled</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -5116,33 +4711,6 @@ > public static final int OPAQUE_MENU_SEPARATOR__TOOLTIP = MENU_SEPARATOR__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_SEPARATOR__LOCAL_LABEL = MENU_SEPARATOR__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_SEPARATOR__LOCAL_TOOLTIP = MENU_SEPARATOR__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU_SEPARATOR__LOCAL_IMAGE = MENU_SEPARATOR__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >@@ -5324,33 +4892,6 @@ > public static final int OPAQUE_MENU__TOOLTIP = MENU__TOOLTIP; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- public static final int OPAQUE_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE; >- >- /** > * The feature id for the '<em><b>Mnemonics</b></em>' attribute. > * <!-- begin-user-doc --> > * <!-- end-user-doc --> >Index: src/org/eclipse/e4/ui/model/internal/ModelUtils.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.model.workbench/src/org/eclipse/e4/ui/model/internal/ModelUtils.java,v >retrieving revision 1.4 >diff -u -r1.4 ModelUtils.java >--- src/org/eclipse/e4/ui/model/internal/ModelUtils.java 10 Aug 2010 19:27:41 -0000 1.4 >+++ src/org/eclipse/e4/ui/model/internal/ModelUtils.java 14 Jan 2011 19:08:13 -0000 >@@ -1,9 +1,22 @@ >+/******************************************************************************* >+ * Copyright (c) 2010, 2011 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.e4.ui.model.internal; > > import java.util.ArrayList; > import java.util.Collections; > import java.util.List; >+import org.eclipse.e4.core.contexts.IEclipseContext; > import org.eclipse.e4.ui.model.application.MApplicationElement; >+import org.eclipse.e4.ui.model.application.ui.MContext; >+import org.eclipse.e4.ui.model.application.ui.MUIElement; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EClass; > import org.eclipse.emf.ecore.EClassifier; >@@ -126,4 +139,26 @@ > > return Collections.emptyList(); > } >+ >+ public static IEclipseContext getContainingContext(MUIElement element) { >+ MUIElement curParent = null; >+ if (element.getCurSharedRef() != null) >+ curParent = element.getCurSharedRef().getParent(); >+ else >+ curParent = (MUIElement) ((EObject) element).eContainer(); >+ >+ while (curParent != null) { >+ if (curParent instanceof MContext) { >+ return ((MContext) curParent).getContext(); >+ } >+ >+ if (curParent.getCurSharedRef() != null) >+ curParent = curParent.getCurSharedRef().getParent(); >+ else >+ curParent = (MUIElement) ((EObject) curParent).eContainer(); >+ } >+ >+ return null; >+ } >+ > } >#P org.eclipse.e4.ui.tests >Index: src/org/eclipse/e4/ui/tests/model/test/MTestPackage.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/model/test/MTestPackage.java,v >retrieving revision 1.8 >diff -u -r1.8 MTestPackage.java >--- src/org/eclipse/e4/ui/tests/model/test/MTestPackage.java 10 Jan 2011 16:04:46 -0000 1.8 >+++ src/org/eclipse/e4/ui/tests/model/test/MTestPackage.java 14 Jan 2011 19:08:13 -0000 >@@ -341,40 +341,13 @@ > int TEST_HARNESS__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 27; > > /** >- * The feature id for the '<em><b>Local Label</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- int TEST_HARNESS__LOCAL_LABEL = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 28; >- >- /** >- * The feature id for the '<em><b>Local Tooltip</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- int TEST_HARNESS__LOCAL_TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 29; >- >- /** >- * The feature id for the '<em><b>Local Image</b></em>' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @generated >- * @ordered >- */ >- int TEST_HARNESS__LOCAL_IMAGE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 30; >- >- /** > * The feature id for the '<em><b>Dirty</b></em>' attribute. <!-- > * begin-user-doc --> <!-- end-user-doc --> > * > * @generated > * @ordered > */ >- int TEST_HARNESS__DIRTY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 31; >+ int TEST_HARNESS__DIRTY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 28; > > /** > * The number of structural features of the '<em>Harness</em>' class. <!-- >@@ -383,7 +356,7 @@ > * @generated > * @ordered > */ >- int TEST_HARNESS_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 32; >+ int TEST_HARNESS_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 29; > > /** > * Returns the meta object for class '{@link org.eclipse.e4.ui.tests.model.test.MTestHarness <em>Harness</em>}'. >Index: src/org/eclipse/e4/ui/tests/model/test/impl/TestHarnessImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/tests/org.eclipse.e4.ui.tests/src/org/eclipse/e4/ui/tests/model/test/impl/TestHarnessImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 TestHarnessImpl.java >--- src/org/eclipse/e4/ui/tests/model/test/impl/TestHarnessImpl.java 12 Nov 2010 15:56:19 -0000 1.9 >+++ src/org/eclipse/e4/ui/tests/model/test/impl/TestHarnessImpl.java 14 Jan 2011 19:08:13 -0000 >@@ -80,9 +80,6 @@ > * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLabel <em>Label</em>}</li> > * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getIconURI <em>Icon URI</em>}</li> > * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getTooltip <em>Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalLabel <em>Local Label</em>}</li> >- * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalTooltip <em>Local Tooltip</em>}</li> >- * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalImage <em>Local Image</em>}</li> > * <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#isDirty <em>Dirty</em>}</li> > * </ul> > * </p> >@@ -464,60 +461,6 @@ > */ > protected String tooltip = TOOLTIP_EDEFAULT; > /** >- * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_LABEL_EDEFAULT = null; >- /** >- * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalLabel() >- * @generated >- * @ordered >- */ >- protected String localLabel = LOCAL_LABEL_EDEFAULT; >- /** >- * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected static final String LOCAL_TOOLTIP_EDEFAULT = null; >- /** >- * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalTooltip() >- * @generated >- * @ordered >- */ >- protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT; >- /** >- * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected static final Object LOCAL_IMAGE_EDEFAULT = null; >- /** >- * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute. >- * <!-- begin-user-doc --> >- * <!-- end-user-doc --> >- * @see #getLocalImage() >- * @generated >- * @ordered >- */ >- protected Object localImage = LOCAL_IMAGE_EDEFAULT; >- /** > * The default value of the '{@link #isDirty() <em>Dirty</em>}' attribute. > * <!-- begin-user-doc --> <!-- end-user-doc --> > * @see #isDirty() >@@ -1154,6 +1097,28 @@ > } > > /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public String getLocalizedLabel() { >+ // TODO: implement this method >+ // Ensure that you remove @generated or mark it @generated NOT >+ throw new UnsupportedOperationException(); >+ } >+ >+ /** >+ * <!-- begin-user-doc --> >+ * <!-- end-user-doc --> >+ * @generated >+ */ >+ public String getLocalizedTooltip() { >+ // TODO: implement this method >+ // Ensure that you remove @generated or mark it @generated NOT >+ throw new UnsupportedOperationException(); >+ } >+ >+ /** > * <!-- begin-user-doc --> <!-- end-user-doc --> > * @generated > */ >@@ -1278,12 +1243,6 @@ > return getIconURI(); > case MTestPackage.TEST_HARNESS__TOOLTIP: > return getTooltip(); >- case MTestPackage.TEST_HARNESS__LOCAL_LABEL: >- return getLocalLabel(); >- case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: >- return getLocalTooltip(); >- case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: >- return getLocalImage(); > case MTestPackage.TEST_HARNESS__DIRTY: > return isDirty(); > } >@@ -1385,15 +1344,6 @@ > case MTestPackage.TEST_HARNESS__TOOLTIP: > setTooltip((String)newValue); > return; >- case MTestPackage.TEST_HARNESS__LOCAL_LABEL: >- setLocalLabel((String)newValue); >- return; >- case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: >- setLocalTooltip((String)newValue); >- return; >- case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: >- setLocalImage(newValue); >- return; > case MTestPackage.TEST_HARNESS__DIRTY: > setDirty((Boolean)newValue); > return; >@@ -1492,15 +1442,6 @@ > case MTestPackage.TEST_HARNESS__TOOLTIP: > setTooltip(TOOLTIP_EDEFAULT); > return; >- case MTestPackage.TEST_HARNESS__LOCAL_LABEL: >- setLocalLabel(LOCAL_LABEL_EDEFAULT); >- return; >- case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: >- setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT); >- return; >- case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: >- setLocalImage(LOCAL_IMAGE_EDEFAULT); >- return; > case MTestPackage.TEST_HARNESS__DIRTY: > setDirty(DIRTY_EDEFAULT); > return; >@@ -1571,12 +1512,6 @@ > return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI); > case MTestPackage.TEST_HARNESS__TOOLTIP: > return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip); >- case MTestPackage.TEST_HARNESS__LOCAL_LABEL: >- return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel); >- case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: >- return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip); >- case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: >- return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage); > case MTestPackage.TEST_HARNESS__DIRTY: > return dirty != DIRTY_EDEFAULT; > } >@@ -1654,9 +1589,6 @@ > case MTestPackage.TEST_HARNESS__LABEL: return UiPackageImpl.UI_LABEL__LABEL; > case MTestPackage.TEST_HARNESS__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI; > case MTestPackage.TEST_HARNESS__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP; >- case MTestPackage.TEST_HARNESS__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL; >- case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP; >- case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1740,9 +1672,6 @@ > case UiPackageImpl.UI_LABEL__LABEL: return MTestPackage.TEST_HARNESS__LABEL; > case UiPackageImpl.UI_LABEL__ICON_URI: return MTestPackage.TEST_HARNESS__ICON_URI; > case UiPackageImpl.UI_LABEL__TOOLTIP: return MTestPackage.TEST_HARNESS__TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MTestPackage.TEST_HARNESS__LOCAL_LABEL; >- case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP; >- case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MTestPackage.TEST_HARNESS__LOCAL_IMAGE; > default: return -1; > } > } >@@ -1802,12 +1731,6 @@ > result.append(iconURI); > result.append(", tooltip: "); > result.append(tooltip); >- result.append(", localLabel: "); >- result.append(localLabel); >- result.append(", localTooltip: "); >- result.append(localTooltip); >- result.append(", localImage: "); >- result.append(localImage); > result.append(", dirty: "); > result.append(dirty); > result.append(')'); >#P org.eclipse.e4.ui.workbench >Index: src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java,v >retrieving revision 1.28 >diff -u -r1.28 ModelServiceImpl.java >--- src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java 29 Nov 2010 20:50:21 -0000 1.28 >+++ src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java 14 Jan 2011 19:08:14 -0000 >@@ -18,7 +18,6 @@ > import org.eclipse.e4.core.contexts.IEclipseContext; > import org.eclipse.e4.core.di.annotations.Execute; > import org.eclipse.e4.ui.model.application.MApplication; >-import org.eclipse.e4.ui.model.application.ui.MContext; > import org.eclipse.e4.ui.model.application.ui.MElementContainer; > import org.eclipse.e4.ui.model.application.ui.MGenericTile; > import org.eclipse.e4.ui.model.application.ui.MUIElement; >@@ -39,6 +38,7 @@ > import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement; > import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl; > import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; >+import org.eclipse.e4.ui.model.internal.ModelUtils; > import org.eclipse.e4.ui.workbench.IPresentationEngine; > import org.eclipse.e4.ui.workbench.modeling.EModelService; > import org.eclipse.emf.ecore.EObject; >@@ -213,24 +213,7 @@ > * .model .application.MUIElement) > */ > public IEclipseContext getContainingContext(MUIElement element) { >- MUIElement curParent = null; >- if (element.getCurSharedRef() != null) >- curParent = element.getCurSharedRef().getParent(); >- else >- curParent = (MUIElement) ((EObject) element).eContainer(); >- >- while (curParent != null) { >- if (curParent instanceof MContext) { >- return ((MContext) curParent).getContext(); >- } >- >- if (curParent.getCurSharedRef() != null) >- curParent = curParent.getCurSharedRef().getParent(); >- else >- curParent = (MUIElement) ((EObject) curParent).eContainer(); >- } >- >- return null; >+ return ModelUtils.getContainingContext(element); > } > > /* >#P org.eclipse.e4.ui.workbench.addons.swt >Index: src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.addons.swt/src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java,v >retrieving revision 1.32 >diff -u -r1.32 PerspectiveSwitcher.java >--- src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java 6 Jan 2011 15:41:34 -0000 1.32 >+++ src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java 14 Jan 2011 19:08:14 -0000 >@@ -322,14 +322,14 @@ > if (desc != null) { > psItem.setImage(desc.createImage(false)); > foundImage = true; >- psItem.setToolTipText(persp.getLabel()); >+ psItem.setToolTipText(persp.getLocalizedLabel()); > } > } > if (!foundImage > || PrefUtil.getAPIPreferenceStore().getBoolean( > IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR)) { >- psItem.setText(persp.getLabel()); >- psItem.setToolTipText(persp.getTooltip()); >+ psItem.setText(persp.getLocalizedLabel()); >+ psItem.setToolTipText(persp.getLocalizedTooltip()); > } > > psItem.setSelection(persp == persp.getParent().getSelectedElement()); >@@ -490,7 +490,7 @@ > return; > IWorkbenchPage page = persp.getContext().get(IWorkbenchPage.class); > String message = NLS.bind(WorkbenchMessages.ResetPerspective_message, >- persp.getLabel()); >+ persp.getLocalizedLabel()); > if (MessageDialog.openConfirm(page.getWorkbenchWindow().getShell(), > WorkbenchMessages.ResetPerspective_title, message)) { > page.resetPerspective(); >@@ -526,13 +526,13 @@ > if (persp != null) > if (showText) { > if (persp.getLabel() != null) >- items[i].setText(persp.getLabel()); >- items[i].setToolTipText(persp.getTooltip()); >+ items[i].setText(persp.getLocalizedLabel()); >+ items[i].setToolTipText(persp.getLocalizedTooltip()); > } else { > Image image = items[i].getImage(); > if (image != null) { > items[i].setText(""); >- items[i].setToolTipText(persp.getLabel()); >+ items[i].setToolTipText(persp.getLocalizedLabel()); > } > } > } >#P org.eclipse.e4.ui.workbench.renderers.swt >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/AreaRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/AreaRenderer.java,v >retrieving revision 1.3 >diff -u -r1.3 AreaRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/AreaRenderer.java 6 Jan 2011 14:54:53 -0000 1.3 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/AreaRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -55,11 +55,11 @@ > String attName = (String) event > .getProperty(UIEvents.EventTags.ATTNAME); > if (UIEvents.UILabel.LABEL.equals(attName)) { >- areaItem.setText(areaModel.getLabel()); >+ areaItem.setText(areaModel.getLocalizedLabel()); > } else if (UIEvents.UILabel.ICONURI.equals(attName)) { > areaItem.setImage(getImage(areaModel)); > } else if (UIEvents.UILabel.TOOLTIP.equals(attName)) { >- areaItem.setToolTipText(areaModel.getTooltip()); >+ areaItem.setToolTipText(areaModel.getLocalizedTooltip()); > } > } > }; >@@ -94,9 +94,9 @@ > > CTabItem cti = new CTabItem(ctf, SWT.NONE); > if (areaModel.getLabel() != null) >- cti.setText(areaModel.getLabel()); >+ cti.setText(areaModel.getLocalizedLabel()); > if (areaModel.getTooltip() != null) >- cti.setToolTipText(areaModel.getTooltip()); >+ cti.setToolTipText(areaModel.getLocalizedTooltip()); > if (areaModel.getIconURI() != null) > cti.setImage(getImage(areaModel)); > >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/DirectContributionItem.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/DirectContributionItem.java,v >retrieving revision 1.2 >diff -u -r1.2 DirectContributionItem.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/DirectContributionItem.java 8 Oct 2010 12:03:07 -0000 1.2 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/DirectContributionItem.java 14 Jan 2011 19:08:14 -0000 >@@ -185,7 +185,7 @@ > > private void updateMenuItem() { > MenuItem item = (MenuItem) widget; >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (text != null) { > item.setText(text); > } else { >@@ -197,13 +197,13 @@ > > private void updateToolItem() { > ToolItem item = (ToolItem) widget; >- final String text = model.getLabel(); >+ final String text = model.getLocalizedLabel(); > if (text != null) { > item.setText(text); > } else { > item.setText(""); //$NON-NLS-1$ > } >- final String tooltip = model.getTooltip(); >+ final String tooltip = model.getLocalizedTooltip(); > item.setToolTipText(tooltip); > > item.setSelection(model.isSelected()); >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/HandledContributionItem.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/HandledContributionItem.java,v >retrieving revision 1.2 >diff -u -r1.2 HandledContributionItem.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/HandledContributionItem.java 8 Oct 2010 12:03:07 -0000 1.2 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/HandledContributionItem.java 14 Jan 2011 19:08:14 -0000 >@@ -223,7 +223,7 @@ > > private void updateMenuItem() { > MenuItem item = (MenuItem) widget; >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > ParameterizedCommand parmCmd = model.getWbCommand(); > String keyBindingText = null; > if (parmCmd != null) { >@@ -255,13 +255,13 @@ > > private void updateToolItem() { > ToolItem item = (ToolItem) widget; >- final String text = model.getLabel(); >+ final String text = model.getLocalizedLabel(); > if (text != null) { > item.setText(text); > } else { > item.setText(""); //$NON-NLS-1$ > } >- final String tooltip = model.getTooltip(); >+ final String tooltip = model.getLocalizedTooltip(); > item.setToolTipText(tooltip); > item.setSelection(model.isSelected()); > item.setEnabled(model.isEnabled()); >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/HandledMenuItemRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/HandledMenuItemRenderer.java,v >retrieving revision 1.8 >diff -u -r1.8 HandledMenuItemRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/HandledMenuItemRenderer.java 14 Oct 2010 18:21:18 -0000 1.8 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/HandledMenuItemRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -94,7 +94,7 @@ > } > > protected void setItemText(MMenuItem model, MenuItem item) { >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (model instanceof MHandledItem) { > MHandledItem handledItem = (MHandledItem) model; > IEclipseContext context = getContext(model); >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java,v >retrieving revision 1.7 >diff -u -r1.7 MenuItemRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java 14 Oct 2010 18:21:18 -0000 1.7 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -10,8 +10,6 @@ > *******************************************************************************/ > package org.eclipse.e4.ui.workbench.renderers.swt; > >-import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator; >- > import java.util.HashMap; > import javax.annotation.PostConstruct; > import javax.annotation.PreDestroy; >@@ -24,6 +22,7 @@ > import org.eclipse.e4.core.contexts.RunAndTrack; > import org.eclipse.e4.core.services.events.IEventBroker; > import org.eclipse.e4.core.services.log.Logger; >+import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator; > import org.eclipse.e4.ui.model.application.ui.MCoreExpression; > import org.eclipse.e4.ui.model.application.ui.MElementContainer; > import org.eclipse.e4.ui.model.application.ui.MUIElement; >@@ -199,7 +198,7 @@ > } > > protected void setItemText(MMenuItem model, MenuItem item) { >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (text == null) { > text = ""; //$NON-NLS-1$ > } >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java,v >retrieving revision 1.6 >diff -u -r1.6 MenuManagerRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java 18 Nov 2010 20:35:56 -0000 1.6 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -750,7 +750,7 @@ > } > > private String getText(MMenu menuModel) { >- String text = menuModel.getLabel(); >+ String text = menuModel.getLocalizedLabel(); > if (text == null || text.length() == 0) { > return NO_LABEL; > } >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/MenuRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/MenuRenderer.java,v >retrieving revision 1.11 >diff -u -r1.11 MenuRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/MenuRenderer.java 12 Nov 2010 16:44:01 -0000 1.11 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/MenuRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -191,7 +191,7 @@ > } > > private void setItemText(MMenu model, MenuItem item) { >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (text == null) { > text = ""; //$NON-NLS-1$ > } >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/RenderedMenuRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/RenderedMenuRenderer.java,v >retrieving revision 1.7 >diff -u -r1.7 RenderedMenuRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/RenderedMenuRenderer.java 14 Oct 2010 18:21:18 -0000 1.7 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/RenderedMenuRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -75,7 +75,7 @@ > } > > private void setItemText(MMenu model, MenuItem item) { >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (text == null) { > text = ""; //$NON-NLS-1$ > } >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/SWTPartRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/SWTPartRenderer.java,v >retrieving revision 1.9 >diff -u -r1.9 SWTPartRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/SWTPartRenderer.java 3 Dec 2010 20:46:45 -0000 1.9 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/SWTPartRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -140,7 +140,8 @@ > if (logService != null) { > String msg = "Error disposing widget for : " + element.getClass().getName(); //$NON-NLS-1$ > if (element instanceof MUILabel) { >- msg += ' ' + ((MUILabel) element).getLabel(); >+ msg += ' ' + ((MUILabel) element) >+ .getLocalizedLabel(); > } > logService.error(e, msg); > } >@@ -159,7 +160,7 @@ > ((Control) widget).getAccessible().addAccessibleListener( > new AccessibleAdapter() { > public void getName(AccessibleEvent e) { >- e.result = ((MUILabel) me).getLabel(); >+ e.result = ((MUILabel) me).getLocalizedLabel(); > } > }); > } >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java,v >retrieving revision 1.30 >diff -u -r1.30 StackRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java 26 Nov 2010 16:24:03 -0000 1.30 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -325,9 +325,9 @@ > cti = new CTabItem(ctf, createFlags, index); > > cti.setData(OWNING_ME, element); >- cti.setText(getLabel(part, part.getLabel())); >+ cti.setText(getLabel(part, part.getLocalizedLabel())); > cti.setImage(getImage(part)); >- cti.setToolTipText(part.getTooltip()); >+ cti.setToolTipText(part.getLocalizedTooltip()); > if (element.getWidget() != null) { > // The part might have a widget but may not yet have been placed > // under this stack, check this >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java,v >retrieving revision 1.13 >diff -u -r1.13 ToolItemRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java 22 Nov 2010 15:12:18 -0000 1.13 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -167,7 +167,7 @@ > } > > private void setItemText(MToolItem model, ToolItem item) { >- String text = model.getLabel(); >+ String text = model.getLocalizedLabel(); > if (model instanceof MHandledItem) { > MHandledItem handledItem = (MHandledItem) model; > IEclipseContext context = getContext(model); >@@ -192,7 +192,7 @@ > } > > private String getToolTipText(MItem item) { >- String text = item.getTooltip(); >+ String text = item.getLocalizedTooltip(); > if (item instanceof MHandledItem) { > MHandledItem handledItem = (MHandledItem) item; > IEclipseContext context = getContext(item); >@@ -242,7 +242,7 @@ > > ToolItem newItem = new ToolItem((ToolBar) parent, flags, addIndex); > if (itemModel.getLabel() != null) >- newItem.setText(itemModel.getLabel()); >+ newItem.setText(itemModel.getLocalizedLabel()); > > newItem.setToolTipText(getToolTipText(itemModel)); > >Index: src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java,v >retrieving revision 1.12 >diff -u -r1.12 WBWRenderer.java >--- src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java 6 Jan 2011 14:54:53 -0000 1.12 >+++ src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java 14 Jan 2011 19:08:14 -0000 >@@ -376,7 +376,7 @@ > }); > > if (wbwModel.getLabel() != null) >- wbwShell.setText(wbwModel.getLabel()); >+ wbwShell.setText(wbwModel.getLocalizedLabel()); > > wbwShell.setImage(getImage(wbwModel)); > // TODO: This should be added to the model, see bug 308494 >@@ -608,7 +608,7 @@ > tableViewer.setLabelProvider(new LabelProvider() { > @Override > public String getText(Object element) { >- return ((MPart) element).getLabel(); >+ return ((MPart) element).getLocalizedLabel(); > } > }); > tableViewer.setContentProvider(ArrayContentProvider.getInstance()); >#P org.eclipse.e4.ui.workbench.swt >Index: src/org/eclipse/e4/ui/workbench/swt/internal/copy/ShowViewDialog.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/ShowViewDialog.java,v >retrieving revision 1.2 >diff -u -r1.2 ShowViewDialog.java >--- src/org/eclipse/e4/ui/workbench/swt/internal/copy/ShowViewDialog.java 25 Jun 2010 20:52:22 -0000 1.2 >+++ src/org/eclipse/e4/ui/workbench/swt/internal/copy/ShowViewDialog.java 14 Jan 2011 19:08:15 -0000 >@@ -11,12 +11,12 @@ > *******************************************************************************/ > package org.eclipse.e4.ui.workbench.swt.internal.copy; > >-import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator; >- > import java.util.ArrayList; > import java.util.Iterator; > import java.util.List; > import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.MApplication; > import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; > import org.eclipse.jface.dialogs.Dialog; >@@ -182,7 +182,7 @@ > * the parent <code>Composite</code>. > */ > private void createFilteredTreeViewer(Composite parent) { >- PatternFilter filter = new ViewPatternFilter(); >+ PatternFilter filter = new ViewPatternFilter(context); > int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER; > filteredTree = new FilteredTree(parent, styleBits, filter, true); > filteredTree.setBackground(parent.getDisplay().getSystemColor( >@@ -357,8 +357,12 @@ > public void selectionChanged(SelectionChangedEvent event) { > updateSelection(event); > updateButtons(); >- String tooltip = (viewDescs.length > 0) ? viewDescs[0].getTooltip() >- : ""; >+ String tooltip = ""; >+ if (viewDescs.length > 0) { >+ tooltip = viewDescs[0].getTooltip(); >+ tooltip = LocalizationHelper.getLocalized(tooltip, viewDescs[0], >+ context); >+ } > boolean hasTooltip = (tooltip == null) ? false : tooltip.length() > 0; > descriptionHint.setVisible(viewDescs.length == 1 && hasTooltip); > } >@@ -411,6 +415,8 @@ > Object o = selection.getFirstElement(); > if (o instanceof MPartDescriptor) { > String description = ((MPartDescriptor) o).getTooltip(); >+ description = LocalizationHelper.getLocalized(description, >+ (MPartDescriptor) o, context); > if (description != null && description.length() == 0) > description = WorkbenchSWTMessages.ShowView_noDesc; > popUp(description); >Index: src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewComparator.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewComparator.java,v >retrieving revision 1.1 >diff -u -r1.1 ViewComparator.java >--- src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewComparator.java 8 Jun 2010 19:32:46 -0000 1.1 >+++ src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewComparator.java 14 Jan 2011 19:08:15 -0000 >@@ -44,13 +44,13 @@ > > String str1; > if (e1 instanceof MPartDescriptor) >- str1 = ((MPartDescriptor) e1).getLabel(); >+ str1 = ((MPartDescriptor) e1).getLocalizedLabel(); > else > str1 = e1.toString(); > > String str2; > if (e2 instanceof MPartDescriptor) >- str2 = ((MPartDescriptor) e2).getLabel(); >+ str2 = ((MPartDescriptor) e2).getLocalizedLabel(); > else > str2 = e2.toString(); > if (str1 == null) >Index: src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewLabelProvider.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewLabelProvider.java,v >retrieving revision 1.2 >diff -u -r1.2 ViewLabelProvider.java >--- src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewLabelProvider.java 25 Jun 2010 20:52:23 -0000 1.2 >+++ src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewLabelProvider.java 14 Jan 2011 19:08:15 -0000 >@@ -102,8 +102,8 @@ > } else if (element instanceof String) { > Image image = imageMap.get(FOLDER_ICON); > if (image == null) { >- image = JFaceResources.getImageRegistry().getDescriptor( >- FOLDER_ICON).createImage(); >+ image = JFaceResources.getImageRegistry() >+ .getDescriptor(FOLDER_ICON).createImage(); > imageMap.put(FOLDER_ICON, image); > } > return image; >@@ -121,7 +121,7 @@ > if (element instanceof String) { > label = (String) element; > } else if (element instanceof MPartDescriptor) { >- label = ((MPartDescriptor) element).getLabel(); >+ label = ((MPartDescriptor) element).getLocalizedLabel(); > } > return label; > } >Index: src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewPatternFilter.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.ui/bundles/org.eclipse.e4.ui.workbench.swt/src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewPatternFilter.java,v >retrieving revision 1.2 >diff -u -r1.2 ViewPatternFilter.java >--- src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewPatternFilter.java 25 Jun 2010 19:58:48 -0000 1.2 >+++ src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewPatternFilter.java 14 Jan 2011 19:08:15 -0000 >@@ -10,6 +10,8 @@ > *******************************************************************************/ > package org.eclipse.e4.ui.workbench.swt.internal.copy; > >+import org.eclipse.e4.core.contexts.IEclipseContext; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; > import org.eclipse.jface.viewers.Viewer; > >@@ -18,11 +20,14 @@ > */ > public class ViewPatternFilter extends PatternFilter { > >+ private IEclipseContext context; >+ > /** > * Create a new instance of a ViewPatternFilter > */ >- public ViewPatternFilter() { >+ public ViewPatternFilter(IEclipseContext context) { > super(); >+ this.context = context; > } > > /* >@@ -51,7 +56,8 @@ > String text = null; > if (element instanceof MPartDescriptor) { > MPartDescriptor desc = (MPartDescriptor) element; >- text = desc.getLabel(); >+ text = LocalizationHelper.getLocalized(desc.getLabel(), desc, >+ context); > if (wordMatches(text)) { > return true; > } >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/EditorReference.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java,v >retrieving revision 1.33 >diff -u -r1.33 EditorReference.java >--- Eclipse UI/org/eclipse/ui/internal/EditorReference.java 4 Jan 2011 15:40:28 -0000 1.33 >+++ Eclipse UI/org/eclipse/ui/internal/EditorReference.java 14 Jan 2011 19:08:15 -0000 >@@ -171,13 +171,14 @@ > public String getName() { > IEditorPart editor = getEditor(false); > if (input == null) { >- return editor == null ? getModel().getLabel() : editor.getEditorInput().getName(); >+ return editor == null ? getModel().getLocalizedLabel() : editor.getEditorInput() >+ .getName(); > } > return editor == null ? input.getName() : editor.getEditorInput().getName(); > } > > public String getTitle() { >- String label = Util.safeString(getModel().getLabel()); >+ String label = Util.safeString(getModel().getLocalizedLabel()); > if (label.length() == 0) { > if (input == null) { > if (descriptor != null) { >Index: Eclipse UI/org/eclipse/ui/internal/PartSite.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java,v >retrieving revision 1.15 >diff -u -r1.15 PartSite.java >--- Eclipse UI/org/eclipse/ui/internal/PartSite.java 4 Jan 2011 18:35:32 -0000 1.15 >+++ Eclipse UI/org/eclipse/ui/internal/PartSite.java 14 Jan 2011 19:08:15 -0000 >@@ -326,7 +326,7 @@ > * @see org.eclipse.ui.IWorkbenchPartSite#getRegisteredName() > */ > public String getRegisteredName() { >- return element == null ? model.getLabel() : element >+ return element == null ? model.getLocalizedLabel() : element > .getAttribute(IWorkbenchRegistryConstants.ATT_NAME); > } > >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java,v >retrieving revision 1.16 >diff -u -r1.16 WorkbenchPartReference.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java 4 Jan 2011 18:59:18 -0000 1.16 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java 14 Jan 2011 19:08:15 -0000 >@@ -12,9 +12,6 @@ > *******************************************************************************/ > package org.eclipse.ui.internal; > >-import org.eclipse.e4.ui.workbench.modeling.EPartService; >-import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; >- > import java.util.HashMap; > import java.util.Iterator; > import java.util.Map; >@@ -25,6 +22,8 @@ > import org.eclipse.e4.core.services.events.IEventBroker; > import org.eclipse.e4.ui.model.application.ui.basic.MPart; > import org.eclipse.e4.ui.workbench.UIEvents; >+import org.eclipse.e4.ui.workbench.modeling.EPartService; >+import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState; > import org.eclipse.jface.resource.ImageDescriptor; > import org.eclipse.jface.resource.JFaceResources; > import org.eclipse.jface.util.IPropertyChangeListener; >@@ -357,7 +356,7 @@ > * @see org.eclipse.ui.IWorkbenchPartReference#getTitle() > */ > public String getTitle() { >- String title = legacyPart == null ? part.getLabel() : legacyPart.getTitle(); >+ String title = legacyPart == null ? part.getLocalizedLabel() : legacyPart.getTitle(); > return Util.safeString(title); > } > >@@ -367,7 +366,7 @@ > * @see org.eclipse.ui.IWorkbenchPartReference#getTitleToolTip() > */ > public String getTitleToolTip() { >- String toolTip = part.getTooltip(); >+ String toolTip = part.getLocalizedTooltip(); > return Util.safeString(toolTip); > } > >@@ -637,7 +636,7 @@ > * @see org.eclipse.ui.IWorkbenchPartReference#getPartName() > */ > public String getPartName() { >- return part.getLabel(); >+ return part.getLocalizedLabel(); > } > > /* >Index: Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java,v >retrieving revision 1.83 >diff -u -r1.83 WorkbenchWindow.java >--- Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java 13 Jan 2011 15:43:06 -0000 1.83 >+++ Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java 14 Jan 2011 19:08:15 -0000 >@@ -457,7 +457,7 @@ > LabelProvider labelProvider = new LabelProvider() { > @Override > public String getText(Object element) { >- return ((MPart) element).getLabel(); >+ return ((MPart) element).getLocalizedLabel(); > } > }; > List<MPart> parts = new ArrayList<MPart>(dirtyParts); >Index: Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java,v >retrieving revision 1.58 >diff -u -r1.58 CompatibilityPart.java >--- Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java 4 Jan 2011 19:30:23 -0000 1.58 >+++ Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java 14 Jan 2011 19:08:15 -0000 >@@ -105,7 +105,7 @@ > } catch (Exception e) { > if (logger != null) { > String msg = "Error setting focus to : " + part.getClass().getName(); //$NON-NLS-1$ >- msg += ' ' + part.getLabel(); >+ msg += ' ' + part.getLocalizedLabel(); > logger.error(e, msg); > } > } >Index: Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java,v >retrieving revision 1.3 >diff -u -r1.3 ViewElement.java >--- Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java 26 Nov 2010 17:28:29 -0000 1.3 >+++ Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java 14 Jan 2011 19:08:15 -0000 >@@ -13,6 +13,7 @@ > > import java.net.MalformedURLException; > import java.net.URL; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; > import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder; > import org.eclipse.e4.ui.model.application.ui.basic.MPart; >@@ -87,7 +88,7 @@ > > @Override > public String getLabel() { >- return viewDescriptor.getLabel(); >+ return LocalizationHelper.getLocalized(viewDescriptor.getLabel(), viewDescriptor, window.getContext()); > } > > public int hashCode() { >Index: Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java >=================================================================== >RCS file: /cvsroot/eclipse/e4/org.eclipse.e4.compatibility/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java,v >retrieving revision 1.6 >diff -u -r1.6 ViewDescriptor.java >--- Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java 4 Jun 2010 20:22:17 -0000 1.6 >+++ Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java 14 Jan 2011 19:08:15 -0000 >@@ -11,14 +11,14 @@ > *******************************************************************************/ > package org.eclipse.ui.internal.registry; > >-import org.eclipse.e4.ui.workbench.IResourceUtilities; >- > import org.eclipse.core.runtime.CoreException; > import org.eclipse.core.runtime.IConfigurationElement; > import org.eclipse.core.runtime.IStatus; > import org.eclipse.core.runtime.Status; >+import org.eclipse.e4.ui.model.LocalizationHelper; > import org.eclipse.e4.ui.model.application.MApplication; > import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor; >+import org.eclipse.e4.ui.workbench.IResourceUtilities; > import org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities; > import org.eclipse.emf.common.util.URI; > import org.eclipse.jface.resource.ImageDescriptor; >@@ -118,7 +118,8 @@ > * @see org.eclipse.ui.views.IViewDescriptor#getLabel() > */ > public String getLabel() { >- return descriptor.getLabel(); >+ return LocalizationHelper.getLocalized(descriptor.getLabel(), descriptor, >+ application.getContext()); > } > > /*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 331260
:
183968
|
184155
|
185001
|
185457
|
186664
|
186665
|
186735
|
186742
|
186743
| 186844