<bdo id='SHptk'></bdo><ul id='SHptk'></ul>

<small id='SHptk'></small><noframes id='SHptk'>

    1. <tfoot id='SHptk'></tfoot>
      <i id='SHptk'><tr id='SHptk'><dt id='SHptk'><q id='SHptk'><span id='SHptk'><b id='SHptk'><form id='SHptk'><ins id='SHptk'></ins><ul id='SHptk'></ul><sub id='SHptk'></sub></form><legend id='SHptk'></legend><bdo id='SHptk'><pre id='SHptk'><center id='SHptk'></center></pre></bdo></b><th id='SHptk'></th></span></q></dt></tr></i><div id='SHptk'><tfoot id='SHptk'></tfoot><dl id='SHptk'><fieldset id='SHptk'></fieldset></dl></div>

        <legend id='SHptk'><style id='SHptk'><dir id='SHptk'><q id='SHptk'></q></dir></style></legend>

      1. 以编程方式保存 Eclipse 编辑器

        Save an Eclipse editor programmatically(以编程方式保存 Eclipse 编辑器)
          <bdo id='PynpK'></bdo><ul id='PynpK'></ul>

            <tbody id='PynpK'></tbody>

          1. <legend id='PynpK'><style id='PynpK'><dir id='PynpK'><q id='PynpK'></q></dir></style></legend>

            <small id='PynpK'></small><noframes id='PynpK'>

                • <i id='PynpK'><tr id='PynpK'><dt id='PynpK'><q id='PynpK'><span id='PynpK'><b id='PynpK'><form id='PynpK'><ins id='PynpK'></ins><ul id='PynpK'></ul><sub id='PynpK'></sub></form><legend id='PynpK'></legend><bdo id='PynpK'><pre id='PynpK'><center id='PynpK'></center></pre></bdo></b><th id='PynpK'></th></span></q></dt></tr></i><div id='PynpK'><tfoot id='PynpK'></tfoot><dl id='PynpK'><fieldset id='PynpK'></fieldset></dl></div>
                  <tfoot id='PynpK'></tfoot>

                  本文介绍了以编程方式保存 Eclipse 编辑器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个插件.

                  单击按钮时,我想调用 Eclipse 的保存方法或调用 Eclipse 工具栏上的保存按钮.

                  On clicking a button, I'd like to call the save method of Eclipse or call the save button on Eclipse toolbar.

                  有什么办法呢?

                  推荐答案

                  org.eclipse.ui.PlatformUI.getWorkbench().saveAll(..) 
                  

                  应该可以解决问题.

                  如果您想保存活动编辑器,请尝试

                  If you want to save the active editor, please try

                  IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
                  IEditorPart editor = page.getActiveEditor();
                  page.saveEditor(editor, true /* confirm */);
                  

                  注意导航路径中的元素可能为空.

                  Note that the elements in the navigation path may be null.

                  这篇关于以编程方式保存 Eclipse 编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)
                  How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)
                  Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)
                  Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)
                  How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)
                  How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)

                  <small id='ANRA9'></small><noframes id='ANRA9'>

                    <bdo id='ANRA9'></bdo><ul id='ANRA9'></ul>
                  • <tfoot id='ANRA9'></tfoot>

                          <legend id='ANRA9'><style id='ANRA9'><dir id='ANRA9'><q id='ANRA9'></q></dir></style></legend>
                            <tbody id='ANRA9'></tbody>
                          <i id='ANRA9'><tr id='ANRA9'><dt id='ANRA9'><q id='ANRA9'><span id='ANRA9'><b id='ANRA9'><form id='ANRA9'><ins id='ANRA9'></ins><ul id='ANRA9'></ul><sub id='ANRA9'></sub></form><legend id='ANRA9'></legend><bdo id='ANRA9'><pre id='ANRA9'><center id='ANRA9'></center></pre></bdo></b><th id='ANRA9'></th></span></q></dt></tr></i><div id='ANRA9'><tfoot id='ANRA9'></tfoot><dl id='ANRA9'><fieldset id='ANRA9'></fieldset></dl></div>