switch (method.getNumberOfParameters()) {
case 0:
break;
case 1: {
ILocalVariable pType = method.getParameters()[0];
String[][] resolvedType = type
.resolveType(Signature.toString(pType
.getTypeSignature()));
IType parameterType = null;
if (resolvedType != null) {
parameterType = project
.findType(resolvedType[0][0]
+ "." + resolvedType[0][1]); //$NON-NLS-1$
}
if (resolvedType == null
|| !Util.assignable(
parameterType,
project.findType("javafx.event.Event"))) { ////$NON-NLS-1$
DefaultProblem problem = new DefaultProblem(
unit.getElementName().toCharArray(),
"Parameter '" //$NON-NLS-1$
+ pType.getElementName()
+ "' is not assignable to javafx.event.Event", //$NON-NLS-1$
IProblem.ExternalProblemNotFixable,
new String[0],
ProblemSeverities.Warning, pType
.getSourceRange()
.getOffset(), pType
.getSourceRange()
.getOffset()
+ pType.getSourceRange()
.getLength(),
getMethodLineNumber(type, method),
0);
problems.add(problem);
}