Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Remove Perspective from the Perspective Toolbar
Remove Perspective from the Perspective Toolbar [message #1870497] Fri, 30 August 2024 12:13
Isaac Asimovic is currently offline Isaac AsimovicFriend
Messages: 1
Registered: August 2024
Junior Member
Hi all,
I was in the need of developing an application to build up a block diagram flow chart to perform specific task in the given depicted order, my first thought is on developing the whole with the GEF and EMF.
The develop phase is quite simple, now I'm struggling on removing the perspective that came with the framework as shown below

index.php/fa/45099/0/

What I've tried is:

1) via plugin_customization.ini loading the configuration, as seen in https://www.eclipse.org/forums/index.php/t/198788/, where the file contains at least this line:
org.eclipse.ui/SHOW_OPEN_ON_PERSPECTIVE_BAR=false

linking the ini files to the product with the fragment
<product
            application="it.sogei.rcp.monopoli.sivo.application.prodotto"
            name="My GEF Editor">
         <property
               name="my.application.product"
               value="plugin_customization.ini">
         </property>
      </product>

where my.application.product is the id stated in the .product file as the product id
These seems to have no success, the button is still there

2) via activities, as pointed out in varous post such as https://www.eclipse.org/forums/index.php/t/160373/, through a fragment in the plugin.xml that aiming to not show the Debug Perspective
<extension
         point="org.eclipse.ui.activities">
      <activity
            id="my.id.to.remove.perspective"
            name="disable perspective">
         <enabledWhen>
            <with
                  variable="true">
               <equals
                     value="false">
               </equals>
            </with>
         </enabledWhen>
      </activity>
      <activityPatternBinding
            activityId="my.id.to.remove.perspective"
            isEqualityPattern="true"
            pattern="org.eclipse.debug.ui.DebugPerspective">
      </activityPatternBinding>
   </extension>

with no success, by the way I put the fragment once inthe product plugin anc once in the plugin where the GEF derived editor is implemented.

PS: Until now I get to not show a given perspective on the right of the "Open Perspective" button with a few lines of code in the start of the Application
IPerspectiveDescriptor[] descriptors = getWorkbench()
				.getPerspectiveRegistry().getPerspectives();

		PerspectiveRegistry pr = (PerspectiveRegistry) getWorkbench()
				.getPerspectiveRegistry();

		for (IPerspectiveDescriptor iPerspectiveDescriptor : descriptors) {
			if (iPerspectiveDescriptor.getId().equalsIgnoreCase("org.eclipse.debug.ui.DebugPerspective")) {
				pr.deletePerspective(iPerspectiveDescriptor);
			}
		}

but the user can stille be able to open the Debug perspective.

[Updated on: Fri, 30 August 2024 15:44]

Report message to a moderator

Previous Topic:How to set the style of workbench by css
Next Topic:For e4 related questions please visit the "Eclipse 4" forum
Goto Forum:
  


Current Time: Mon Oct 14 01:49:58 GMT 2024

Powered by FUDForum. Page generated in 0.03884 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top