Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 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 140-145
Link Here
|
140 |
ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true); |
140 |
ClassFile classFile = new CodeSnippetClassFile(typeBinding, null, true); |
141 |
|
141 |
|
142 |
// inner attributes |
142 |
// inner attributes |
|
|
143 |
if (typeBinding.hasMemberTypes()) { |
144 |
// see bug 180109 |
145 |
ReferenceBinding[] members = typeBinding.memberTypes; |
146 |
for (int i = 0, l = members.length; i < l; i++) |
147 |
classFile.recordInnerClasses(members[i]); |
148 |
} |
149 |
// TODO (olivier) handle cases where a field cannot be generated (name too long) |
150 |
// TODO (olivier) handle too many methods |
151 |
// inner attributes |
143 |
if (typeBinding.isNestedType()) { |
152 |
if (typeBinding.isNestedType()) { |
144 |
classFile.recordInnerClasses(typeBinding); |
153 |
classFile.recordInnerClasses(typeBinding); |
145 |
} |
154 |
} |
Lines 180-185
Link Here
|
180 |
AbstractMethodDeclaration methodDecl = methodDecls[i]; |
189 |
AbstractMethodDeclaration methodDecl = methodDecls[i]; |
181 |
MethodBinding method = methodDecl.binding; |
190 |
MethodBinding method = methodDecl.binding; |
182 |
if (method == null || method.isConstructor()) continue; |
191 |
if (method == null || method.isConstructor()) continue; |
|
|
192 |
method.modifiers = ClassFileConstants.AccPublic | ClassFileConstants.AccAbstract; |
183 |
classFile.addAbstractMethod(methodDecl, method); |
193 |
classFile.addAbstractMethod(methodDecl, method); |
184 |
} |
194 |
} |
185 |
} else { |
195 |
} else { |
Lines 189-194
Link Here
|
189 |
if (method == null) continue; |
199 |
if (method == null) continue; |
190 |
if (method.isConstructor()) { |
200 |
if (method.isConstructor()) { |
191 |
classFile.addProblemConstructor(methodDecl, method, problemsCopy); |
201 |
classFile.addProblemConstructor(methodDecl, method, problemsCopy); |
|
|
202 |
} else if (method.isAbstract()) { |
203 |
classFile.addAbstractMethod(methodDecl, method); |
192 |
} else { |
204 |
} else { |
193 |
classFile.addProblemMethod(methodDecl, method, problemsCopy); |
205 |
classFile.addProblemMethod(methodDecl, method, problemsCopy); |
194 |
} |
206 |
} |