Jump to: navigation, search

Difference between revisions of "MoDisco/Capabilities"

Line 29: Line 29:
 
Product maintainers can use this definition as a starting point for customizing their product.
 
Product maintainers can use this definition as a starting point for customizing their product.
 
See [https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.modisco/plugins/trunk/org.eclipse.gmt.modisco.infra.capabilities org.eclipse.gmt.modisco.infra.capabilities].
 
See [https://dev.eclipse.org/svnroot/modeling/org.eclipse.gmt.modisco/plugins/trunk/org.eclipse.gmt.modisco.infra.capabilities org.eclipse.gmt.modisco.infra.capabilities].
 +
 +
== Selective Capabilities ==
 +
Capabilities can be as selective as you want. For example, you can choose to disable certain MoDisco views. This disables the "EPackage Registry" view:
 +
  <activityPatternBinding
 +
        activityId="org.eclipse.gmt.modisco.activities.activity"
 +
        isEqualityPattern="true"
 +
        pattern="org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.views.packageRegistry">
 +
  </activityPatternBinding>
 +
 +
Here are examples of patterns you can use to disable MoDisco contributions (use <code>isEqualityPattern="false"</code> for regular expressions):
 +
 +
{| class="wikitable" border="1" cellspacing="0"
 +
|-
 +
! Element
 +
! Pattern
 +
|-
 +
| "Package Registry" view
 +
| org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.views.packageRegistry
 +
|-
 +
| MoDisco preference page
 +
| org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.preferences.MoDiscoRootPreferencePage
 +
|-
 +
| "Query Sets" view
 +
| org.eclipse.gmt.modisco.infra.query.ui/org.eclipse.gmt.modisco.infra.query.ui.catalogView
 +
|-
 +
| "Query Execution" view
 +
| org.eclipse.gmt.modisco.infra.query.ui/org.eclipse.gmt.modisco.infra.query.ui.queryExecutionView
 +
|-
 +
| "Facet Sets" view
 +
| org.eclipse.gmt.modisco.infra.facet.ui/org.eclipse.gmt.modisco.infra.facet.ui.view
 +
|-
 +
| "Customizations" view
 +
| org.eclipse.gmt.modisco.infra.browser.custom.ui/org.eclipse.gmt.modisco.infra.browser.custom.view
 +
|-
 +
| New MoDisco project wizard
 +
| org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.NewProjectWizard
 +
|-
 +
| Open EPackage action
 +
| org.eclipse.gmt.modisco.infra.browser/org.eclipse.gmt.modisco.infra.browser.actions.actions.OpenModelFromEmfRegistry
 +
|-
 +
| Model Browser
 +
| org\.eclipse\.gmt\.modisco\.infra\.browser/.*
 +
|-
 +
| New Customization wizard
 +
| org.eclipse.gmt.modisco.infra.browser.custom.ui/org.eclipse.gmt.modisco.infra.ui.browser.custom.ui.newCustomizationWizard
 +
|-
 +
|}
 +
 +
  
 
== Capability Dialog ==
 
== Capability Dialog ==

Revision as of 09:42, 26 April 2010

Definition

MoDisco currently defines an Activity (aka Capability in the UI) that allows enabling or disabling all of MoDisco UI contributions:

<extension
      point="org.eclipse.ui.activities">
   <activity
         description="MoDisco UI Contributions"
         id="org.eclipse.gmt.modisco.activities.activity"
         name="MoDisco UI Contributions">
   </activity>
   <category
         description="MoDisco UI elements"
         id="org.eclipse.gmt.modisco.activities.category"
         name="MoDisco">
   </category>
   <categoryActivityBinding
         activityId="org.eclipse.gmt.modisco.activities.activity"
         categoryId="org.eclipse.gmt.modisco.activities.category">
   </categoryActivityBinding>
   <activityPatternBinding
         activityId="org.eclipse.gmt.modisco.activities.activity"
         isEqualityPattern="false"
         pattern="org\.eclipse\.gmt\.modisco\..*/.*">
   </activityPatternBinding>
   <defaultEnablement
         id="org.eclipse.gmt.modisco.activities.activity">
   </defaultEnablement>
</extension>

Product maintainers can use this definition as a starting point for customizing their product. See org.eclipse.gmt.modisco.infra.capabilities.

Selective Capabilities

Capabilities can be as selective as you want. For example, you can choose to disable certain MoDisco views. This disables the "EPackage Registry" view:

  <activityPatternBinding
        activityId="org.eclipse.gmt.modisco.activities.activity"
        isEqualityPattern="true"
        pattern="org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.views.packageRegistry">
  </activityPatternBinding>

Here are examples of patterns you can use to disable MoDisco contributions (use isEqualityPattern="false" for regular expressions):

Element Pattern
"Package Registry" view org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.views.packageRegistry
MoDisco preference page org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.infra.common.ui.preferences.MoDiscoRootPreferencePage
"Query Sets" view org.eclipse.gmt.modisco.infra.query.ui/org.eclipse.gmt.modisco.infra.query.ui.catalogView
"Query Execution" view org.eclipse.gmt.modisco.infra.query.ui/org.eclipse.gmt.modisco.infra.query.ui.queryExecutionView
"Facet Sets" view org.eclipse.gmt.modisco.infra.facet.ui/org.eclipse.gmt.modisco.infra.facet.ui.view
"Customizations" view org.eclipse.gmt.modisco.infra.browser.custom.ui/org.eclipse.gmt.modisco.infra.browser.custom.view
New MoDisco project wizard org.eclipse.gmt.modisco.infra.common.ui/org.eclipse.gmt.modisco.NewProjectWizard
Open EPackage action org.eclipse.gmt.modisco.infra.browser/org.eclipse.gmt.modisco.infra.browser.actions.actions.OpenModelFromEmfRegistry
Model Browser org\.eclipse\.gmt\.modisco\.infra\.browser/.*
New Customization wizard org.eclipse.gmt.modisco.infra.browser.custom.ui/org.eclipse.gmt.modisco.infra.ui.browser.custom.ui.newCustomizationWizard


Capability Dialog

Plug-in "org.eclipse.gmt.modisco.infra.capabilities" contains the Activity defined above, so that all MoDisco UI contributions can be activated/deactivated in the preferences (General > Capabilities):

MoDisco Capabilities.png