Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'doc/org.eclipse.eef.documentation/pages')
-rw-r--r--doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.html86
-rw-r--r--doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.textile89
2 files changed, 174 insertions, 1 deletions
diff --git a/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.html b/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.html
index f20e80d35..52d94e975 100644
--- a/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.html
+++ b/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.html
@@ -173,5 +173,91 @@ public class SampleTabDescriptorProvider implements IEEFTabDescriptorProvider {
<li>org.eclipse.ui.workbench</li>
<li>org.eclipse.jface</li>
</ul>
+ <h3 id="eeftabdescriptorfilter">IEEFTabDescriptorFilter</h3>
+ <p>This extension point allows to filter tabs contributed to the EEF tabbed property sheet page by implementing org.eclipse.eef.properties.ui.api.IEEFTabDescriptorFilter.</p>
+ <pre><code>&lt;extension
+ point="org.eclipse.eef.properties.ui.eefTabDescriptorFilter"&gt;
+ &lt;descriptor
+ class="org.eclipse.eef.sample.internal.extensions.SampleTabDescriptorFilter"
+ description="Provides EEF Tab filter"
+ id="org.eclipse.eef.sample.eefTabDescriptorFilter"
+ label="EEF Sample Tab Descriptor Filter"&gt;
+ &lt;/descriptor&gt;
+&lt;/extension&gt;
+</code></pre>
+ <p>Example of IEEFTabDescriptorFilter contribution. In this example, we are providing a contribution used to filter legacy tabs to the Properties view created by EEF.</p>
+ <pre><code>import org.eclipse.eef.properties.ui.api.IEEFTabDescriptor;
+import org.eclipse.eef.properties.ui.api.IEEFTabDescriptorFilter;
+
+public class SampleTabDescriptorFilter implements IEEFTabDescriptorFilter {
+
+ @Override
+ public boolean filter(IEEFTabDescriptor tabDescriptor) {
+ // Write here a useful condition
+ return false;
+ }
+
+}
+</code></pre>
+ <p>This example requires at least the following dependencies:</p>
+ <ul>
+ <li>org.eclipse.eef.common</li>
+ <li>org.eclipse.eef.properties.ui</li>
+ </ul>
+ <h3 id="eefextreferenceviewerfilterprovider">IEEFExtReferenceViewerFilterProvider</h3>
+ <p>This extension point allows the contribution of an org.eclipse.eef.ide.ui.ext.widgets.reference.api.IEEFExtReferenceViewerFilterProvider which can be used to filter the content of the tree viewers used to display the objects that can be selected and where an object can be created using the reference widget.</p>
+ <pre><code>&lt;extension
+ point="org.eclipse.eef.ide.ui.ext.widgets.reference.eefExtReferenceViewerFilterProvider"&gt;
+ &lt;descriptor
+ class="org.eclipse.sirius.ui.properties.ext.widgets.reference.internal.EEFExtReferenceViewerFilterProvider"
+ description="%viewerFilterProvider.Description"
+ id="org.eclipse.sirius.ui.properties.ext.widgets.reference.viewerFilterProvider"
+ label="%viewerFilterProvider.Label"&gt;
+ &lt;/descriptor&gt;
+&lt;/extension&gt;
+</code></pre>
+ <p>Example of the contribution of a viewer filter provider. This contribution will let a plugin filter the content displayed in the tree viewers used to show where a new value can be created and which value can be selected for a reference. Eclipse Sirius provides the following basic implementation which is used to filter everything not contained in a semantic resource:</p>
+ <pre><code>import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.eef.ide.ui.ext.widgets.reference.api.IEEFExtReferenceViewerFilterProvider;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+
+
+public class EEFExtReferenceViewerFilterProvider implements IEEFExtReferenceViewerFilterProvider {
+
+ @Override
+ public List&lt;ViewerFilter&gt; getViewerFilters(ContextKind contextKind) {
+ List&lt;ViewerFilter&gt; viewerFilters = new ArrayList&lt;&gt;();
+
+ ViewerFilter viewFilter = new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ // Used to filter aird, odesign, etc
+ if (element instanceof Resource) {
+ Session session = SessionManager.INSTANCE.getSession((Resource) element);
+ return session != null;
+ }
+ return true;
+ }
+ };
+
+ viewerFilters.add(viewFilter);
+ return viewerFilters;
+ }
+
+}
+</code></pre>
+ <p>This example requires at least the following dependencies:</p>
+ <ul>
+ <li>org.eclipse.eef.ide.ui.ext.widgets.reference</li>
+ <li>org.eclipse.emf.ecore</li>
+ <li>org.eclipse.jface.viewers</li>
+ <li>org.eclipse.sirius</li>
+ </ul>
</body>
</html> \ No newline at end of file
diff --git a/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.textile b/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.textile
index 9734b8e01..18bd8bd30 100644
--- a/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.textile
+++ b/doc/org.eclipse.eef.documentation/pages/developerguide/extensionpoints.textile
@@ -157,4 +157,91 @@ p. This example requires at least the following dependencies:
* org.eclipse.eef.ide.ui.properties
* org.eclipse.eef.properties.ui
* org.eclipse.ui.workbench
-* org.eclipse.jface \ No newline at end of file
+* org.eclipse.jface
+
+
+h3(#eeftabdescriptorfilter). IEEFTabDescriptorFilter
+
+This extension point allows to filter tabs contributed to the EEF tabbed property sheet page by implementing org.eclipse.eef.properties.ui.api.IEEFTabDescriptorFilter.
+
+bc.. <extension
+ point="org.eclipse.eef.properties.ui.eefTabDescriptorFilter">
+ <descriptor
+ class="org.eclipse.eef.sample.internal.extensions.SampleTabDescriptorFilter"
+ description="Provides EEF Tab filter"
+ id="org.eclipse.eef.sample.eefTabDescriptorFilter"
+ label="EEF Sample Tab Descriptor Filter">
+ </descriptor>
+</extension>
+p. Example of IEEFTabDescriptorFilter contribution. In this example, we are providing a contribution used to filter legacy tabs to the Properties view created by EEF.
+
+bc.. import org.eclipse.eef.properties.ui.api.IEEFTabDescriptor;
+import org.eclipse.eef.properties.ui.api.IEEFTabDescriptorFilter;
+
+public class SampleTabDescriptorFilter implements IEEFTabDescriptorFilter {
+
+ @Override
+ public boolean filter(IEEFTabDescriptor tabDescriptor) {
+ // Write here a useful condition
+ return false;
+ }
+
+}
+p. This example requires at least the following dependencies:
+* org.eclipse.eef.common
+* org.eclipse.eef.properties.ui
+
+h3(#eefextreferenceviewerfilterprovider). IEEFExtReferenceViewerFilterProvider
+
+This extension point allows the contribution of an org.eclipse.eef.ide.ui.ext.widgets.reference.api.IEEFExtReferenceViewerFilterProvider which can be used to filter the content of the tree viewers used to display the objects that can be selected and where an object can be created using the reference widget.
+
+bc.. <extension
+ point="org.eclipse.eef.ide.ui.ext.widgets.reference.eefExtReferenceViewerFilterProvider">
+ <descriptor
+ class="org.eclipse.sirius.ui.properties.ext.widgets.reference.internal.EEFExtReferenceViewerFilterProvider"
+ description="%viewerFilterProvider.Description"
+ id="org.eclipse.sirius.ui.properties.ext.widgets.reference.viewerFilterProvider"
+ label="%viewerFilterProvider.Label">
+ </descriptor>
+</extension>
+p. Example of the contribution of a viewer filter provider. This contribution will let a plugin filter the content displayed in the tree viewers used to show where a new value can be created and which value can be selected for a reference. Eclipse Sirius provides the following basic implementation which is used to filter everything not contained in a semantic resource:
+
+bc.. import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.eef.ide.ui.ext.widgets.reference.api.IEEFExtReferenceViewerFilterProvider;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.sirius.business.api.session.Session;
+import org.eclipse.sirius.business.api.session.SessionManager;
+
+
+public class EEFExtReferenceViewerFilterProvider implements IEEFExtReferenceViewerFilterProvider {
+
+ @Override
+ public List<ViewerFilter> getViewerFilters(ContextKind contextKind) {
+ List<ViewerFilter> viewerFilters = new ArrayList<>();
+
+ ViewerFilter viewFilter = new ViewerFilter() {
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ // Used to filter aird, odesign, etc
+ if (element instanceof Resource) {
+ Session session = SessionManager.INSTANCE.getSession((Resource) element);
+ return session != null;
+ }
+ return true;
+ }
+ };
+
+ viewerFilters.add(viewFilter);
+ return viewerFilters;
+ }
+
+}
+p. This example requires at least the following dependencies:
+* org.eclipse.eef.ide.ui.ext.widgets.reference
+* org.eclipse.emf.ecore
+* org.eclipse.jface.viewers
+* org.eclipse.sirius \ No newline at end of file

Back to the top