精華區beta Eclipse 關於我們 聯絡資訊
今天試著找怎麼最直接取得 IFile, 後來發現在別人的 source code 有這樣寫 http://www.koders.com/java/fid69E1B2386B77CC840688DB65FC3F3E7FFDAC8352.aspx ====================================================== IEditorPart editor = PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getActivePage().getActiveEditor(); IEditorInput input = editor.getEditorInput(); IFile file = (IFile) input.getAdapter(IFile.class); System.out.println(file); -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.133.80.216
quake:Adaptor是好物阿~~ 07/07 20:17