if (endOffset == -1)
if (endOffset == -1) {
		public void restore() {			/* https://bugs.eclipse.org/bugs/show_bug.cgi?id=52257			 * This method may be called inside an async call posted			 * to the UI thread, so protect against intermediate disposal			 * of the editor.			 */			if (getSourceViewer() == null)				return;						try {								int startOffset= fStartOffset.getOffset();				int endOffset= fEndOffset.getOffset();								if (startOffset == -1)					startOffset= endOffset; // fallback to caret offset								if (endOffset == -1)					endOffset= startOffset; // fallback to other offset								IJavaElement element;				if (endOffset == -1) {					 // fallback to element selection					element= fEndOffset.getElement();					if (element == null)						element= fStartOffset.getElement();					if (element != null)						setSelection(element);					return;				}											if (isValidSelection(startOffset, endOffset - startOffset))					selectAndReveal(startOffset, endOffset - startOffset);			} finally {				fStartOffset.clear();				fEndOffset.clear();			}		}