}
@Override
protected IStatus run(IProgressMonitor monitor) {
if (componentType != null) {
EvaluationContext context = createContext();
TypeDeclaration typeDec = getCompTypeDeclaration();
if (typeDec != null) {
MethodDeclaration constructor = getConstructor(typeDec);
if (constructor != null) {
IEvaluator evaluator = (IEvaluator) Platform
.getAdapterManager().getAdapter(constructor,
IEvaluator.class);
if (evaluator != null) {
int result = evaluator.evaluate(context);
FrameContext consFrame = context.popup();
if (result == IEvaluator.RETURN) {
System.out.println("this="
+ context.getThisObject());
for (String fieldName : context.getFieldNames()) {
System.out.println(fieldName + "="
+ context.getField(fieldName));
}
} else if (result == IEvaluator.THROW) {
Throwable throwable = (Throwable) consFrame.getResult();
throwable.printStackTrace();
}