2014-03-04 53 views

回答

3

FileEditorInputorg.eclipse.ui.part.FileEditorInput,但是這僅在您打開編輯器時使用。在查看現有編輯器的輸入時,請使用IFileEditorInput界面(org.eclipse.ui.IFileEditorInput)。

編輯器的輸入實際上定義爲IEditorInput,其中擴展。如果編輯器正在編輯工作區中的文件,它通常會使用IFileEditorInput。編輯也可以輸入IPathEditorInputIURIEditorInput

+0

問題是你如何找到它。在我的編輯器中,它說'org.eclipse.ui.part.FileEditorInput不能被解析爲一個類型' – Mishax

+1

@Mishax你需要在你的插件的依賴中有'org.eclipse.ui.ide',但是你通常不需要使用'FileEditorInput'。 –

+0

是的!現在我將upvote you – Mishax