Bug 48617 Error range for unresolved names in qualified references
20031211 1. in the following code public void foo() { int i= xxx.yyy; } 2. if 'xxx' is undefined, but the compiler marks 'xxx.yyy' as unresolved. It would be better to only mark 'xxx'
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java
ImportRewrite importRewrite= new ImportRewrite(cu, JavaPreferencesSettings.getCodeGenerationSettings());				
			String simpleName= importRewrite.addImport(fullName);
			
			TextEdit root= proposal.getRootTextEdit();
			
			if (!importRewrite.isEmpty()) {
				root.addChild(importRewrite.createEdit(buffer)); 
			}
			String packName= Signature.getQualifier(fullName);
			String[] arg= { simpleName, packName };
			if (node.isSimpleName() && simpleName.equals(((SimpleName) node).getIdentifier())) { 
				proposal.setImage(JavaPluginImages.get(JavaPluginImages.IMG_OBJS_IMPDECL));
				proposal.setDisplayName(CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.importtype.description", arg)); 
				proposal.setRelevance(relevance + 20);
			} else {			
				root.addChild(new ReplaceEdit(node.getStartPosition(), node.getLength(), simpleName)); 
				if (packName.length() == 0) {
					proposal.setDisplayName(CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetype.nopack.description", simpleName)); 
				} else {
					proposal.setDisplayName(CorrectionMessages.getFormattedString("UnresolvedElementsSubProcessor.changetype.description", arg)); 
				}
				proposal.setRelevance(relevance);
			}
			return proposal;
		} finally {
			if (buffer != null)
				TextBuffer.release(buffer);
		}
	}