LinkedPositionGroup group= new LinkedPositionGroup();
	private void enterLinkedMode(ITextViewer viewer) throws BadLocationException {		IDocument document= viewer.getDocument();		LinkedModeModel model= new LinkedModeModel();		boolean added= false;		Iterator iterator= fLinkGroups.values().iterator();		while (iterator.hasNext()) {			LinkedModeGroup curr= (LinkedModeGroup) iterator.next();			List positions= curr.fPositions;			if (!positions.isEmpty()) {				LinkedPositionGroup group= new LinkedPositionGroup();				IJavaCompletionProposal[] linkedModeProposals= curr.getProposals();				if (linkedModeProposals.length <= 1) {					for (int i= 0; i < positions.size(); i++) {						ITrackedNodePosition pos= (ITrackedNodePosition) positions.get(i);						if (pos.getStartPosition() != -1) {							group.addPosition(new LinkedPosition(document, pos.getStartPosition(), pos.getLength(), fPositionOrder.indexOf(pos)));						}					}				} else {					for (int i= 0; i < positions.size(); i++) {						ITrackedNodePosition pos= (ITrackedNodePosition) positions.get(i);						if (pos.getStartPosition() != -1) {							ProposalPosition proposalPosition= new ProposalPosition(document, pos.getStartPosition(), pos.getLength(), fPositionOrder.indexOf(pos), linkedModeProposals);							for (int j= 0; j < linkedModeProposals.length; j++) {								if (linkedModeProposals[j] instanceof LinkedModeProposal)									((LinkedModeProposal)linkedModeProposals[j]).addPosition(proposalPosition);							}							group.addPosition(proposalPosition);						}					}				}				model.addGroup(group);				added= true;			}		}		model.forceInstall();		JavaEditor editor= getJavaEditor();		if (editor != null) {			model.addLinkingListener(new EditorHighlightingSynchronizer(editor));		}		if (added) { // only set up UI if there are any positions set			LinkedModeUI ui= new EditorLinkedModeUI(model, viewer);			if (fSelectionDescription != null && fSelectionDescription.getStartPosition() != -1) {				ui.setExitPosition(viewer, fSelectionDescription.getStartPosition() + fSelectionDescription.getLength(), 0, Integer.MAX_VALUE);			} else {				int cursorPosition= viewer.getSelectedRange().x;				if (cursorPosition != 0) {					ui.setExitPosition(viewer, cursorPosition, 0, Integer.MAX_VALUE);				}			}			ui.setExitPolicy(new LinkedModeExitPolicy());			ui.enter();			IRegion region= ui.getSelectedRegion();			viewer.setSelectedRange(region.getOffset(), region.getLength());			viewer.revealRange(region.getOffset(), region.getLength());		}	}