Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 331260 | Differences between
and this patch

Collapse All | Expand All

(-)Application.e4xmi (-9 / +9 lines)
Lines 1-25 Link Here
1
<?xml version="1.0" encoding="ASCII"?>
1
<?xml version="1.0" encoding="ASCII"?>
2
<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">
2
<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">
3
  <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="_SeXUAe8EEd6FC9cDb6iV7g" label="e4 Contacts Demo" x="20" y="20" width="700" height="480">
3
  <children xsi:type="basic:TrimmedWindow" xmi:id="_SeXUAe8EEd6FC9cDb6iV7g" elementId="_SeXUAe8EEd6FC9cDb6iV7g" label="%windowTitle" x="20" y="20" width="700" height="480">
4
    <children xsi:type="basic:PartSashContainer" xmi:id="_SeXUCu8EEd6FC9cDb6iV7g" elementId="_SeXUCu8EEd6FC9cDb6iV7g" horizontal="true">
4
    <children xsi:type="basic:PartSashContainer" xmi:id="_SeXUCu8EEd6FC9cDb6iV7g" elementId="_SeXUCu8EEd6FC9cDb6iV7g" horizontal="true">
5
      <children xsi:type="basic:PartStack" xmi:id="_SeXUC-8EEd6FC9cDb6iV7g" elementId="_SeXUC-8EEd6FC9cDb6iV7g" containerData="30">
5
      <children xsi:type="basic:PartStack" xmi:id="_SeXUC-8EEd6FC9cDb6iV7g" elementId="_SeXUC-8EEd6FC9cDb6iV7g" containerData="30">
6
        <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"/>
6
        <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"/>
7
      </children>
7
      </children>
8
      <children xsi:type="basic:PartStack" xmi:id="_SeXUDe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.partstacks.second" containerData="70">
8
      <children xsi:type="basic:PartStack" xmi:id="_SeXUDe8EEd6FC9cDb6iV7g" elementId="org.eclipse.e4.demo.contacts.partstacks.second" containerData="70">
9
        <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"/>
9
        <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"/>
10
      </children>
10
      </children>
11
    </children>
11
    </children>
12
    <mainMenu xmi:id="menu:org.eclipse.ui.main.menu" elementId="menu:org.eclipse.ui.main.menu">
12
    <mainMenu xmi:id="menu:org.eclipse.ui.main.menu" elementId="menu:org.eclipse.ui.main.menu">
13
      <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="File">
13
      <children xsi:type="menu:Menu" xmi:id="_SeXUD-8EEd6FC9cDb6iV7g" elementId="_SeXUD-8EEd6FC9cDb6iV7g" label="%fileMenu">
14
        <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"/>
14
        <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"/>
15
        <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"/>
15
        <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"/>
16
        <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"/>
16
        <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"/>
17
        <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="Exit" command="contacts.exit"/>
17
        <children xsi:type="menu:HandledMenuItem" xmi:id="_SeXUE-8EEd6FC9cDb6iV7g" elementId="_SeXUE-8EEd6FC9cDb6iV7g" label="%menuLabelExit" command="contacts.exit"/>
18
      </children>
18
      </children>
19
    </mainMenu>
19
    </mainMenu>
20
    <trimBars xmi:id="_SeXUAu8EEd6FC9cDb6iV7g" elementId="_SeXUAu8EEd6FC9cDb6iV7g">
20
    <trimBars xmi:id="_SeXUAu8EEd6FC9cDb6iV7g" elementId="_SeXUAu8EEd6FC9cDb6iV7g">
21
      <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="toolbar:org.eclipse.ui.main.toolbar">
21
      <children xsi:type="menu:ToolBar" xmi:id="toolbar:org.eclipse.ui.main.toolbar" elementId="toolbar:org.eclipse.ui.main.toolbar">
22
        <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"/>
22
        <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"/>
23
      </children>
23
      </children>
24
    </trimBars>
24
    </trimBars>
25
  </children>
25
  </children>
(-)build.properties (-1 / +3 lines)
Lines 10-13 Link Here
10
               css/,\
10
               css/,\
11
               splash.bmp,\
11
               splash.bmp,\
12
               plugin_customization.ini,\
12
               plugin_customization.ini,\
13
               vcards/
13
               vcards/,\
14
               plugin_ru.properties,\
15
               plugin.properties
(-)META-INF/MANIFEST.MF (-1 / +3 lines)
Lines 24-35 Link Here
24
 org.eclipse.e4.ui.bindings;bundle-version="0.9.0",
24
 org.eclipse.e4.ui.bindings;bundle-version="0.9.0",
25
 org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0",
25
 org.eclipse.e4.ui.css.swt.theme;bundle-version="0.9.0",
26
 org.eclipse.e4.ui.css.swt;bundle-version="0.9.1",
26
 org.eclipse.e4.ui.css.swt;bundle-version="0.9.1",
27
 org.eclipse.e4.ui.di;bundle-version="0.9.0"
27
 org.eclipse.e4.ui.di;bundle-version="0.9.0",
28
 org.eclipse.e4.core.services;bundle-version="0.9.1"
28
Bundle-ActivationPolicy: lazy
29
Bundle-ActivationPolicy: lazy
29
Bundle-Vendor: Eclipse.org
30
Bundle-Vendor: Eclipse.org
30
Import-Package: javax.annotation;version="1.0.0",
31
Import-Package: javax.annotation;version="1.0.0",
31
 javax.inject;version="1.0.0"
32
 javax.inject;version="1.0.0"
32
Bundle-Activator: org.eclipse.e4.demo.contacts.BundleActivatorImpl
33
Bundle-Activator: org.eclipse.e4.demo.contacts.BundleActivatorImpl
33
Export-Package: org.eclipse.e4.demo.contacts.model
34
Export-Package: org.eclipse.e4.demo.contacts.model
35
Bundle-Localization: plugin
34
36
35
37
(-)plugin.properties (+21 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2011 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
fileMenu = &File
12
partDetails = Details
13
contactsList = Contacts List
14
menuLabelSave = &Save
15
menuLabelDelete = &Delete
16
menuLabelDirectExit = Direct E&xit
17
menuLabelExit = &Exit
18
windowTitle = e4 Contacts Demo
19
contactsTooltip = List of Contacts
20
detailsTooltip = Contact Details
21
toolbarSaveTooltip = Save
(-)plugin_ru.properties (+22 lines)
Added Link Here
1
###############################################################################
2
# Copyright (c) 2011 IBM Corporation and others.
3
# All rights reserved. This program and the accompanying materials
4
# are made available under the terms of the Eclipse Public License v1.0
5
# which accompanies this distribution, and is available at
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
10
###############################################################################
11
fileMenu = &\u0424\u0430\u0439\u043B
12
partDetails = \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u043E
13
contactsList = \u041A\u043E\u043D\u0442\u0430\u043A\u0442\u044B
14
menuLabelSave = &\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
15
menuLabelDelete = &\u0423\u0434\u0430\u043B\u0438\u0442\u044C
16
menuLabelDirectExit = &\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u044B\u0445\u043E\u0434
17
menuLabelExit = &\u0412\u044B\u0445\u043E\u0434
18
windowTitle = e4 \u0417\u0430\u043F\u0438\u0441\u043D\u0430\u044F \u043A\u043D\u0438\u0436\u043A\u0430
19
contactsTooltip = \u0421\u043F\u0438\u0441\u043E\u043A \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043E\u0432
20
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
21
toolbarSaveTooltip = \u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
22
(-)src/org/eclipse/e4/demo/contacts/model/internal/BinaryTranslatorProvider.java (+31 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.e4.demo.contacts.model.internal;
12
13
import org.eclipse.e4.core.services.translation.TranslationService;
14
15
public class BinaryTranslatorProvider extends TranslationService {
16
17
	@Override
18
	public String translate(String key, String contributorURI) {
19
		if (key == null)
20
			return null;
21
		char[] charArray = key.toCharArray();
22
		StringBuffer tmp = new StringBuffer();
23
		tmp.append("0x");
24
		for(int i = 0; i < charArray.length; i++) {
25
			int value = charArray[i];
26
			tmp.append(Integer.toHexString(value));
27
		}
28
		return tmp.toString();
29
	}
30
31
}
(-)src/org/eclipse/e4/demo/contacts/model/internal/ModelLifeCycleExtension.java (+34 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.e4.demo.contacts.model.internal;
12
13
import javax.inject.Inject;
14
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
15
import org.eclipse.e4.core.contexts.IEclipseContext;
16
import org.eclipse.e4.core.services.translation.TranslationService;
17
import org.eclipse.e4.ui.model.application.MApplication;
18
import org.eclipse.e4.ui.workbench.lifecycle.ProcessRemovals;
19
20
public class ModelLifeCycleExtension {
21
	
22
	@Inject
23
	public ModelLifeCycleExtension() {
24
		// placeholder
25
	}
26
27
	@ProcessRemovals
28
	public void overrideTranslation(MApplication application) {
29
		IEclipseContext appContext = application.getContext();
30
		BinaryTranslatorProvider translationService = ContextInjectionFactory.make(BinaryTranslatorProvider.class, appContext);
31
		appContext.set(TranslationService.class, translationService);
32
	}
33
34
}
(-)META-INF/MANIFEST.MF (-2 / +3 lines)
Lines 8-14 Link Here
8
Bundle-Vendor: %providerName
8
Bundle-Vendor: %providerName
9
Bundle-Localization: plugin
9
Bundle-Localization: plugin
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
10
Bundle-RequiredExecutionEnvironment: J2SE-1.5
11
Export-Package: org.eclipse.e4.ui.model.application;
11
Export-Package: org.eclipse.e4.ui.model;x-friends:="org.eclipse.e4.ui.workbench,org.eclipse.e4.ui.workbench.swt,org.eclipse.ui.workbench",
12
 org.eclipse.e4.ui.model.application;
12
  x-friends:="org.eclipse.e4.ui.workbench,
13
  x-friends:="org.eclipse.e4.ui.workbench,
13
   org.eclipse.e4.ui.workbench.addons.swt,
14
   org.eclipse.e4.ui.workbench.addons.swt,
14
   org.eclipse.e4.ui.workbench.renderers.swt,
15
   org.eclipse.e4.ui.workbench.renderers.swt,
Lines 87-93 Link Here
87
 org.eclipse.e4.ui.model.fragment;x-friends:="org.eclipse.e4.ui.workbench",
88
 org.eclipse.e4.ui.model.fragment;x-friends:="org.eclipse.e4.ui.workbench",
88
 org.eclipse.e4.ui.model.fragment.impl;x-friends:="org.eclipse.e4.ui.workbench",
89
 org.eclipse.e4.ui.model.fragment.impl;x-friends:="org.eclipse.e4.ui.workbench",
89
 org.eclipse.e4.ui.model.fragment.util;x-internal:=true,
90
 org.eclipse.e4.ui.model.fragment.util;x-internal:=true,
90
 org.eclipse.e4.ui.model.internal;x-internal:=true
91
 org.eclipse.e4.ui.model.internal;x-friends:="org.eclipse.e4.ui.workbench"
91
Require-Bundle: org.eclipse.core.runtime,
92
Require-Bundle: org.eclipse.core.runtime,
92
 org.eclipse.emf.ecore;visibility:=reexport,
93
 org.eclipse.emf.ecore;visibility:=reexport,
93
 org.eclipse.emf.ecore.xmi;visibility:=reexport,
94
 org.eclipse.emf.ecore.xmi;visibility:=reexport,
(-)model/UIElements.ecore (-6 / +2 lines)
Lines 152-166 Link Here
152
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
152
          eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
153
    </eClassifiers>
153
    </eClassifiers>
154
    <eClassifiers xsi:type="ecore:EClass" name="UILabel" abstract="true" interface="true">
154
    <eClassifiers xsi:type="ecore:EClass" name="UILabel" abstract="true" interface="true">
155
      <eOperations name="getLocalizedLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
156
      <eOperations name="getLocalizedTooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
155
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
157
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
156
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="iconURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
158
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="iconURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
157
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="tooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
159
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="tooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
158
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="localLabel" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
159
          transient="true"/>
160
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="localTooltip" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"
161
          transient="true"/>
162
      <eStructuralFeatures xsi:type="ecore:EAttribute" name="localImage" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject"
163
          transient="true"/>
164
    </eClassifiers>
160
    </eClassifiers>
165
    <eClassifiers xsi:type="ecore:EClass" name="ElementContainer" abstract="true"
161
    <eClassifiers xsi:type="ecore:EClass" name="ElementContainer" abstract="true"
166
        eSuperTypes="#//ui/UIElement">
162
        eSuperTypes="#//ui/UIElement">
(-)src/org/eclipse/e4/ui/model/LocalizationHelper.java (+94 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.e4.ui.model;
12
13
import org.eclipse.e4.core.contexts.IEclipseContext;
14
import org.eclipse.e4.core.services.translation.TranslationService;
15
import org.eclipse.e4.ui.model.application.MApplicationElement;
16
import org.eclipse.e4.ui.model.application.ui.MUIElement;
17
import org.eclipse.e4.ui.model.application.ui.MUILabel;
18
import org.eclipse.e4.ui.model.internal.ModelUtils;
19
20
/**
21
 * This class provides set of utility method that can be useful in typical
22
 * localization scenarios.
23
 */
24
final public class LocalizationHelper {
25
	
26
	private LocalizationHelper() {
27
		// prevents instantiation
28
	}
29
	
30
	/**
31
	 * Returns localized label for the specified element using locale information 
32
	 * from its context.
33
	 * @param element the element
34
	 * @return localized element's label, or <code>null</code> if no label can be found
35
	 */
36
	public static String getLocalizedLabel(MUIElement element) {
37
		if (!(element instanceof MUILabel))
38
			return null;
39
		String key = ((MUILabel)element).getLabel();
40
		if (key == null)
41
			return null;
42
		return getLocalized(key, element);
43
	}
44
45
	/**
46
	 * Returns localized tooltip for the specified element using locale information 
47
	 * from its context.
48
	 * @param element the element
49
	 * @return localized element's tooltip, or <code>null</code> if no tooltip can be found
50
	 */
51
	public static String getLocalizedTooltip(MUIElement element) {
52
		if (!(element instanceof MUILabel))
53
			return null;
54
		String key = ((MUILabel)element).getTooltip();
55
		if (key == null)
56
			return null;
57
		return getLocalized(key, element);
58
	}
59
60
	/**
61
	 * Returns localized string for the key using locale information specified
62
	 * in the element's context.
63
	 * <p>
64
	 * This method may return <code>null</code> if the context can not be found
65
	 * for the model element.
66
	 * </p>
67
	 * @param key the key
68
	 * @param element the model element
69
	 * @return localized key, or <code>null</code> if context information can not
70
	 * be found for the model element
71
	 */
72
	public static String getLocalized(String key, MUIElement element) {
73
		IEclipseContext context = ModelUtils.getContainingContext(element);
74
		if (context == null)
75
			return null;
76
		return getLocalized(key, element, context);
77
	}
78
79
	/**
80
	 * Returns localized string for the key from the application element using translation 
81
	 * service from the context.
82
	 * @param key the key
83
	 * @param element the model element
84
	 * @param context the context
85
	 * @return localized key
86
	 */
87
	public static String getLocalized(String key, MApplicationElement element, IEclipseContext context) {
88
		TranslationService translation = context.get(TranslationService.class);
89
		if (translation == null)
90
			return key;
91
		return translation.translate(key, element.getContributorURI());
92
	}
93
94
}
(-)src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/BasicPackageImpl.java (-38 / +11 lines)
Lines 138-177 Link Here
138
	public static final int PART_DESCRIPTOR__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 2;
138
	public static final int PART_DESCRIPTOR__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 2;
139
139
140
	/**
140
	/**
141
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
142
	 * <!-- begin-user-doc -->
143
	 * <!-- end-user-doc -->
144
	 * @generated
145
	 * @ordered
146
	 */
147
	public static final int PART_DESCRIPTOR__LOCAL_LABEL = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 3;
148
149
	/**
150
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
151
	 * <!-- begin-user-doc -->
152
	 * <!-- end-user-doc -->
153
	 * @generated
154
	 * @ordered
155
	 */
156
	public static final int PART_DESCRIPTOR__LOCAL_TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 4;
157
158
	/**
159
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
160
	 * <!-- begin-user-doc -->
161
	 * <!-- end-user-doc -->
162
	 * @generated
163
	 * @ordered
164
	 */
165
	public static final int PART_DESCRIPTOR__LOCAL_IMAGE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 5;
166
167
	/**
168
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
141
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
169
	 * <!-- begin-user-doc -->
142
	 * <!-- begin-user-doc -->
170
	 * <!-- end-user-doc -->
143
	 * <!-- end-user-doc -->
171
	 * @generated
144
	 * @generated
172
	 * @ordered
145
	 * @ordered
173
	 */
146
	 */
174
	public static final int PART_DESCRIPTOR__HANDLERS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 6;
147
	public static final int PART_DESCRIPTOR__HANDLERS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 3;
175
148
176
	/**
149
	/**
177
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
150
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
Lines 180-186 Link Here
180
	 * @generated
153
	 * @generated
181
	 * @ordered
154
	 * @ordered
182
	 */
155
	 */
183
	public static final int PART_DESCRIPTOR__BINDING_CONTEXTS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 7;
156
	public static final int PART_DESCRIPTOR__BINDING_CONTEXTS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 4;
184
157
185
	/**
158
	/**
186
	 * The feature id for the '<em><b>Allow Multiple</b></em>' attribute.
159
	 * The feature id for the '<em><b>Allow Multiple</b></em>' attribute.
Lines 189-195 Link Here
189
	 * @generated
162
	 * @generated
190
	 * @ordered
163
	 * @ordered
191
	 */
164
	 */
192
	public static final int PART_DESCRIPTOR__ALLOW_MULTIPLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 8;
165
	public static final int PART_DESCRIPTOR__ALLOW_MULTIPLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 5;
193
166
194
	/**
167
	/**
195
	 * The feature id for the '<em><b>Category</b></em>' attribute.
168
	 * The feature id for the '<em><b>Category</b></em>' attribute.
Lines 198-204 Link Here
198
	 * @generated
171
	 * @generated
199
	 * @ordered
172
	 * @ordered
200
	 */
173
	 */
201
	public static final int PART_DESCRIPTOR__CATEGORY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 9;
174
	public static final int PART_DESCRIPTOR__CATEGORY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 6;
202
175
203
	/**
176
	/**
204
	 * The feature id for the '<em><b>Menus</b></em>' containment reference list.
177
	 * The feature id for the '<em><b>Menus</b></em>' containment reference list.
Lines 207-213 Link Here
207
	 * @generated
180
	 * @generated
208
	 * @ordered
181
	 * @ordered
209
	 */
182
	 */
210
	public static final int PART_DESCRIPTOR__MENUS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 10;
183
	public static final int PART_DESCRIPTOR__MENUS = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 7;
211
184
212
	/**
185
	/**
213
	 * The feature id for the '<em><b>Toolbar</b></em>' containment reference.
186
	 * The feature id for the '<em><b>Toolbar</b></em>' containment reference.
Lines 216-222 Link Here
216
	 * @generated
189
	 * @generated
217
	 * @ordered
190
	 * @ordered
218
	 */
191
	 */
219
	public static final int PART_DESCRIPTOR__TOOLBAR = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 11;
192
	public static final int PART_DESCRIPTOR__TOOLBAR = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 8;
220
193
221
	/**
194
	/**
222
	 * The feature id for the '<em><b>Closeable</b></em>' attribute.
195
	 * The feature id for the '<em><b>Closeable</b></em>' attribute.
Lines 225-231 Link Here
225
	 * @generated
198
	 * @generated
226
	 * @ordered
199
	 * @ordered
227
	 */
200
	 */
228
	public static final int PART_DESCRIPTOR__CLOSEABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 12;
201
	public static final int PART_DESCRIPTOR__CLOSEABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 9;
229
202
230
	/**
203
	/**
231
	 * The feature id for the '<em><b>Dirtyable</b></em>' attribute.
204
	 * The feature id for the '<em><b>Dirtyable</b></em>' attribute.
Lines 234-240 Link Here
234
	 * @generated
207
	 * @generated
235
	 * @ordered
208
	 * @ordered
236
	 */
209
	 */
237
	public static final int PART_DESCRIPTOR__DIRTYABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 13;
210
	public static final int PART_DESCRIPTOR__DIRTYABLE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 10;
238
211
239
	/**
212
	/**
240
	 * The feature id for the '<em><b>Contribution URI</b></em>' attribute.
213
	 * The feature id for the '<em><b>Contribution URI</b></em>' attribute.
Lines 243-249 Link Here
243
	 * @generated
216
	 * @generated
244
	 * @ordered
217
	 * @ordered
245
	 */
218
	 */
246
	public static final int PART_DESCRIPTOR__CONTRIBUTION_URI = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 14;
219
	public static final int PART_DESCRIPTOR__CONTRIBUTION_URI = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 11;
247
220
248
	/**
221
	/**
249
	 * The feature id for the '<em><b>Description</b></em>' attribute.
222
	 * The feature id for the '<em><b>Description</b></em>' attribute.
Lines 252-258 Link Here
252
	 * @generated
225
	 * @generated
253
	 * @ordered
226
	 * @ordered
254
	 */
227
	 */
255
	public static final int PART_DESCRIPTOR__DESCRIPTION = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 15;
228
	public static final int PART_DESCRIPTOR__DESCRIPTION = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 12;
256
229
257
	/**
230
	/**
258
	 * The number of structural features of the '<em>Part Descriptor</em>' class.
231
	 * The number of structural features of the '<em>Part Descriptor</em>' class.
Lines 261-267 Link Here
261
	 * @generated
234
	 * @generated
262
	 * @ordered
235
	 * @ordered
263
	 */
236
	 */
264
	public static final int PART_DESCRIPTOR_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 16;
237
	public static final int PART_DESCRIPTOR_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 13;
265
238
266
	/**
239
	/**
267
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer <em>Part Descriptor Container</em>}' class.
240
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptorContainer <em>Part Descriptor Container</em>}' class.
(-)src/org/eclipse/e4/ui/model/application/descriptor/basic/impl/PartDescriptorImpl.java (-168 / +16 lines)
Lines 42-50 Link Here
42
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLabel <em>Label</em>}</li>
42
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLabel <em>Label</em>}</li>
43
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getIconURI <em>Icon URI</em>}</li>
43
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getIconURI <em>Icon URI</em>}</li>
44
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getTooltip <em>Tooltip</em>}</li>
44
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getTooltip <em>Tooltip</em>}</li>
45
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalLabel <em>Local Label</em>}</li>
46
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
47
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getLocalImage <em>Local Image</em>}</li>
48
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getHandlers <em>Handlers</em>}</li>
45
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getHandlers <em>Handlers</em>}</li>
49
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getBindingContexts <em>Binding Contexts</em>}</li>
46
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#getBindingContexts <em>Binding Contexts</em>}</li>
50
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#isAllowMultiple <em>Allow Multiple</em>}</li>
47
 *   <li>{@link org.eclipse.e4.ui.model.application.descriptor.basic.impl.PartDescriptorImpl#isAllowMultiple <em>Allow Multiple</em>}</li>
Lines 122-187 Link Here
122
	protected String tooltip = TOOLTIP_EDEFAULT;
119
	protected String tooltip = TOOLTIP_EDEFAULT;
123
120
124
	/**
121
	/**
125
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
126
	 * <!-- begin-user-doc -->
127
	 * <!-- end-user-doc -->
128
	 * @see #getLocalLabel()
129
	 * @generated
130
	 * @ordered
131
	 */
132
	protected static final String LOCAL_LABEL_EDEFAULT = null;
133
134
	/**
135
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
136
	 * <!-- begin-user-doc -->
137
	 * <!-- end-user-doc -->
138
	 * @see #getLocalLabel()
139
	 * @generated
140
	 * @ordered
141
	 */
142
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
143
144
	/**
145
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
146
	 * <!-- begin-user-doc -->
147
	 * <!-- end-user-doc -->
148
	 * @see #getLocalTooltip()
149
	 * @generated
150
	 * @ordered
151
	 */
152
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
153
154
	/**
155
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @see #getLocalTooltip()
159
	 * @generated
160
	 * @ordered
161
	 */
162
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
163
164
	/**
165
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
166
	 * <!-- begin-user-doc -->
167
	 * <!-- end-user-doc -->
168
	 * @see #getLocalImage()
169
	 * @generated
170
	 * @ordered
171
	 */
172
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
173
174
	/**
175
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
176
	 * <!-- begin-user-doc -->
177
	 * <!-- end-user-doc -->
178
	 * @see #getLocalImage()
179
	 * @generated
180
	 * @ordered
181
	 */
182
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
183
184
	/**
185
	 * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list.
122
	 * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list.
186
	 * <!-- begin-user-doc -->
123
	 * <!-- begin-user-doc -->
187
	 * <!-- end-user-doc -->
124
	 * <!-- end-user-doc -->
Lines 428-496 Link Here
428
	 * <!-- end-user-doc -->
365
	 * <!-- end-user-doc -->
429
	 * @generated
366
	 * @generated
430
	 */
367
	 */
431
	public String getLocalLabel() {
432
		return localLabel;
433
	}
434
435
	/**
436
	 * <!-- begin-user-doc -->
437
	 * <!-- end-user-doc -->
438
	 * @generated
439
	 */
440
	public void setLocalLabel(String newLocalLabel) {
441
		String oldLocalLabel = localLabel;
442
		localLabel = newLocalLabel;
443
		if (eNotificationRequired())
444
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL, oldLocalLabel, localLabel));
445
	}
446
447
	/**
448
	 * <!-- begin-user-doc -->
449
	 * <!-- end-user-doc -->
450
	 * @generated
451
	 */
452
	public String getLocalTooltip() {
453
		return localTooltip;
454
	}
455
456
	/**
457
	 * <!-- begin-user-doc -->
458
	 * <!-- end-user-doc -->
459
	 * @generated
460
	 */
461
	public void setLocalTooltip(String newLocalTooltip) {
462
		String oldLocalTooltip = localTooltip;
463
		localTooltip = newLocalTooltip;
464
		if (eNotificationRequired())
465
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
466
	}
467
468
	/**
469
	 * <!-- begin-user-doc -->
470
	 * <!-- end-user-doc -->
471
	 * @generated
472
	 */
473
	public Object getLocalImage() {
474
		return localImage;
475
	}
476
477
	/**
478
	 * <!-- begin-user-doc -->
479
	 * <!-- end-user-doc -->
480
	 * @generated
481
	 */
482
	public void setLocalImage(Object newLocalImage) {
483
		Object oldLocalImage = localImage;
484
		localImage = newLocalImage;
485
		if (eNotificationRequired())
486
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE, oldLocalImage, localImage));
487
	}
488
489
	/**
490
	 * <!-- begin-user-doc -->
491
	 * <!-- end-user-doc -->
492
	 * @generated
493
	 */
494
	public List<MHandler> getHandlers() {
368
	public List<MHandler> getHandlers() {
495
		if (handlers == null) {
369
		if (handlers == null) {
496
			handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART_DESCRIPTOR__HANDLERS);
370
			handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART_DESCRIPTOR__HANDLERS);
Lines 694-699 Link Here
694
	/**
568
	/**
695
	 * <!-- begin-user-doc -->
569
	 * <!-- begin-user-doc -->
696
	 * <!-- end-user-doc -->
570
	 * <!-- end-user-doc -->
571
	 */
572
	public String getLocalizedLabel() {
573
		throw new UnsupportedOperationException("Please use LocalizationHelper");
574
	}
575
576
	/**
577
	 * <!-- begin-user-doc -->
578
	 * <!-- end-user-doc -->
579
	 */
580
	public String getLocalizedTooltip() {
581
		throw new UnsupportedOperationException("Please use LocalizationHelper");
582
	}
583
584
	/**
585
	 * <!-- begin-user-doc -->
586
	 * <!-- end-user-doc -->
697
	 * @generated
587
	 * @generated
698
	 */
588
	 */
699
	@Override
589
	@Override
Lines 723-734 Link Here
723
				return getIconURI();
613
				return getIconURI();
724
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
614
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
725
				return getTooltip();
615
				return getTooltip();
726
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL:
727
				return getLocalLabel();
728
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP:
729
				return getLocalTooltip();
730
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE:
731
				return getLocalImage();
732
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
616
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
733
				return getHandlers();
617
				return getHandlers();
734
			case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS:
618
			case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS:
Lines 771-785 Link Here
771
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
655
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
772
				setTooltip((String)newValue);
656
				setTooltip((String)newValue);
773
				return;
657
				return;
774
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL:
775
				setLocalLabel((String)newValue);
776
				return;
777
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP:
778
				setLocalTooltip((String)newValue);
779
				return;
780
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE:
781
				setLocalImage(newValue);
782
				return;
783
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
658
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
784
				getHandlers().clear();
659
				getHandlers().clear();
785
				getHandlers().addAll((Collection<? extends MHandler>)newValue);
660
				getHandlers().addAll((Collection<? extends MHandler>)newValue);
Lines 834-848 Link Here
834
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
709
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
835
				setTooltip(TOOLTIP_EDEFAULT);
710
				setTooltip(TOOLTIP_EDEFAULT);
836
				return;
711
				return;
837
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL:
838
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
839
				return;
840
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP:
841
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
842
				return;
843
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE:
844
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
845
				return;
846
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
712
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
847
				getHandlers().clear();
713
				getHandlers().clear();
848
				return;
714
				return;
Lines 891-902 Link Here
891
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
757
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
892
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
758
			case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP:
893
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
759
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
894
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL:
895
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
896
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP:
897
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
898
			case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE:
899
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
900
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
760
			case BasicPackageImpl.PART_DESCRIPTOR__HANDLERS:
901
				return handlers != null && !handlers.isEmpty();
761
				return handlers != null && !handlers.isEmpty();
902
			case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS:
762
			case BasicPackageImpl.PART_DESCRIPTOR__BINDING_CONTEXTS:
Lines 933-941 Link Here
933
				case BasicPackageImpl.PART_DESCRIPTOR__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
793
				case BasicPackageImpl.PART_DESCRIPTOR__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
934
				case BasicPackageImpl.PART_DESCRIPTOR__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
794
				case BasicPackageImpl.PART_DESCRIPTOR__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
935
				case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
795
				case BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
936
				case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
937
				case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
938
				case BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
939
				default: return -1;
796
				default: return -1;
940
			}
797
			}
941
		}
798
		}
Lines 966-974 Link Here
966
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART_DESCRIPTOR__LABEL;
823
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART_DESCRIPTOR__LABEL;
967
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART_DESCRIPTOR__ICON_URI;
824
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART_DESCRIPTOR__ICON_URI;
968
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP;
825
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART_DESCRIPTOR__TOOLTIP;
969
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_LABEL;
970
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_TOOLTIP;
971
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.PART_DESCRIPTOR__LOCAL_IMAGE;
972
				default: return -1;
826
				default: return -1;
973
			}
827
			}
974
		}
828
		}
Lines 1003-1014 Link Here
1003
		result.append(iconURI);
857
		result.append(iconURI);
1004
		result.append(", tooltip: "); //$NON-NLS-1$
858
		result.append(", tooltip: "); //$NON-NLS-1$
1005
		result.append(tooltip);
859
		result.append(tooltip);
1006
		result.append(", localLabel: "); //$NON-NLS-1$
1007
		result.append(localLabel);
1008
		result.append(", localTooltip: "); //$NON-NLS-1$
1009
		result.append(localTooltip);
1010
		result.append(", localImage: "); //$NON-NLS-1$
1011
		result.append(localImage);
1012
		result.append(", bindingContexts: "); //$NON-NLS-1$
860
		result.append(", bindingContexts: "); //$NON-NLS-1$
1013
		result.append(bindingContexts);
861
		result.append(bindingContexts);
1014
		result.append(", allowMultiple: "); //$NON-NLS-1$
862
		result.append(", allowMultiple: "); //$NON-NLS-1$
(-)src/org/eclipse/e4/ui/model/application/ui/MUILabel.java (-66 / +4 lines)
Lines 22-30 Link Here
22
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLabel <em>Label</em>}</li>
22
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLabel <em>Label</em>}</li>
23
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getIconURI <em>Icon URI</em>}</li>
23
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getIconURI <em>Icon URI</em>}</li>
24
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getTooltip <em>Tooltip</em>}</li>
24
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getTooltip <em>Tooltip</em>}</li>
25
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}</li>
26
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}</li>
27
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}</li>
28
 * </ul>
25
 * </ul>
29
 * </p>
26
 * </p>
30
 *
27
 *
Lines 108-185 Link Here
108
	void setTooltip(String value);
105
	void setTooltip(String value);
109
106
110
	/**
107
	/**
111
	 * Returns the value of the '<em><b>Local Label</b></em>' attribute.
112
	 * <!-- begin-user-doc -->
108
	 * <!-- begin-user-doc -->
113
	 * <p>
114
	 * If the meaning of the '<em>Local Label</em>' attribute isn't clear,
115
	 * there really should be more of a description here...
116
	 * </p>
117
	 * <!-- end-user-doc -->
118
	 * @return the value of the '<em>Local Label</em>' attribute.
119
	 * @see #setLocalLabel(String)
120
	 * @model transient="true"
121
	 * @generated
122
	 */
123
	String getLocalLabel();
124
125
	/**
126
	 * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}' attribute.
127
	 * <!-- begin-user-doc -->
128
	 * <!-- end-user-doc -->
129
	 * @param value the new value of the '<em>Local Label</em>' attribute.
130
	 * @see #getLocalLabel()
131
	 * @generated
132
	 */
133
	void setLocalLabel(String value);
134
135
	/**
136
	 * Returns the value of the '<em><b>Local Tooltip</b></em>' attribute.
137
	 * <!-- begin-user-doc -->
138
	 * <p>
139
	 * If the meaning of the '<em>Local Tooltip</em>' attribute isn't clear,
140
	 * there really should be more of a description here...
141
	 * </p>
142
	 * <!-- end-user-doc -->
143
	 * @return the value of the '<em>Local Tooltip</em>' attribute.
144
	 * @see #setLocalTooltip(String)
145
	 * @model transient="true"
146
	 * @generated
147
	 */
148
	String getLocalTooltip();
149
150
	/**
151
	 * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}' attribute.
152
	 * <!-- begin-user-doc -->
153
	 * <!-- end-user-doc -->
154
	 * @param value the new value of the '<em>Local Tooltip</em>' attribute.
155
	 * @see #getLocalTooltip()
156
	 * @generated
157
	 */
158
	void setLocalTooltip(String value);
159
160
	/**
161
	 * Returns the value of the '<em><b>Local Image</b></em>' attribute.
162
	 * <!-- begin-user-doc -->
163
	 * <p>
164
	 * If the meaning of the '<em>Local Image</em>' attribute isn't clear,
165
	 * there really should be more of a description here...
166
	 * </p>
167
	 * <!-- end-user-doc -->
109
	 * <!-- end-user-doc -->
168
	 * @return the value of the '<em>Local Image</em>' attribute.
110
	 * @model kind="operation"
169
	 * @see #setLocalImage(Object)
170
	 * @model transient="true"
171
	 * @generated
111
	 * @generated
172
	 */
112
	 */
173
	Object getLocalImage();
113
	String getLocalizedLabel();
174
114
175
	/**
115
	/**
176
	 * Sets the value of the '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}' attribute.
177
	 * <!-- begin-user-doc -->
116
	 * <!-- begin-user-doc -->
178
	 * <!-- end-user-doc -->
117
	 * <!-- end-user-doc -->
179
	 * @param value the new value of the '<em>Local Image</em>' attribute.
118
	 * @model kind="operation"
180
	 * @see #getLocalImage()
181
	 * @generated
119
	 * @generated
182
	 */
120
	 */
183
	void setLocalImage(Object value);
121
	String getLocalizedTooltip();
184
122
185
} // MUILabel
123
} // MUILabel
(-)src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AdvancedPackageImpl.java (-60 / +6 lines)
Lines 393-432 Link Here
393
	public static final int PERSPECTIVE__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2;
393
	public static final int PERSPECTIVE__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2;
394
394
395
	/**
395
	/**
396
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
397
	 * <!-- begin-user-doc -->
398
	 * <!-- end-user-doc -->
399
	 * @generated
400
	 * @ordered
401
	 */
402
	public static final int PERSPECTIVE__LOCAL_LABEL = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3;
403
404
	/**
405
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
406
	 * <!-- begin-user-doc -->
407
	 * <!-- end-user-doc -->
408
	 * @generated
409
	 * @ordered
410
	 */
411
	public static final int PERSPECTIVE__LOCAL_TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4;
412
413
	/**
414
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
415
	 * <!-- begin-user-doc -->
416
	 * <!-- end-user-doc -->
417
	 * @generated
418
	 * @ordered
419
	 */
420
	public static final int PERSPECTIVE__LOCAL_IMAGE = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5;
421
422
	/**
423
	 * The feature id for the '<em><b>Context</b></em>' attribute.
396
	 * The feature id for the '<em><b>Context</b></em>' attribute.
424
	 * <!-- begin-user-doc -->
397
	 * <!-- begin-user-doc -->
425
	 * <!-- end-user-doc -->
398
	 * <!-- end-user-doc -->
426
	 * @generated
399
	 * @generated
427
	 * @ordered
400
	 * @ordered
428
	 */
401
	 */
429
	public static final int PERSPECTIVE__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6;
402
	public static final int PERSPECTIVE__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3;
430
403
431
	/**
404
	/**
432
	 * The feature id for the '<em><b>Variables</b></em>' attribute list.
405
	 * The feature id for the '<em><b>Variables</b></em>' attribute list.
Lines 435-441 Link Here
435
	 * @generated
408
	 * @generated
436
	 * @ordered
409
	 * @ordered
437
	 */
410
	 */
438
	public static final int PERSPECTIVE__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7;
411
	public static final int PERSPECTIVE__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4;
439
412
440
	/**
413
	/**
441
	 * The feature id for the '<em><b>Properties</b></em>' map.
414
	 * The feature id for the '<em><b>Properties</b></em>' map.
Lines 444-450 Link Here
444
	 * @generated
417
	 * @generated
445
	 * @ordered
418
	 * @ordered
446
	 */
419
	 */
447
	public static final int PERSPECTIVE__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8;
420
	public static final int PERSPECTIVE__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5;
448
421
449
	/**
422
	/**
450
	 * The feature id for the '<em><b>Windows</b></em>' containment reference list.
423
	 * The feature id for the '<em><b>Windows</b></em>' containment reference list.
Lines 453-459 Link Here
453
	 * @generated
426
	 * @generated
454
	 * @ordered
427
	 * @ordered
455
	 */
428
	 */
456
	public static final int PERSPECTIVE__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9;
429
	public static final int PERSPECTIVE__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6;
457
430
458
	/**
431
	/**
459
	 * The number of structural features of the '<em>Perspective</em>' class.
432
	 * The number of structural features of the '<em>Perspective</em>' class.
Lines 462-468 Link Here
462
	 * @generated
435
	 * @generated
463
	 * @ordered
436
	 * @ordered
464
	 */
437
	 */
465
	public static final int PERSPECTIVE_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10;
438
	public static final int PERSPECTIVE_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7;
466
439
467
	/**
440
	/**
468
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl <em>Perspective Stack</em>}' class.
441
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveStackImpl <em>Perspective Stack</em>}' class.
Lines 800-839 Link Here
800
	public static final int AREA__TOOLTIP = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 2;
773
	public static final int AREA__TOOLTIP = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 2;
801
774
802
	/**
775
	/**
803
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
804
	 * <!-- begin-user-doc -->
805
	 * <!-- end-user-doc -->
806
	 * @generated
807
	 * @ordered
808
	 */
809
	public static final int AREA__LOCAL_LABEL = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 3;
810
811
	/**
812
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
813
	 * <!-- begin-user-doc -->
814
	 * <!-- end-user-doc -->
815
	 * @generated
816
	 * @ordered
817
	 */
818
	public static final int AREA__LOCAL_TOOLTIP = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 4;
819
820
	/**
821
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
822
	 * <!-- begin-user-doc -->
823
	 * <!-- end-user-doc -->
824
	 * @generated
825
	 * @ordered
826
	 */
827
	public static final int AREA__LOCAL_IMAGE = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 5;
828
829
	/**
830
	 * The number of structural features of the '<em>Area</em>' class.
776
	 * The number of structural features of the '<em>Area</em>' class.
831
	 * <!-- begin-user-doc -->
777
	 * <!-- begin-user-doc -->
832
	 * <!-- end-user-doc -->
778
	 * <!-- end-user-doc -->
833
	 * @generated
779
	 * @generated
834
	 * @ordered
780
	 * @ordered
835
	 */
781
	 */
836
	public static final int AREA_FEATURE_COUNT = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 6;
782
	public static final int AREA_FEATURE_COUNT = BasicPackageImpl.PART_SASH_CONTAINER_FEATURE_COUNT + 3;
837
783
838
	/**
784
	/**
839
	 * <!-- begin-user-doc -->
785
	 * <!-- begin-user-doc -->
(-)src/org/eclipse/e4/ui/model/application/ui/advanced/impl/AreaImpl.java (-156 / +5 lines)
Lines 10-15 Link Here
10
 */
10
 */
11
package org.eclipse.e4.ui.model.application.ui.advanced.impl;
11
package org.eclipse.e4.ui.model.application.ui.advanced.impl;
12
12
13
import org.eclipse.e4.ui.model.LocalizationHelper;
13
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.advanced.MArea;
15
import org.eclipse.e4.ui.model.application.ui.advanced.MArea;
15
import org.eclipse.e4.ui.model.application.ui.basic.impl.PartSashContainerImpl;
16
import org.eclipse.e4.ui.model.application.ui.basic.impl.PartSashContainerImpl;
Lines 28-36 Link Here
28
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLabel <em>Label</em>}</li>
29
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLabel <em>Label</em>}</li>
29
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getIconURI <em>Icon URI</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getIconURI <em>Icon URI</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getTooltip <em>Tooltip</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getTooltip <em>Tooltip</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalLabel <em>Local Label</em>}</li>
32
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
33
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.AreaImpl#getLocalImage <em>Local Image</em>}</li>
34
 * </ul>
32
 * </ul>
35
 * </p>
33
 * </p>
36
 *
34
 *
Lines 98-163 Link Here
98
	protected String tooltip = TOOLTIP_EDEFAULT;
96
	protected String tooltip = TOOLTIP_EDEFAULT;
99
97
100
	/**
98
	/**
101
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
102
	 * <!-- begin-user-doc -->
103
	 * <!-- end-user-doc -->
104
	 * @see #getLocalLabel()
105
	 * @generated
106
	 * @ordered
107
	 */
108
	protected static final String LOCAL_LABEL_EDEFAULT = null;
109
110
	/**
111
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
112
	 * <!-- begin-user-doc -->
113
	 * <!-- end-user-doc -->
114
	 * @see #getLocalLabel()
115
	 * @generated
116
	 * @ordered
117
	 */
118
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
119
120
	/**
121
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
122
	 * <!-- begin-user-doc -->
123
	 * <!-- end-user-doc -->
124
	 * @see #getLocalTooltip()
125
	 * @generated
126
	 * @ordered
127
	 */
128
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
129
130
	/**
131
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
132
	 * <!-- begin-user-doc -->
133
	 * <!-- end-user-doc -->
134
	 * @see #getLocalTooltip()
135
	 * @generated
136
	 * @ordered
137
	 */
138
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
139
140
	/**
141
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
142
	 * <!-- begin-user-doc -->
143
	 * <!-- end-user-doc -->
144
	 * @see #getLocalImage()
145
	 * @generated
146
	 * @ordered
147
	 */
148
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
149
150
	/**
151
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
152
	 * <!-- begin-user-doc -->
153
	 * <!-- end-user-doc -->
154
	 * @see #getLocalImage()
155
	 * @generated
156
	 * @ordered
157
	 */
158
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
159
160
	/**
161
	 * <!-- begin-user-doc -->
99
	 * <!-- begin-user-doc -->
162
	 * <!-- end-user-doc -->
100
	 * <!-- end-user-doc -->
163
	 * @generated
101
	 * @generated
Lines 242-305 Link Here
242
	/**
180
	/**
243
	 * <!-- begin-user-doc -->
181
	 * <!-- begin-user-doc -->
244
	 * <!-- end-user-doc -->
182
	 * <!-- end-user-doc -->
245
	 * @generated
246
	 */
247
	public String getLocalLabel() {
248
		return localLabel;
249
	}
250
251
	/**
252
	 * <!-- begin-user-doc -->
253
	 * <!-- end-user-doc -->
254
	 * @generated
255
	 */
256
	public void setLocalLabel(String newLocalLabel) {
257
		String oldLocalLabel = localLabel;
258
		localLabel = newLocalLabel;
259
		if (eNotificationRequired())
260
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_LABEL, oldLocalLabel, localLabel));
261
	}
262
263
	/**
264
	 * <!-- begin-user-doc -->
265
	 * <!-- end-user-doc -->
266
	 * @generated
267
	 */
268
	public String getLocalTooltip() {
269
		return localTooltip;
270
	}
271
272
	/**
273
	 * <!-- begin-user-doc -->
274
	 * <!-- end-user-doc -->
275
	 * @generated
276
	 */
277
	public void setLocalTooltip(String newLocalTooltip) {
278
		String oldLocalTooltip = localTooltip;
279
		localTooltip = newLocalTooltip;
280
		if (eNotificationRequired())
281
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
282
	}
283
284
	/**
285
	 * <!-- begin-user-doc -->
286
	 * <!-- end-user-doc -->
287
	 * @generated
288
	 */
183
	 */
289
	public Object getLocalImage() {
184
	public String getLocalizedLabel() {
290
		return localImage;
185
		return LocalizationHelper.getLocalizedLabel(this);
291
	}
186
	}
292
187
293
	/**
188
	/**
294
	 * <!-- begin-user-doc -->
189
	 * <!-- begin-user-doc -->
295
	 * <!-- end-user-doc -->
190
	 * <!-- end-user-doc -->
296
	 * @generated
297
	 */
191
	 */
298
	public void setLocalImage(Object newLocalImage) {
192
	public String getLocalizedTooltip() {
299
		Object oldLocalImage = localImage;
193
		return LocalizationHelper.getLocalizedTooltip(this);
300
		localImage = newLocalImage;
301
		if (eNotificationRequired())
302
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.AREA__LOCAL_IMAGE, oldLocalImage, localImage));
303
	}
194
	}
304
195
305
	/**
196
	/**
Lines 316-327 Link Here
316
				return getIconURI();
207
				return getIconURI();
317
			case AdvancedPackageImpl.AREA__TOOLTIP:
208
			case AdvancedPackageImpl.AREA__TOOLTIP:
318
				return getTooltip();
209
				return getTooltip();
319
			case AdvancedPackageImpl.AREA__LOCAL_LABEL:
320
				return getLocalLabel();
321
			case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP:
322
				return getLocalTooltip();
323
			case AdvancedPackageImpl.AREA__LOCAL_IMAGE:
324
				return getLocalImage();
325
		}
210
		}
326
		return super.eGet(featureID, resolve, coreType);
211
		return super.eGet(featureID, resolve, coreType);
327
	}
212
	}
Lines 343-357 Link Here
343
			case AdvancedPackageImpl.AREA__TOOLTIP:
228
			case AdvancedPackageImpl.AREA__TOOLTIP:
344
				setTooltip((String)newValue);
229
				setTooltip((String)newValue);
345
				return;
230
				return;
346
			case AdvancedPackageImpl.AREA__LOCAL_LABEL:
347
				setLocalLabel((String)newValue);
348
				return;
349
			case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP:
350
				setLocalTooltip((String)newValue);
351
				return;
352
			case AdvancedPackageImpl.AREA__LOCAL_IMAGE:
353
				setLocalImage(newValue);
354
				return;
355
		}
231
		}
356
		super.eSet(featureID, newValue);
232
		super.eSet(featureID, newValue);
357
	}
233
	}
Lines 373-387 Link Here
373
			case AdvancedPackageImpl.AREA__TOOLTIP:
249
			case AdvancedPackageImpl.AREA__TOOLTIP:
374
				setTooltip(TOOLTIP_EDEFAULT);
250
				setTooltip(TOOLTIP_EDEFAULT);
375
				return;
251
				return;
376
			case AdvancedPackageImpl.AREA__LOCAL_LABEL:
377
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
378
				return;
379
			case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP:
380
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
381
				return;
382
			case AdvancedPackageImpl.AREA__LOCAL_IMAGE:
383
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
384
				return;
385
		}
252
		}
386
		super.eUnset(featureID);
253
		super.eUnset(featureID);
387
	}
254
	}
Lines 400-411 Link Here
400
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
267
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
401
			case AdvancedPackageImpl.AREA__TOOLTIP:
268
			case AdvancedPackageImpl.AREA__TOOLTIP:
402
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
269
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
403
			case AdvancedPackageImpl.AREA__LOCAL_LABEL:
404
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
405
			case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP:
406
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
407
			case AdvancedPackageImpl.AREA__LOCAL_IMAGE:
408
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
409
		}
270
		}
410
		return super.eIsSet(featureID);
271
		return super.eIsSet(featureID);
411
	}
272
	}
Lines 422-430 Link Here
422
				case AdvancedPackageImpl.AREA__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
283
				case AdvancedPackageImpl.AREA__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
423
				case AdvancedPackageImpl.AREA__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
284
				case AdvancedPackageImpl.AREA__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
424
				case AdvancedPackageImpl.AREA__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
285
				case AdvancedPackageImpl.AREA__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
425
				case AdvancedPackageImpl.AREA__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
426
				case AdvancedPackageImpl.AREA__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
427
				case AdvancedPackageImpl.AREA__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
428
				default: return -1;
286
				default: return -1;
429
			}
287
			}
430
		}
288
		}
Lines 443-451 Link Here
443
				case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.AREA__LABEL;
301
				case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.AREA__LABEL;
444
				case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.AREA__ICON_URI;
302
				case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.AREA__ICON_URI;
445
				case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.AREA__TOOLTIP;
303
				case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.AREA__TOOLTIP;
446
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return AdvancedPackageImpl.AREA__LOCAL_LABEL;
447
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return AdvancedPackageImpl.AREA__LOCAL_TOOLTIP;
448
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return AdvancedPackageImpl.AREA__LOCAL_IMAGE;
449
				default: return -1;
304
				default: return -1;
450
			}
305
			}
451
		}
306
		}
Lines 468-479 Link Here
468
		result.append(iconURI);
323
		result.append(iconURI);
469
		result.append(", tooltip: "); //$NON-NLS-1$
324
		result.append(", tooltip: "); //$NON-NLS-1$
470
		result.append(tooltip);
325
		result.append(tooltip);
471
		result.append(", localLabel: "); //$NON-NLS-1$
472
		result.append(localLabel);
473
		result.append(", localTooltip: "); //$NON-NLS-1$
474
		result.append(localTooltip);
475
		result.append(", localImage: "); //$NON-NLS-1$
476
		result.append(localImage);
477
		result.append(')');
326
		result.append(')');
478
		return result.toString();
327
		return result.toString();
479
	}
328
	}
(-)src/org/eclipse/e4/ui/model/application/ui/advanced/impl/PerspectiveImpl.java (-168 / +17 lines)
Lines 14-19 Link Here
14
import java.util.List;
14
import java.util.List;
15
import java.util.Map;
15
import java.util.Map;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
17
import org.eclipse.e4.ui.model.LocalizationHelper;
17
import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
18
import org.eclipse.e4.ui.model.application.impl.ApplicationPackageImpl;
18
import org.eclipse.e4.ui.model.application.impl.StringToStringMapImpl;
19
import org.eclipse.e4.ui.model.application.impl.StringToStringMapImpl;
19
import org.eclipse.e4.ui.model.application.ui.MContext;
20
import org.eclipse.e4.ui.model.application.ui.MContext;
Lines 46-54 Link Here
46
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLabel <em>Label</em>}</li>
47
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLabel <em>Label</em>}</li>
47
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getIconURI <em>Icon URI</em>}</li>
48
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getIconURI <em>Icon URI</em>}</li>
48
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getTooltip <em>Tooltip</em>}</li>
49
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getTooltip <em>Tooltip</em>}</li>
49
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalLabel <em>Local Label</em>}</li>
50
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
51
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getLocalImage <em>Local Image</em>}</li>
52
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getContext <em>Context</em>}</li>
50
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getContext <em>Context</em>}</li>
53
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getVariables <em>Variables</em>}</li>
51
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getVariables <em>Variables</em>}</li>
54
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getProperties <em>Properties</em>}</li>
52
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.advanced.impl.PerspectiveImpl#getProperties <em>Properties</em>}</li>
Lines 120-185 Link Here
120
	protected String tooltip = TOOLTIP_EDEFAULT;
118
	protected String tooltip = TOOLTIP_EDEFAULT;
121
119
122
	/**
120
	/**
123
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
124
	 * <!-- begin-user-doc -->
125
	 * <!-- end-user-doc -->
126
	 * @see #getLocalLabel()
127
	 * @generated
128
	 * @ordered
129
	 */
130
	protected static final String LOCAL_LABEL_EDEFAULT = null;
131
132
	/**
133
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
134
	 * <!-- begin-user-doc -->
135
	 * <!-- end-user-doc -->
136
	 * @see #getLocalLabel()
137
	 * @generated
138
	 * @ordered
139
	 */
140
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
141
142
	/**
143
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
144
	 * <!-- begin-user-doc -->
145
	 * <!-- end-user-doc -->
146
	 * @see #getLocalTooltip()
147
	 * @generated
148
	 * @ordered
149
	 */
150
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
151
152
	/**
153
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
154
	 * <!-- begin-user-doc -->
155
	 * <!-- end-user-doc -->
156
	 * @see #getLocalTooltip()
157
	 * @generated
158
	 * @ordered
159
	 */
160
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
161
162
	/**
163
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
164
	 * <!-- begin-user-doc -->
165
	 * <!-- end-user-doc -->
166
	 * @see #getLocalImage()
167
	 * @generated
168
	 * @ordered
169
	 */
170
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
171
172
	/**
173
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
174
	 * <!-- begin-user-doc -->
175
	 * <!-- end-user-doc -->
176
	 * @see #getLocalImage()
177
	 * @generated
178
	 * @ordered
179
	 */
180
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
181
182
	/**
183
	 * The default value of the '{@link #getContext() <em>Context</em>}' attribute.
121
	 * The default value of the '{@link #getContext() <em>Context</em>}' attribute.
184
	 * <!-- begin-user-doc -->
122
	 * <!-- begin-user-doc -->
185
	 * <!-- end-user-doc -->
123
	 * <!-- end-user-doc -->
Lines 316-384 Link Here
316
	 * <!-- end-user-doc -->
254
	 * <!-- end-user-doc -->
317
	 * @generated
255
	 * @generated
318
	 */
256
	 */
319
	public String getLocalLabel() {
320
		return localLabel;
321
	}
322
323
	/**
324
	 * <!-- begin-user-doc -->
325
	 * <!-- end-user-doc -->
326
	 * @generated
327
	 */
328
	public void setLocalLabel(String newLocalLabel) {
329
		String oldLocalLabel = localLabel;
330
		localLabel = newLocalLabel;
331
		if (eNotificationRequired())
332
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL, oldLocalLabel, localLabel));
333
	}
334
335
	/**
336
	 * <!-- begin-user-doc -->
337
	 * <!-- end-user-doc -->
338
	 * @generated
339
	 */
340
	public String getLocalTooltip() {
341
		return localTooltip;
342
	}
343
344
	/**
345
	 * <!-- begin-user-doc -->
346
	 * <!-- end-user-doc -->
347
	 * @generated
348
	 */
349
	public void setLocalTooltip(String newLocalTooltip) {
350
		String oldLocalTooltip = localTooltip;
351
		localTooltip = newLocalTooltip;
352
		if (eNotificationRequired())
353
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
354
	}
355
356
	/**
357
	 * <!-- begin-user-doc -->
358
	 * <!-- end-user-doc -->
359
	 * @generated
360
	 */
361
	public Object getLocalImage() {
362
		return localImage;
363
	}
364
365
	/**
366
	 * <!-- begin-user-doc -->
367
	 * <!-- end-user-doc -->
368
	 * @generated
369
	 */
370
	public void setLocalImage(Object newLocalImage) {
371
		Object oldLocalImage = localImage;
372
		localImage = newLocalImage;
373
		if (eNotificationRequired())
374
			eNotify(new ENotificationImpl(this, Notification.SET, AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE, oldLocalImage, localImage));
375
	}
376
377
	/**
378
	 * <!-- begin-user-doc -->
379
	 * <!-- end-user-doc -->
380
	 * @generated
381
	 */
382
	public IEclipseContext getContext() {
257
	public IEclipseContext getContext() {
383
		return context;
258
		return context;
384
	}
259
	}
Lines 434-439 Link Here
434
	/**
309
	/**
435
	 * <!-- begin-user-doc -->
310
	 * <!-- begin-user-doc -->
436
	 * <!-- end-user-doc -->
311
	 * <!-- end-user-doc -->
312
	 */
313
	public String getLocalizedLabel() {
314
		return LocalizationHelper.getLocalizedLabel(this);		
315
	}
316
317
	/**
318
	 * <!-- begin-user-doc -->
319
	 * <!-- end-user-doc -->
320
	 */
321
	public String getLocalizedTooltip() {
322
		return LocalizationHelper.getLocalizedTooltip(this);
323
	}
324
325
	/**
326
	 * <!-- begin-user-doc -->
327
	 * <!-- end-user-doc -->
437
	 * @generated
328
	 * @generated
438
	 */
329
	 */
439
	@Override
330
	@Override
Lines 461-472 Link Here
461
				return getIconURI();
352
				return getIconURI();
462
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
353
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
463
				return getTooltip();
354
				return getTooltip();
464
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL:
465
				return getLocalLabel();
466
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP:
467
				return getLocalTooltip();
468
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE:
469
				return getLocalImage();
470
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
355
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
471
				return getContext();
356
				return getContext();
472
			case AdvancedPackageImpl.PERSPECTIVE__VARIABLES:
357
			case AdvancedPackageImpl.PERSPECTIVE__VARIABLES:
Lines 498-512 Link Here
498
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
383
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
499
				setTooltip((String)newValue);
384
				setTooltip((String)newValue);
500
				return;
385
				return;
501
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL:
502
				setLocalLabel((String)newValue);
503
				return;
504
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP:
505
				setLocalTooltip((String)newValue);
506
				return;
507
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE:
508
				setLocalImage(newValue);
509
				return;
510
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
386
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
511
				setContext((IEclipseContext)newValue);
387
				setContext((IEclipseContext)newValue);
512
				return;
388
				return;
Lines 542-556 Link Here
542
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
418
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
543
				setTooltip(TOOLTIP_EDEFAULT);
419
				setTooltip(TOOLTIP_EDEFAULT);
544
				return;
420
				return;
545
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL:
546
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
547
				return;
548
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP:
549
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
550
				return;
551
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE:
552
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
553
				return;
554
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
421
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
555
				setContext(CONTEXT_EDEFAULT);
422
				setContext(CONTEXT_EDEFAULT);
556
				return;
423
				return;
Lines 581-592 Link Here
581
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
448
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
582
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
449
			case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP:
583
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
450
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
584
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL:
585
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
586
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP:
587
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
588
			case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE:
589
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
590
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
451
			case AdvancedPackageImpl.PERSPECTIVE__CONTEXT:
591
				return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
452
				return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
592
			case AdvancedPackageImpl.PERSPECTIVE__VARIABLES:
453
			case AdvancedPackageImpl.PERSPECTIVE__VARIABLES:
Lines 611-619 Link Here
611
				case AdvancedPackageImpl.PERSPECTIVE__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
472
				case AdvancedPackageImpl.PERSPECTIVE__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
612
				case AdvancedPackageImpl.PERSPECTIVE__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
473
				case AdvancedPackageImpl.PERSPECTIVE__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
613
				case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
474
				case AdvancedPackageImpl.PERSPECTIVE__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
614
				case AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
615
				case AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
616
				case AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
617
				default: return -1;
475
				default: return -1;
618
			}
476
			}
619
		}
477
		}
Lines 640-648 Link Here
640
				case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.PERSPECTIVE__LABEL;
498
				case UiPackageImpl.UI_LABEL__LABEL: return AdvancedPackageImpl.PERSPECTIVE__LABEL;
641
				case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.PERSPECTIVE__ICON_URI;
499
				case UiPackageImpl.UI_LABEL__ICON_URI: return AdvancedPackageImpl.PERSPECTIVE__ICON_URI;
642
				case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.PERSPECTIVE__TOOLTIP;
500
				case UiPackageImpl.UI_LABEL__TOOLTIP: return AdvancedPackageImpl.PERSPECTIVE__TOOLTIP;
643
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_LABEL;
644
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_TOOLTIP;
645
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return AdvancedPackageImpl.PERSPECTIVE__LOCAL_IMAGE;
646
				default: return -1;
501
				default: return -1;
647
			}
502
			}
648
		}
503
		}
Lines 673-684 Link Here
673
		result.append(iconURI);
528
		result.append(iconURI);
674
		result.append(", tooltip: "); //$NON-NLS-1$
529
		result.append(", tooltip: "); //$NON-NLS-1$
675
		result.append(tooltip);
530
		result.append(tooltip);
676
		result.append(", localLabel: "); //$NON-NLS-1$
677
		result.append(localLabel);
678
		result.append(", localTooltip: "); //$NON-NLS-1$
679
		result.append(localTooltip);
680
		result.append(", localImage: "); //$NON-NLS-1$
681
		result.append(localImage);
682
		result.append(", context: "); //$NON-NLS-1$
531
		result.append(", context: "); //$NON-NLS-1$
683
		result.append(context);
532
		result.append(context);
684
		result.append(", variables: "); //$NON-NLS-1$
533
		result.append(", variables: "); //$NON-NLS-1$
(-)src/org/eclipse/e4/ui/model/application/ui/basic/impl/BasicPackageImpl.java (-129 / +21 lines)
Lines 392-431 Link Here
392
	public static final int PART__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 8;
392
	public static final int PART__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 8;
393
393
394
	/**
394
	/**
395
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
396
	 * <!-- begin-user-doc -->
397
	 * <!-- end-user-doc -->
398
	 * @generated
399
	 * @ordered
400
	 */
401
	public static final int PART__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9;
402
403
	/**
404
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
405
	 * <!-- begin-user-doc -->
406
	 * <!-- end-user-doc -->
407
	 * @generated
408
	 * @ordered
409
	 */
410
	public static final int PART__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 10;
411
412
	/**
413
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
414
	 * <!-- begin-user-doc -->
415
	 * <!-- end-user-doc -->
416
	 * @generated
417
	 * @ordered
418
	 */
419
	public static final int PART__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 11;
420
421
	/**
422
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
395
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
423
	 * <!-- begin-user-doc -->
396
	 * <!-- begin-user-doc -->
424
	 * <!-- end-user-doc -->
397
	 * <!-- end-user-doc -->
425
	 * @generated
398
	 * @generated
426
	 * @ordered
399
	 * @ordered
427
	 */
400
	 */
428
	public static final int PART__HANDLERS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 12;
401
	public static final int PART__HANDLERS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9;
429
402
430
	/**
403
	/**
431
	 * The feature id for the '<em><b>Dirty</b></em>' attribute.
404
	 * The feature id for the '<em><b>Dirty</b></em>' attribute.
Lines 434-440 Link Here
434
	 * @generated
407
	 * @generated
435
	 * @ordered
408
	 * @ordered
436
	 */
409
	 */
437
	public static final int PART__DIRTY = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 13;
410
	public static final int PART__DIRTY = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 10;
438
411
439
	/**
412
	/**
440
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
413
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
Lines 443-449 Link Here
443
	 * @generated
416
	 * @generated
444
	 * @ordered
417
	 * @ordered
445
	 */
418
	 */
446
	public static final int PART__BINDING_CONTEXTS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 14;
419
	public static final int PART__BINDING_CONTEXTS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 11;
447
420
448
	/**
421
	/**
449
	 * The feature id for the '<em><b>Menus</b></em>' containment reference list.
422
	 * The feature id for the '<em><b>Menus</b></em>' containment reference list.
Lines 452-458 Link Here
452
	 * @generated
425
	 * @generated
453
	 * @ordered
426
	 * @ordered
454
	 */
427
	 */
455
	public static final int PART__MENUS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 15;
428
	public static final int PART__MENUS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 12;
456
429
457
	/**
430
	/**
458
	 * The feature id for the '<em><b>Toolbar</b></em>' containment reference.
431
	 * The feature id for the '<em><b>Toolbar</b></em>' containment reference.
Lines 461-467 Link Here
461
	 * @generated
434
	 * @generated
462
	 * @ordered
435
	 * @ordered
463
	 */
436
	 */
464
	public static final int PART__TOOLBAR = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 16;
437
	public static final int PART__TOOLBAR = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 13;
465
438
466
	/**
439
	/**
467
	 * The feature id for the '<em><b>Closeable</b></em>' attribute.
440
	 * The feature id for the '<em><b>Closeable</b></em>' attribute.
Lines 470-476 Link Here
470
	 * @generated
443
	 * @generated
471
	 * @ordered
444
	 * @ordered
472
	 */
445
	 */
473
	public static final int PART__CLOSEABLE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 17;
446
	public static final int PART__CLOSEABLE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 14;
474
447
475
	/**
448
	/**
476
	 * The feature id for the '<em><b>Description</b></em>' attribute.
449
	 * The feature id for the '<em><b>Description</b></em>' attribute.
Lines 479-485 Link Here
479
	 * @generated
452
	 * @generated
480
	 * @ordered
453
	 * @ordered
481
	 */
454
	 */
482
	public static final int PART__DESCRIPTION = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 18;
455
	public static final int PART__DESCRIPTION = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 15;
483
456
484
	/**
457
	/**
485
	 * The number of structural features of the '<em>Part</em>' class.
458
	 * The number of structural features of the '<em>Part</em>' class.
Lines 488-494 Link Here
488
	 * @generated
461
	 * @generated
489
	 * @ordered
462
	 * @ordered
490
	 */
463
	 */
491
	public static final int PART_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 19;
464
	public static final int PART_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 16;
492
465
493
	/**
466
	/**
494
	 * The feature id for the '<em><b>Element Id</b></em>' attribute.
467
	 * The feature id for the '<em><b>Element Id</b></em>' attribute.
Lines 689-721 Link Here
689
	public static final int INPUT_PART__TOOLTIP = PART__TOOLTIP;
662
	public static final int INPUT_PART__TOOLTIP = PART__TOOLTIP;
690
663
691
	/**
664
	/**
692
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
693
	 * <!-- begin-user-doc -->
694
	 * <!-- end-user-doc -->
695
	 * @generated
696
	 * @ordered
697
	 */
698
	public static final int INPUT_PART__LOCAL_LABEL = PART__LOCAL_LABEL;
699
700
	/**
701
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
702
	 * <!-- begin-user-doc -->
703
	 * <!-- end-user-doc -->
704
	 * @generated
705
	 * @ordered
706
	 */
707
	public static final int INPUT_PART__LOCAL_TOOLTIP = PART__LOCAL_TOOLTIP;
708
709
	/**
710
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
711
	 * <!-- begin-user-doc -->
712
	 * <!-- end-user-doc -->
713
	 * @generated
714
	 * @ordered
715
	 */
716
	public static final int INPUT_PART__LOCAL_IMAGE = PART__LOCAL_IMAGE;
717
718
	/**
719
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
665
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
720
	 * <!-- begin-user-doc -->
666
	 * <!-- begin-user-doc -->
721
	 * <!-- end-user-doc -->
667
	 * <!-- end-user-doc -->
Lines 1256-1295 Link Here
1256
	public static final int WINDOW__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2;
1202
	public static final int WINDOW__TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 2;
1257
1203
1258
	/**
1204
	/**
1259
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1260
	 * <!-- begin-user-doc -->
1261
	 * <!-- end-user-doc -->
1262
	 * @generated
1263
	 * @ordered
1264
	 */
1265
	public static final int WINDOW__LOCAL_LABEL = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3;
1266
1267
	/**
1268
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
1269
	 * <!-- begin-user-doc -->
1270
	 * <!-- end-user-doc -->
1271
	 * @generated
1272
	 * @ordered
1273
	 */
1274
	public static final int WINDOW__LOCAL_TOOLTIP = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4;
1275
1276
	/**
1277
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
1278
	 * <!-- begin-user-doc -->
1279
	 * <!-- end-user-doc -->
1280
	 * @generated
1281
	 * @ordered
1282
	 */
1283
	public static final int WINDOW__LOCAL_IMAGE = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5;
1284
1285
	/**
1286
	 * The feature id for the '<em><b>Context</b></em>' attribute.
1205
	 * The feature id for the '<em><b>Context</b></em>' attribute.
1287
	 * <!-- begin-user-doc -->
1206
	 * <!-- begin-user-doc -->
1288
	 * <!-- end-user-doc -->
1207
	 * <!-- end-user-doc -->
1289
	 * @generated
1208
	 * @generated
1290
	 * @ordered
1209
	 * @ordered
1291
	 */
1210
	 */
1292
	public static final int WINDOW__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6;
1211
	public static final int WINDOW__CONTEXT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 3;
1293
1212
1294
	/**
1213
	/**
1295
	 * The feature id for the '<em><b>Variables</b></em>' attribute list.
1214
	 * The feature id for the '<em><b>Variables</b></em>' attribute list.
Lines 1298-1304 Link Here
1298
	 * @generated
1217
	 * @generated
1299
	 * @ordered
1218
	 * @ordered
1300
	 */
1219
	 */
1301
	public static final int WINDOW__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7;
1220
	public static final int WINDOW__VARIABLES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 4;
1302
1221
1303
	/**
1222
	/**
1304
	 * The feature id for the '<em><b>Properties</b></em>' map.
1223
	 * The feature id for the '<em><b>Properties</b></em>' map.
Lines 1307-1313 Link Here
1307
	 * @generated
1226
	 * @generated
1308
	 * @ordered
1227
	 * @ordered
1309
	 */
1228
	 */
1310
	public static final int WINDOW__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8;
1229
	public static final int WINDOW__PROPERTIES = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 5;
1311
1230
1312
	/**
1231
	/**
1313
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
1232
	 * The feature id for the '<em><b>Handlers</b></em>' containment reference list.
Lines 1316-1322 Link Here
1316
	 * @generated
1235
	 * @generated
1317
	 * @ordered
1236
	 * @ordered
1318
	 */
1237
	 */
1319
	public static final int WINDOW__HANDLERS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9;
1238
	public static final int WINDOW__HANDLERS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 6;
1320
1239
1321
	/**
1240
	/**
1322
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
1241
	 * The feature id for the '<em><b>Binding Contexts</b></em>' attribute list.
Lines 1325-1331 Link Here
1325
	 * @generated
1244
	 * @generated
1326
	 * @ordered
1245
	 * @ordered
1327
	 */
1246
	 */
1328
	public static final int WINDOW__BINDING_CONTEXTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10;
1247
	public static final int WINDOW__BINDING_CONTEXTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 7;
1329
1248
1330
	/**
1249
	/**
1331
	 * The feature id for the '<em><b>Main Menu</b></em>' containment reference.
1250
	 * The feature id for the '<em><b>Main Menu</b></em>' containment reference.
Lines 1334-1340 Link Here
1334
	 * @generated
1253
	 * @generated
1335
	 * @ordered
1254
	 * @ordered
1336
	 */
1255
	 */
1337
	public static final int WINDOW__MAIN_MENU = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 11;
1256
	public static final int WINDOW__MAIN_MENU = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 8;
1338
1257
1339
	/**
1258
	/**
1340
	 * The feature id for the '<em><b>X</b></em>' attribute.
1259
	 * The feature id for the '<em><b>X</b></em>' attribute.
Lines 1343-1349 Link Here
1343
	 * @generated
1262
	 * @generated
1344
	 * @ordered
1263
	 * @ordered
1345
	 */
1264
	 */
1346
	public static final int WINDOW__X = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 12;
1265
	public static final int WINDOW__X = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 9;
1347
1266
1348
	/**
1267
	/**
1349
	 * The feature id for the '<em><b>Y</b></em>' attribute.
1268
	 * The feature id for the '<em><b>Y</b></em>' attribute.
Lines 1352-1358 Link Here
1352
	 * @generated
1271
	 * @generated
1353
	 * @ordered
1272
	 * @ordered
1354
	 */
1273
	 */
1355
	public static final int WINDOW__Y = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 13;
1274
	public static final int WINDOW__Y = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 10;
1356
1275
1357
	/**
1276
	/**
1358
	 * The feature id for the '<em><b>Width</b></em>' attribute.
1277
	 * The feature id for the '<em><b>Width</b></em>' attribute.
Lines 1361-1367 Link Here
1361
	 * @generated
1280
	 * @generated
1362
	 * @ordered
1281
	 * @ordered
1363
	 */
1282
	 */
1364
	public static final int WINDOW__WIDTH = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 14;
1283
	public static final int WINDOW__WIDTH = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 11;
1365
1284
1366
	/**
1285
	/**
1367
	 * The feature id for the '<em><b>Height</b></em>' attribute.
1286
	 * The feature id for the '<em><b>Height</b></em>' attribute.
Lines 1370-1376 Link Here
1370
	 * @generated
1289
	 * @generated
1371
	 * @ordered
1290
	 * @ordered
1372
	 */
1291
	 */
1373
	public static final int WINDOW__HEIGHT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 15;
1292
	public static final int WINDOW__HEIGHT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 12;
1374
1293
1375
	/**
1294
	/**
1376
	 * The feature id for the '<em><b>Windows</b></em>' containment reference list.
1295
	 * The feature id for the '<em><b>Windows</b></em>' containment reference list.
Lines 1379-1385 Link Here
1379
	 * @generated
1298
	 * @generated
1380
	 * @ordered
1299
	 * @ordered
1381
	 */
1300
	 */
1382
	public static final int WINDOW__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 16;
1301
	public static final int WINDOW__WINDOWS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 13;
1383
1302
1384
	/**
1303
	/**
1385
	 * The feature id for the '<em><b>Shared Elements</b></em>' containment reference list.
1304
	 * The feature id for the '<em><b>Shared Elements</b></em>' containment reference list.
Lines 1388-1394 Link Here
1388
	 * @generated
1307
	 * @generated
1389
	 * @ordered
1308
	 * @ordered
1390
	 */
1309
	 */
1391
	public static final int WINDOW__SHARED_ELEMENTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 17;
1310
	public static final int WINDOW__SHARED_ELEMENTS = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 14;
1392
1311
1393
	/**
1312
	/**
1394
	 * The number of structural features of the '<em>Window</em>' class.
1313
	 * The number of structural features of the '<em>Window</em>' class.
Lines 1397-1403 Link Here
1397
	 * @generated
1316
	 * @generated
1398
	 * @ordered
1317
	 * @ordered
1399
	 */
1318
	 */
1400
	public static final int WINDOW_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 18;
1319
	public static final int WINDOW_FEATURE_COUNT = UiPackageImpl.ELEMENT_CONTAINER_FEATURE_COUNT + 15;
1401
1320
1402
	/**
1321
	/**
1403
	 * The feature id for the '<em><b>Element Id</b></em>' attribute.
1322
	 * The feature id for the '<em><b>Element Id</b></em>' attribute.
Lines 1562-1594 Link Here
1562
	public static final int TRIMMED_WINDOW__TOOLTIP = WINDOW__TOOLTIP;
1481
	public static final int TRIMMED_WINDOW__TOOLTIP = WINDOW__TOOLTIP;
1563
1482
1564
	/**
1483
	/**
1565
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1566
	 * <!-- begin-user-doc -->
1567
	 * <!-- end-user-doc -->
1568
	 * @generated
1569
	 * @ordered
1570
	 */
1571
	public static final int TRIMMED_WINDOW__LOCAL_LABEL = WINDOW__LOCAL_LABEL;
1572
1573
	/**
1574
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
1575
	 * <!-- begin-user-doc -->
1576
	 * <!-- end-user-doc -->
1577
	 * @generated
1578
	 * @ordered
1579
	 */
1580
	public static final int TRIMMED_WINDOW__LOCAL_TOOLTIP = WINDOW__LOCAL_TOOLTIP;
1581
1582
	/**
1583
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
1584
	 * <!-- begin-user-doc -->
1585
	 * <!-- end-user-doc -->
1586
	 * @generated
1587
	 * @ordered
1588
	 */
1589
	public static final int TRIMMED_WINDOW__LOCAL_IMAGE = WINDOW__LOCAL_IMAGE;
1590
1591
	/**
1592
	 * The feature id for the '<em><b>Context</b></em>' attribute.
1484
	 * The feature id for the '<em><b>Context</b></em>' attribute.
1593
	 * <!-- begin-user-doc -->
1485
	 * <!-- begin-user-doc -->
1594
	 * <!-- end-user-doc -->
1486
	 * <!-- end-user-doc -->
(-)src/org/eclipse/e4/ui/model/application/ui/basic/impl/PartImpl.java (-168 / +17 lines)
Lines 14-19 Link Here
14
import java.util.List;
14
import java.util.List;
15
import java.util.Map;
15
import java.util.Map;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
17
import org.eclipse.e4.ui.model.LocalizationHelper;
17
import org.eclipse.e4.ui.model.application.MContribution;
18
import org.eclipse.e4.ui.model.application.MContribution;
18
import org.eclipse.e4.ui.model.application.commands.MBindings;
19
import org.eclipse.e4.ui.model.application.commands.MBindings;
19
import org.eclipse.e4.ui.model.application.commands.MHandler;
20
import org.eclipse.e4.ui.model.application.commands.MHandler;
Lines 61-69 Link Here
61
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLabel <em>Label</em>}</li>
62
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLabel <em>Label</em>}</li>
62
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getIconURI <em>Icon URI</em>}</li>
63
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getIconURI <em>Icon URI</em>}</li>
63
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getTooltip <em>Tooltip</em>}</li>
64
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getTooltip <em>Tooltip</em>}</li>
64
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalLabel <em>Local Label</em>}</li>
65
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
66
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getLocalImage <em>Local Image</em>}</li>
67
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getHandlers <em>Handlers</em>}</li>
65
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getHandlers <em>Handlers</em>}</li>
68
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#isDirty <em>Dirty</em>}</li>
66
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#isDirty <em>Dirty</em>}</li>
69
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getBindingContexts <em>Binding Contexts</em>}</li>
67
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.PartImpl#getBindingContexts <em>Binding Contexts</em>}</li>
Lines 228-293 Link Here
228
	protected String tooltip = TOOLTIP_EDEFAULT;
226
	protected String tooltip = TOOLTIP_EDEFAULT;
229
227
230
	/**
228
	/**
231
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
232
	 * <!-- begin-user-doc -->
233
	 * <!-- end-user-doc -->
234
	 * @see #getLocalLabel()
235
	 * @generated
236
	 * @ordered
237
	 */
238
	protected static final String LOCAL_LABEL_EDEFAULT = null;
239
240
	/**
241
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
242
	 * <!-- begin-user-doc -->
243
	 * <!-- end-user-doc -->
244
	 * @see #getLocalLabel()
245
	 * @generated
246
	 * @ordered
247
	 */
248
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
249
250
	/**
251
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
252
	 * <!-- begin-user-doc -->
253
	 * <!-- end-user-doc -->
254
	 * @see #getLocalTooltip()
255
	 * @generated
256
	 * @ordered
257
	 */
258
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
259
260
	/**
261
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
262
	 * <!-- begin-user-doc -->
263
	 * <!-- end-user-doc -->
264
	 * @see #getLocalTooltip()
265
	 * @generated
266
	 * @ordered
267
	 */
268
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
269
270
	/**
271
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
272
	 * <!-- begin-user-doc -->
273
	 * <!-- end-user-doc -->
274
	 * @see #getLocalImage()
275
	 * @generated
276
	 * @ordered
277
	 */
278
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
279
280
	/**
281
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
282
	 * <!-- begin-user-doc -->
283
	 * <!-- end-user-doc -->
284
	 * @see #getLocalImage()
285
	 * @generated
286
	 * @ordered
287
	 */
288
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
289
290
	/**
291
	 * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list.
229
	 * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' containment reference list.
292
	 * <!-- begin-user-doc -->
230
	 * <!-- begin-user-doc -->
293
	 * <!-- end-user-doc -->
231
	 * <!-- end-user-doc -->
Lines 573-641 Link Here
573
	 * <!-- end-user-doc -->
511
	 * <!-- end-user-doc -->
574
	 * @generated
512
	 * @generated
575
	 */
513
	 */
576
	public String getLocalLabel() {
577
		return localLabel;
578
	}
579
580
	/**
581
	 * <!-- begin-user-doc -->
582
	 * <!-- end-user-doc -->
583
	 * @generated
584
	 */
585
	public void setLocalLabel(String newLocalLabel) {
586
		String oldLocalLabel = localLabel;
587
		localLabel = newLocalLabel;
588
		if (eNotificationRequired())
589
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_LABEL, oldLocalLabel, localLabel));
590
	}
591
592
	/**
593
	 * <!-- begin-user-doc -->
594
	 * <!-- end-user-doc -->
595
	 * @generated
596
	 */
597
	public String getLocalTooltip() {
598
		return localTooltip;
599
	}
600
601
	/**
602
	 * <!-- begin-user-doc -->
603
	 * <!-- end-user-doc -->
604
	 * @generated
605
	 */
606
	public void setLocalTooltip(String newLocalTooltip) {
607
		String oldLocalTooltip = localTooltip;
608
		localTooltip = newLocalTooltip;
609
		if (eNotificationRequired())
610
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
611
	}
612
613
	/**
614
	 * <!-- begin-user-doc -->
615
	 * <!-- end-user-doc -->
616
	 * @generated
617
	 */
618
	public Object getLocalImage() {
619
		return localImage;
620
	}
621
622
	/**
623
	 * <!-- begin-user-doc -->
624
	 * <!-- end-user-doc -->
625
	 * @generated
626
	 */
627
	public void setLocalImage(Object newLocalImage) {
628
		Object oldLocalImage = localImage;
629
		localImage = newLocalImage;
630
		if (eNotificationRequired())
631
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.PART__LOCAL_IMAGE, oldLocalImage, localImage));
632
	}
633
634
	/**
635
	 * <!-- begin-user-doc -->
636
	 * <!-- end-user-doc -->
637
	 * @generated
638
	 */
639
	public List<MHandler> getHandlers() {
514
	public List<MHandler> getHandlers() {
640
		if (handlers == null) {
515
		if (handlers == null) {
641
			handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART__HANDLERS);
516
			handlers = new EObjectContainmentEList<MHandler>(MHandler.class, this, BasicPackageImpl.PART__HANDLERS);
Lines 776-781 Link Here
776
	/**
651
	/**
777
	 * <!-- begin-user-doc -->
652
	 * <!-- begin-user-doc -->
778
	 * <!-- end-user-doc -->
653
	 * <!-- end-user-doc -->
654
	 */
655
	public String getLocalizedLabel() {
656
		return LocalizationHelper.getLocalizedLabel(this);		
657
	}
658
659
	/**
660
	 * <!-- begin-user-doc -->
661
	 * <!-- end-user-doc -->
662
	 */
663
	public String getLocalizedTooltip() {
664
		return LocalizationHelper.getLocalizedTooltip(this);
665
	}
666
667
	/**
668
	 * <!-- begin-user-doc -->
669
	 * <!-- end-user-doc -->
779
	 * @generated
670
	 * @generated
780
	 */
671
	 */
781
	@Override
672
	@Override
Lines 823-834 Link Here
823
				return getIconURI();
714
				return getIconURI();
824
			case BasicPackageImpl.PART__TOOLTIP:
715
			case BasicPackageImpl.PART__TOOLTIP:
825
				return getTooltip();
716
				return getTooltip();
826
			case BasicPackageImpl.PART__LOCAL_LABEL:
827
				return getLocalLabel();
828
			case BasicPackageImpl.PART__LOCAL_TOOLTIP:
829
				return getLocalTooltip();
830
			case BasicPackageImpl.PART__LOCAL_IMAGE:
831
				return getLocalImage();
832
			case BasicPackageImpl.PART__HANDLERS:
717
			case BasicPackageImpl.PART__HANDLERS:
833
				return getHandlers();
718
				return getHandlers();
834
			case BasicPackageImpl.PART__DIRTY:
719
			case BasicPackageImpl.PART__DIRTY:
Lines 884-898 Link Here
884
			case BasicPackageImpl.PART__TOOLTIP:
769
			case BasicPackageImpl.PART__TOOLTIP:
885
				setTooltip((String)newValue);
770
				setTooltip((String)newValue);
886
				return;
771
				return;
887
			case BasicPackageImpl.PART__LOCAL_LABEL:
888
				setLocalLabel((String)newValue);
889
				return;
890
			case BasicPackageImpl.PART__LOCAL_TOOLTIP:
891
				setLocalTooltip((String)newValue);
892
				return;
893
			case BasicPackageImpl.PART__LOCAL_IMAGE:
894
				setLocalImage(newValue);
895
				return;
896
			case BasicPackageImpl.PART__HANDLERS:
772
			case BasicPackageImpl.PART__HANDLERS:
897
				getHandlers().clear();
773
				getHandlers().clear();
898
				getHandlers().addAll((Collection<? extends MHandler>)newValue);
774
				getHandlers().addAll((Collection<? extends MHandler>)newValue);
Lines 956-970 Link Here
956
			case BasicPackageImpl.PART__TOOLTIP:
832
			case BasicPackageImpl.PART__TOOLTIP:
957
				setTooltip(TOOLTIP_EDEFAULT);
833
				setTooltip(TOOLTIP_EDEFAULT);
958
				return;
834
				return;
959
			case BasicPackageImpl.PART__LOCAL_LABEL:
960
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
961
				return;
962
			case BasicPackageImpl.PART__LOCAL_TOOLTIP:
963
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
964
				return;
965
			case BasicPackageImpl.PART__LOCAL_IMAGE:
966
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
967
				return;
968
			case BasicPackageImpl.PART__HANDLERS:
835
			case BasicPackageImpl.PART__HANDLERS:
969
				getHandlers().clear();
836
				getHandlers().clear();
970
				return;
837
				return;
Lines 1016-1027 Link Here
1016
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
883
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
1017
			case BasicPackageImpl.PART__TOOLTIP:
884
			case BasicPackageImpl.PART__TOOLTIP:
1018
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
885
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
1019
			case BasicPackageImpl.PART__LOCAL_LABEL:
1020
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
1021
			case BasicPackageImpl.PART__LOCAL_TOOLTIP:
1022
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
1023
			case BasicPackageImpl.PART__LOCAL_IMAGE:
1024
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
1025
			case BasicPackageImpl.PART__HANDLERS:
886
			case BasicPackageImpl.PART__HANDLERS:
1026
				return handlers != null && !handlers.isEmpty();
887
				return handlers != null && !handlers.isEmpty();
1027
			case BasicPackageImpl.PART__DIRTY:
888
			case BasicPackageImpl.PART__DIRTY:
Lines 1078-1086 Link Here
1078
				case BasicPackageImpl.PART__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
939
				case BasicPackageImpl.PART__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
1079
				case BasicPackageImpl.PART__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
940
				case BasicPackageImpl.PART__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
1080
				case BasicPackageImpl.PART__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
941
				case BasicPackageImpl.PART__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
1081
				case BasicPackageImpl.PART__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
1082
				case BasicPackageImpl.PART__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
1083
				case BasicPackageImpl.PART__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
1084
				default: return -1;
942
				default: return -1;
1085
			}
943
			}
1086
		}
944
		}
Lines 1148-1156 Link Here
1148
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART__LABEL;
1006
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.PART__LABEL;
1149
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART__ICON_URI;
1007
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.PART__ICON_URI;
1150
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART__TOOLTIP;
1008
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.PART__TOOLTIP;
1151
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.PART__LOCAL_LABEL;
1152
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.PART__LOCAL_TOOLTIP;
1153
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.PART__LOCAL_IMAGE;
1154
				default: return -1;
1009
				default: return -1;
1155
			}
1010
			}
1156
		}
1011
		}
Lines 1204-1215 Link Here
1204
		result.append(iconURI);
1059
		result.append(iconURI);
1205
		result.append(", tooltip: "); //$NON-NLS-1$
1060
		result.append(", tooltip: "); //$NON-NLS-1$
1206
		result.append(tooltip);
1061
		result.append(tooltip);
1207
		result.append(", localLabel: "); //$NON-NLS-1$
1208
		result.append(localLabel);
1209
		result.append(", localTooltip: "); //$NON-NLS-1$
1210
		result.append(localTooltip);
1211
		result.append(", localImage: "); //$NON-NLS-1$
1212
		result.append(localImage);
1213
		result.append(", dirty: "); //$NON-NLS-1$
1062
		result.append(", dirty: "); //$NON-NLS-1$
1214
		result.append(dirty);
1063
		result.append(dirty);
1215
		result.append(", bindingContexts: "); //$NON-NLS-1$
1064
		result.append(", bindingContexts: "); //$NON-NLS-1$
(-)src/org/eclipse/e4/ui/model/application/ui/basic/impl/WindowImpl.java (-168 / +17 lines)
Lines 14-19 Link Here
14
import java.util.List;
14
import java.util.List;
15
import java.util.Map;
15
import java.util.Map;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
17
import org.eclipse.e4.ui.model.LocalizationHelper;
17
import org.eclipse.e4.ui.model.application.commands.MBindings;
18
import org.eclipse.e4.ui.model.application.commands.MBindings;
18
import org.eclipse.e4.ui.model.application.commands.MHandler;
19
import org.eclipse.e4.ui.model.application.commands.MHandler;
19
import org.eclipse.e4.ui.model.application.commands.MHandlerContainer;
20
import org.eclipse.e4.ui.model.application.commands.MHandlerContainer;
Lines 51-59 Link Here
51
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLabel <em>Label</em>}</li>
52
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLabel <em>Label</em>}</li>
52
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getIconURI <em>Icon URI</em>}</li>
53
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getIconURI <em>Icon URI</em>}</li>
53
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getTooltip <em>Tooltip</em>}</li>
54
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getTooltip <em>Tooltip</em>}</li>
54
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalLabel <em>Local Label</em>}</li>
55
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
56
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getLocalImage <em>Local Image</em>}</li>
57
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getContext <em>Context</em>}</li>
55
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getContext <em>Context</em>}</li>
58
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getVariables <em>Variables</em>}</li>
56
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getVariables <em>Variables</em>}</li>
59
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getProperties <em>Properties</em>}</li>
57
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.basic.impl.WindowImpl#getProperties <em>Properties</em>}</li>
Lines 133-198 Link Here
133
	protected String tooltip = TOOLTIP_EDEFAULT;
131
	protected String tooltip = TOOLTIP_EDEFAULT;
134
132
135
	/**
133
	/**
136
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
137
	 * <!-- begin-user-doc -->
138
	 * <!-- end-user-doc -->
139
	 * @see #getLocalLabel()
140
	 * @generated
141
	 * @ordered
142
	 */
143
	protected static final String LOCAL_LABEL_EDEFAULT = null;
144
145
	/**
146
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
147
	 * <!-- begin-user-doc -->
148
	 * <!-- end-user-doc -->
149
	 * @see #getLocalLabel()
150
	 * @generated
151
	 * @ordered
152
	 */
153
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
154
155
	/**
156
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
157
	 * <!-- begin-user-doc -->
158
	 * <!-- end-user-doc -->
159
	 * @see #getLocalTooltip()
160
	 * @generated
161
	 * @ordered
162
	 */
163
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
164
165
	/**
166
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
167
	 * <!-- begin-user-doc -->
168
	 * <!-- end-user-doc -->
169
	 * @see #getLocalTooltip()
170
	 * @generated
171
	 * @ordered
172
	 */
173
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
174
175
	/**
176
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
177
	 * <!-- begin-user-doc -->
178
	 * <!-- end-user-doc -->
179
	 * @see #getLocalImage()
180
	 * @generated
181
	 * @ordered
182
	 */
183
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
184
185
	/**
186
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
187
	 * <!-- begin-user-doc -->
188
	 * <!-- end-user-doc -->
189
	 * @see #getLocalImage()
190
	 * @generated
191
	 * @ordered
192
	 */
193
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
194
195
	/**
196
	 * The default value of the '{@link #getContext() <em>Context</em>}' attribute.
134
	 * The default value of the '{@link #getContext() <em>Context</em>}' attribute.
197
	 * <!-- begin-user-doc -->
135
	 * <!-- begin-user-doc -->
198
	 * <!-- end-user-doc -->
136
	 * <!-- end-user-doc -->
Lines 449-517 Link Here
449
	 * <!-- end-user-doc -->
387
	 * <!-- end-user-doc -->
450
	 * @generated
388
	 * @generated
451
	 */
389
	 */
452
	public String getLocalLabel() {
453
		return localLabel;
454
	}
455
456
	/**
457
	 * <!-- begin-user-doc -->
458
	 * <!-- end-user-doc -->
459
	 * @generated
460
	 */
461
	public void setLocalLabel(String newLocalLabel) {
462
		String oldLocalLabel = localLabel;
463
		localLabel = newLocalLabel;
464
		if (eNotificationRequired())
465
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_LABEL, oldLocalLabel, localLabel));
466
	}
467
468
	/**
469
	 * <!-- begin-user-doc -->
470
	 * <!-- end-user-doc -->
471
	 * @generated
472
	 */
473
	public String getLocalTooltip() {
474
		return localTooltip;
475
	}
476
477
	/**
478
	 * <!-- begin-user-doc -->
479
	 * <!-- end-user-doc -->
480
	 * @generated
481
	 */
482
	public void setLocalTooltip(String newLocalTooltip) {
483
		String oldLocalTooltip = localTooltip;
484
		localTooltip = newLocalTooltip;
485
		if (eNotificationRequired())
486
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
487
	}
488
489
	/**
490
	 * <!-- begin-user-doc -->
491
	 * <!-- end-user-doc -->
492
	 * @generated
493
	 */
494
	public Object getLocalImage() {
495
		return localImage;
496
	}
497
498
	/**
499
	 * <!-- begin-user-doc -->
500
	 * <!-- end-user-doc -->
501
	 * @generated
502
	 */
503
	public void setLocalImage(Object newLocalImage) {
504
		Object oldLocalImage = localImage;
505
		localImage = newLocalImage;
506
		if (eNotificationRequired())
507
			eNotify(new ENotificationImpl(this, Notification.SET, BasicPackageImpl.WINDOW__LOCAL_IMAGE, oldLocalImage, localImage));
508
	}
509
510
	/**
511
	 * <!-- begin-user-doc -->
512
	 * <!-- end-user-doc -->
513
	 * @generated
514
	 */
515
	public IEclipseContext getContext() {
390
	public IEclipseContext getContext() {
516
		return context;
391
		return context;
517
	}
392
	}
Lines 730-735 Link Here
730
	/**
605
	/**
731
	 * <!-- begin-user-doc -->
606
	 * <!-- begin-user-doc -->
732
	 * <!-- end-user-doc -->
607
	 * <!-- end-user-doc -->
608
	 */
609
	public String getLocalizedLabel() {
610
		return LocalizationHelper.getLocalizedLabel(this);		
611
	}
612
613
	/**
614
	 * <!-- begin-user-doc -->
615
	 * <!-- end-user-doc -->
616
	 */
617
	public String getLocalizedTooltip() {
618
		return LocalizationHelper.getLocalizedTooltip(this);
619
	}
620
621
	/**
622
	 * <!-- begin-user-doc -->
623
	 * <!-- end-user-doc -->
733
	 * @generated
624
	 * @generated
734
	 */
625
	 */
735
	@Override
626
	@Override
Lines 763-774 Link Here
763
				return getIconURI();
654
				return getIconURI();
764
			case BasicPackageImpl.WINDOW__TOOLTIP:
655
			case BasicPackageImpl.WINDOW__TOOLTIP:
765
				return getTooltip();
656
				return getTooltip();
766
			case BasicPackageImpl.WINDOW__LOCAL_LABEL:
767
				return getLocalLabel();
768
			case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP:
769
				return getLocalTooltip();
770
			case BasicPackageImpl.WINDOW__LOCAL_IMAGE:
771
				return getLocalImage();
772
			case BasicPackageImpl.WINDOW__CONTEXT:
657
			case BasicPackageImpl.WINDOW__CONTEXT:
773
				return getContext();
658
				return getContext();
774
			case BasicPackageImpl.WINDOW__VARIABLES:
659
			case BasicPackageImpl.WINDOW__VARIABLES:
Lines 816-830 Link Here
816
			case BasicPackageImpl.WINDOW__TOOLTIP:
701
			case BasicPackageImpl.WINDOW__TOOLTIP:
817
				setTooltip((String)newValue);
702
				setTooltip((String)newValue);
818
				return;
703
				return;
819
			case BasicPackageImpl.WINDOW__LOCAL_LABEL:
820
				setLocalLabel((String)newValue);
821
				return;
822
			case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP:
823
				setLocalTooltip((String)newValue);
824
				return;
825
			case BasicPackageImpl.WINDOW__LOCAL_IMAGE:
826
				setLocalImage(newValue);
827
				return;
828
			case BasicPackageImpl.WINDOW__CONTEXT:
704
			case BasicPackageImpl.WINDOW__CONTEXT:
829
				setContext((IEclipseContext)newValue);
705
				setContext((IEclipseContext)newValue);
830
				return;
706
				return;
Lines 887-901 Link Here
887
			case BasicPackageImpl.WINDOW__TOOLTIP:
763
			case BasicPackageImpl.WINDOW__TOOLTIP:
888
				setTooltip(TOOLTIP_EDEFAULT);
764
				setTooltip(TOOLTIP_EDEFAULT);
889
				return;
765
				return;
890
			case BasicPackageImpl.WINDOW__LOCAL_LABEL:
891
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
892
				return;
893
			case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP:
894
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
895
				return;
896
			case BasicPackageImpl.WINDOW__LOCAL_IMAGE:
897
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
898
				return;
899
			case BasicPackageImpl.WINDOW__CONTEXT:
766
			case BasicPackageImpl.WINDOW__CONTEXT:
900
				setContext(CONTEXT_EDEFAULT);
767
				setContext(CONTEXT_EDEFAULT);
901
				return;
768
				return;
Lines 950-961 Link Here
950
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
817
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
951
			case BasicPackageImpl.WINDOW__TOOLTIP:
818
			case BasicPackageImpl.WINDOW__TOOLTIP:
952
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
819
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
953
			case BasicPackageImpl.WINDOW__LOCAL_LABEL:
954
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
955
			case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP:
956
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
957
			case BasicPackageImpl.WINDOW__LOCAL_IMAGE:
958
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
959
			case BasicPackageImpl.WINDOW__CONTEXT:
820
			case BasicPackageImpl.WINDOW__CONTEXT:
960
				return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
821
				return CONTEXT_EDEFAULT == null ? context != null : !CONTEXT_EDEFAULT.equals(context);
961
			case BasicPackageImpl.WINDOW__VARIABLES:
822
			case BasicPackageImpl.WINDOW__VARIABLES:
Lines 996-1004 Link Here
996
				case BasicPackageImpl.WINDOW__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
857
				case BasicPackageImpl.WINDOW__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
997
				case BasicPackageImpl.WINDOW__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
858
				case BasicPackageImpl.WINDOW__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
998
				case BasicPackageImpl.WINDOW__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
859
				case BasicPackageImpl.WINDOW__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
999
				case BasicPackageImpl.WINDOW__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
1000
				case BasicPackageImpl.WINDOW__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
1001
				case BasicPackageImpl.WINDOW__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
1002
				default: return -1;
860
				default: return -1;
1003
			}
861
			}
1004
		}
862
		}
Lines 1037-1045 Link Here
1037
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.WINDOW__LABEL;
895
				case UiPackageImpl.UI_LABEL__LABEL: return BasicPackageImpl.WINDOW__LABEL;
1038
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.WINDOW__ICON_URI;
896
				case UiPackageImpl.UI_LABEL__ICON_URI: return BasicPackageImpl.WINDOW__ICON_URI;
1039
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.WINDOW__TOOLTIP;
897
				case UiPackageImpl.UI_LABEL__TOOLTIP: return BasicPackageImpl.WINDOW__TOOLTIP;
1040
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return BasicPackageImpl.WINDOW__LOCAL_LABEL;
1041
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return BasicPackageImpl.WINDOW__LOCAL_TOOLTIP;
1042
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return BasicPackageImpl.WINDOW__LOCAL_IMAGE;
1043
				default: return -1;
898
				default: return -1;
1044
			}
899
			}
1045
		}
900
		}
Lines 1082-1093 Link Here
1082
		result.append(iconURI);
937
		result.append(iconURI);
1083
		result.append(", tooltip: "); //$NON-NLS-1$
938
		result.append(", tooltip: "); //$NON-NLS-1$
1084
		result.append(tooltip);
939
		result.append(tooltip);
1085
		result.append(", localLabel: "); //$NON-NLS-1$
1086
		result.append(localLabel);
1087
		result.append(", localTooltip: "); //$NON-NLS-1$
1088
		result.append(localTooltip);
1089
		result.append(", localImage: "); //$NON-NLS-1$
1090
		result.append(localImage);
1091
		result.append(", context: "); //$NON-NLS-1$
940
		result.append(", context: "); //$NON-NLS-1$
1092
		result.append(context);
941
		result.append(context);
1093
		result.append(", variables: "); //$NON-NLS-1$
942
		result.append(", variables: "); //$NON-NLS-1$
(-)src/org/eclipse/e4/ui/model/application/ui/impl/UiPackageImpl.java (-100 / +5 lines)
Lines 362-401 Link Here
362
	public static final int UI_LABEL__TOOLTIP = 2;
362
	public static final int UI_LABEL__TOOLTIP = 2;
363
363
364
	/**
364
	/**
365
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
366
	 * <!-- begin-user-doc -->
367
	 * <!-- end-user-doc -->
368
	 * @generated
369
	 * @ordered
370
	 */
371
	public static final int UI_LABEL__LOCAL_LABEL = 3;
372
373
	/**
374
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
375
	 * <!-- begin-user-doc -->
376
	 * <!-- end-user-doc -->
377
	 * @generated
378
	 * @ordered
379
	 */
380
	public static final int UI_LABEL__LOCAL_TOOLTIP = 4;
381
382
	/**
383
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
384
	 * <!-- begin-user-doc -->
385
	 * <!-- end-user-doc -->
386
	 * @generated
387
	 * @ordered
388
	 */
389
	public static final int UI_LABEL__LOCAL_IMAGE = 5;
390
391
	/**
392
	 * The number of structural features of the '<em>UI Label</em>' class.
365
	 * The number of structural features of the '<em>UI Label</em>' class.
393
	 * <!-- begin-user-doc -->
366
	 * <!-- begin-user-doc -->
394
	 * <!-- end-user-doc -->
367
	 * <!-- end-user-doc -->
395
	 * @generated
368
	 * @generated
396
	 * @ordered
369
	 * @ordered
397
	 */
370
	 */
398
	public static final int UI_LABEL_FEATURE_COUNT = 6;
371
	public static final int UI_LABEL_FEATURE_COUNT = 3;
399
372
400
	/**
373
	/**
401
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class.
374
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class.
Lines 1615-1662 Link Here
1615
	}
1588
	}
1616
1589
1617
	/**
1590
	/**
1618
	 * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel <em>Local Label</em>}'.
1619
	 * <!-- begin-user-doc -->
1620
	 * <!-- end-user-doc -->
1621
	 * @return the meta object for the attribute '<em>Local Label</em>'.
1622
	 * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalLabel()
1623
	 * @see #getUILabel()
1624
	 * @generated
1625
	 */
1626
	public EAttribute getUILabel_LocalLabel() {
1627
		return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(3);
1628
	}
1629
1630
1631
	/**
1632
	 * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip <em>Local Tooltip</em>}'.
1633
	 * <!-- begin-user-doc -->
1634
	 * <!-- end-user-doc -->
1635
	 * @return the meta object for the attribute '<em>Local Tooltip</em>'.
1636
	 * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalTooltip()
1637
	 * @see #getUILabel()
1638
	 * @generated
1639
	 */
1640
	public EAttribute getUILabel_LocalTooltip() {
1641
		return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(4);
1642
	}
1643
1644
1645
	/**
1646
	 * Returns the meta object for the attribute '{@link org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage <em>Local Image</em>}'.
1647
	 * <!-- begin-user-doc -->
1648
	 * <!-- end-user-doc -->
1649
	 * @return the meta object for the attribute '<em>Local Image</em>'.
1650
	 * @see org.eclipse.e4.ui.model.application.ui.MUILabel#getLocalImage()
1651
	 * @see #getUILabel()
1652
	 * @generated
1653
	 */
1654
	public EAttribute getUILabel_LocalImage() {
1655
		return (EAttribute)uiLabelEClass.getEStructuralFeatures().get(5);
1656
	}
1657
1658
1659
	/**
1660
	 * Returns the meta object for class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</em>}'.
1591
	 * Returns the meta object for class '{@link org.eclipse.e4.ui.model.application.ui.MElementContainer <em>Element Container</em>}'.
1661
	 * <!-- begin-user-doc -->
1592
	 * <!-- begin-user-doc -->
1662
	 * <!-- end-user-doc -->
1593
	 * <!-- end-user-doc -->
Lines 1879-1887 Link Here
1879
		createEAttribute(uiLabelEClass, UI_LABEL__LABEL);
1810
		createEAttribute(uiLabelEClass, UI_LABEL__LABEL);
1880
		createEAttribute(uiLabelEClass, UI_LABEL__ICON_URI);
1811
		createEAttribute(uiLabelEClass, UI_LABEL__ICON_URI);
1881
		createEAttribute(uiLabelEClass, UI_LABEL__TOOLTIP);
1812
		createEAttribute(uiLabelEClass, UI_LABEL__TOOLTIP);
1882
		createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_LABEL);
1883
		createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_TOOLTIP);
1884
		createEAttribute(uiLabelEClass, UI_LABEL__LOCAL_IMAGE);
1885
1813
1886
		elementContainerEClass = createEClass(ELEMENT_CONTAINER);
1814
		elementContainerEClass = createEClass(ELEMENT_CONTAINER);
1887
		createEReference(elementContainerEClass, ELEMENT_CONTAINER__CHILDREN);
1815
		createEReference(elementContainerEClass, ELEMENT_CONTAINER__CHILDREN);
Lines 2004-2012 Link Here
2004
		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$
1932
		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$
2005
		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$
1933
		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$
2006
		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$
1934
		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$
2007
		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$
1935
2008
		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$
1936
		addEOperation(uiLabelEClass, ecorePackage.getEString(), "getLocalizedLabel", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
2009
		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$
1937
1938
		addEOperation(uiLabelEClass, ecorePackage.getEString(), "getLocalizedTooltip", 0, 1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
2010
1939
2011
		initEClass(elementContainerEClass, MElementContainer.class, "ElementContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
1940
		initEClass(elementContainerEClass, MElementContainer.class, "ElementContainer", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
2012
		g1 = createEGenericType(elementContainerEClass_T);
1941
		g1 = createEGenericType(elementContainerEClass_T);
Lines 2244-2273 Link Here
2244
		public static final EAttribute UI_LABEL__TOOLTIP = eINSTANCE.getUILabel_Tooltip();
2173
		public static final EAttribute UI_LABEL__TOOLTIP = eINSTANCE.getUILabel_Tooltip();
2245
2174
2246
		/**
2175
		/**
2247
		 * The meta object literal for the '<em><b>Local Label</b></em>' attribute feature.
2248
		 * <!-- begin-user-doc -->
2249
		 * <!-- end-user-doc -->
2250
		 * @generated
2251
		 */
2252
		public static final EAttribute UI_LABEL__LOCAL_LABEL = eINSTANCE.getUILabel_LocalLabel();
2253
2254
		/**
2255
		 * The meta object literal for the '<em><b>Local Tooltip</b></em>' attribute feature.
2256
		 * <!-- begin-user-doc -->
2257
		 * <!-- end-user-doc -->
2258
		 * @generated
2259
		 */
2260
		public static final EAttribute UI_LABEL__LOCAL_TOOLTIP = eINSTANCE.getUILabel_LocalTooltip();
2261
2262
		/**
2263
		 * The meta object literal for the '<em><b>Local Image</b></em>' attribute feature.
2264
		 * <!-- begin-user-doc -->
2265
		 * <!-- end-user-doc -->
2266
		 * @generated
2267
		 */
2268
		public static final EAttribute UI_LABEL__LOCAL_IMAGE = eINSTANCE.getUILabel_LocalImage();
2269
2270
		/**
2271
		 * The meta object literal for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class.
2176
		 * The meta object literal for the '{@link org.eclipse.e4.ui.model.application.ui.impl.ElementContainerImpl <em>Element Container</em>}' class.
2272
		 * <!-- begin-user-doc -->
2177
		 * <!-- begin-user-doc -->
2273
		 * <!-- end-user-doc -->
2178
		 * <!-- end-user-doc -->
(-)src/org/eclipse/e4/ui/model/application/ui/menu/impl/ItemImpl.java (-168 / +17 lines)
Lines 10-15 Link Here
10
 */
10
 */
11
package org.eclipse.e4.ui.model.application.ui.menu.impl;
11
package org.eclipse.e4.ui.model.application.ui.menu.impl;
12
12
13
import org.eclipse.e4.ui.model.LocalizationHelper;
13
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl;
15
import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl;
15
import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
16
import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
Lines 29-37 Link Here
29
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLabel <em>Label</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLabel <em>Label</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getIconURI <em>Icon URI</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getIconURI <em>Icon URI</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getTooltip <em>Tooltip</em>}</li>
32
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getTooltip <em>Tooltip</em>}</li>
32
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalLabel <em>Local Label</em>}</li>
33
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
34
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getLocalImage <em>Local Image</em>}</li>
35
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isEnabled <em>Enabled</em>}</li>
33
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isEnabled <em>Enabled</em>}</li>
36
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isSelected <em>Selected</em>}</li>
34
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#isSelected <em>Selected</em>}</li>
37
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getType <em>Type</em>}</li>
35
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.ItemImpl#getType <em>Type</em>}</li>
Lines 102-167 Link Here
102
	protected String tooltip = TOOLTIP_EDEFAULT;
100
	protected String tooltip = TOOLTIP_EDEFAULT;
103
101
104
	/**
102
	/**
105
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
106
	 * <!-- begin-user-doc -->
107
	 * <!-- end-user-doc -->
108
	 * @see #getLocalLabel()
109
	 * @generated
110
	 * @ordered
111
	 */
112
	protected static final String LOCAL_LABEL_EDEFAULT = null;
113
114
	/**
115
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
116
	 * <!-- begin-user-doc -->
117
	 * <!-- end-user-doc -->
118
	 * @see #getLocalLabel()
119
	 * @generated
120
	 * @ordered
121
	 */
122
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
123
124
	/**
125
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
126
	 * <!-- begin-user-doc -->
127
	 * <!-- end-user-doc -->
128
	 * @see #getLocalTooltip()
129
	 * @generated
130
	 * @ordered
131
	 */
132
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
133
134
	/**
135
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
136
	 * <!-- begin-user-doc -->
137
	 * <!-- end-user-doc -->
138
	 * @see #getLocalTooltip()
139
	 * @generated
140
	 * @ordered
141
	 */
142
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
143
144
	/**
145
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
146
	 * <!-- begin-user-doc -->
147
	 * <!-- end-user-doc -->
148
	 * @see #getLocalImage()
149
	 * @generated
150
	 * @ordered
151
	 */
152
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
153
154
	/**
155
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
156
	 * <!-- begin-user-doc -->
157
	 * <!-- end-user-doc -->
158
	 * @see #getLocalImage()
159
	 * @generated
160
	 * @ordered
161
	 */
162
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
163
164
	/**
165
	 * The default value of the '{@link #isEnabled() <em>Enabled</em>}' attribute.
103
	 * The default value of the '{@link #isEnabled() <em>Enabled</em>}' attribute.
166
	 * <!-- begin-user-doc -->
104
	 * <!-- begin-user-doc -->
167
	 * <!-- end-user-doc -->
105
	 * <!-- end-user-doc -->
Lines 308-376 Link Here
308
	 * <!-- end-user-doc -->
246
	 * <!-- end-user-doc -->
309
	 * @generated
247
	 * @generated
310
	 */
248
	 */
311
	public String getLocalLabel() {
312
		return localLabel;
313
	}
314
315
	/**
316
	 * <!-- begin-user-doc -->
317
	 * <!-- end-user-doc -->
318
	 * @generated
319
	 */
320
	public void setLocalLabel(String newLocalLabel) {
321
		String oldLocalLabel = localLabel;
322
		localLabel = newLocalLabel;
323
		if (eNotificationRequired())
324
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_LABEL, oldLocalLabel, localLabel));
325
	}
326
327
	/**
328
	 * <!-- begin-user-doc -->
329
	 * <!-- end-user-doc -->
330
	 * @generated
331
	 */
332
	public String getLocalTooltip() {
333
		return localTooltip;
334
	}
335
336
	/**
337
	 * <!-- begin-user-doc -->
338
	 * <!-- end-user-doc -->
339
	 * @generated
340
	 */
341
	public void setLocalTooltip(String newLocalTooltip) {
342
		String oldLocalTooltip = localTooltip;
343
		localTooltip = newLocalTooltip;
344
		if (eNotificationRequired())
345
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
346
	}
347
348
	/**
349
	 * <!-- begin-user-doc -->
350
	 * <!-- end-user-doc -->
351
	 * @generated
352
	 */
353
	public Object getLocalImage() {
354
		return localImage;
355
	}
356
357
	/**
358
	 * <!-- begin-user-doc -->
359
	 * <!-- end-user-doc -->
360
	 * @generated
361
	 */
362
	public void setLocalImage(Object newLocalImage) {
363
		Object oldLocalImage = localImage;
364
		localImage = newLocalImage;
365
		if (eNotificationRequired())
366
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.ITEM__LOCAL_IMAGE, oldLocalImage, localImage));
367
	}
368
369
	/**
370
	 * <!-- begin-user-doc -->
371
	 * <!-- end-user-doc -->
372
	 * @generated
373
	 */
374
	public boolean isEnabled() {
249
	public boolean isEnabled() {
375
		return enabled;
250
		return enabled;
376
	}
251
	}
Lines 432-437 Link Here
432
	/**
307
	/**
433
	 * <!-- begin-user-doc -->
308
	 * <!-- begin-user-doc -->
434
	 * <!-- end-user-doc -->
309
	 * <!-- end-user-doc -->
310
	 */
311
	public String getLocalizedLabel() {
312
		return LocalizationHelper.getLocalizedLabel(this);
313
	}
314
315
	/**
316
	 * <!-- begin-user-doc -->
317
	 * <!-- end-user-doc -->
318
	 */
319
	public String getLocalizedTooltip() {
320
		return LocalizationHelper.getLocalizedTooltip(this);		
321
	}
322
323
	/**
324
	 * <!-- begin-user-doc -->
325
	 * <!-- end-user-doc -->
435
	 * @generated
326
	 * @generated
436
	 */
327
	 */
437
	@Override
328
	@Override
Lines 443-454 Link Here
443
				return getIconURI();
334
				return getIconURI();
444
			case MenuPackageImpl.ITEM__TOOLTIP:
335
			case MenuPackageImpl.ITEM__TOOLTIP:
445
				return getTooltip();
336
				return getTooltip();
446
			case MenuPackageImpl.ITEM__LOCAL_LABEL:
447
				return getLocalLabel();
448
			case MenuPackageImpl.ITEM__LOCAL_TOOLTIP:
449
				return getLocalTooltip();
450
			case MenuPackageImpl.ITEM__LOCAL_IMAGE:
451
				return getLocalImage();
452
			case MenuPackageImpl.ITEM__ENABLED:
337
			case MenuPackageImpl.ITEM__ENABLED:
453
				return isEnabled();
338
				return isEnabled();
454
			case MenuPackageImpl.ITEM__SELECTED:
339
			case MenuPackageImpl.ITEM__SELECTED:
Lines 476-490 Link Here
476
			case MenuPackageImpl.ITEM__TOOLTIP:
361
			case MenuPackageImpl.ITEM__TOOLTIP:
477
				setTooltip((String)newValue);
362
				setTooltip((String)newValue);
478
				return;
363
				return;
479
			case MenuPackageImpl.ITEM__LOCAL_LABEL:
480
				setLocalLabel((String)newValue);
481
				return;
482
			case MenuPackageImpl.ITEM__LOCAL_TOOLTIP:
483
				setLocalTooltip((String)newValue);
484
				return;
485
			case MenuPackageImpl.ITEM__LOCAL_IMAGE:
486
				setLocalImage(newValue);
487
				return;
488
			case MenuPackageImpl.ITEM__ENABLED:
364
			case MenuPackageImpl.ITEM__ENABLED:
489
				setEnabled((Boolean)newValue);
365
				setEnabled((Boolean)newValue);
490
				return;
366
				return;
Lines 515-529 Link Here
515
			case MenuPackageImpl.ITEM__TOOLTIP:
391
			case MenuPackageImpl.ITEM__TOOLTIP:
516
				setTooltip(TOOLTIP_EDEFAULT);
392
				setTooltip(TOOLTIP_EDEFAULT);
517
				return;
393
				return;
518
			case MenuPackageImpl.ITEM__LOCAL_LABEL:
519
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
520
				return;
521
			case MenuPackageImpl.ITEM__LOCAL_TOOLTIP:
522
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
523
				return;
524
			case MenuPackageImpl.ITEM__LOCAL_IMAGE:
525
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
526
				return;
527
			case MenuPackageImpl.ITEM__ENABLED:
394
			case MenuPackageImpl.ITEM__ENABLED:
528
				setEnabled(ENABLED_EDEFAULT);
395
				setEnabled(ENABLED_EDEFAULT);
529
				return;
396
				return;
Lines 551-562 Link Here
551
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
418
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
552
			case MenuPackageImpl.ITEM__TOOLTIP:
419
			case MenuPackageImpl.ITEM__TOOLTIP:
553
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
420
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
554
			case MenuPackageImpl.ITEM__LOCAL_LABEL:
555
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
556
			case MenuPackageImpl.ITEM__LOCAL_TOOLTIP:
557
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
558
			case MenuPackageImpl.ITEM__LOCAL_IMAGE:
559
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
560
			case MenuPackageImpl.ITEM__ENABLED:
421
			case MenuPackageImpl.ITEM__ENABLED:
561
				return enabled != ENABLED_EDEFAULT;
422
				return enabled != ENABLED_EDEFAULT;
562
			case MenuPackageImpl.ITEM__SELECTED:
423
			case MenuPackageImpl.ITEM__SELECTED:
Lines 579-587 Link Here
579
				case MenuPackageImpl.ITEM__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
440
				case MenuPackageImpl.ITEM__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
580
				case MenuPackageImpl.ITEM__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
441
				case MenuPackageImpl.ITEM__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
581
				case MenuPackageImpl.ITEM__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
442
				case MenuPackageImpl.ITEM__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
582
				case MenuPackageImpl.ITEM__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
583
				case MenuPackageImpl.ITEM__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
584
				case MenuPackageImpl.ITEM__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
585
				default: return -1;
443
				default: return -1;
586
			}
444
			}
587
		}
445
		}
Lines 600-608 Link Here
600
				case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.ITEM__LABEL;
458
				case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.ITEM__LABEL;
601
				case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.ITEM__ICON_URI;
459
				case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.ITEM__ICON_URI;
602
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.ITEM__TOOLTIP;
460
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.ITEM__TOOLTIP;
603
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MenuPackageImpl.ITEM__LOCAL_LABEL;
604
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MenuPackageImpl.ITEM__LOCAL_TOOLTIP;
605
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MenuPackageImpl.ITEM__LOCAL_IMAGE;
606
				default: return -1;
461
				default: return -1;
607
			}
462
			}
608
		}
463
		}
Lines 625-636 Link Here
625
		result.append(iconURI);
480
		result.append(iconURI);
626
		result.append(", tooltip: "); //$NON-NLS-1$
481
		result.append(", tooltip: "); //$NON-NLS-1$
627
		result.append(tooltip);
482
		result.append(tooltip);
628
		result.append(", localLabel: "); //$NON-NLS-1$
629
		result.append(localLabel);
630
		result.append(", localTooltip: "); //$NON-NLS-1$
631
		result.append(localTooltip);
632
		result.append(", localImage: "); //$NON-NLS-1$
633
		result.append(localImage);
634
		result.append(", enabled: "); //$NON-NLS-1$
483
		result.append(", enabled: "); //$NON-NLS-1$
635
		result.append(enabled);
484
		result.append(enabled);
636
		result.append(", selected: "); //$NON-NLS-1$
485
		result.append(", selected: "); //$NON-NLS-1$
(-)src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuElementImpl.java (-162 / +11 lines)
Lines 10-15 Link Here
10
 */
10
 */
11
package org.eclipse.e4.ui.model.application.ui.menu.impl;
11
package org.eclipse.e4.ui.model.application.ui.menu.impl;
12
12
13
import org.eclipse.e4.ui.model.LocalizationHelper;
13
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.MUILabel;
14
import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl;
15
import org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl;
15
import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
16
import org.eclipse.e4.ui.model.application.ui.impl.UiPackageImpl;
Lines 28-36 Link Here
28
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLabel <em>Label</em>}</li>
29
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLabel <em>Label</em>}</li>
29
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getIconURI <em>Icon URI</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getIconURI <em>Icon URI</em>}</li>
30
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getTooltip <em>Tooltip</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getTooltip <em>Tooltip</em>}</li>
31
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalLabel <em>Local Label</em>}</li>
32
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
33
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getLocalImage <em>Local Image</em>}</li>
34
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getMnemonics <em>Mnemonics</em>}</li>
32
 *   <li>{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuElementImpl#getMnemonics <em>Mnemonics</em>}</li>
35
 * </ul>
33
 * </ul>
36
 * </p>
34
 * </p>
Lines 99-164 Link Here
99
	protected String tooltip = TOOLTIP_EDEFAULT;
97
	protected String tooltip = TOOLTIP_EDEFAULT;
100
98
101
	/**
99
	/**
102
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
103
	 * <!-- begin-user-doc -->
104
	 * <!-- end-user-doc -->
105
	 * @see #getLocalLabel()
106
	 * @generated
107
	 * @ordered
108
	 */
109
	protected static final String LOCAL_LABEL_EDEFAULT = null;
110
111
	/**
112
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
113
	 * <!-- begin-user-doc -->
114
	 * <!-- end-user-doc -->
115
	 * @see #getLocalLabel()
116
	 * @generated
117
	 * @ordered
118
	 */
119
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
120
121
	/**
122
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
123
	 * <!-- begin-user-doc -->
124
	 * <!-- end-user-doc -->
125
	 * @see #getLocalTooltip()
126
	 * @generated
127
	 * @ordered
128
	 */
129
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
130
131
	/**
132
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
133
	 * <!-- begin-user-doc -->
134
	 * <!-- end-user-doc -->
135
	 * @see #getLocalTooltip()
136
	 * @generated
137
	 * @ordered
138
	 */
139
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
140
141
	/**
142
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
143
	 * <!-- begin-user-doc -->
144
	 * <!-- end-user-doc -->
145
	 * @see #getLocalImage()
146
	 * @generated
147
	 * @ordered
148
	 */
149
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
150
151
	/**
152
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
153
	 * <!-- begin-user-doc -->
154
	 * <!-- end-user-doc -->
155
	 * @see #getLocalImage()
156
	 * @generated
157
	 * @ordered
158
	 */
159
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
160
161
	/**
162
	 * The default value of the '{@link #getMnemonics() <em>Mnemonics</em>}' attribute.
100
	 * The default value of the '{@link #getMnemonics() <em>Mnemonics</em>}' attribute.
163
	 * <!-- begin-user-doc -->
101
	 * <!-- begin-user-doc -->
164
	 * <!-- end-user-doc -->
102
	 * <!-- end-user-doc -->
Lines 265-314 Link Here
265
	 * <!-- end-user-doc -->
203
	 * <!-- end-user-doc -->
266
	 * @generated
204
	 * @generated
267
	 */
205
	 */
268
	public String getLocalLabel() {
206
	public String getMnemonics() {
269
		return localLabel;
207
		return mnemonics;
270
	}
271
272
	/**
273
	 * <!-- begin-user-doc -->
274
	 * <!-- end-user-doc -->
275
	 * @generated
276
	 */
277
	public void setLocalLabel(String newLocalLabel) {
278
		String oldLocalLabel = localLabel;
279
		localLabel = newLocalLabel;
280
		if (eNotificationRequired())
281
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL, oldLocalLabel, localLabel));
282
	}
283
284
	/**
285
	 * <!-- begin-user-doc -->
286
	 * <!-- end-user-doc -->
287
	 * @generated
288
	 */
289
	public String getLocalTooltip() {
290
		return localTooltip;
291
	}
292
293
	/**
294
	 * <!-- begin-user-doc -->
295
	 * <!-- end-user-doc -->
296
	 * @generated
297
	 */
298
	public void setLocalTooltip(String newLocalTooltip) {
299
		String oldLocalTooltip = localTooltip;
300
		localTooltip = newLocalTooltip;
301
		if (eNotificationRequired())
302
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP, oldLocalTooltip, localTooltip));
303
	}
304
305
	/**
306
	 * <!-- begin-user-doc -->
307
	 * <!-- end-user-doc -->
308
	 * @generated
309
	 */
310
	public Object getLocalImage() {
311
		return localImage;
312
	}
208
	}
313
209
314
	/**
210
	/**
Lines 316-347 Link Here
316
	 * <!-- end-user-doc -->
212
	 * <!-- end-user-doc -->
317
	 * @generated
213
	 * @generated
318
	 */
214
	 */
319
	public void setLocalImage(Object newLocalImage) {
215
	public void setMnemonics(String newMnemonics) {
320
		Object oldLocalImage = localImage;
216
		String oldMnemonics = mnemonics;
321
		localImage = newLocalImage;
217
		mnemonics = newMnemonics;
322
		if (eNotificationRequired())
218
		if (eNotificationRequired())
323
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE, oldLocalImage, localImage));
219
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__MNEMONICS, oldMnemonics, mnemonics));
324
	}
220
	}
325
221
326
	/**
222
	/**
327
	 * <!-- begin-user-doc -->
223
	 * <!-- begin-user-doc -->
328
	 * <!-- end-user-doc -->
224
	 * <!-- end-user-doc -->
329
	 * @generated
330
	 */
225
	 */
331
	public String getMnemonics() {
226
	public String getLocalizedLabel() {
332
		return mnemonics;
227
		return LocalizationHelper.getLocalizedLabel(this);
333
	}
228
	}
334
229
335
	/**
230
	/**
336
	 * <!-- begin-user-doc -->
231
	 * <!-- begin-user-doc -->
337
	 * <!-- end-user-doc -->
232
	 * <!-- end-user-doc -->
338
	 * @generated
339
	 */
233
	 */
340
	public void setMnemonics(String newMnemonics) {
234
	public String getLocalizedTooltip() {
341
		String oldMnemonics = mnemonics;
235
		return LocalizationHelper.getLocalizedTooltip(this);
342
		mnemonics = newMnemonics;
343
		if (eNotificationRequired())
344
			eNotify(new ENotificationImpl(this, Notification.SET, MenuPackageImpl.MENU_ELEMENT__MNEMONICS, oldMnemonics, mnemonics));
345
	}
236
	}
346
237
347
	/**
238
	/**
Lines 358-369 Link Here
358
				return getIconURI();
249
				return getIconURI();
359
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
250
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
360
				return getTooltip();
251
				return getTooltip();
361
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL:
362
				return getLocalLabel();
363
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP:
364
				return getLocalTooltip();
365
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE:
366
				return getLocalImage();
367
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
252
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
368
				return getMnemonics();
253
				return getMnemonics();
369
		}
254
		}
Lines 387-401 Link Here
387
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
272
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
388
				setTooltip((String)newValue);
273
				setTooltip((String)newValue);
389
				return;
274
				return;
390
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL:
391
				setLocalLabel((String)newValue);
392
				return;
393
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP:
394
				setLocalTooltip((String)newValue);
395
				return;
396
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE:
397
				setLocalImage(newValue);
398
				return;
399
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
275
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
400
				setMnemonics((String)newValue);
276
				setMnemonics((String)newValue);
401
				return;
277
				return;
Lines 420-434 Link Here
420
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
296
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
421
				setTooltip(TOOLTIP_EDEFAULT);
297
				setTooltip(TOOLTIP_EDEFAULT);
422
				return;
298
				return;
423
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL:
424
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
425
				return;
426
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP:
427
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
428
				return;
429
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE:
430
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
431
				return;
432
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
299
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
433
				setMnemonics(MNEMONICS_EDEFAULT);
300
				setMnemonics(MNEMONICS_EDEFAULT);
434
				return;
301
				return;
Lines 450-461 Link Here
450
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
317
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
451
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
318
			case MenuPackageImpl.MENU_ELEMENT__TOOLTIP:
452
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
319
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
453
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL:
454
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
455
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP:
456
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
457
			case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE:
458
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
459
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
320
			case MenuPackageImpl.MENU_ELEMENT__MNEMONICS:
460
				return MNEMONICS_EDEFAULT == null ? mnemonics != null : !MNEMONICS_EDEFAULT.equals(mnemonics);
321
				return MNEMONICS_EDEFAULT == null ? mnemonics != null : !MNEMONICS_EDEFAULT.equals(mnemonics);
461
		}
322
		}
Lines 474-482 Link Here
474
				case MenuPackageImpl.MENU_ELEMENT__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
335
				case MenuPackageImpl.MENU_ELEMENT__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
475
				case MenuPackageImpl.MENU_ELEMENT__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
336
				case MenuPackageImpl.MENU_ELEMENT__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
476
				case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
337
				case MenuPackageImpl.MENU_ELEMENT__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
477
				case MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
478
				case MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
479
				case MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
480
				default: return -1;
338
				default: return -1;
481
			}
339
			}
482
		}
340
		}
Lines 495-503 Link Here
495
				case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.MENU_ELEMENT__LABEL;
353
				case UiPackageImpl.UI_LABEL__LABEL: return MenuPackageImpl.MENU_ELEMENT__LABEL;
496
				case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.MENU_ELEMENT__ICON_URI;
354
				case UiPackageImpl.UI_LABEL__ICON_URI: return MenuPackageImpl.MENU_ELEMENT__ICON_URI;
497
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.MENU_ELEMENT__TOOLTIP;
355
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MenuPackageImpl.MENU_ELEMENT__TOOLTIP;
498
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MenuPackageImpl.MENU_ELEMENT__LOCAL_LABEL;
499
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MenuPackageImpl.MENU_ELEMENT__LOCAL_TOOLTIP;
500
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MenuPackageImpl.MENU_ELEMENT__LOCAL_IMAGE;
501
				default: return -1;
356
				default: return -1;
502
			}
357
			}
503
		}
358
		}
Lines 520-531 Link Here
520
		result.append(iconURI);
375
		result.append(iconURI);
521
		result.append(", tooltip: "); //$NON-NLS-1$
376
		result.append(", tooltip: "); //$NON-NLS-1$
522
		result.append(tooltip);
377
		result.append(tooltip);
523
		result.append(", localLabel: "); //$NON-NLS-1$
524
		result.append(localLabel);
525
		result.append(", localTooltip: "); //$NON-NLS-1$
526
		result.append(localTooltip);
527
		result.append(", localImage: "); //$NON-NLS-1$
528
		result.append(localImage);
529
		result.append(", mnemonics: "); //$NON-NLS-1$
378
		result.append(", mnemonics: "); //$NON-NLS-1$
530
		result.append(mnemonics);
379
		result.append(mnemonics);
531
		result.append(')');
380
		result.append(')');
(-)src/org/eclipse/e4/ui/model/application/ui/menu/impl/MenuPackageImpl.java (-465 / +6 lines)
Lines 257-296 Link Here
257
	public static final int ITEM__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2;
257
	public static final int ITEM__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2;
258
258
259
	/**
259
	/**
260
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
261
	 * <!-- begin-user-doc -->
262
	 * <!-- end-user-doc -->
263
	 * @generated
264
	 * @ordered
265
	 */
266
	public static final int ITEM__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3;
267
268
	/**
269
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
270
	 * <!-- begin-user-doc -->
271
	 * <!-- end-user-doc -->
272
	 * @generated
273
	 * @ordered
274
	 */
275
	public static final int ITEM__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4;
276
277
	/**
278
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
279
	 * <!-- begin-user-doc -->
280
	 * <!-- end-user-doc -->
281
	 * @generated
282
	 * @ordered
283
	 */
284
	public static final int ITEM__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5;
285
286
	/**
287
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
260
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
288
	 * <!-- begin-user-doc -->
261
	 * <!-- begin-user-doc -->
289
	 * <!-- end-user-doc -->
262
	 * <!-- end-user-doc -->
290
	 * @generated
263
	 * @generated
291
	 * @ordered
264
	 * @ordered
292
	 */
265
	 */
293
	public static final int ITEM__ENABLED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6;
266
	public static final int ITEM__ENABLED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3;
294
267
295
	/**
268
	/**
296
	 * The feature id for the '<em><b>Selected</b></em>' attribute.
269
	 * The feature id for the '<em><b>Selected</b></em>' attribute.
Lines 299-305 Link Here
299
	 * @generated
272
	 * @generated
300
	 * @ordered
273
	 * @ordered
301
	 */
274
	 */
302
	public static final int ITEM__SELECTED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 7;
275
	public static final int ITEM__SELECTED = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4;
303
276
304
	/**
277
	/**
305
	 * The feature id for the '<em><b>Type</b></em>' attribute.
278
	 * The feature id for the '<em><b>Type</b></em>' attribute.
Lines 308-314 Link Here
308
	 * @generated
281
	 * @generated
309
	 * @ordered
282
	 * @ordered
310
	 */
283
	 */
311
	public static final int ITEM__TYPE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 8;
284
	public static final int ITEM__TYPE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5;
312
285
313
	/**
286
	/**
314
	 * The number of structural features of the '<em>Item</em>' class.
287
	 * The number of structural features of the '<em>Item</em>' class.
Lines 317-323 Link Here
317
	 * @generated
290
	 * @generated
318
	 * @ordered
291
	 * @ordered
319
	 */
292
	 */
320
	public static final int ITEM_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 9;
293
	public static final int ITEM_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6;
321
294
322
	/**
295
	/**
323
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.HandledItemImpl <em>Handled Item</em>}' class.
296
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.HandledItemImpl <em>Handled Item</em>}' class.
Lines 474-506 Link Here
474
	public static final int HANDLED_ITEM__TOOLTIP = ITEM__TOOLTIP;
447
	public static final int HANDLED_ITEM__TOOLTIP = ITEM__TOOLTIP;
475
448
476
	/**
449
	/**
477
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
478
	 * <!-- begin-user-doc -->
479
	 * <!-- end-user-doc -->
480
	 * @generated
481
	 * @ordered
482
	 */
483
	public static final int HANDLED_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL;
484
485
	/**
486
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
487
	 * <!-- begin-user-doc -->
488
	 * <!-- end-user-doc -->
489
	 * @generated
490
	 * @ordered
491
	 */
492
	public static final int HANDLED_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP;
493
494
	/**
495
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
496
	 * <!-- begin-user-doc -->
497
	 * <!-- end-user-doc -->
498
	 * @generated
499
	 * @ordered
500
	 */
501
	public static final int HANDLED_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE;
502
503
	/**
504
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
450
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
505
	 * <!-- begin-user-doc -->
451
	 * <!-- begin-user-doc -->
506
	 * <!-- end-user-doc -->
452
	 * <!-- end-user-doc -->
Lines 718-757 Link Here
718
	public static final int MENU_ELEMENT__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2;
664
	public static final int MENU_ELEMENT__TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 2;
719
665
720
	/**
666
	/**
721
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
722
	 * <!-- begin-user-doc -->
723
	 * <!-- end-user-doc -->
724
	 * @generated
725
	 * @ordered
726
	 */
727
	public static final int MENU_ELEMENT__LOCAL_LABEL = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3;
728
729
	/**
730
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
731
	 * <!-- begin-user-doc -->
732
	 * <!-- end-user-doc -->
733
	 * @generated
734
	 * @ordered
735
	 */
736
	public static final int MENU_ELEMENT__LOCAL_TOOLTIP = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4;
737
738
	/**
739
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
740
	 * <!-- begin-user-doc -->
741
	 * <!-- end-user-doc -->
742
	 * @generated
743
	 * @ordered
744
	 */
745
	public static final int MENU_ELEMENT__LOCAL_IMAGE = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 5;
746
747
	/**
748
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
667
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
749
	 * <!-- begin-user-doc -->
668
	 * <!-- begin-user-doc -->
750
	 * <!-- end-user-doc -->
669
	 * <!-- end-user-doc -->
751
	 * @generated
670
	 * @generated
752
	 * @ordered
671
	 * @ordered
753
	 */
672
	 */
754
	public static final int MENU_ELEMENT__MNEMONICS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 6;
673
	public static final int MENU_ELEMENT__MNEMONICS = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 3;
755
674
756
	/**
675
	/**
757
	 * The number of structural features of the '<em>Element</em>' class.
676
	 * The number of structural features of the '<em>Element</em>' class.
Lines 760-766 Link Here
760
	 * @generated
679
	 * @generated
761
	 * @ordered
680
	 * @ordered
762
	 */
681
	 */
763
	public static final int MENU_ELEMENT_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 7;
682
	public static final int MENU_ELEMENT_FEATURE_COUNT = UiPackageImpl.UI_ELEMENT_FEATURE_COUNT + 4;
764
683
765
	/**
684
	/**
766
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuItemImpl <em>Item</em>}' class.
685
	 * The meta object id for the '{@link org.eclipse.e4.ui.model.application.ui.menu.impl.MenuItemImpl <em>Item</em>}' class.
Lines 917-949 Link Here
917
	public static final int MENU_ITEM__TOOLTIP = ITEM__TOOLTIP;
836
	public static final int MENU_ITEM__TOOLTIP = ITEM__TOOLTIP;
918
837
919
	/**
838
	/**
920
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
921
	 * <!-- begin-user-doc -->
922
	 * <!-- end-user-doc -->
923
	 * @generated
924
	 * @ordered
925
	 */
926
	public static final int MENU_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL;
927
928
	/**
929
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
930
	 * <!-- begin-user-doc -->
931
	 * <!-- end-user-doc -->
932
	 * @generated
933
	 * @ordered
934
	 */
935
	public static final int MENU_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP;
936
937
	/**
938
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
939
	 * <!-- begin-user-doc -->
940
	 * <!-- end-user-doc -->
941
	 * @generated
942
	 * @ordered
943
	 */
944
	public static final int MENU_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE;
945
946
	/**
947
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
839
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
948
	 * <!-- begin-user-doc -->
840
	 * <!-- begin-user-doc -->
949
	 * <!-- end-user-doc -->
841
	 * <!-- end-user-doc -->
Lines 1143-1175 Link Here
1143
	public static final int MENU_SEPARATOR__TOOLTIP = MENU_ELEMENT__TOOLTIP;
1035
	public static final int MENU_SEPARATOR__TOOLTIP = MENU_ELEMENT__TOOLTIP;
1144
1036
1145
	/**
1037
	/**
1146
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1147
	 * <!-- begin-user-doc -->
1148
	 * <!-- end-user-doc -->
1149
	 * @generated
1150
	 * @ordered
1151
	 */
1152
	public static final int MENU_SEPARATOR__LOCAL_LABEL = MENU_ELEMENT__LOCAL_LABEL;
1153
1154
	/**
1155
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
1156
	 * <!-- begin-user-doc -->
1157
	 * <!-- end-user-doc -->
1158
	 * @generated
1159
	 * @ordered
1160
	 */
1161
	public static final int MENU_SEPARATOR__LOCAL_TOOLTIP = MENU_ELEMENT__LOCAL_TOOLTIP;
1162
1163
	/**
1164
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
1165
	 * <!-- begin-user-doc -->
1166
	 * <!-- end-user-doc -->
1167
	 * @generated
1168
	 * @ordered
1169
	 */
1170
	public static final int MENU_SEPARATOR__LOCAL_IMAGE = MENU_ELEMENT__LOCAL_IMAGE;
1171
1172
	/**
1173
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1038
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1174
	 * <!-- begin-user-doc -->
1039
	 * <!-- begin-user-doc -->
1175
	 * <!-- end-user-doc -->
1040
	 * <!-- end-user-doc -->
Lines 1342-1374 Link Here
1342
	public static final int MENU__TOOLTIP = MENU_ELEMENT__TOOLTIP;
1207
	public static final int MENU__TOOLTIP = MENU_ELEMENT__TOOLTIP;
1343
1208
1344
	/**
1209
	/**
1345
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1346
	 * <!-- begin-user-doc -->
1347
	 * <!-- end-user-doc -->
1348
	 * @generated
1349
	 * @ordered
1350
	 */
1351
	public static final int MENU__LOCAL_LABEL = MENU_ELEMENT__LOCAL_LABEL;
1352
1353
	/**
1354
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
1355
	 * <!-- begin-user-doc -->
1356
	 * <!-- end-user-doc -->
1357
	 * @generated
1358
	 * @ordered
1359
	 */
1360
	public static final int MENU__LOCAL_TOOLTIP = MENU_ELEMENT__LOCAL_TOOLTIP;
1361
1362
	/**
1363
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
1364
	 * <!-- begin-user-doc -->
1365
	 * <!-- end-user-doc -->
1366
	 * @generated
1367
	 * @ordered
1368
	 */
1369
	public static final int MENU__LOCAL_IMAGE = MENU_ELEMENT__LOCAL_IMAGE;
1370
1371
	/**
1372
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1210
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1373
	 * <!-- begin-user-doc -->
1211
	 * <!-- begin-user-doc -->
1374
	 * <!-- end-user-doc -->
1212
	 * <!-- end-user-doc -->
Lines 1740-1772 Link Here
1740
	public static final int POPUP_MENU__TOOLTIP = MENU__TOOLTIP;
1578
	public static final int POPUP_MENU__TOOLTIP = MENU__TOOLTIP;
1741
1579
1742
	/**
1580
	/**
1743
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1744
	 * <!-- begin-user-doc -->
1745
	 * <!-- end-user-doc -->
1746
	 * @generated
1747
	 * @ordered
1748
	 */
1749
	public static final int POPUP_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL;
1750
1751
	/**
1752
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
1753
	 * <!-- begin-user-doc -->
1754
	 * <!-- end-user-doc -->
1755
	 * @generated
1756
	 * @ordered
1757
	 */
1758
	public static final int POPUP_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP;
1759
1760
	/**
1761
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
1762
	 * <!-- begin-user-doc -->
1763
	 * <!-- end-user-doc -->
1764
	 * @generated
1765
	 * @ordered
1766
	 */
1767
	public static final int POPUP_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE;
1768
1769
	/**
1770
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1581
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
1771
	 * <!-- begin-user-doc -->
1582
	 * <!-- begin-user-doc -->
1772
	 * <!-- end-user-doc -->
1583
	 * <!-- end-user-doc -->
Lines 1993-2025 Link Here
1993
	public static final int DIRECT_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
1804
	public static final int DIRECT_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
1994
1805
1995
	/**
1806
	/**
1996
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
1997
	 * <!-- begin-user-doc -->
1998
	 * <!-- end-user-doc -->
1999
	 * @generated
2000
	 * @ordered
2001
	 */
2002
	public static final int DIRECT_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL;
2003
2004
	/**
2005
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
2006
	 * <!-- begin-user-doc -->
2007
	 * <!-- end-user-doc -->
2008
	 * @generated
2009
	 * @ordered
2010
	 */
2011
	public static final int DIRECT_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP;
2012
2013
	/**
2014
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
2015
	 * <!-- begin-user-doc -->
2016
	 * <!-- end-user-doc -->
2017
	 * @generated
2018
	 * @ordered
2019
	 */
2020
	public static final int DIRECT_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE;
2021
2022
	/**
2023
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
1807
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2024
	 * <!-- begin-user-doc -->
1808
	 * <!-- begin-user-doc -->
2025
	 * <!-- end-user-doc -->
1809
	 * <!-- end-user-doc -->
Lines 2246-2278 Link Here
2246
	public static final int HANDLED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
2030
	public static final int HANDLED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
2247
2031
2248
	/**
2032
	/**
2249
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
2250
	 * <!-- begin-user-doc -->
2251
	 * <!-- end-user-doc -->
2252
	 * @generated
2253
	 * @ordered
2254
	 */
2255
	public static final int HANDLED_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL;
2256
2257
	/**
2258
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
2259
	 * <!-- begin-user-doc -->
2260
	 * <!-- end-user-doc -->
2261
	 * @generated
2262
	 * @ordered
2263
	 */
2264
	public static final int HANDLED_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP;
2265
2266
	/**
2267
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
2268
	 * <!-- begin-user-doc -->
2269
	 * <!-- end-user-doc -->
2270
	 * @generated
2271
	 * @ordered
2272
	 */
2273
	public static final int HANDLED_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE;
2274
2275
	/**
2276
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2033
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2277
	 * <!-- begin-user-doc -->
2034
	 * <!-- begin-user-doc -->
2278
	 * <!-- end-user-doc -->
2035
	 * <!-- end-user-doc -->
Lines 2499-2531 Link Here
2499
	public static final int TOOL_ITEM__TOOLTIP = ITEM__TOOLTIP;
2256
	public static final int TOOL_ITEM__TOOLTIP = ITEM__TOOLTIP;
2500
2257
2501
	/**
2258
	/**
2502
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
2503
	 * <!-- begin-user-doc -->
2504
	 * <!-- end-user-doc -->
2505
	 * @generated
2506
	 * @ordered
2507
	 */
2508
	public static final int TOOL_ITEM__LOCAL_LABEL = ITEM__LOCAL_LABEL;
2509
2510
	/**
2511
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
2512
	 * <!-- begin-user-doc -->
2513
	 * <!-- end-user-doc -->
2514
	 * @generated
2515
	 * @ordered
2516
	 */
2517
	public static final int TOOL_ITEM__LOCAL_TOOLTIP = ITEM__LOCAL_TOOLTIP;
2518
2519
	/**
2520
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
2521
	 * <!-- begin-user-doc -->
2522
	 * <!-- end-user-doc -->
2523
	 * @generated
2524
	 * @ordered
2525
	 */
2526
	public static final int TOOL_ITEM__LOCAL_IMAGE = ITEM__LOCAL_IMAGE;
2527
2528
	/**
2529
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2259
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2530
	 * <!-- begin-user-doc -->
2260
	 * <!-- begin-user-doc -->
2531
	 * <!-- end-user-doc -->
2261
	 * <!-- end-user-doc -->
Lines 3178-3210 Link Here
3178
	public static final int HANDLED_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP;
2908
	public static final int HANDLED_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP;
3179
2909
3180
	/**
2910
	/**
3181
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
3182
	 * <!-- begin-user-doc -->
3183
	 * <!-- end-user-doc -->
3184
	 * @generated
3185
	 * @ordered
3186
	 */
3187
	public static final int HANDLED_TOOL_ITEM__LOCAL_LABEL = TOOL_ITEM__LOCAL_LABEL;
3188
3189
	/**
3190
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
3191
	 * <!-- begin-user-doc -->
3192
	 * <!-- end-user-doc -->
3193
	 * @generated
3194
	 * @ordered
3195
	 */
3196
	public static final int HANDLED_TOOL_ITEM__LOCAL_TOOLTIP = TOOL_ITEM__LOCAL_TOOLTIP;
3197
3198
	/**
3199
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
3200
	 * <!-- begin-user-doc -->
3201
	 * <!-- end-user-doc -->
3202
	 * @generated
3203
	 * @ordered
3204
	 */
3205
	public static final int HANDLED_TOOL_ITEM__LOCAL_IMAGE = TOOL_ITEM__LOCAL_IMAGE;
3206
3207
	/**
3208
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
2911
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
3209
	 * <!-- begin-user-doc -->
2912
	 * <!-- begin-user-doc -->
3210
	 * <!-- end-user-doc -->
2913
	 * <!-- end-user-doc -->
Lines 3431-3463 Link Here
3431
	public static final int DIRECT_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP;
3134
	public static final int DIRECT_TOOL_ITEM__TOOLTIP = TOOL_ITEM__TOOLTIP;
3432
3135
3433
	/**
3136
	/**
3434
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
3435
	 * <!-- begin-user-doc -->
3436
	 * <!-- end-user-doc -->
3437
	 * @generated
3438
	 * @ordered
3439
	 */
3440
	public static final int DIRECT_TOOL_ITEM__LOCAL_LABEL = TOOL_ITEM__LOCAL_LABEL;
3441
3442
	/**
3443
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
3444
	 * <!-- begin-user-doc -->
3445
	 * <!-- end-user-doc -->
3446
	 * @generated
3447
	 * @ordered
3448
	 */
3449
	public static final int DIRECT_TOOL_ITEM__LOCAL_TOOLTIP = TOOL_ITEM__LOCAL_TOOLTIP;
3450
3451
	/**
3452
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
3453
	 * <!-- begin-user-doc -->
3454
	 * <!-- end-user-doc -->
3455
	 * @generated
3456
	 * @ordered
3457
	 */
3458
	public static final int DIRECT_TOOL_ITEM__LOCAL_IMAGE = TOOL_ITEM__LOCAL_IMAGE;
3459
3460
	/**
3461
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
3137
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
3462
	 * <!-- begin-user-doc -->
3138
	 * <!-- begin-user-doc -->
3463
	 * <!-- end-user-doc -->
3139
	 * <!-- end-user-doc -->
Lines 3848-3880 Link Here
3848
	public static final int RENDERED_MENU__TOOLTIP = MENU__TOOLTIP;
3524
	public static final int RENDERED_MENU__TOOLTIP = MENU__TOOLTIP;
3849
3525
3850
	/**
3526
	/**
3851
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
3852
	 * <!-- begin-user-doc -->
3853
	 * <!-- end-user-doc -->
3854
	 * @generated
3855
	 * @ordered
3856
	 */
3857
	public static final int RENDERED_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL;
3858
3859
	/**
3860
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
3861
	 * <!-- begin-user-doc -->
3862
	 * <!-- end-user-doc -->
3863
	 * @generated
3864
	 * @ordered
3865
	 */
3866
	public static final int RENDERED_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP;
3867
3868
	/**
3869
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
3870
	 * <!-- begin-user-doc -->
3871
	 * <!-- end-user-doc -->
3872
	 * @generated
3873
	 * @ordered
3874
	 */
3875
	public static final int RENDERED_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE;
3876
3877
	/**
3878
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
3527
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
3879
	 * <!-- begin-user-doc -->
3528
	 * <!-- begin-user-doc -->
3880
	 * <!-- end-user-doc -->
3529
	 * <!-- end-user-doc -->
Lines 4646-4678 Link Here
4646
	public static final int RENDERED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
4295
	public static final int RENDERED_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
4647
4296
4648
	/**
4297
	/**
4649
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
4650
	 * <!-- begin-user-doc -->
4651
	 * <!-- end-user-doc -->
4652
	 * @generated
4653
	 * @ordered
4654
	 */
4655
	public static final int RENDERED_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL;
4656
4657
	/**
4658
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
4659
	 * <!-- begin-user-doc -->
4660
	 * <!-- end-user-doc -->
4661
	 * @generated
4662
	 * @ordered
4663
	 */
4664
	public static final int RENDERED_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP;
4665
4666
	/**
4667
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
4668
	 * <!-- begin-user-doc -->
4669
	 * <!-- end-user-doc -->
4670
	 * @generated
4671
	 * @ordered
4672
	 */
4673
	public static final int RENDERED_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE;
4674
4675
	/**
4676
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
4298
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
4677
	 * <!-- begin-user-doc -->
4299
	 * <!-- begin-user-doc -->
4678
	 * <!-- end-user-doc -->
4300
	 * <!-- end-user-doc -->
Lines 4881-4913 Link Here
4881
	public static final int OPAQUE_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
4503
	public static final int OPAQUE_MENU_ITEM__TOOLTIP = MENU_ITEM__TOOLTIP;
4882
4504
4883
	/**
4505
	/**
4884
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
4885
	 * <!-- begin-user-doc -->
4886
	 * <!-- end-user-doc -->
4887
	 * @generated
4888
	 * @ordered
4889
	 */
4890
	public static final int OPAQUE_MENU_ITEM__LOCAL_LABEL = MENU_ITEM__LOCAL_LABEL;
4891
4892
	/**
4893
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
4894
	 * <!-- begin-user-doc -->
4895
	 * <!-- end-user-doc -->
4896
	 * @generated
4897
	 * @ordered
4898
	 */
4899
	public static final int OPAQUE_MENU_ITEM__LOCAL_TOOLTIP = MENU_ITEM__LOCAL_TOOLTIP;
4900
4901
	/**
4902
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
4903
	 * <!-- begin-user-doc -->
4904
	 * <!-- end-user-doc -->
4905
	 * @generated
4906
	 * @ordered
4907
	 */
4908
	public static final int OPAQUE_MENU_ITEM__LOCAL_IMAGE = MENU_ITEM__LOCAL_IMAGE;
4909
4910
	/**
4911
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
4506
	 * The feature id for the '<em><b>Enabled</b></em>' attribute.
4912
	 * <!-- begin-user-doc -->
4507
	 * <!-- begin-user-doc -->
4913
	 * <!-- end-user-doc -->
4508
	 * <!-- end-user-doc -->
Lines 5116-5148 Link Here
5116
	public static final int OPAQUE_MENU_SEPARATOR__TOOLTIP = MENU_SEPARATOR__TOOLTIP;
4711
	public static final int OPAQUE_MENU_SEPARATOR__TOOLTIP = MENU_SEPARATOR__TOOLTIP;
5117
4712
5118
	/**
4713
	/**
5119
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
5120
	 * <!-- begin-user-doc -->
5121
	 * <!-- end-user-doc -->
5122
	 * @generated
5123
	 * @ordered
5124
	 */
5125
	public static final int OPAQUE_MENU_SEPARATOR__LOCAL_LABEL = MENU_SEPARATOR__LOCAL_LABEL;
5126
5127
	/**
5128
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
5129
	 * <!-- begin-user-doc -->
5130
	 * <!-- end-user-doc -->
5131
	 * @generated
5132
	 * @ordered
5133
	 */
5134
	public static final int OPAQUE_MENU_SEPARATOR__LOCAL_TOOLTIP = MENU_SEPARATOR__LOCAL_TOOLTIP;
5135
5136
	/**
5137
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
5138
	 * <!-- begin-user-doc -->
5139
	 * <!-- end-user-doc -->
5140
	 * @generated
5141
	 * @ordered
5142
	 */
5143
	public static final int OPAQUE_MENU_SEPARATOR__LOCAL_IMAGE = MENU_SEPARATOR__LOCAL_IMAGE;
5144
5145
	/**
5146
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
4714
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
5147
	 * <!-- begin-user-doc -->
4715
	 * <!-- begin-user-doc -->
5148
	 * <!-- end-user-doc -->
4716
	 * <!-- end-user-doc -->
Lines 5324-5356 Link Here
5324
	public static final int OPAQUE_MENU__TOOLTIP = MENU__TOOLTIP;
4892
	public static final int OPAQUE_MENU__TOOLTIP = MENU__TOOLTIP;
5325
4893
5326
	/**
4894
	/**
5327
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
5328
	 * <!-- begin-user-doc -->
5329
	 * <!-- end-user-doc -->
5330
	 * @generated
5331
	 * @ordered
5332
	 */
5333
	public static final int OPAQUE_MENU__LOCAL_LABEL = MENU__LOCAL_LABEL;
5334
5335
	/**
5336
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
5337
	 * <!-- begin-user-doc -->
5338
	 * <!-- end-user-doc -->
5339
	 * @generated
5340
	 * @ordered
5341
	 */
5342
	public static final int OPAQUE_MENU__LOCAL_TOOLTIP = MENU__LOCAL_TOOLTIP;
5343
5344
	/**
5345
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
5346
	 * <!-- begin-user-doc -->
5347
	 * <!-- end-user-doc -->
5348
	 * @generated
5349
	 * @ordered
5350
	 */
5351
	public static final int OPAQUE_MENU__LOCAL_IMAGE = MENU__LOCAL_IMAGE;
5352
5353
	/**
5354
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
4895
	 * The feature id for the '<em><b>Mnemonics</b></em>' attribute.
5355
	 * <!-- begin-user-doc -->
4896
	 * <!-- begin-user-doc -->
5356
	 * <!-- end-user-doc -->
4897
	 * <!-- end-user-doc -->
(-)src/org/eclipse/e4/ui/model/internal/ModelUtils.java (+35 lines)
Lines 1-9 Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2010, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
1
package org.eclipse.e4.ui.model.internal;
11
package org.eclipse.e4.ui.model.internal;
2
12
3
import java.util.ArrayList;
13
import java.util.ArrayList;
4
import java.util.Collections;
14
import java.util.Collections;
5
import java.util.List;
15
import java.util.List;
16
import org.eclipse.e4.core.contexts.IEclipseContext;
6
import org.eclipse.e4.ui.model.application.MApplicationElement;
17
import org.eclipse.e4.ui.model.application.MApplicationElement;
18
import org.eclipse.e4.ui.model.application.ui.MContext;
19
import org.eclipse.e4.ui.model.application.ui.MUIElement;
7
import org.eclipse.emf.common.util.EList;
20
import org.eclipse.emf.common.util.EList;
8
import org.eclipse.emf.ecore.EClass;
21
import org.eclipse.emf.ecore.EClass;
9
import org.eclipse.emf.ecore.EClassifier;
22
import org.eclipse.emf.ecore.EClassifier;
Lines 126-129 Link Here
126
		
139
		
127
		return Collections.emptyList();
140
		return Collections.emptyList();
128
	}
141
	}
142
143
	public static IEclipseContext getContainingContext(MUIElement element) {
144
		MUIElement curParent = null;
145
		if (element.getCurSharedRef() != null)
146
			curParent = element.getCurSharedRef().getParent();
147
		else
148
			curParent = (MUIElement) ((EObject) element).eContainer();
149
150
		while (curParent != null) {
151
			if (curParent instanceof MContext) {
152
				return ((MContext) curParent).getContext();
153
			}
154
155
			if (curParent.getCurSharedRef() != null)
156
				curParent = curParent.getCurSharedRef().getParent();
157
			else
158
				curParent = (MUIElement) ((EObject) curParent).eContainer();
159
		}
160
161
		return null;
162
	}
163
129
}
164
}
(-)src/org/eclipse/e4/ui/tests/model/test/MTestPackage.java (-29 / +2 lines)
Lines 341-380 Link Here
341
	int TEST_HARNESS__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 27;
341
	int TEST_HARNESS__TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 27;
342
342
343
	/**
343
	/**
344
	 * The feature id for the '<em><b>Local Label</b></em>' attribute.
345
	 * <!-- begin-user-doc -->
346
	 * <!-- end-user-doc -->
347
	 * @generated
348
	 * @ordered
349
	 */
350
	int TEST_HARNESS__LOCAL_LABEL = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 28;
351
352
	/**
353
	 * The feature id for the '<em><b>Local Tooltip</b></em>' attribute.
354
	 * <!-- begin-user-doc -->
355
	 * <!-- end-user-doc -->
356
	 * @generated
357
	 * @ordered
358
	 */
359
	int TEST_HARNESS__LOCAL_TOOLTIP = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 29;
360
361
	/**
362
	 * The feature id for the '<em><b>Local Image</b></em>' attribute.
363
	 * <!-- begin-user-doc -->
364
	 * <!-- end-user-doc -->
365
	 * @generated
366
	 * @ordered
367
	 */
368
	int TEST_HARNESS__LOCAL_IMAGE = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 30;
369
370
	/**
371
	 * The feature id for the '<em><b>Dirty</b></em>' attribute. <!--
344
	 * The feature id for the '<em><b>Dirty</b></em>' attribute. <!--
372
	 * begin-user-doc --> <!-- end-user-doc -->
345
	 * begin-user-doc --> <!-- end-user-doc -->
373
	 * 
346
	 * 
374
	 * @generated
347
	 * @generated
375
	 * @ordered
348
	 * @ordered
376
	 */
349
	 */
377
	int TEST_HARNESS__DIRTY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 31;
350
	int TEST_HARNESS__DIRTY = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 28;
378
351
379
	/**
352
	/**
380
	 * The number of structural features of the '<em>Harness</em>' class. <!--
353
	 * The number of structural features of the '<em>Harness</em>' class. <!--
Lines 383-389 Link Here
383
	 * @generated
356
	 * @generated
384
	 * @ordered
357
	 * @ordered
385
	 */
358
	 */
386
	int TEST_HARNESS_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 32;
359
	int TEST_HARNESS_FEATURE_COUNT = ApplicationPackageImpl.APPLICATION_ELEMENT_FEATURE_COUNT + 29;
387
360
388
	/**
361
	/**
389
	 * Returns the meta object for class '{@link org.eclipse.e4.ui.tests.model.test.MTestHarness <em>Harness</em>}'.
362
	 * Returns the meta object for class '{@link org.eclipse.e4.ui.tests.model.test.MTestHarness <em>Harness</em>}'.
(-)src/org/eclipse/e4/ui/tests/model/test/impl/TestHarnessImpl.java (-99 / +22 lines)
Lines 80-88 Link Here
80
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLabel <em>Label</em>}</li>
80
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLabel <em>Label</em>}</li>
81
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getIconURI <em>Icon URI</em>}</li>
81
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getIconURI <em>Icon URI</em>}</li>
82
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getTooltip <em>Tooltip</em>}</li>
82
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getTooltip <em>Tooltip</em>}</li>
83
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalLabel <em>Local Label</em>}</li>
84
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalTooltip <em>Local Tooltip</em>}</li>
85
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#getLocalImage <em>Local Image</em>}</li>
86
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#isDirty <em>Dirty</em>}</li>
83
 *   <li>{@link org.eclipse.e4.ui.tests.model.test.impl.TestHarnessImpl#isDirty <em>Dirty</em>}</li>
87
 * </ul>
84
 * </ul>
88
 * </p>
85
 * </p>
Lines 464-523 Link Here
464
	 */
461
	 */
465
	protected String tooltip = TOOLTIP_EDEFAULT;
462
	protected String tooltip = TOOLTIP_EDEFAULT;
466
	/**
463
	/**
467
	 * The default value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
468
	 * <!-- begin-user-doc -->
469
	 * <!-- end-user-doc -->
470
	 * @see #getLocalLabel()
471
	 * @generated
472
	 * @ordered
473
	 */
474
	protected static final String LOCAL_LABEL_EDEFAULT = null;
475
	/**
476
	 * The cached value of the '{@link #getLocalLabel() <em>Local Label</em>}' attribute.
477
	 * <!-- begin-user-doc -->
478
	 * <!-- end-user-doc -->
479
	 * @see #getLocalLabel()
480
	 * @generated
481
	 * @ordered
482
	 */
483
	protected String localLabel = LOCAL_LABEL_EDEFAULT;
484
	/**
485
	 * The default value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
486
	 * <!-- begin-user-doc -->
487
	 * <!-- end-user-doc -->
488
	 * @see #getLocalTooltip()
489
	 * @generated
490
	 * @ordered
491
	 */
492
	protected static final String LOCAL_TOOLTIP_EDEFAULT = null;
493
	/**
494
	 * The cached value of the '{@link #getLocalTooltip() <em>Local Tooltip</em>}' attribute.
495
	 * <!-- begin-user-doc -->
496
	 * <!-- end-user-doc -->
497
	 * @see #getLocalTooltip()
498
	 * @generated
499
	 * @ordered
500
	 */
501
	protected String localTooltip = LOCAL_TOOLTIP_EDEFAULT;
502
	/**
503
	 * The default value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
504
	 * <!-- begin-user-doc -->
505
	 * <!-- end-user-doc -->
506
	 * @see #getLocalImage()
507
	 * @generated
508
	 * @ordered
509
	 */
510
	protected static final Object LOCAL_IMAGE_EDEFAULT = null;
511
	/**
512
	 * The cached value of the '{@link #getLocalImage() <em>Local Image</em>}' attribute.
513
	 * <!-- begin-user-doc -->
514
	 * <!-- end-user-doc -->
515
	 * @see #getLocalImage()
516
	 * @generated
517
	 * @ordered
518
	 */
519
	protected Object localImage = LOCAL_IMAGE_EDEFAULT;
520
	/**
521
	 * The default value of the '{@link #isDirty() <em>Dirty</em>}' attribute.
464
	 * The default value of the '{@link #isDirty() <em>Dirty</em>}' attribute.
522
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
465
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
523
	 * @see #isDirty()
466
	 * @see #isDirty()
Lines 1154-1159 Link Here
1154
	}
1097
	}
1155
1098
1156
	/**
1099
	/**
1100
	 * <!-- begin-user-doc -->
1101
	 * <!-- end-user-doc -->
1102
	 * @generated
1103
	 */
1104
	public String getLocalizedLabel() {
1105
		// TODO: implement this method
1106
		// Ensure that you remove @generated or mark it @generated NOT
1107
		throw new UnsupportedOperationException();
1108
	}
1109
1110
	/**
1111
	 * <!-- begin-user-doc -->
1112
	 * <!-- end-user-doc -->
1113
	 * @generated
1114
	 */
1115
	public String getLocalizedTooltip() {
1116
		// TODO: implement this method
1117
		// Ensure that you remove @generated or mark it @generated NOT
1118
		throw new UnsupportedOperationException();
1119
	}
1120
1121
	/**
1157
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
1122
	 * <!-- begin-user-doc --> <!-- end-user-doc -->
1158
	 * @generated
1123
	 * @generated
1159
	 */
1124
	 */
Lines 1278-1289 Link Here
1278
				return getIconURI();
1243
				return getIconURI();
1279
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1244
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1280
				return getTooltip();
1245
				return getTooltip();
1281
			case MTestPackage.TEST_HARNESS__LOCAL_LABEL:
1282
				return getLocalLabel();
1283
			case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP:
1284
				return getLocalTooltip();
1285
			case MTestPackage.TEST_HARNESS__LOCAL_IMAGE:
1286
				return getLocalImage();
1287
			case MTestPackage.TEST_HARNESS__DIRTY:
1246
			case MTestPackage.TEST_HARNESS__DIRTY:
1288
				return isDirty();
1247
				return isDirty();
1289
		}
1248
		}
Lines 1385-1399 Link Here
1385
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1344
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1386
				setTooltip((String)newValue);
1345
				setTooltip((String)newValue);
1387
				return;
1346
				return;
1388
			case MTestPackage.TEST_HARNESS__LOCAL_LABEL:
1389
				setLocalLabel((String)newValue);
1390
				return;
1391
			case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP:
1392
				setLocalTooltip((String)newValue);
1393
				return;
1394
			case MTestPackage.TEST_HARNESS__LOCAL_IMAGE:
1395
				setLocalImage(newValue);
1396
				return;
1397
			case MTestPackage.TEST_HARNESS__DIRTY:
1347
			case MTestPackage.TEST_HARNESS__DIRTY:
1398
				setDirty((Boolean)newValue);
1348
				setDirty((Boolean)newValue);
1399
				return;
1349
				return;
Lines 1492-1506 Link Here
1492
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1442
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1493
				setTooltip(TOOLTIP_EDEFAULT);
1443
				setTooltip(TOOLTIP_EDEFAULT);
1494
				return;
1444
				return;
1495
			case MTestPackage.TEST_HARNESS__LOCAL_LABEL:
1496
				setLocalLabel(LOCAL_LABEL_EDEFAULT);
1497
				return;
1498
			case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP:
1499
				setLocalTooltip(LOCAL_TOOLTIP_EDEFAULT);
1500
				return;
1501
			case MTestPackage.TEST_HARNESS__LOCAL_IMAGE:
1502
				setLocalImage(LOCAL_IMAGE_EDEFAULT);
1503
				return;
1504
			case MTestPackage.TEST_HARNESS__DIRTY:
1445
			case MTestPackage.TEST_HARNESS__DIRTY:
1505
				setDirty(DIRTY_EDEFAULT);
1446
				setDirty(DIRTY_EDEFAULT);
1506
				return;
1447
				return;
Lines 1571-1582 Link Here
1571
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
1512
				return ICON_URI_EDEFAULT == null ? iconURI != null : !ICON_URI_EDEFAULT.equals(iconURI);
1572
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1513
			case MTestPackage.TEST_HARNESS__TOOLTIP:
1573
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
1514
				return TOOLTIP_EDEFAULT == null ? tooltip != null : !TOOLTIP_EDEFAULT.equals(tooltip);
1574
			case MTestPackage.TEST_HARNESS__LOCAL_LABEL:
1575
				return LOCAL_LABEL_EDEFAULT == null ? localLabel != null : !LOCAL_LABEL_EDEFAULT.equals(localLabel);
1576
			case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP:
1577
				return LOCAL_TOOLTIP_EDEFAULT == null ? localTooltip != null : !LOCAL_TOOLTIP_EDEFAULT.equals(localTooltip);
1578
			case MTestPackage.TEST_HARNESS__LOCAL_IMAGE:
1579
				return LOCAL_IMAGE_EDEFAULT == null ? localImage != null : !LOCAL_IMAGE_EDEFAULT.equals(localImage);
1580
			case MTestPackage.TEST_HARNESS__DIRTY:
1515
			case MTestPackage.TEST_HARNESS__DIRTY:
1581
				return dirty != DIRTY_EDEFAULT;
1516
				return dirty != DIRTY_EDEFAULT;
1582
		}
1517
		}
Lines 1654-1662 Link Here
1654
				case MTestPackage.TEST_HARNESS__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
1589
				case MTestPackage.TEST_HARNESS__LABEL: return UiPackageImpl.UI_LABEL__LABEL;
1655
				case MTestPackage.TEST_HARNESS__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
1590
				case MTestPackage.TEST_HARNESS__ICON_URI: return UiPackageImpl.UI_LABEL__ICON_URI;
1656
				case MTestPackage.TEST_HARNESS__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
1591
				case MTestPackage.TEST_HARNESS__TOOLTIP: return UiPackageImpl.UI_LABEL__TOOLTIP;
1657
				case MTestPackage.TEST_HARNESS__LOCAL_LABEL: return UiPackageImpl.UI_LABEL__LOCAL_LABEL;
1658
				case MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP: return UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP;
1659
				case MTestPackage.TEST_HARNESS__LOCAL_IMAGE: return UiPackageImpl.UI_LABEL__LOCAL_IMAGE;
1660
				default: return -1;
1592
				default: return -1;
1661
			}
1593
			}
1662
		}
1594
		}
Lines 1740-1748 Link Here
1740
				case UiPackageImpl.UI_LABEL__LABEL: return MTestPackage.TEST_HARNESS__LABEL;
1672
				case UiPackageImpl.UI_LABEL__LABEL: return MTestPackage.TEST_HARNESS__LABEL;
1741
				case UiPackageImpl.UI_LABEL__ICON_URI: return MTestPackage.TEST_HARNESS__ICON_URI;
1673
				case UiPackageImpl.UI_LABEL__ICON_URI: return MTestPackage.TEST_HARNESS__ICON_URI;
1742
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MTestPackage.TEST_HARNESS__TOOLTIP;
1674
				case UiPackageImpl.UI_LABEL__TOOLTIP: return MTestPackage.TEST_HARNESS__TOOLTIP;
1743
				case UiPackageImpl.UI_LABEL__LOCAL_LABEL: return MTestPackage.TEST_HARNESS__LOCAL_LABEL;
1744
				case UiPackageImpl.UI_LABEL__LOCAL_TOOLTIP: return MTestPackage.TEST_HARNESS__LOCAL_TOOLTIP;
1745
				case UiPackageImpl.UI_LABEL__LOCAL_IMAGE: return MTestPackage.TEST_HARNESS__LOCAL_IMAGE;
1746
				default: return -1;
1675
				default: return -1;
1747
			}
1676
			}
1748
		}
1677
		}
Lines 1802-1813 Link Here
1802
		result.append(iconURI);
1731
		result.append(iconURI);
1803
		result.append(", tooltip: ");
1732
		result.append(", tooltip: ");
1804
		result.append(tooltip);
1733
		result.append(tooltip);
1805
		result.append(", localLabel: ");
1806
		result.append(localLabel);
1807
		result.append(", localTooltip: ");
1808
		result.append(localTooltip);
1809
		result.append(", localImage: ");
1810
		result.append(localImage);
1811
		result.append(", dirty: ");
1734
		result.append(", dirty: ");
1812
		result.append(dirty);
1735
		result.append(dirty);
1813
		result.append(')');
1736
		result.append(')');
(-)src/org/eclipse/e4/ui/internal/workbench/ModelServiceImpl.java (-19 / +2 lines)
Lines 18-24 Link Here
18
import org.eclipse.e4.core.contexts.IEclipseContext;
18
import org.eclipse.e4.core.contexts.IEclipseContext;
19
import org.eclipse.e4.core.di.annotations.Execute;
19
import org.eclipse.e4.core.di.annotations.Execute;
20
import org.eclipse.e4.ui.model.application.MApplication;
20
import org.eclipse.e4.ui.model.application.MApplication;
21
import org.eclipse.e4.ui.model.application.ui.MContext;
22
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
21
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
23
import org.eclipse.e4.ui.model.application.ui.MGenericTile;
22
import org.eclipse.e4.ui.model.application.ui.MGenericTile;
24
import org.eclipse.e4.ui.model.application.ui.MUIElement;
23
import org.eclipse.e4.ui.model.application.ui.MUIElement;
Lines 39-44 Link Here
39
import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement;
38
import org.eclipse.e4.ui.model.application.ui.basic.MWindowElement;
40
import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
39
import org.eclipse.e4.ui.model.application.ui.basic.impl.BasicFactoryImpl;
41
import org.eclipse.e4.ui.model.application.ui.menu.MToolControl;
40
import org.eclipse.e4.ui.model.application.ui.menu.MToolControl;
41
import org.eclipse.e4.ui.model.internal.ModelUtils;
42
import org.eclipse.e4.ui.workbench.IPresentationEngine;
42
import org.eclipse.e4.ui.workbench.IPresentationEngine;
43
import org.eclipse.e4.ui.workbench.modeling.EModelService;
43
import org.eclipse.e4.ui.workbench.modeling.EModelService;
44
import org.eclipse.emf.ecore.EObject;
44
import org.eclipse.emf.ecore.EObject;
Lines 213-236 Link Here
213
	 * .model .application.MUIElement)
213
	 * .model .application.MUIElement)
214
	 */
214
	 */
215
	public IEclipseContext getContainingContext(MUIElement element) {
215
	public IEclipseContext getContainingContext(MUIElement element) {
216
		MUIElement curParent = null;
216
		return ModelUtils.getContainingContext(element);
217
		if (element.getCurSharedRef() != null)
218
			curParent = element.getCurSharedRef().getParent();
219
		else
220
			curParent = (MUIElement) ((EObject) element).eContainer();
221
222
		while (curParent != null) {
223
			if (curParent instanceof MContext) {
224
				return ((MContext) curParent).getContext();
225
			}
226
227
			if (curParent.getCurSharedRef() != null)
228
				curParent = curParent.getCurSharedRef().getParent();
229
			else
230
				curParent = (MUIElement) ((EObject) curParent).eContainer();
231
		}
232
233
		return null;
234
	}
217
	}
235
218
236
	/*
219
	/*
(-)src/org/eclipse/e4/ui/workbench/addons/perspectiveswitcher/PerspectiveSwitcher.java (-7 / +7 lines)
Lines 322-335 Link Here
322
			if (desc != null) {
322
			if (desc != null) {
323
				psItem.setImage(desc.createImage(false));
323
				psItem.setImage(desc.createImage(false));
324
				foundImage = true;
324
				foundImage = true;
325
				psItem.setToolTipText(persp.getLabel());
325
				psItem.setToolTipText(persp.getLocalizedLabel());
326
			}
326
			}
327
		}
327
		}
328
		if (!foundImage
328
		if (!foundImage
329
				|| PrefUtil.getAPIPreferenceStore().getBoolean(
329
				|| PrefUtil.getAPIPreferenceStore().getBoolean(
330
						IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR)) {
330
						IWorkbenchPreferenceConstants.SHOW_TEXT_ON_PERSPECTIVE_BAR)) {
331
			psItem.setText(persp.getLabel());
331
			psItem.setText(persp.getLocalizedLabel());
332
			psItem.setToolTipText(persp.getTooltip());
332
			psItem.setToolTipText(persp.getLocalizedTooltip());
333
		}
333
		}
334
334
335
		psItem.setSelection(persp == persp.getParent().getSelectedElement());
335
		psItem.setSelection(persp == persp.getParent().getSelectedElement());
Lines 490-496 Link Here
490
					return;
490
					return;
491
				IWorkbenchPage page = persp.getContext().get(IWorkbenchPage.class);
491
				IWorkbenchPage page = persp.getContext().get(IWorkbenchPage.class);
492
				String message = NLS.bind(WorkbenchMessages.ResetPerspective_message,
492
				String message = NLS.bind(WorkbenchMessages.ResetPerspective_message,
493
						persp.getLabel());
493
						persp.getLocalizedLabel());
494
				if (MessageDialog.openConfirm(page.getWorkbenchWindow().getShell(),
494
				if (MessageDialog.openConfirm(page.getWorkbenchWindow().getShell(),
495
						WorkbenchMessages.ResetPerspective_title, message)) {
495
						WorkbenchMessages.ResetPerspective_title, message)) {
496
					page.resetPerspective();
496
					page.resetPerspective();
Lines 526-538 Link Here
526
			if (persp != null)
526
			if (persp != null)
527
				if (showText) {
527
				if (showText) {
528
					if (persp.getLabel() != null)
528
					if (persp.getLabel() != null)
529
						items[i].setText(persp.getLabel());
529
						items[i].setText(persp.getLocalizedLabel());
530
					items[i].setToolTipText(persp.getTooltip());
530
					items[i].setToolTipText(persp.getLocalizedTooltip());
531
				} else {
531
				} else {
532
					Image image = items[i].getImage();
532
					Image image = items[i].getImage();
533
					if (image != null) {
533
					if (image != null) {
534
						items[i].setText("");
534
						items[i].setText("");
535
						items[i].setToolTipText(persp.getLabel());
535
						items[i].setToolTipText(persp.getLocalizedLabel());
536
					}
536
					}
537
				}
537
				}
538
		}
538
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/AreaRenderer.java (-4 / +4 lines)
Lines 55-65 Link Here
55
			String attName = (String) event
55
			String attName = (String) event
56
					.getProperty(UIEvents.EventTags.ATTNAME);
56
					.getProperty(UIEvents.EventTags.ATTNAME);
57
			if (UIEvents.UILabel.LABEL.equals(attName)) {
57
			if (UIEvents.UILabel.LABEL.equals(attName)) {
58
				areaItem.setText(areaModel.getLabel());
58
				areaItem.setText(areaModel.getLocalizedLabel());
59
			} else if (UIEvents.UILabel.ICONURI.equals(attName)) {
59
			} else if (UIEvents.UILabel.ICONURI.equals(attName)) {
60
				areaItem.setImage(getImage(areaModel));
60
				areaItem.setImage(getImage(areaModel));
61
			} else if (UIEvents.UILabel.TOOLTIP.equals(attName)) {
61
			} else if (UIEvents.UILabel.TOOLTIP.equals(attName)) {
62
				areaItem.setToolTipText(areaModel.getTooltip());
62
				areaItem.setToolTipText(areaModel.getLocalizedTooltip());
63
			}
63
			}
64
		}
64
		}
65
	};
65
	};
Lines 94-102 Link Here
94
94
95
		CTabItem cti = new CTabItem(ctf, SWT.NONE);
95
		CTabItem cti = new CTabItem(ctf, SWT.NONE);
96
		if (areaModel.getLabel() != null)
96
		if (areaModel.getLabel() != null)
97
			cti.setText(areaModel.getLabel());
97
			cti.setText(areaModel.getLocalizedLabel());
98
		if (areaModel.getTooltip() != null)
98
		if (areaModel.getTooltip() != null)
99
			cti.setToolTipText(areaModel.getTooltip());
99
			cti.setToolTipText(areaModel.getLocalizedTooltip());
100
		if (areaModel.getIconURI() != null)
100
		if (areaModel.getIconURI() != null)
101
			cti.setImage(getImage(areaModel));
101
			cti.setImage(getImage(areaModel));
102
102
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/DirectContributionItem.java (-3 / +3 lines)
Lines 185-191 Link Here
185
185
186
	private void updateMenuItem() {
186
	private void updateMenuItem() {
187
		MenuItem item = (MenuItem) widget;
187
		MenuItem item = (MenuItem) widget;
188
		String text = model.getLabel();
188
		String text = model.getLocalizedLabel();
189
		if (text != null) {
189
		if (text != null) {
190
			item.setText(text);
190
			item.setText(text);
191
		} else {
191
		} else {
Lines 197-209 Link Here
197
197
198
	private void updateToolItem() {
198
	private void updateToolItem() {
199
		ToolItem item = (ToolItem) widget;
199
		ToolItem item = (ToolItem) widget;
200
		final String text = model.getLabel();
200
		final String text = model.getLocalizedLabel();
201
		if (text != null) {
201
		if (text != null) {
202
			item.setText(text);
202
			item.setText(text);
203
		} else {
203
		} else {
204
			item.setText(""); //$NON-NLS-1$
204
			item.setText(""); //$NON-NLS-1$
205
		}
205
		}
206
		final String tooltip = model.getTooltip();
206
		final String tooltip = model.getLocalizedTooltip();
207
		item.setToolTipText(tooltip);
207
		item.setToolTipText(tooltip);
208
208
209
		item.setSelection(model.isSelected());
209
		item.setSelection(model.isSelected());
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/HandledContributionItem.java (-3 / +3 lines)
Lines 223-229 Link Here
223
223
224
	private void updateMenuItem() {
224
	private void updateMenuItem() {
225
		MenuItem item = (MenuItem) widget;
225
		MenuItem item = (MenuItem) widget;
226
		String text = model.getLabel();
226
		String text = model.getLocalizedLabel();
227
		ParameterizedCommand parmCmd = model.getWbCommand();
227
		ParameterizedCommand parmCmd = model.getWbCommand();
228
		String keyBindingText = null;
228
		String keyBindingText = null;
229
		if (parmCmd != null) {
229
		if (parmCmd != null) {
Lines 255-267 Link Here
255
255
256
	private void updateToolItem() {
256
	private void updateToolItem() {
257
		ToolItem item = (ToolItem) widget;
257
		ToolItem item = (ToolItem) widget;
258
		final String text = model.getLabel();
258
		final String text = model.getLocalizedLabel();
259
		if (text != null) {
259
		if (text != null) {
260
			item.setText(text);
260
			item.setText(text);
261
		} else {
261
		} else {
262
			item.setText(""); //$NON-NLS-1$
262
			item.setText(""); //$NON-NLS-1$
263
		}
263
		}
264
		final String tooltip = model.getTooltip();
264
		final String tooltip = model.getLocalizedTooltip();
265
		item.setToolTipText(tooltip);
265
		item.setToolTipText(tooltip);
266
		item.setSelection(model.isSelected());
266
		item.setSelection(model.isSelected());
267
		item.setEnabled(model.isEnabled());
267
		item.setEnabled(model.isEnabled());
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/HandledMenuItemRenderer.java (-1 / +1 lines)
Lines 94-100 Link Here
94
	}
94
	}
95
95
96
	protected void setItemText(MMenuItem model, MenuItem item) {
96
	protected void setItemText(MMenuItem model, MenuItem item) {
97
		String text = model.getLabel();
97
		String text = model.getLocalizedLabel();
98
		if (model instanceof MHandledItem) {
98
		if (model instanceof MHandledItem) {
99
			MHandledItem handledItem = (MHandledItem) model;
99
			MHandledItem handledItem = (MHandledItem) model;
100
			IEclipseContext context = getContext(model);
100
			IEclipseContext context = getContext(model);
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/MenuItemRenderer.java (-3 / +2 lines)
Lines 10-17 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.e4.ui.workbench.renderers.swt;
11
package org.eclipse.e4.ui.workbench.renderers.swt;
12
12
13
import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator;
14
15
import java.util.HashMap;
13
import java.util.HashMap;
16
import javax.annotation.PostConstruct;
14
import javax.annotation.PostConstruct;
17
import javax.annotation.PreDestroy;
15
import javax.annotation.PreDestroy;
Lines 24-29 Link Here
24
import org.eclipse.e4.core.contexts.RunAndTrack;
22
import org.eclipse.e4.core.contexts.RunAndTrack;
25
import org.eclipse.e4.core.services.events.IEventBroker;
23
import org.eclipse.e4.core.services.events.IEventBroker;
26
import org.eclipse.e4.core.services.log.Logger;
24
import org.eclipse.e4.core.services.log.Logger;
25
import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator;
27
import org.eclipse.e4.ui.model.application.ui.MCoreExpression;
26
import org.eclipse.e4.ui.model.application.ui.MCoreExpression;
28
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
27
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
29
import org.eclipse.e4.ui.model.application.ui.MUIElement;
28
import org.eclipse.e4.ui.model.application.ui.MUIElement;
Lines 199-205 Link Here
199
	}
198
	}
200
199
201
	protected void setItemText(MMenuItem model, MenuItem item) {
200
	protected void setItemText(MMenuItem model, MenuItem item) {
202
		String text = model.getLabel();
201
		String text = model.getLocalizedLabel();
203
		if (text == null) {
202
		if (text == null) {
204
			text = ""; //$NON-NLS-1$
203
			text = ""; //$NON-NLS-1$
205
		}
204
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/MenuManagerRenderer.java (-1 / +1 lines)
Lines 750-756 Link Here
750
	}
750
	}
751
751
752
	private String getText(MMenu menuModel) {
752
	private String getText(MMenu menuModel) {
753
		String text = menuModel.getLabel();
753
		String text = menuModel.getLocalizedLabel();
754
		if (text == null || text.length() == 0) {
754
		if (text == null || text.length() == 0) {
755
			return NO_LABEL;
755
			return NO_LABEL;
756
		}
756
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/MenuRenderer.java (-1 / +1 lines)
Lines 191-197 Link Here
191
	}
191
	}
192
192
193
	private void setItemText(MMenu model, MenuItem item) {
193
	private void setItemText(MMenu model, MenuItem item) {
194
		String text = model.getLabel();
194
		String text = model.getLocalizedLabel();
195
		if (text == null) {
195
		if (text == null) {
196
			text = ""; //$NON-NLS-1$
196
			text = ""; //$NON-NLS-1$
197
		}
197
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/RenderedMenuRenderer.java (-1 / +1 lines)
Lines 75-81 Link Here
75
	}
75
	}
76
76
77
	private void setItemText(MMenu model, MenuItem item) {
77
	private void setItemText(MMenu model, MenuItem item) {
78
		String text = model.getLabel();
78
		String text = model.getLocalizedLabel();
79
		if (text == null) {
79
		if (text == null) {
80
			text = ""; //$NON-NLS-1$
80
			text = ""; //$NON-NLS-1$
81
		}
81
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/SWTPartRenderer.java (-2 / +3 lines)
Lines 140-146 Link Here
140
					if (logService != null) {
140
					if (logService != null) {
141
						String msg = "Error disposing widget for : " + element.getClass().getName(); //$NON-NLS-1$
141
						String msg = "Error disposing widget for : " + element.getClass().getName(); //$NON-NLS-1$
142
						if (element instanceof MUILabel) {
142
						if (element instanceof MUILabel) {
143
							msg += ' ' + ((MUILabel) element).getLabel();
143
							msg += ' ' + ((MUILabel) element)
144
									.getLocalizedLabel();
144
						}
145
						}
145
						logService.error(e, msg);
146
						logService.error(e, msg);
146
					}
147
					}
Lines 159-165 Link Here
159
			((Control) widget).getAccessible().addAccessibleListener(
160
			((Control) widget).getAccessible().addAccessibleListener(
160
					new AccessibleAdapter() {
161
					new AccessibleAdapter() {
161
						public void getName(AccessibleEvent e) {
162
						public void getName(AccessibleEvent e) {
162
							e.result = ((MUILabel) me).getLabel();
163
							e.result = ((MUILabel) me).getLocalizedLabel();
163
						}
164
						}
164
					});
165
					});
165
		}
166
		}
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/StackRenderer.java (-2 / +2 lines)
Lines 325-333 Link Here
325
		cti = new CTabItem(ctf, createFlags, index);
325
		cti = new CTabItem(ctf, createFlags, index);
326
326
327
		cti.setData(OWNING_ME, element);
327
		cti.setData(OWNING_ME, element);
328
		cti.setText(getLabel(part, part.getLabel()));
328
		cti.setText(getLabel(part, part.getLocalizedLabel()));
329
		cti.setImage(getImage(part));
329
		cti.setImage(getImage(part));
330
		cti.setToolTipText(part.getTooltip());
330
		cti.setToolTipText(part.getLocalizedTooltip());
331
		if (element.getWidget() != null) {
331
		if (element.getWidget() != null) {
332
			// The part might have a widget but may not yet have been placed
332
			// The part might have a widget but may not yet have been placed
333
			// under this stack, check this
333
			// under this stack, check this
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/ToolItemRenderer.java (-3 / +3 lines)
Lines 167-173 Link Here
167
	}
167
	}
168
168
169
	private void setItemText(MToolItem model, ToolItem item) {
169
	private void setItemText(MToolItem model, ToolItem item) {
170
		String text = model.getLabel();
170
		String text = model.getLocalizedLabel();
171
		if (model instanceof MHandledItem) {
171
		if (model instanceof MHandledItem) {
172
			MHandledItem handledItem = (MHandledItem) model;
172
			MHandledItem handledItem = (MHandledItem) model;
173
			IEclipseContext context = getContext(model);
173
			IEclipseContext context = getContext(model);
Lines 192-198 Link Here
192
	}
192
	}
193
193
194
	private String getToolTipText(MItem item) {
194
	private String getToolTipText(MItem item) {
195
		String text = item.getTooltip();
195
		String text = item.getLocalizedTooltip();
196
		if (item instanceof MHandledItem) {
196
		if (item instanceof MHandledItem) {
197
			MHandledItem handledItem = (MHandledItem) item;
197
			MHandledItem handledItem = (MHandledItem) item;
198
			IEclipseContext context = getContext(item);
198
			IEclipseContext context = getContext(item);
Lines 242-248 Link Here
242
242
243
		ToolItem newItem = new ToolItem((ToolBar) parent, flags, addIndex);
243
		ToolItem newItem = new ToolItem((ToolBar) parent, flags, addIndex);
244
		if (itemModel.getLabel() != null)
244
		if (itemModel.getLabel() != null)
245
			newItem.setText(itemModel.getLabel());
245
			newItem.setText(itemModel.getLocalizedLabel());
246
246
247
		newItem.setToolTipText(getToolTipText(itemModel));
247
		newItem.setToolTipText(getToolTipText(itemModel));
248
248
(-)src/org/eclipse/e4/ui/workbench/renderers/swt/WBWRenderer.java (-2 / +2 lines)
Lines 376-382 Link Here
376
		});
376
		});
377
377
378
		if (wbwModel.getLabel() != null)
378
		if (wbwModel.getLabel() != null)
379
			wbwShell.setText(wbwModel.getLabel());
379
			wbwShell.setText(wbwModel.getLocalizedLabel());
380
380
381
		wbwShell.setImage(getImage(wbwModel));
381
		wbwShell.setImage(getImage(wbwModel));
382
		// TODO: This should be added to the model, see bug 308494
382
		// TODO: This should be added to the model, see bug 308494
Lines 608-614 Link Here
608
			tableViewer.setLabelProvider(new LabelProvider() {
608
			tableViewer.setLabelProvider(new LabelProvider() {
609
				@Override
609
				@Override
610
				public String getText(Object element) {
610
				public String getText(Object element) {
611
					return ((MPart) element).getLabel();
611
					return ((MPart) element).getLocalizedLabel();
612
				}
612
				}
613
			});
613
			});
614
			tableViewer.setContentProvider(ArrayContentProvider.getInstance());
614
			tableViewer.setContentProvider(ArrayContentProvider.getInstance());
(-)src/org/eclipse/e4/ui/workbench/swt/internal/copy/ShowViewDialog.java (-5 / +11 lines)
Lines 11-22 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.e4.ui.workbench.swt.internal.copy;
12
package org.eclipse.e4.ui.workbench.swt.internal.copy;
13
13
14
import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator;
15
16
import java.util.ArrayList;
14
import java.util.ArrayList;
17
import java.util.Iterator;
15
import java.util.Iterator;
18
import java.util.List;
16
import java.util.List;
19
import org.eclipse.e4.core.contexts.IEclipseContext;
17
import org.eclipse.e4.core.contexts.IEclipseContext;
18
import org.eclipse.e4.ui.internal.workbench.swt.WorkbenchSWTActivator;
19
import org.eclipse.e4.ui.model.LocalizationHelper;
20
import org.eclipse.e4.ui.model.application.MApplication;
20
import org.eclipse.e4.ui.model.application.MApplication;
21
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
21
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
22
import org.eclipse.jface.dialogs.Dialog;
22
import org.eclipse.jface.dialogs.Dialog;
Lines 182-188 Link Here
182
	 *            the parent <code>Composite</code>.
182
	 *            the parent <code>Composite</code>.
183
	 */
183
	 */
184
	private void createFilteredTreeViewer(Composite parent) {
184
	private void createFilteredTreeViewer(Composite parent) {
185
		PatternFilter filter = new ViewPatternFilter();
185
		PatternFilter filter = new ViewPatternFilter(context);
186
		int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
186
		int styleBits = SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER;
187
		filteredTree = new FilteredTree(parent, styleBits, filter, true);
187
		filteredTree = new FilteredTree(parent, styleBits, filter, true);
188
		filteredTree.setBackground(parent.getDisplay().getSystemColor(
188
		filteredTree.setBackground(parent.getDisplay().getSystemColor(
Lines 357-364 Link Here
357
	public void selectionChanged(SelectionChangedEvent event) {
357
	public void selectionChanged(SelectionChangedEvent event) {
358
		updateSelection(event);
358
		updateSelection(event);
359
		updateButtons();
359
		updateButtons();
360
		String tooltip = (viewDescs.length > 0) ? viewDescs[0].getTooltip()
360
		String tooltip = "";
361
				: "";
361
		if (viewDescs.length > 0) {
362
			tooltip = viewDescs[0].getTooltip();
363
			tooltip = LocalizationHelper.getLocalized(tooltip, viewDescs[0],
364
					context);
365
		}
362
		boolean hasTooltip = (tooltip == null) ? false : tooltip.length() > 0;
366
		boolean hasTooltip = (tooltip == null) ? false : tooltip.length() > 0;
363
		descriptionHint.setVisible(viewDescs.length == 1 && hasTooltip);
367
		descriptionHint.setVisible(viewDescs.length == 1 && hasTooltip);
364
	}
368
	}
Lines 411-416 Link Here
411
				Object o = selection.getFirstElement();
415
				Object o = selection.getFirstElement();
412
				if (o instanceof MPartDescriptor) {
416
				if (o instanceof MPartDescriptor) {
413
					String description = ((MPartDescriptor) o).getTooltip();
417
					String description = ((MPartDescriptor) o).getTooltip();
418
					description = LocalizationHelper.getLocalized(description,
419
							(MPartDescriptor) o, context);
414
					if (description != null && description.length() == 0)
420
					if (description != null && description.length() == 0)
415
						description = WorkbenchSWTMessages.ShowView_noDesc;
421
						description = WorkbenchSWTMessages.ShowView_noDesc;
416
					popUp(description);
422
					popUp(description);
(-)src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewComparator.java (-2 / +2 lines)
Lines 44-56 Link Here
44
44
45
		String str1;
45
		String str1;
46
		if (e1 instanceof MPartDescriptor)
46
		if (e1 instanceof MPartDescriptor)
47
			str1 = ((MPartDescriptor) e1).getLabel();
47
			str1 = ((MPartDescriptor) e1).getLocalizedLabel();
48
		else
48
		else
49
			str1 = e1.toString();
49
			str1 = e1.toString();
50
50
51
		String str2;
51
		String str2;
52
		if (e2 instanceof MPartDescriptor)
52
		if (e2 instanceof MPartDescriptor)
53
			str2 = ((MPartDescriptor) e2).getLabel();
53
			str2 = ((MPartDescriptor) e2).getLocalizedLabel();
54
		else
54
		else
55
			str2 = e2.toString();
55
			str2 = e2.toString();
56
		if (str1 == null)
56
		if (str1 == null)
(-)src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewLabelProvider.java (-3 / +3 lines)
Lines 102-109 Link Here
102
		} else if (element instanceof String) {
102
		} else if (element instanceof String) {
103
			Image image = imageMap.get(FOLDER_ICON);
103
			Image image = imageMap.get(FOLDER_ICON);
104
			if (image == null) {
104
			if (image == null) {
105
				image = JFaceResources.getImageRegistry().getDescriptor(
105
				image = JFaceResources.getImageRegistry()
106
						FOLDER_ICON).createImage();
106
						.getDescriptor(FOLDER_ICON).createImage();
107
				imageMap.put(FOLDER_ICON, image);
107
				imageMap.put(FOLDER_ICON, image);
108
			}
108
			}
109
			return image;
109
			return image;
Lines 121-127 Link Here
121
		if (element instanceof String) {
121
		if (element instanceof String) {
122
			label = (String) element;
122
			label = (String) element;
123
		} else if (element instanceof MPartDescriptor) {
123
		} else if (element instanceof MPartDescriptor) {
124
			label = ((MPartDescriptor) element).getLabel();
124
			label = ((MPartDescriptor) element).getLocalizedLabel();
125
		}
125
		}
126
		return label;
126
		return label;
127
	}
127
	}
(-)src/org/eclipse/e4/ui/workbench/swt/internal/copy/ViewPatternFilter.java (-2 / +8 lines)
Lines 10-15 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.e4.ui.workbench.swt.internal.copy;
11
package org.eclipse.e4.ui.workbench.swt.internal.copy;
12
12
13
import org.eclipse.e4.core.contexts.IEclipseContext;
14
import org.eclipse.e4.ui.model.LocalizationHelper;
13
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
15
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
14
import org.eclipse.jface.viewers.Viewer;
16
import org.eclipse.jface.viewers.Viewer;
15
17
Lines 18-28 Link Here
18
 */
20
 */
19
public class ViewPatternFilter extends PatternFilter {
21
public class ViewPatternFilter extends PatternFilter {
20
22
23
	private IEclipseContext context;
24
21
	/**
25
	/**
22
	 * Create a new instance of a ViewPatternFilter
26
	 * Create a new instance of a ViewPatternFilter
23
	 */
27
	 */
24
	public ViewPatternFilter() {
28
	public ViewPatternFilter(IEclipseContext context) {
25
		super();
29
		super();
30
		this.context = context;
26
	}
31
	}
27
32
28
	/*
33
	/*
Lines 51-57 Link Here
51
		String text = null;
56
		String text = null;
52
		if (element instanceof MPartDescriptor) {
57
		if (element instanceof MPartDescriptor) {
53
			MPartDescriptor desc = (MPartDescriptor) element;
58
			MPartDescriptor desc = (MPartDescriptor) element;
54
			text = desc.getLabel();
59
			text = LocalizationHelper.getLocalized(desc.getLabel(), desc,
60
					context);
55
			if (wordMatches(text)) {
61
			if (wordMatches(text)) {
56
				return true;
62
				return true;
57
			}
63
			}
(-)Eclipse UI/org/eclipse/ui/internal/EditorReference.java (-2 / +3 lines)
Lines 171-183 Link Here
171
	public String getName() {
171
	public String getName() {
172
		IEditorPart editor = getEditor(false);
172
		IEditorPart editor = getEditor(false);
173
		if (input == null) {
173
		if (input == null) {
174
			return editor == null ? getModel().getLabel() : editor.getEditorInput().getName();
174
			return editor == null ? getModel().getLocalizedLabel() : editor.getEditorInput()
175
					.getName();
175
		}
176
		}
176
		return editor == null ? input.getName() : editor.getEditorInput().getName();
177
		return editor == null ? input.getName() : editor.getEditorInput().getName();
177
	}
178
	}
178
179
179
	public String getTitle() {
180
	public String getTitle() {
180
		String label = Util.safeString(getModel().getLabel());
181
		String label = Util.safeString(getModel().getLocalizedLabel());
181
		if (label.length() == 0) {
182
		if (label.length() == 0) {
182
			if (input == null) {
183
			if (input == null) {
183
				if (descriptor != null) {
184
				if (descriptor != null) {
(-)Eclipse UI/org/eclipse/ui/internal/PartSite.java (-1 / +1 lines)
Lines 326-332 Link Here
326
	 * @see org.eclipse.ui.IWorkbenchPartSite#getRegisteredName()
326
	 * @see org.eclipse.ui.IWorkbenchPartSite#getRegisteredName()
327
	 */
327
	 */
328
	public String getRegisteredName() {
328
	public String getRegisteredName() {
329
		return element == null ? model.getLabel() : element
329
		return element == null ? model.getLocalizedLabel() : element
330
				.getAttribute(IWorkbenchRegistryConstants.ATT_NAME);
330
				.getAttribute(IWorkbenchRegistryConstants.ATT_NAME);
331
	}
331
	}
332
332
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchPartReference.java (-6 / +5 lines)
Lines 12-20 Link Here
12
 *******************************************************************************/
12
 *******************************************************************************/
13
package org.eclipse.ui.internal;
13
package org.eclipse.ui.internal;
14
14
15
import org.eclipse.e4.ui.workbench.modeling.EPartService;
16
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
17
18
import java.util.HashMap;
15
import java.util.HashMap;
19
import java.util.Iterator;
16
import java.util.Iterator;
20
import java.util.Map;
17
import java.util.Map;
Lines 25-30 Link Here
25
import org.eclipse.e4.core.services.events.IEventBroker;
22
import org.eclipse.e4.core.services.events.IEventBroker;
26
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
23
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
27
import org.eclipse.e4.ui.workbench.UIEvents;
24
import org.eclipse.e4.ui.workbench.UIEvents;
25
import org.eclipse.e4.ui.workbench.modeling.EPartService;
26
import org.eclipse.e4.ui.workbench.modeling.EPartService.PartState;
28
import org.eclipse.jface.resource.ImageDescriptor;
27
import org.eclipse.jface.resource.ImageDescriptor;
29
import org.eclipse.jface.resource.JFaceResources;
28
import org.eclipse.jface.resource.JFaceResources;
30
import org.eclipse.jface.util.IPropertyChangeListener;
29
import org.eclipse.jface.util.IPropertyChangeListener;
Lines 357-363 Link Here
357
	 * @see org.eclipse.ui.IWorkbenchPartReference#getTitle()
356
	 * @see org.eclipse.ui.IWorkbenchPartReference#getTitle()
358
	 */
357
	 */
359
	public String getTitle() {
358
	public String getTitle() {
360
		String title = legacyPart == null ? part.getLabel() : legacyPart.getTitle();
359
		String title = legacyPart == null ? part.getLocalizedLabel() : legacyPart.getTitle();
361
		return Util.safeString(title);
360
		return Util.safeString(title);
362
	}
361
	}
363
362
Lines 367-373 Link Here
367
	 * @see org.eclipse.ui.IWorkbenchPartReference#getTitleToolTip()
366
	 * @see org.eclipse.ui.IWorkbenchPartReference#getTitleToolTip()
368
	 */
367
	 */
369
	public String getTitleToolTip() {
368
	public String getTitleToolTip() {
370
		String toolTip = part.getTooltip();
369
		String toolTip = part.getLocalizedTooltip();
371
		return Util.safeString(toolTip);
370
		return Util.safeString(toolTip);
372
	}
371
	}
373
372
Lines 637-643 Link Here
637
	 * @see org.eclipse.ui.IWorkbenchPartReference#getPartName()
636
	 * @see org.eclipse.ui.IWorkbenchPartReference#getPartName()
638
	 */
637
	 */
639
	public String getPartName() {
638
	public String getPartName() {
640
		return part.getLabel();
639
		return part.getLocalizedLabel();
641
	}
640
	}
642
641
643
	/*
642
	/*
(-)Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java (-1 / +1 lines)
Lines 457-463 Link Here
457
				LabelProvider labelProvider = new LabelProvider() {
457
				LabelProvider labelProvider = new LabelProvider() {
458
					@Override
458
					@Override
459
					public String getText(Object element) {
459
					public String getText(Object element) {
460
						return ((MPart) element).getLabel();
460
						return ((MPart) element).getLocalizedLabel();
461
					}
461
					}
462
				};
462
				};
463
				List<MPart> parts = new ArrayList<MPart>(dirtyParts);
463
				List<MPart> parts = new ArrayList<MPart>(dirtyParts);
(-)Eclipse UI/org/eclipse/ui/internal/e4/compatibility/CompatibilityPart.java (-1 / +1 lines)
Lines 105-111 Link Here
105
		} catch (Exception e) {
105
		} catch (Exception e) {
106
			if (logger != null) {
106
			if (logger != null) {
107
				String msg = "Error setting focus to : " + part.getClass().getName(); //$NON-NLS-1$
107
				String msg = "Error setting focus to : " + part.getClass().getName(); //$NON-NLS-1$
108
				msg += ' ' + part.getLabel();
108
				msg += ' ' + part.getLocalizedLabel();
109
				logger.error(e, msg);
109
				logger.error(e, msg);
110
			}
110
			}
111
		}
111
		}
(-)Eclipse UI/org/eclipse/ui/internal/quickaccess/ViewElement.java (-1 / +2 lines)
Lines 13-18 Link Here
13
13
14
import java.net.MalformedURLException;
14
import java.net.MalformedURLException;
15
import java.net.URL;
15
import java.net.URL;
16
import org.eclipse.e4.ui.model.LocalizationHelper;
16
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
17
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
17
import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
18
import org.eclipse.e4.ui.model.application.ui.advanced.MPlaceholder;
18
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
19
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
Lines 87-93 Link Here
87
88
88
	@Override
89
	@Override
89
	public String getLabel() {
90
	public String getLabel() {
90
		return viewDescriptor.getLabel();
91
		return LocalizationHelper.getLocalized(viewDescriptor.getLabel(), viewDescriptor, window.getContext());
91
	}
92
	}
92
93
93
	public int hashCode() {
94
	public int hashCode() {
(-)Eclipse UI/org/eclipse/ui/internal/registry/ViewDescriptor.java (-3 / +4 lines)
Lines 11-24 Link Here
11
 *******************************************************************************/
11
 *******************************************************************************/
12
package org.eclipse.ui.internal.registry;
12
package org.eclipse.ui.internal.registry;
13
13
14
import org.eclipse.e4.ui.workbench.IResourceUtilities;
15
16
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.core.runtime.CoreException;
17
import org.eclipse.core.runtime.IConfigurationElement;
15
import org.eclipse.core.runtime.IConfigurationElement;
18
import org.eclipse.core.runtime.IStatus;
16
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.Status;
17
import org.eclipse.core.runtime.Status;
18
import org.eclipse.e4.ui.model.LocalizationHelper;
20
import org.eclipse.e4.ui.model.application.MApplication;
19
import org.eclipse.e4.ui.model.application.MApplication;
21
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
20
import org.eclipse.e4.ui.model.application.descriptor.basic.MPartDescriptor;
21
import org.eclipse.e4.ui.workbench.IResourceUtilities;
22
import org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities;
22
import org.eclipse.e4.ui.workbench.swt.util.ISWTResourceUtilities;
23
import org.eclipse.emf.common.util.URI;
23
import org.eclipse.emf.common.util.URI;
24
import org.eclipse.jface.resource.ImageDescriptor;
24
import org.eclipse.jface.resource.ImageDescriptor;
Lines 118-124 Link Here
118
	 * @see org.eclipse.ui.views.IViewDescriptor#getLabel()
118
	 * @see org.eclipse.ui.views.IViewDescriptor#getLabel()
119
	 */
119
	 */
120
	public String getLabel() {
120
	public String getLabel() {
121
		return descriptor.getLabel();
121
		return LocalizationHelper.getLocalized(descriptor.getLabel(), descriptor,
122
				application.getContext());
122
	}
123
	}
123
124
124
	/*
125
	/*

Return to bug 331260