Skip to main content
summaryrefslogtreecommitdiffstats
blob: e404f751b78bfa736331e02cb249ddd6ce2cf222 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<!--
  Copyright (c) 2016-2017 Thales Global Services S.A.S.
  This program and the accompanying materials are made
  available under the terms of the Eclipse Public License 2.0
  which is available at https://www.eclipse.org/legal/epl-2.0/
  
  SPDX-License-Identifier: EPL-2.0

    Contributors:
         Abel Hegedus, Tamas Borbas, Balazs Grill, Peter Lunk, Daniel Segesdi (IncQuery Labs Ltd.) - initial API and implementation
 -->

<plugin>

   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="org.eclipse.emf.diffmerge.patch.ui.editors.ModelPatchEditorPart"
            extensions="modelpatch, emodelpatch"
            id="org.eclipse.emf.diffmerge.patch.ui.editors.ModelPatchEditorPart"
            name="ModelPatch Editor">
      </editor>
   </extension>
  <extension
         point="org.eclipse.ui.preferencePages">
      <page
            class="org.eclipse.emf.diffmerge.patch.ui.preferences.ModelPatchPreferencePage"
            id="org.eclipse.emf.diffmerge.patch.ui.preferences.page"
            name="Model Patch Preferences">
      </page>
   </extension>
    <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="menu:edit?after=additions">
         <command
               commandId="org.eclipse.emf.diffmerge.patch.ui.patch.generate"
               icon="icons/generate_16.png"
               label="Generate modelpatch"
               style="push">
            <visibleWhen
                  checkEnabled="false">
               <or>
                  <with
                       variable="activeEditorInput">
                    <instanceof
                          value="org.eclipse.emf.diffmerge.ui.setup.EMFDiffMergeEditorInput">
                    </instanceof>
                 </with>
                 <with
                       variable="selection">
                    <instanceof
                          value="org.eclipse.emf.diffmerge.ui.diffuidata.ComparisonSelection">
                    </instanceof>
                 </with>
               </or>
            </visibleWhen>
         </command>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
         <command
               commandId="org.eclipse.emf.diffmerge.patch.ui.patch.apply"
               icon="icons/apply_16.png"
               label="Apply modelpatch"
               style="push">
            <visibleWhen
                  checkEnabled="false">
                  <and>
               <with
                     variable="selection">
                  <count
                        value="1">
                  </count>
                  <iterate>
                     <or>
                        <adapt
                              type="org.eclipse.emf.ecore.EObject">
                        </adapt>
                        <adapt
                              type="org.eclipse.emf.ecore.resource.Resource">
                        </adapt>
                     </or>
                  </iterate>
               </with>
               <not>
                  <or>
                    <with
                         variable="activeEditorInput">
                      <instanceof
                            value="org.eclipse.emf.diffmerge.ui.setup.EMFDiffMergeEditorInput">
                      </instanceof>
                   </with>
                   <with
                         variable="activeMenuSelection">
                      <instanceof
                            value="org.eclipse.emf.diffmerge.ui.diffuidata.ComparisonSelection">
                      </instanceof>
                   </with>
                 </or>
               </not>
                  </and>
            </visibleWhen>
         </command>
         <command
               commandId="org.eclipse.emf.diffmerge.patch.ui.patch.generate"
               icon="icons/generate_16.png"
               label="Generate modelpatch"
               style="push">
            <visibleWhen
                  checkEnabled="false">
               <or>
                  <with
                       variable="activeEditorInput">
                    <instanceof
                          value="org.eclipse.emf.diffmerge.ui.setup.EMFDiffMergeEditorInput">
                    </instanceof>
                 </with>
                 <with
                       variable="activeMenuSelection">
                    <instanceof
                          value="org.eclipse.emf.diffmerge.ui.diffuidata.ComparisonSelection">
                    </instanceof>
                 </with>
               </or>
            </visibleWhen>
         </command>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <category
            id="org.eclipse.emf.diffmerge.patch.ui.patch"
            name="Modelpatch">
      </category>
      <command
            categoryId="org.eclipse.emf.diffmerge.patch.ui.patch"
            defaultHandler="org.eclipse.emf.diffmerge.patch.ui.handlers.ModelpatchApplicationHandler"
            id="org.eclipse.emf.diffmerge.patch.ui.patch.apply"
            name="Apply modelpatch">
      </command>
      <command
            categoryId="org.eclipse.emf.diffmerge.patch.ui.patch"
            id="org.eclipse.emf.diffmerge.patch.ui.patch.generate"
            name="Generate modelpatch">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.handlers">
      <handler
            class="org.eclipse.emf.diffmerge.patch.ui.handlers.ModelpatchGenerationHandler"
            commandId="org.eclipse.emf.diffmerge.patch.ui.patch.generate">
      </handler>
   </extension>
</plugin>

Back to the top