Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 200551 Details for
Bug 353328
ModelService.cloneElement() should not clone widget and renderer fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Add derived=true to all transient fields
derivedPatch.txt (text/plain), 8.30 KB, created by
Dean Roberts
on 2011-07-28 15:12:53 EDT
(
hide
)
Description:
Add derived=true to all transient fields
Filename:
MIME Type:
Creator:
Dean Roberts
Created:
2011-07-28 15:12:53 EDT
Size:
8.30 KB
patch
obsolete
>From fc8c14bf150809b21ac6476171eb2dea7b64d31a Thu, 28 Jul 2011 15:05:28 -0400 >From: droberts <dean_roberts@ca.ibm.com> >Date: Thu, 28 Jul 2011 13:22:16 -0400 >Subject: [PATCH] Bugzilla 353328 : ModelService.cloneElement() should not clone widget and renderer fields > >Make all transient fields derived so that EMFs default copier will >ignore them. This should be safe since all transient fields need to be >able to initialize themselves if they are null. > >diff --git a/bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore b/bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore >index 1c5fa81..4cf1d15 100644 >--- a/bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore >+++ b/bundles/org.eclipse.e4.ui.model.workbench/model/UIElements.ecore >@@ -35,12 +35,12 @@ > <eStructuralFeatures xsi:type="ecore:EReference" name="clonableSnippets" upperBound="-1" > eType="#//ApplicationElement" containment="true"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="transientData" upperBound="-1" >- eType="#//StringToObjectMap" transient="true" containment="true"/> >+ eType="#//StringToObjectMap" transient="true" derived="true" containment="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="Contribution" abstract="true" eSuperTypes="#//ApplicationElement"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="contributionURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="object" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="persistedState" upperBound="-1" > eType="#//StringToStringMap" containment="true"/> > </eClassifiers> >@@ -127,7 +127,7 @@ > nsPrefix="ui"> > <eClassifiers xsi:type="ecore:EClass" name="Context" abstract="true" interface="true"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="context" eType="#//IEclipseContext" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="variables" ordered="false" > upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="properties" upperBound="-1" >@@ -135,7 +135,7 @@ > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="Dirtyable" abstract="true" interface="true"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="dirty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="Input" abstract="true" interface="true"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="inputURI" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> >@@ -143,9 +143,9 @@ > <eClassifiers xsi:type="ecore:EClass" name="UIElement" abstract="true" eSuperTypes="#//ApplicationElement"> > <eOperations name="getLocalizedAccessibilityPhrase" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="widget" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="renderer" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="toBeRendered" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" > defaultValueLiteral="true"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="onTop" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> >@@ -158,7 +158,7 @@ > </eStructuralFeatures> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="containerData" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="curSharedRef" eType="#//ui/advanced/Placeholder" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="visibleWhen" eType="#//ui/Expression" > containment="true"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="accessibilityPhrase" >@@ -222,7 +222,7 @@ > <eStructuralFeatures xsi:type="ecore:EAttribute" name="coreExpressionId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString" > defaultValueLiteral=""/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="coreExpression" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eSubpackages name="menu" nsURI="http://www.eclipse.org/ui/2010/UIModel/application/ui/menu" > nsPrefix="menu"> >@@ -241,7 +241,7 @@ > <eClassifiers xsi:type="ecore:EClass" name="HandledItem" abstract="true" eSuperTypes="#//ui/menu/Item"> > <eStructuralFeatures xsi:type="ecore:EReference" name="command" eType="#//commands/Command"/> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="wbCommand" eType="#//commands/ParameterizedCommand" >- transient="true"/> >+ transient="true" derived="true"/> > <eStructuralFeatures xsi:type="ecore:EReference" name="parameters" upperBound="-1" > eType="#//commands/Parameter" containment="true"/> > </eClassifiers> >@@ -295,12 +295,12 @@ > <eClassifiers xsi:type="ecore:EClass" name="RenderedMenu" eSuperTypes="#//ui/menu/Menu"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="contributionManager" > eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="RenderedToolBar" eSuperTypes="#//ui/menu/ToolBar"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="contributionManager" > eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="ToolBarContribution"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="parentId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> >@@ -328,19 +328,19 @@ > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="RenderedMenuItem" eSuperTypes="#//ui/menu/MenuItem"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="contributionItem" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="OpaqueToolItem" eSuperTypes="#//ui/menu/ToolItem"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="opaqueItem" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="OpaqueMenuItem" eSuperTypes="#//ui/menu/MenuItem"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="opaqueItem" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="OpaqueMenuSeparator" eSuperTypes="#//ui/menu/MenuSeparator"> > <eStructuralFeatures xsi:type="ecore:EAttribute" name="opaqueItem" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EJavaObject" >- transient="true"/> >+ transient="true" derived="true"/> > </eClassifiers> > <eClassifiers xsi:type="ecore:EClass" name="OpaqueMenu" eSuperTypes="#//ui/menu/Menu"/> > </eSubpackages>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 353328
: 200551