}
if(targetNode instanceof QualifiedName) {
QualifiedName target = (QualifiedName) targetNode;
IBinding binding = target.resolveBinding();
if(binding instanceof IVariableBinding) {
IVariableBinding vb = (IVariableBinding) binding;
if(vb.isField()) {
return new StoreFieldInstructionImpl(
node,
source,
new EclipseBrokenFieldAccess(target, eclipseVariableQuery),
eclipseVariableQuery);
}
}
}
if(targetNode instanceof SimpleName) {
SimpleName target = (SimpleName) targetNode;
IBinding binding = target.resolveBinding();
if(binding instanceof IVariableBinding) {
IVariableBinding vb = (IVariableBinding) binding;
if(vb.isField()) {
// implicit field access on this
return new StoreFieldInstructionImpl(
node,
source,
new EclipseImplicitFieldAccess(target, eclipseVariableQuery),
eclipseVariableQuery);
}
else if(!vb.isEnumConstant()) {
// local
return new CopyInstructionImpl(node, source,
true,
eclipseVariableQuery.variable(targetNode),
eclipseVariableQuery);