<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 编辑器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Bytecode features not available in the Java language(Java 语言中不可用的字节码功能)
                  ClassCastException because of classloaders?(ClassCastException 因为类加载器?)
                  How can I add a Javaagent to a JVM without stopping the JVM?(如何在不停止 JVM 的情况下将 Javaagent 添加到 JVM?)
                  Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )(无法在 32 位 JVM 上加载 64 位 SWT 库(替换 SWT 文件))
                  Encourage the JVM to GC rather than grow the heap?(鼓励 JVM 进行 GC 而不是增加堆?)
                  Why a sawtooth shaped graph?(为什么是锯齿形图形?)

                  <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>