protected IScope createLocalVarScopeForJvmConstructor( JvmConstructor context, IScope parentScope) { EList<JvmFormalParameter> parameters = context.getParameters(); List<LocalVarDescription> descriptions = newArrayList(); for (JvmFormalParameter p : parameters) { if (p.getName() != null) descriptions.add(new LocalVarDescription(QualifiedName.create(p.getName()), p)); } return new JvmFeatureScope(parentScope, "constructor " + context.getSimpleName(), descriptions); }
@Override protected JvmConstructor getConstructorFromType( EObject context, Class<?> type, String constructor) { JvmConstructor result = super.getConstructorFromType(context, type, constructor); if (result != null) { IJavaElement found = elementFinder.findElementFor(result); assertEquals(IJavaElement.METHOD, found.getElementType()); assertEquals(result.getSimpleName(), found.getElementName()); IMethod foundMethod = (IMethod) found; assertEquals(result.getParameters().size(), foundMethod.getNumberOfParameters()); } return result; }