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 155103 Details for
Bug 255469
Investigate support for dynamic EOperation call API
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]
Allows reflective EOperation invocation in dynamic models
dynamic.patch (text/plain), 1.62 KB, created by
Achim Demelt
on 2009-12-29 03:26:07 EST
(
hide
)
Description:
Allows reflective EOperation invocation in dynamic models
Filename:
MIME Type:
Creator:
Achim Demelt
Created:
2009-12-29 03:26:07 EST
Size:
1.62 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.ecore >Index: src/org/eclipse/emf/ecore/impl/DynamicEObjectImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/impl/DynamicEObjectImpl.java,v >retrieving revision 1.9 >diff -u -r1.9 DynamicEObjectImpl.java >--- src/org/eclipse/emf/ecore/impl/DynamicEObjectImpl.java 16 Nov 2009 19:27:13 -0000 1.9 >+++ src/org/eclipse/emf/ecore/impl/DynamicEObjectImpl.java 29 Dec 2009 08:03:57 -0000 >@@ -17,6 +17,8 @@ > package org.eclipse.emf.ecore.impl; > > >+import java.lang.reflect.InvocationTargetException; >+ > import org.eclipse.emf.common.util.BasicEMap; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.common.util.URI; >@@ -265,6 +267,28 @@ > } > > @Override >+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException >+ { >+ EOperation eOperation = eClass().getEOperation(operationID); >+ assert eOperation != null : "Invalid operationID: " + operationID; >+ >+ return eInvocationDelegate(eOperation).dynamicInvoke(this, arguments); >+ } >+ >+ @Override >+ public Object eInvoke(EOperation eOperation, EList<?> arguments) throws InvocationTargetException { >+ int operationID = eDerivedOperationID(eOperation); >+ if (operationID >= 0) >+ { >+ return eInvoke(operationID, arguments); >+ } >+ else >+ { >+ throw new IllegalArgumentException("The operation '" + eOperation.getName() + "' is not a valid operation"); >+ } >+ } >+ >+ @Override > protected EClass eDynamicClass() > { > return eClass;
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 255469
:
118008
|
118009
|
148791
|
149767
|
150408
|
150693
|
151088
| 155103