本文整理匯總了Java中org.eclipse.ui.IEditorPart.doSaveAs方法的典型用法代碼示例。如果您正苦於以下問題:Java IEditorPart.doSaveAs方法的具體用法?Java IEditorPart.doSaveAs怎麽用?Java IEditorPart.doSaveAs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.IEditorPart
的用法示例。
在下文中一共展示了IEditorPart.doSaveAs方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doSaveAs
import org.eclipse.ui.IEditorPart; //導入方法依賴的package包/類
/**
* Saves the multi-page editor's document as another file. Also updates the
* text for page 0's tab, and updates this multi-page editor's input to
* correspond to the nested editor's.
*/
public void doSaveAs() {
IEditorPart editor = getEditor(0);
editor.doSaveAs();
setPageText(0, editor.getTitle());
setInput(editor.getEditorInput());
}
示例2: doSaveAs
import org.eclipse.ui.IEditorPart; //導入方法依賴的package包/類
@Override
public void doSaveAs() {
IEditorPart editorPart = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
if (editorPart != null) {
editorPart.doSaveAs();
}
}