<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.event-b.org/index.php?action=history&amp;feed=atom&amp;title=Extending_Single_View_Design</id>
	<title>Extending Single View Design - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.event-b.org/index.php?action=history&amp;feed=atom&amp;title=Extending_Single_View_Design"/>
	<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Extending_Single_View_Design&amp;action=history"/>
	<updated>2026-05-15T04:30:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.event-b.org/index.php?title=Extending_Single_View_Design&amp;diff=4715&amp;oldid=prev</id>
		<title>imported&gt;Jrloria: /* Adding an action provider to the navigator */</title>
		<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Extending_Single_View_Design&amp;diff=4715&amp;oldid=prev"/>
		<updated>2010-03-26T18:36:15Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Adding an action provider to the navigator&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 18:36, 26 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add a custom filter you use again the &amp;lt;code&amp;gt;org.eclipse.ui.navigator.navigatorContent&amp;lt;/code&amp;gt; extension. There you add a new actionProvider. You have to provide an implementation for &amp;lt;code&amp;gt;org.eclipse.ui.navigator.CommonActionProvider&amp;lt;/code&amp;gt;. To decide on what nodes in the tree your action provider should be invoked, use the enablement expression. Finally include your commonFilter in your viewerActionBindings. There is a example project in the SVN repository, that adds an action provider to the navigator.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;To add a custom filter you use again the &amp;lt;code&amp;gt;org.eclipse.ui.navigator.navigatorContent&amp;lt;/code&amp;gt; extension. There you add a new actionProvider. You have to provide an implementation for &amp;lt;code&amp;gt;org.eclipse.ui.navigator.CommonActionProvider&amp;lt;/code&amp;gt;. To decide on what nodes in the tree your action provider should be invoked, use the enablement expression. Finally include your commonFilter in your viewerActionBindings. There is a example project in the SVN repository, that adds an action provider to the navigator.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==See Also==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Single View Design]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Developer documentation]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Developer documentation]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Design]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Design]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>imported&gt;Jrloria</name></author>
	</entry>
	<entry>
		<id>https://wiki.event-b.org/index.php?title=Extending_Single_View_Design&amp;diff=4714&amp;oldid=prev</id>
		<title>imported&gt;Jrloria: moved from Single View Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.event-b.org/index.php?title=Extending_Single_View_Design&amp;diff=4714&amp;oldid=prev"/>
		<updated>2010-03-26T18:30:06Z</updated>

		<summary type="html">&lt;p&gt;moved from &lt;a href=&quot;/index.php/Single_View_Design&quot; title=&quot;Single View Design&quot;&gt;Single View Design&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===Extending Single View Design===&lt;br /&gt;
Single View Design uses the [http://wiki.eclipse.org/index.php/Common_Navigator_Framework Common Navigator Framework]. You can add custom filters, content providers and action providers in a plug-in of your own. Add the extension &amp;lt;code&amp;gt;org.eclipse.ui.navigator.viewer&amp;lt;/code&amp;gt;. There you can add viewerContentBindings and viewerActionBindings with viewerId &amp;lt;code&amp;gt;fr.systerel.explorer.navigator.view&amp;lt;/code&amp;gt;. This binds your custom content, actions and filters to the navigator. &lt;br /&gt;
&lt;br /&gt;
In the picture you can see what types the nodes in the navigator have.&lt;br /&gt;
&lt;br /&gt;
[[Image:Tree.jpg]]&lt;br /&gt;
&lt;br /&gt;
====Adding a content provider to the navigator====&lt;br /&gt;
To add a custom content provider you have to use the &amp;lt;code&amp;gt;org.eclipse.ui.navigator.navigatorContent&amp;lt;/code&amp;gt; extension. There you add a new navigatorContent. Example: You want to add a new child under the IMachineRoot nodes. Define a navigatorContent and add triggerPoints. There you add a new &amp;lt;code&amp;gt;instanceof&amp;lt;/code&amp;gt; with value &amp;lt;code&amp;gt;org.eventb.core.IMachineRoot &amp;lt;/code&amp;gt;. The priority of the navigatorContent decides in what order the content is shown with respect to other content providers. (For example the content provider for the variables has a higher priority than the one for invariants, that&amp;#039;s why the variables appear before the invariants in the tree.) You need to provide a contentProvider and a labelProvider class. Finally include your navigatorContent in your viewerContentBindings. For more information read the extension point description of [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html navigatorContent]. There is a example project in the SVN repository, that adds a content provider to the navigator.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
   &amp;lt;extension&lt;br /&gt;
         point=&amp;quot;org.eclipse.ui.navigator.navigatorContent&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;navigatorContent&lt;br /&gt;
            contentProvider=&amp;quot;example.ContentProvider&amp;quot;&lt;br /&gt;
            id=&amp;quot;example.navigatorContent&amp;quot;&lt;br /&gt;
            labelProvider=&amp;quot;example.LabelProvider&amp;quot;&lt;br /&gt;
            name=&amp;quot;Example Content&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;triggerPoints&amp;gt;&lt;br /&gt;
            &amp;lt;instanceof&lt;br /&gt;
                  value=&amp;quot;org.eventb.core.IMachineRoot &amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;/instanceof&amp;gt;&lt;br /&gt;
         &amp;lt;/triggerPoints&amp;gt;&lt;br /&gt;
      &amp;lt;/navigatorContent&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
   &amp;lt;extension&lt;br /&gt;
         point=&amp;quot;org.eclipse.ui.navigator.viewer&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;viewerContentBinding&lt;br /&gt;
            viewerId=&amp;quot;fr.systerel.explorer.navigator.view&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;includes&amp;gt;&lt;br /&gt;
            &amp;lt;contentExtension&lt;br /&gt;
                  pattern=&amp;quot;example.navigatorContent&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;/contentExtension&amp;gt;&lt;br /&gt;
         &amp;lt;/includes&amp;gt;&lt;br /&gt;
      &amp;lt;/viewerContentBinding&amp;gt;&lt;br /&gt;
   &amp;lt;/extension&amp;gt;&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Adding a filter to the navigator====&lt;br /&gt;
To add a custom filter you have to use the &amp;lt;code&amp;gt;org.eclipse.ui.navigator.navigatorContent&amp;lt;/code&amp;gt; extension. There you add a new commonFilter. You can either provide an implementation for &amp;lt;code&amp;gt;ViewerFilter&amp;lt;/code&amp;gt; or use xml filterExpressions. For more information read the extension point description of [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html navigatorContent]. Finally include your commonFilter in your viewerContentBindings. There is a example project in the SVN repository, that adds a filter to the navigator.&lt;br /&gt;
&lt;br /&gt;
====Adding an action provider to the navigator====&lt;br /&gt;
To add a custom filter you use again the &amp;lt;code&amp;gt;org.eclipse.ui.navigator.navigatorContent&amp;lt;/code&amp;gt; extension. There you add a new actionProvider. You have to provide an implementation for &amp;lt;code&amp;gt;org.eclipse.ui.navigator.CommonActionProvider&amp;lt;/code&amp;gt;. To decide on what nodes in the tree your action provider should be invoked, use the enablement expression. Finally include your commonFilter in your viewerActionBindings. There is a example project in the SVN repository, that adds an action provider to the navigator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Developer documentation]]&lt;br /&gt;
[[Category:Design]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Jrloria</name></author>
	</entry>
</feed>