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 151776 Details for
Bug 294698
[analyzer] PathNameCS.simpleNames.ast are awkward to set
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]
Full init of PathNameCS.simpleNames.ast
Bug294698.patch (text/plain), 2.79 KB, created by
Ed Willink
on 2009-11-10 02:34:03 EST
(
hide
)
Description:
Full init of PathNameCS.simpleNames.ast
Filename:
MIME Type:
Creator:
Ed Willink
Created:
2009-11-10 02:34:03 EST
Size:
2.79 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ocl >Index: src/org/eclipse/ocl/parser/AbstractOCLAnalyzer.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/parser/AbstractOCLAnalyzer.java,v >retrieving revision 1.36 >diff -u -r1.36 AbstractOCLAnalyzer.java >--- src/org/eclipse/ocl/parser/AbstractOCLAnalyzer.java 9 Nov 2009 22:00:09 -0000 1.36 >+++ src/org/eclipse/ocl/parser/AbstractOCLAnalyzer.java 10 Nov 2009 07:33:04 -0000 >@@ -236,18 +236,6 @@ > } > > /** >- * @since 3.0 >- */ >- public void initPathNameAst(PathNameCS pathNameCS, Object astNode) { >- pathNameCS.setAst(astNode); >- List<SimpleNameCS> simpleNames = pathNameCS.getSimpleNames(); >- for (int i = simpleNames.size() - 1; i >= 0; --i) { >- simpleNames.get(i).setAst(astNode); >- astNode = astNode instanceof EObject ? ((EObject)astNode).eContainer() : null; >- } >- } >- >- /** > * Returns true if the token kind is an identifier or keyword, otherwise > * false. > * >@@ -1754,7 +1742,7 @@ > ERROR(typeCS, "typeCS", message);//$NON-NLS-1$ > astNode = createDummyInvalidType(env, typeCS, message); > } >- initPathNameAst((PathNameCS)typeCS, astNode); >+ typeCS.setAst(astNode); > } else if (typeCS instanceof CollectionTypeCS > || typeCS instanceof TupleTypeCS) { > if (typeCS instanceof CollectionTypeCS) { >Index: src/org/eclipse/ocl/cst/impl/PathNameCSImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.mdt/org.eclipse.ocl/plugins/org.eclipse.ocl/src/org/eclipse/ocl/cst/impl/PathNameCSImpl.java,v >retrieving revision 1.5 >diff -u -r1.5 PathNameCSImpl.java >--- src/org/eclipse/ocl/cst/impl/PathNameCSImpl.java 15 Oct 2009 19:38:06 -0000 1.5 >+++ src/org/eclipse/ocl/cst/impl/PathNameCSImpl.java 10 Nov 2009 07:33:01 -0000 >@@ -22,6 +22,7 @@ > import org.eclipse.emf.common.notify.NotificationChain; > import org.eclipse.emf.common.util.EList; > import org.eclipse.emf.ecore.EClass; >+import org.eclipse.emf.ecore.EObject; > import org.eclipse.emf.ecore.InternalEObject; > import org.eclipse.emf.ecore.util.EObjectContainmentEList; > import org.eclipse.emf.ecore.util.InternalEList; >@@ -167,9 +168,17 @@ > return super.eIsSet(featureID); > } > >+ /** >+ * Set the associated AST object to newAst, and set the correspondiing >+ * AST objects of the child simpleNames to newAst and its containers. >+ */ > @Override > public void setAst(Object newAst) { >- // TODO Auto-generated method stub >+ Object node = newAst; >+ for (int i = simpleNames.size() - 1; i >= 0; --i) { >+ simpleNames.get(i).setAst(node); >+ node = node instanceof EObject ? ((EObject)node).eContainer() : null; >+ } > super.setAst(newAst); > } >
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 294698
: 151776