if (nextToken == Symbols.TokenLPAREN
if (!fCloseBrackets || nextToken == Symbols.TokenLPAREN
		public void verifyKey(VerifyEvent event) {						// early pruning to slow down normal typing as little as possible			if (!event.doit || getInsertMode() != SMART_INSERT)				return;			switch (event.character) {				case '(':				case '<':				case '[':				case '\'':				case '\"':					break;				default:					return;			}							final ISourceViewer sourceViewer= getSourceViewer();			IDocument document= sourceViewer.getDocument();			final Point selection= sourceViewer.getSelectedRange();			final int offset= selection.x;			final int length= selection.y;						try {				IRegion startLine= document.getLineInformationOfOffset(offset);				IRegion endLine= document.getLineInformationOfOffset(offset + length);								JavaHeuristicScanner scanner= new JavaHeuristicScanner(document);				int nextToken= scanner.nextToken(offset + length, endLine.getOffset() + endLine.getLength());				String next= nextToken == Symbols.TokenEOF ? null : document.get(offset, scanner.getPosition() - offset).trim();				int prevToken= scanner.previousToken(offset - 1, startLine.getOffset());				int prevTokenOffset= scanner.getPosition() + 1;				String previous= prevToken == Symbols.TokenEOF ? null : document.get(prevTokenOffset, offset - prevTokenOffset).trim();								switch (event.character) {					case '(':						if (nextToken == Symbols.TokenLPAREN								|| nextToken == Symbols.TokenIDENT 								|| next != null && next.length() > 1)							return;						break;											case '<':						if (!fCloseAngularBrackets								|| nextToken == Symbols.TokenLESSTHAN 								|| nextToken == Symbols.TokenIDENT								|| 		   prevToken != Symbols.TokenLBRACE											&& prevToken != Symbols.TokenRBRACE 										&& prevToken != Symbols.TokenSEMICOLON										&& prevToken != Symbols.TokenSYNCHRONIZED										&& prevToken != Symbols.TokenSTATIC										&& (prevToken != Symbols.TokenIDENT || !isAngularIntroducer(previous))										&& prevToken != Symbols.TokenEOF)							return;						break;											case '[':						if (!fCloseBrackets								|| nextToken == Symbols.TokenIDENT 								|| next != null && next.length() > 1)							return;						break;											case '\'':					case '"':						if (!fCloseStrings								|| nextToken == Symbols.TokenIDENT 								|| prevToken == Symbols.TokenIDENT								|| next != null && next.length() > 1								|| previous != null && previous.length() > 1)							return;						break;											default:						return;				}								ITypedRegion partition= TextUtilities.getPartition(document, IJavaPartitions.JAVA_PARTITIONING, offset, true);				if (!IDocument.DEFAULT_CONTENT_TYPE.equals(partition.getType()))					return;								if (!validateEditorInputState())					return;								final char character= event.character;				final char closingCharacter= getPeerCharacter(character);				final StringBuffer buffer= new StringBuffer();				buffer.append(character);				buffer.append(closingCharacter);								document.replace(offset, length, buffer.toString());												BracketLevel level= new BracketLevel();				fBracketLevelStack.push(level);								LinkedPositionGroup group= new LinkedPositionGroup(); 				group.addPosition(new LinkedPosition(document, offset + 1, 0, LinkedPositionGroup.NO_STOP));								LinkedModeModel model= new LinkedModeModel();				model.addLinkingListener(this);				model.addGroup(group);				model.forceInstall();								level.fOffset= offset;				level.fLength= 2;								// set up position tracking for our magic peers				if (fBracketLevelStack.size() == 1) {					document.addPositionCategory(CATEGORY);					document.addPositionUpdater(fUpdater);				}				level.fFirstPosition= new Position(offset, 1);				level.fSecondPosition= new Position(offset + 1, 1);				document.addPosition(CATEGORY, level.fFirstPosition);				document.addPosition(CATEGORY, level.fSecondPosition);								level.fUI= new EditorLinkedModeUI(model, sourceViewer);				level.fUI.setSimpleMode(true);				level.fUI.setExitPolicy(new ExitPolicy(closingCharacter, getEscapeCharacter(closingCharacter), fBracketLevelStack));				level.fUI.setExitPosition(sourceViewer, offset + 2, 0, Integer.MAX_VALUE);				level.fUI.setCyclingMode(LinkedModeUI.CYCLE_NEVER);				level.fUI.enter();												IRegion newSelection= level.fUI.getSelectedRegion();				sourceViewer.setSelectedRange(newSelection.getOffset(), newSelection.getLength());								event.doit= false;							} catch (BadLocationException e) {				JavaPlugin.log(e);			} catch (BadPositionCategoryException e) {				JavaPlugin.log(e);			}		}