View | Details | Raw Unified | Return to bug 305001 | Differences between
and this patch

Collapse All | Expand All

(-)dom/org/eclipse/jdt/core/dom/NodeFinder.java (-2 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 149-156 Link Here
149
			IBuffer buffer= source.getBuffer();
149
			IBuffer buffer= source.getBuffer();
150
			if (buffer != null) {
150
			if (buffer != null) {
151
				IScanner scanner= ToolFactory.createScanner(false, false, false, false);
151
				IScanner scanner= ToolFactory.createScanner(false, false, false, false);
152
				scanner.setSource(buffer.getText(start, length).toCharArray());
153
				try {
152
				try {
153
					scanner.setSource(buffer.getText(start, length).toCharArray());
154
					int token= scanner.getNextToken();
154
					int token= scanner.getNextToken();
155
					if (token != ITerminalSymbols.TokenNameEOF) {
155
					if (token != ITerminalSymbols.TokenNameEOF) {
156
						int tStart= scanner.getCurrentTokenStartPosition();
156
						int tStart= scanner.getCurrentTokenStartPosition();
Lines 163-168 Link Here
163
					}
163
					}
164
				} catch (InvalidInputException e) {
164
				} catch (InvalidInputException e) {
165
					// ignore
165
					// ignore
166
				} catch (IndexOutOfBoundsException e) {
167
					return null;
166
				}
168
				}
167
			}
169
			}
168
		}
170
		}
(-)model/org/eclipse/jdt/core/IBuffer.java (-2 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 156-163 Link Here
156
 * @param offset the  zero-based starting offset
156
 * @param offset the  zero-based starting offset
157
 * @param length the number of characters to retrieve
157
 * @param length the number of characters to retrieve
158
 * @return the given range of text in this buffer
158
 * @return the given range of text in this buffer
159
 * @exception IndexOutOfBoundsException
159
 */
160
 */
160
public String getText(int offset, int length);
161
public String getText(int offset, int length) throws IndexOutOfBoundsException;
161
/**
162
/**
162
 * Returns the underlying resource for which this buffer was opened,
163
 * Returns the underlying resource for which this buffer was opened,
163
 * or <code>null</code> if this buffer was not opened on a resource.
164
 * or <code>null</code> if this buffer was not opened on a resource.
(-)model/org/eclipse/jdt/internal/core/Member.java (-2 / +4 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 279-286 Link Here
279
	final int length= range.getLength();
279
	final int length= range.getLength();
280
	if (length > 0 && buf.getChar(start) == '/') {
280
	if (length > 0 && buf.getChar(start) == '/') {
281
		IScanner scanner= ToolFactory.createScanner(true, false, false, false);
281
		IScanner scanner= ToolFactory.createScanner(true, false, false, false);
282
		scanner.setSource(buf.getText(start, length).toCharArray());
283
		try {
282
		try {
283
			scanner.setSource(buf.getText(start, length).toCharArray());
284
			int docOffset= -1;
284
			int docOffset= -1;
285
			int docEnd= -1;
285
			int docEnd= -1;
286
286
Lines 305-310 Link Here
305
			}
305
			}
306
		} catch (InvalidInputException ex) {
306
		} catch (InvalidInputException ex) {
307
			// try if there is inherited Javadoc
307
			// try if there is inherited Javadoc
308
		} catch (IndexOutOfBoundsException e) {
309
			return null;
308
		}
310
		}
309
	}
311
	}
310
	return null;
312
	return null;

Return to bug 305001