RCP exportWizard remove unnecessary items

2019-08-19 13:48发布

问题:

I've add an Standart EXPORT action on my FileMenu:

addToMenuAndRegister(menu, ActionFactory.EXPORT.create(window));

And created a contribution wizard:

<extension
 id="exportSQL"
 point="org.eclipse.ui.exportWizards"
 name="SQL скрипты создания документа СУФД">
      <wizard
            category="ru.otr.cactuss.model.editor.wizard2"
            icon="icons/database.png"
            class="ru.otr.cactuss.wizard.sqlexport.SQLExportWizard"
            id="ru.otr.cactuss.wizard.sqlexport.SQLExportWizard"
            name="SQL скрипты создания документа СУФД">
      </wizard>
</extension>

And it's all works fine, but there is 3 standart export actions in general folder: export as Archive File, File System and Preferences. At least two of them (2 first) are highly irrelevent to my project and I want to get rid of them. The question is - how?

回答1:

Have a look at Filtering large user interfaces, especially the part of expression-based activities. That should do the trick and can even be used to remove other sorts of items such as views, commands and perspectives...