Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- PKCS#8
- Log4J
- mac
- PKCS
- AES
- ACAP
- Instrumentation
- 암호학
- Freemaker
- sha1
- Postman
- ORM
- xlet
- 이클립스 플러그인 개발
- 자바
- Callable
- Executors
- StringUtils
- Runnable
- 자바 암호화
- IPTV
- 한글조사처리
- 한글조사
- JCE
- RSA
- Java
- DAMO
- Executor
- date
- String
Archives
- Today
- Total
오늘은 어디로 갈까...
org.eclipse.search.searchPages 본문
SearchQuery implements ISearchQuery
SearchResult extends AbstractTextSearchResult implements IEditorMatchAdapter
SearchPage extends DialogPage implements ISearchPage
SearchResultPage extends AbstractTextSearchViewPage
SearchContentProvider implements IStructuredContentProvider
private void selectLine(ITextEditor textEditor, int lineNumber) throws CoreException, BadLocationException { if (lineNumber > 0) { IEditorInput input = textEditor.getEditorInput(); int offset = 0; int length = 0; IDocumentProvider provider = textEditor.getDocumentProvider(); try { provider.connect(input); IDocument document = provider.getDocument(input); IRegion region = document.getLineInformation(lineNumber - 1); offset = region.getOffset(); length = region.getLength(); } finally { provider.disconnect(input); } if (offset >= 0 && length >= 0) { textEditor.selectAndReveal(offset, length); } } } @Override protected void showMatch(Match match, int currentOffset, int currentLength, boolean activate) throws PartInitException { IEditorPart editor = editorOpener.openMatch(match); if (editor != null) { if (activate) { editor.getEditorSite().getPage().activate(editor); } if (editor instanceof XMLMultiPageEditorPart) { TextEditor textEditor = (TextEditor) editor .getAdapter(TextEditor.class); try { selectLine(textEditor, currentOffset); } catch (CoreException e) { e.printStackTrace(); } catch (BadLocationException e) { e.printStackTrace(); } } else if (editor instanceof JavaEditor) { if (match.getElement() instanceof TreeObject) { TreeObject treeObject = (TreeObject) match.getElement(); IMember member = (IMember) treeObject .getAdapter(IMember.class); if (member != null) { try { ISourceRange range = member.getNameRange(); EditorUtility.revealInEditor(editor, range .getOffset(), range.getLength()); // ((JavaEditor)editor).selectAndReveal(range. // getOffset(), range.getLength()); } catch (Exception e) { e.printStackTrace(); } } } } } }
JavaUI.revealInEditor(part, (IJavaElement)element);