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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript