How to show undo and redo actions in toolbar in rcp applicationUndo and Redo options does not appear in applicationHow can I show line numbers in Eclipse?In Eclipse RCP, how do I disable a save toolbar button according to the “dirty” property in editorHow do I remove icons from menu items in an Eclipse RCP-based application?Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)Eclipse-Juno Undo/Redo Enable?Eclipse rcp application loads plugins from the IDE?Eclipse RCP - View - Standalone:true not working Eclipse 4.2.1How do I implement an IUndoableOperation in my RCP application using my own IUndoContextEclipse RCP application - how to create a executablepg_dump hangs when launched from Eclipse RCP application

Is it OK to say "The situation is pregnant with a crisis"?

Simplify the code

Why are symbols not written in words?

What verb goes with "coup"?

What happens if a caster is surprised while casting a spell with a long casting time?

Any Tips On Writing Extended Recollection In A Novel

"in 60 seconds or less" or "in 60 seconds or fewer"?

How does the 'five minute adventuring day' affect class balance?

Why did the Apple IIe make a hideous noise if you inserted the disk upside down?

Why would Dementors torture a Death Eater if they are loyal to Voldemort?

Difference between 给 and 跟

ATMEGA328P-U vs ATMEGA328-PU

How is it possible for tall trees to pull water to heights more than 10m?

Does a lens with a bigger max. aperture focus faster than a lens with a smaller max. aperture?

How useful would a hydroelectric power plant be in the post-apocalypse world?

Enterprise Layers and Naming Conventions

What was the point of separating stdout and stderr?

English idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

What are the children of two Muggle-borns called?

Five 5-cent coins touching each other

Advantages of using bra-ket notation

How far can gerrymandering go?

Disk usage confusion: 10G missing on Linux home partition on SSD

How soon after takeoff can you recline your airplane seat?



How to show undo and redo actions in toolbar in rcp application


Undo and Redo options does not appear in applicationHow can I show line numbers in Eclipse?In Eclipse RCP, how do I disable a save toolbar button according to the “dirty” property in editorHow do I remove icons from menu items in an Eclipse RCP-based application?Hide Coolbar/Toolbar items/Preference pages in Eclipse RCP application (Eclipse e4)Eclipse-Juno Undo/Redo Enable?Eclipse rcp application loads plugins from the IDE?Eclipse RCP - View - Standalone:true not working Eclipse 4.2.1How do I implement an IUndoableOperation in my RCP application using my own IUndoContextEclipse RCP application - how to create a executablepg_dump hangs when launched from Eclipse RCP application













2















I am working on an rcp application with a toolbar for quick access to certain actions, including undo and redo. My problem is that these two specific actions don't show up in the toolbar. I have located the cause to the workbench.xmi file that is generated when the application launches. A tag persistedState with an attribute key="persp.hiddenItems" contains persp.hideToolbarSC:org.eclipse.ui.edit.undo,persp.hideToolbarSC:org.eclipse.ui.edit.redo in the value="..." attribute. If I delete these entries from workbench.xmi, the undo and redo actions show up in the toolbar as they should.



My question is: What can I do so that org.eclipse.ui.edit.undo and org.eclipse.ui.edit.redo don't end up in this attribute to begin with?



I originally used eclipse neon without this problem, but when updating to eclipse 2018-12 this started happening.



Edit:



I finally got it to work by changing the IDs of my undo and redo actions to something else. I had to set the ID with setId(...) and setActionDefinedId(...) in the actions' constructors, and then the commands had to be defined in plugin.xml under <extension point="org.eclipse.ui.commands"> in a <command id="..." name="Undo"></command> tag.



This solutions feels more like a workaround than an actual solution, but it works for me.










share|improve this question




























    2















    I am working on an rcp application with a toolbar for quick access to certain actions, including undo and redo. My problem is that these two specific actions don't show up in the toolbar. I have located the cause to the workbench.xmi file that is generated when the application launches. A tag persistedState with an attribute key="persp.hiddenItems" contains persp.hideToolbarSC:org.eclipse.ui.edit.undo,persp.hideToolbarSC:org.eclipse.ui.edit.redo in the value="..." attribute. If I delete these entries from workbench.xmi, the undo and redo actions show up in the toolbar as they should.



    My question is: What can I do so that org.eclipse.ui.edit.undo and org.eclipse.ui.edit.redo don't end up in this attribute to begin with?



    I originally used eclipse neon without this problem, but when updating to eclipse 2018-12 this started happening.



    Edit:



    I finally got it to work by changing the IDs of my undo and redo actions to something else. I had to set the ID with setId(...) and setActionDefinedId(...) in the actions' constructors, and then the commands had to be defined in plugin.xml under <extension point="org.eclipse.ui.commands"> in a <command id="..." name="Undo"></command> tag.



    This solutions feels more like a workaround than an actual solution, but it works for me.










    share|improve this question


























      2












      2








      2








      I am working on an rcp application with a toolbar for quick access to certain actions, including undo and redo. My problem is that these two specific actions don't show up in the toolbar. I have located the cause to the workbench.xmi file that is generated when the application launches. A tag persistedState with an attribute key="persp.hiddenItems" contains persp.hideToolbarSC:org.eclipse.ui.edit.undo,persp.hideToolbarSC:org.eclipse.ui.edit.redo in the value="..." attribute. If I delete these entries from workbench.xmi, the undo and redo actions show up in the toolbar as they should.



      My question is: What can I do so that org.eclipse.ui.edit.undo and org.eclipse.ui.edit.redo don't end up in this attribute to begin with?



      I originally used eclipse neon without this problem, but when updating to eclipse 2018-12 this started happening.



      Edit:



      I finally got it to work by changing the IDs of my undo and redo actions to something else. I had to set the ID with setId(...) and setActionDefinedId(...) in the actions' constructors, and then the commands had to be defined in plugin.xml under <extension point="org.eclipse.ui.commands"> in a <command id="..." name="Undo"></command> tag.



      This solutions feels more like a workaround than an actual solution, but it works for me.










      share|improve this question
















      I am working on an rcp application with a toolbar for quick access to certain actions, including undo and redo. My problem is that these two specific actions don't show up in the toolbar. I have located the cause to the workbench.xmi file that is generated when the application launches. A tag persistedState with an attribute key="persp.hiddenItems" contains persp.hideToolbarSC:org.eclipse.ui.edit.undo,persp.hideToolbarSC:org.eclipse.ui.edit.redo in the value="..." attribute. If I delete these entries from workbench.xmi, the undo and redo actions show up in the toolbar as they should.



      My question is: What can I do so that org.eclipse.ui.edit.undo and org.eclipse.ui.edit.redo don't end up in this attribute to begin with?



      I originally used eclipse neon without this problem, but when updating to eclipse 2018-12 this started happening.



      Edit:



      I finally got it to work by changing the IDs of my undo and redo actions to something else. I had to set the ID with setId(...) and setActionDefinedId(...) in the actions' constructors, and then the commands had to be defined in plugin.xml under <extension point="org.eclipse.ui.commands"> in a <command id="..." name="Undo"></command> tag.



      This solutions feels more like a workaround than an actual solution, but it works for me.







      java eclipse swt rcp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 26 at 10:45







      maxwalls

















      asked Mar 25 at 16:34









      maxwallsmaxwalls

      134 bronze badges




      134 bronze badges




















          1 Answer
          1






          active

          oldest

          votes


















          2














          This is set by the hiddenToolBarItem element of the org.eclipse.ui.perspectiveExtensions extension point.



          The org.eclipse.ui.ide plug-in uses this to disable these tool-bar items:



           <extension
          point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension targetID="*">
          <!--
          disable "print" button which is defined by org.eclipse.ui.actions.ActionFactory.PRINT
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="print" />
          <!--
          disable "undo" button which is defined by org.eclipse.ui.actions.ActionFactory.UNDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.undo" />
          <!--
          disable "redo" button which is defined by org.eclipse.ui.actions.ActionFactory.REDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.redo" />
          </perspectiveExtension>
          </extension>


          I don't see a way to clear this other than leaving out the plug-in.






          share|improve this answer























          • The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

            – maxwalls
            Mar 26 at 10:13











          • Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

            – maxwalls
            Mar 26 at 10:37










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55342472%2fhow-to-show-undo-and-redo-actions-in-toolbar-in-rcp-application%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          This is set by the hiddenToolBarItem element of the org.eclipse.ui.perspectiveExtensions extension point.



          The org.eclipse.ui.ide plug-in uses this to disable these tool-bar items:



           <extension
          point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension targetID="*">
          <!--
          disable "print" button which is defined by org.eclipse.ui.actions.ActionFactory.PRINT
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="print" />
          <!--
          disable "undo" button which is defined by org.eclipse.ui.actions.ActionFactory.UNDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.undo" />
          <!--
          disable "redo" button which is defined by org.eclipse.ui.actions.ActionFactory.REDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.redo" />
          </perspectiveExtension>
          </extension>


          I don't see a way to clear this other than leaving out the plug-in.






          share|improve this answer























          • The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

            – maxwalls
            Mar 26 at 10:13











          • Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

            – maxwalls
            Mar 26 at 10:37















          2














          This is set by the hiddenToolBarItem element of the org.eclipse.ui.perspectiveExtensions extension point.



          The org.eclipse.ui.ide plug-in uses this to disable these tool-bar items:



           <extension
          point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension targetID="*">
          <!--
          disable "print" button which is defined by org.eclipse.ui.actions.ActionFactory.PRINT
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="print" />
          <!--
          disable "undo" button which is defined by org.eclipse.ui.actions.ActionFactory.UNDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.undo" />
          <!--
          disable "redo" button which is defined by org.eclipse.ui.actions.ActionFactory.REDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.redo" />
          </perspectiveExtension>
          </extension>


          I don't see a way to clear this other than leaving out the plug-in.






          share|improve this answer























          • The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

            – maxwalls
            Mar 26 at 10:13











          • Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

            – maxwalls
            Mar 26 at 10:37













          2












          2








          2







          This is set by the hiddenToolBarItem element of the org.eclipse.ui.perspectiveExtensions extension point.



          The org.eclipse.ui.ide plug-in uses this to disable these tool-bar items:



           <extension
          point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension targetID="*">
          <!--
          disable "print" button which is defined by org.eclipse.ui.actions.ActionFactory.PRINT
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="print" />
          <!--
          disable "undo" button which is defined by org.eclipse.ui.actions.ActionFactory.UNDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.undo" />
          <!--
          disable "redo" button which is defined by org.eclipse.ui.actions.ActionFactory.REDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.redo" />
          </perspectiveExtension>
          </extension>


          I don't see a way to clear this other than leaving out the plug-in.






          share|improve this answer













          This is set by the hiddenToolBarItem element of the org.eclipse.ui.perspectiveExtensions extension point.



          The org.eclipse.ui.ide plug-in uses this to disable these tool-bar items:



           <extension
          point="org.eclipse.ui.perspectiveExtensions">
          <perspectiveExtension targetID="*">
          <!--
          disable "print" button which is defined by org.eclipse.ui.actions.ActionFactory.PRINT
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="print" />
          <!--
          disable "undo" button which is defined by org.eclipse.ui.actions.ActionFactory.UNDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.undo" />
          <!--
          disable "redo" button which is defined by org.eclipse.ui.actions.ActionFactory.REDO
          and contributed by org.eclipse.ui.internal.ide.WorkbenchActionBuilder
          -->
          <hiddenToolBarItem id="org.eclipse.ui.edit.redo" />
          </perspectiveExtension>
          </extension>


          I don't see a way to clear this other than leaving out the plug-in.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 26 at 8:03









          greg-449greg-449

          92.4k16 gold badges68 silver badges107 bronze badges




          92.4k16 gold badges68 silver badges107 bronze badges












          • The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

            – maxwalls
            Mar 26 at 10:13











          • Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

            – maxwalls
            Mar 26 at 10:37

















          • The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

            – maxwalls
            Mar 26 at 10:13











          • Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

            – maxwalls
            Mar 26 at 10:37
















          The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

          – maxwalls
          Mar 26 at 10:13





          The application seems to need org.eclipse.ui.ide, so leaving it out wouldn't work for me. Another thing that I've tried is to give my undo- and redo actions different IDs, which seems to somewhat work. The problem is that exceptions are printed to the console. I'll update the question with this information.

          – maxwalls
          Mar 26 at 10:13













          Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

          – maxwalls
          Mar 26 at 10:37





          Nevermind, I got it working by changing the IDs. I'll update my questing with what I had to do.

          – maxwalls
          Mar 26 at 10:37






          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







          Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid …


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55342472%2fhow-to-show-undo-and-redo-actions-in-toolbar-in-rcp-application%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?