/** * Opens an editor on the given element and selects the given range of text. * If a search results implements a <code>IFileMatchAdapter</code>, match * locations will be tracked and the current match range will be passed into * this method. * If the <code>activate</code> parameter is <code>true</code> the opened editor * should have be activated. Otherwise the focus should not be changed. * * @param match * the match to show * @param currentOffset * the current start offset of the match * @param currentLength * the current length of the selection * @param activate * whether to activate the editor. * @throws PartInitException * if an editor can't be opened * * @see org.eclipse.core.filebuffers.ITextFileBufferManager * @see IFileMatchAdapter */ protected void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException { showMatch(match, currentOffset, currentLength); }
/** * Opens an editor on the given element and selects the given range of text. * If a search results implements a <code>IFileMatchAdapter</code>, match * locations will be tracked and the current match range will be passed into * this method. * If the <code>activate</code> parameter is <code>true</code> the opened editor * should have be activated. Otherwise the focus should not be changed. * * @param match * the match to show * @param currentOffset * the current start offset of the match * @param currentLength * the current length of the selection * @param activate * whether to activate the editor. * @throws PartInitException * if an editor can't be opened * * @see org.eclipse.core.filebuffers.ITextFileBufferManager * @see IFileMatchAdapter */ protected void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException { showMatch(match, currentOffset, currentLength); }
private boolean showCurrentMatch(boolean activateEditor) { Match currentMatch = getCurrentMatch(); if (currentMatch != null) { showMatch(currentMatch, activateEditor); return true; } return false; }
private boolean showCurrentMatch(boolean activateEditor) { Match currentMatch = getCurrentMatch(); if (currentMatch != null) { showMatch(currentMatch, activateEditor); return true; } return false; }
@Override public void run() throws Exception { IRegion location= getCurrentMatchLocation(match); showMatch(match, location.getOffset(), location.getLength(), activateEditor); } };