proposal.markAsSelection(rewrite, fragment.getName());
proposal.setEndPosition(rewrite.track(fragment.getName()));
	private boolean getJoinVariableProposals(IInvocationContext context, ASTNode node, Collection resultingCollections) {		ASTNode parent= node.getParent();		if (!(parent instanceof VariableDeclarationFragment)) {			return false;		}		VariableDeclarationFragment fragment= (VariableDeclarationFragment) parent;				IVariableBinding binding= fragment.resolveBinding();		if (fragment.getInitializer() != null || binding == null || binding.isField()) {			return false;		}				if (!(fragment.getParent() instanceof VariableDeclarationStatement)) {			return false;		}		VariableDeclarationStatement statement= (VariableDeclarationStatement) fragment.getParent();				SimpleName[] names= LinkedNodeFinder.findByBinding(statement.getParent(), binding);		if (names.length <= 1 || names[0] != fragment.getName()) {			return false;		}				SimpleName firstAccess= names[1];		if (!(firstAccess.getParent() instanceof Assignment)) { 			return false;		}		Assignment assignment= (Assignment) firstAccess.getParent();		if (assignment.getLeftHandSide() != firstAccess) {			return false;		}				ASTNode assignParent= assignment.getParent();		if (!(assignParent instanceof ExpressionStatement || assignParent instanceof ForStatement && ((ForStatement) assignParent).initializers().contains(assignment))) {			return false;		}						if (resultingCollections == null) {			return true;		}		AST ast= statement.getAST();		ASTRewrite rewrite= new ASTRewrite(ast);				String label= CorrectionMessages.getString("QuickAssistProcessor.joindeclaration.description"); //$NON-NLS-1$		Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_LOCAL);		LinkedCorrectionProposal proposal= new LinkedCorrectionProposal(label, context.getCompilationUnit(), rewrite, 1, image);		Expression placeholder= (Expression) rewrite.createMoveTarget(assignment.getRightHandSide());		rewrite.set(fragment, VariableDeclarationFragment.INITIALIZER_PROPERTY, placeholder, null);				if (assignParent instanceof ExpressionStatement) {			int statementParent= assignParent.getParent().getNodeType();			if (statementParent == ASTNode.IF_STATEMENT || statementParent == ASTNode.WHILE_STATEMENT || statementParent == ASTNode.DO_STATEMENT				|| statementParent == ASTNode.FOR_STATEMENT) {								Block block= ast.newBlock();				rewrite.replace(assignParent, block, null);			} else {				rewrite.remove(assignParent, null);				}			} else {			rewrite.remove(assignment, null);		}						proposal.markAsSelection(rewrite, fragment.getName());		resultingCollections.add(proposal);		return true;			}