View | Details | Raw Unified | Return to bug 334783 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/jeview/properties/JavaElementProperties.java (-3 / +13 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 104-110 Link Here
104
		addAnnotationProperties();
104
		addAnnotationProperties();
105
		addPackageFragmentProperties();
105
		addPackageFragmentProperties();
106
		addPackageFragmentRootProperties();
106
		addPackageFragmentRootProperties();
107
		addTypeParammeterProperties();
107
		addTypeParameterProperties();
108
		addParentProperties();
108
		addParentProperties();
109
		addSourceReferenceProperties();
109
		addSourceReferenceProperties();
110
		addOpenableProperties();
110
		addOpenableProperties();
Lines 227-232 Link Here
227
				return ((ILocalVariable) element).getTypeSignature();
227
				return ((ILocalVariable) element).getTypeSignature();
228
			}
228
			}
229
		});
229
		});
230
		addProperty(new Property(ILocalVariable.class, "flags") {
231
			@Override public Object compute(IJavaElement element) {
232
				return getFlagsString(((ILocalVariable) element).getFlags(), element.getClass());
233
			}
234
		});
235
		addProperty(new Property(ILocalVariable.class, "isParameter") {
236
			@Override public Object compute(IJavaElement element) {
237
				return ((ILocalVariable) element).isParameter();
238
			}
239
		});
230
	}
240
	}
231
241
232
	private static void addAnnotationProperties() {
242
	private static void addAnnotationProperties() {
Lines 469-475 Link Here
469
		});
479
		});
470
	}
480
	}
471
481
472
	private static void addTypeParammeterProperties() {
482
	private static void addTypeParameterProperties() {
473
		addProperty(new Property(ITypeParameter.class, "nameRange") {
483
		addProperty(new Property(ITypeParameter.class, "nameRange") {
474
			@Override public Object compute(IJavaElement element) throws JavaModelException {
484
			@Override public Object compute(IJavaElement element) throws JavaModelException {
475
				return getSourceRangeString(((ITypeParameter) element).getNameRange());
485
				return getSourceRangeString(((ITypeParameter) element).getNameRange());
(-)src/org/eclipse/jdt/jeview/views/JavaElement.java (-1 / +15 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 28-33 Link Here
28
import org.eclipse.jdt.core.IJavaElement;
28
import org.eclipse.jdt.core.IJavaElement;
29
import org.eclipse.jdt.core.IJavaModel;
29
import org.eclipse.jdt.core.IJavaModel;
30
import org.eclipse.jdt.core.IJavaProject;
30
import org.eclipse.jdt.core.IJavaProject;
31
import org.eclipse.jdt.core.ILocalVariable;
31
import org.eclipse.jdt.core.IMember;
32
import org.eclipse.jdt.core.IMember;
32
import org.eclipse.jdt.core.IMemberValuePair;
33
import org.eclipse.jdt.core.IMemberValuePair;
33
import org.eclipse.jdt.core.IMethod;
34
import org.eclipse.jdt.core.IMethod;
Lines 170-175 Link Here
170
		
171
		
171
		if (fJavaElement instanceof ITypeParameter)
172
		if (fJavaElement instanceof ITypeParameter)
172
			addTypeParameterChildren(result, (ITypeParameter) fJavaElement);
173
			addTypeParameterChildren(result, (ITypeParameter) fJavaElement);
174
		if (fJavaElement instanceof ILocalVariable)
175
			addLocalVariableChildren(result, (ILocalVariable) fJavaElement);
173
		
176
		
174
		if (fJavaElement instanceof IAnnotation)
177
		if (fJavaElement instanceof IAnnotation)
175
			addAnnotationChildren(result, (IAnnotation) fJavaElement);
178
			addAnnotationChildren(result, (IAnnotation) fJavaElement);
Lines 483-488 Link Here
483
				return createStrings(this, method.getExceptionTypes());
486
				return createStrings(this, method.getExceptionTypes());
484
			}
487
			}
485
		});
488
		});
489
		result.add(new JavaElementChildrenProperty(this, "PARAMETERS") {
490
			@Override
491
			protected JEAttribute[] computeChildren() throws JavaModelException {
492
				return createJavaElements(this, method.getParameters());
493
			}
494
		});
486
		result.add(new JavaElementChildrenProperty(this, "PARAMETER NAMES") {
495
		result.add(new JavaElementChildrenProperty(this, "PARAMETER NAMES") {
487
			@Override
496
			@Override
488
			protected JEAttribute[] computeChildren() throws JavaModelException {
497
			protected JEAttribute[] computeChildren() throws JavaModelException {
Lines 530-535 Link Here
530
		});
539
		});
531
	}
540
	}
532
	
541
	
542
	private void addLocalVariableChildren(ArrayList<JEAttribute> result, final ILocalVariable localVariable) {
543
		result.add(new JavaElement(this, "DECLARING MEMBER", localVariable.getDeclaringMember()));
544
		result.add(new JavaElement(this, "TYPE ROOT", localVariable.getTypeRoot()));
545
	}
546
	
533
	static JavaElement[] createJavaElements(JEAttribute parent, Object[] javaElements) {
547
	static JavaElement[] createJavaElements(JEAttribute parent, Object[] javaElements) {
534
		JavaElement[] jeChildren= new JavaElement[javaElements.length];
548
		JavaElement[] jeChildren= new JavaElement[javaElements.length];
535
		for (int i= 0; i < javaElements.length; i++) {
549
		for (int i= 0; i < javaElements.length; i++) {

Return to bug 334783