return success;
}
private boolean createRootCode(IType type, ImportRewrite imports, IProgressMonitor monitor) {
String init_name = INIT_METHOD_NAME;
IMethod method = type.getMethod(INIT_METHOD_NAME, new String[0]);
IJavaElement sibling = null;
if (method != null && method.exists()) {
try {
sibling = getSibling(type, method);
method.delete(false, monitor);
} catch (JavaModelException e) {
ParserPlugin.getLogger().error(e);
return false;
}
}else{
method = type.getMethod(INITIALIZE_METHOD_NAME, new String[0]);
if(method!=null&&method.exists()){
try {
sibling = getSibling(type, method);
method.delete(false, monitor);
} catch (JavaModelException e) {
ParserPlugin.getLogger().error(e);
return false;
}
init_name = INITIALIZE_METHOD_NAME;