Method m = mthd.getMethod();
Class[] ptypes = m.getParameterTypes();
String pcName = ptypes[0].getName();
pcName = imports.addImport(pcName);
String pcSig = Signature.createTypeSignature(pcName, false);
IMethod imthd = meType.getMethod(m.getName(), new String[] { pcSig });
if (!imthd.exists()) {
if (methods.get(mthd) != null) {
StringBuilder builder = new StringBuilder();
if (override)
builder.append("\n");
builder.append(createEventMethodStub(monitor, meType, m, pcName));
return createEventMethod(meType, builder.toString(), monitor);
} else {
if (!override) {
return createEventMethod(meType, createEventMethodStub(monitor, meType, m, pcName), monitor);
}
}
} else {
if (methods.get(mthd) == null) {
if (override) {
try {
imthd.delete(true, monitor);
} catch (JavaModelException e) {
ParserPlugin.getLogger().error(e);
return false;
}
}