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 189202 Details for
Bug 334783
[API] Add new API to ease the retrieval of the parameter annotations for an IMethod
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Updated patch for JavaElement View
patch.txt (text/plain), 4.80 KB, created by
Markus Keller
on 2011-02-17 11:32:05 EST
(
hide
)
Description:
Updated patch for JavaElement View
Filename:
MIME Type:
Creator:
Markus Keller
Created:
2011-02-17 11:32:05 EST
Size:
4.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.jeview >Index: src/org/eclipse/jdt/jeview/properties/JavaElementProperties.java >=================================================================== >RCS file: /cvsroot/eclipse/jdt-ui-home/plugins/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/properties/JavaElementProperties.java,v >retrieving revision 1.11 >diff -u -r1.11 JavaElementProperties.java >--- src/org/eclipse/jdt/jeview/properties/JavaElementProperties.java 8 Mar 2010 16:28:55 -0000 1.11 >+++ src/org/eclipse/jdt/jeview/properties/JavaElementProperties.java 17 Feb 2011 16:20:10 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2010 IBM Corporation and others. >+ * Copyright (c) 2005, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -104,7 +104,7 @@ > addAnnotationProperties(); > addPackageFragmentProperties(); > addPackageFragmentRootProperties(); >- addTypeParammeterProperties(); >+ addTypeParameterProperties(); > addParentProperties(); > addSourceReferenceProperties(); > addOpenableProperties(); >@@ -227,6 +227,16 @@ > return ((ILocalVariable) element).getTypeSignature(); > } > }); >+ addProperty(new Property(ILocalVariable.class, "flags") { >+ @Override public Object compute(IJavaElement element) { >+ return getFlagsString(((ILocalVariable) element).getFlags(), element.getClass()); >+ } >+ }); >+ addProperty(new Property(ILocalVariable.class, "isParameter") { >+ @Override public Object compute(IJavaElement element) { >+ return ((ILocalVariable) element).isParameter(); >+ } >+ }); > } > > private static void addAnnotationProperties() { >@@ -469,7 +479,7 @@ > }); > } > >- private static void addTypeParammeterProperties() { >+ private static void addTypeParameterProperties() { > addProperty(new Property(ITypeParameter.class, "nameRange") { > @Override public Object compute(IJavaElement element) throws JavaModelException { > return getSourceRangeString(((ITypeParameter) element).getNameRange()); >Index: src/org/eclipse/jdt/jeview/views/JavaElement.java >=================================================================== >RCS file: /cvsroot/eclipse/jdt-ui-home/plugins/org.eclipse.jdt.jeview/src/org/eclipse/jdt/jeview/views/JavaElement.java,v >retrieving revision 1.16 >diff -u -r1.16 JavaElement.java >--- src/org/eclipse/jdt/jeview/views/JavaElement.java 8 Mar 2010 16:28:55 -0000 1.16 >+++ src/org/eclipse/jdt/jeview/views/JavaElement.java 17 Feb 2011 16:20:10 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2005, 2010 IBM Corporation and others. >+ * Copyright (c) 2005, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -28,6 +28,7 @@ > import org.eclipse.jdt.core.IJavaElement; > import org.eclipse.jdt.core.IJavaModel; > import org.eclipse.jdt.core.IJavaProject; >+import org.eclipse.jdt.core.ILocalVariable; > import org.eclipse.jdt.core.IMember; > import org.eclipse.jdt.core.IMemberValuePair; > import org.eclipse.jdt.core.IMethod; >@@ -170,6 +171,8 @@ > > if (fJavaElement instanceof ITypeParameter) > addTypeParameterChildren(result, (ITypeParameter) fJavaElement); >+ if (fJavaElement instanceof ILocalVariable) >+ addLocalVariableChildren(result, (ILocalVariable) fJavaElement); > > if (fJavaElement instanceof IAnnotation) > addAnnotationChildren(result, (IAnnotation) fJavaElement); >@@ -483,6 +486,12 @@ > return createStrings(this, method.getExceptionTypes()); > } > }); >+ result.add(new JavaElementChildrenProperty(this, "PARAMETERS") { >+ @Override >+ protected JEAttribute[] computeChildren() throws JavaModelException { >+ return createJavaElements(this, method.getParameters()); >+ } >+ }); > result.add(new JavaElementChildrenProperty(this, "PARAMETER NAMES") { > @Override > protected JEAttribute[] computeChildren() throws JavaModelException { >@@ -530,6 +539,11 @@ > }); > } > >+ private void addLocalVariableChildren(ArrayList<JEAttribute> result, final ILocalVariable localVariable) { >+ result.add(new JavaElement(this, "DECLARING MEMBER", localVariable.getDeclaringMember())); >+ result.add(new JavaElement(this, "TYPE ROOT", localVariable.getTypeRoot())); >+ } >+ > static JavaElement[] createJavaElements(JEAttribute parent, Object[] javaElements) { > JavaElement[] jeChildren= new JavaElement[javaElements.length]; > for (int i= 0; i < javaElements.length; i++) {
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 334783
:
188592
|
188599
|
188610
|
188895
|
189128
|
189195
|
189196
| 189202 |
189233
|
189390