Filter unwanted side Panels

Post here questions and problems related to oXygen frameworks/document types.
MikeH
Posts: 5
Joined: Tue Apr 19, 2022 1:28 pm

Filter unwanted side Panels

Post by MikeH »

I would like to restrict user access to specific side panels in our own framework.
[Project, Model, Transformation Scenario, Open/Find Resource, and Entities]
However Window > Load Layout > Default followed by Window > Reset layout will reveal the panels that we previously removed.
Options:
  • Ability to filter panels - as we do for toolbar items and menu items (using a plugin).
  • Ability to filter from the menu Window > Load Layout both the items Default and Custom...
Ideal would be the ability to do both.
Our plugins are coded in JavaScript (as I am not familiar with Java) .
I wrote a script to identify all menu items via their text (works for almost every menu item) but It doesn't correctly remove Default and Custom....
I have a plugin that runs on startup but I cannot work out how to locate and remove the panels.

function applicationStarted(pluginWorkspaceAccess) {
// add here code to filter out named side panels
}
Cosmin Duna
Site Admin
Posts: 125
Joined: Wed Dec 12, 2018 5:33 pm

Re: Filter unwanted side Panels

Post by Cosmin Duna »

Hello,
We have an add-on that allows filtering side views from the application. And the "Reset layout" action will not reveal them.
This is the add-on: https://github.com/oxygenxml/oxygen-com ... ter-plugin.
You can follow the installation procedure from the "readme" section.
After this, you have to go in the installation directory (C:\Users\user_name\AppData\Roaming\com.oxygenxml\extensions\v24.1\plugins\com.oxygenxml.components.filter\oxygen-components-filter-plugin-master) and change the content of the filter.xml file with something like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<filter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:noNamespaceSchemaLocation="filter.xsd">
	<components>
		<tag>Project</tag>
	</components>
	<components>
		<tag>Model</tag>
	</components>
	<components>
		<tag>Transformation_scenarios</tag>
	</components>
	<components>
		<tag>Open_find_resource</tag>
	</components>
	<components>
		<tag>Entities</tag>
	</components>
</filter>
After these, those side view will be hidden.

You can also download the add-on (from "Code"> "Download zip") and unzip it inside the "{oXygenInstallDir}/plugins" directory, as you did with the JavaScript add-on. And after this, you have to edit the "filter.xml" file located in the unzipped folder.

Best regards,
Cosmin
Cosmin Duna
<oXygen/> XML Editor
http://www.oxygenxml.com
MikeH
Posts: 5
Joined: Tue Apr 19, 2022 1:28 pm

Re: Filter unwanted side Panels

Post by MikeH »

Hello Cosmin.

Thanks, that worked 100% :D
Post Reply