Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 0fcf5c9013a26fe50a0731ee2561453ecf70a246 (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
/*
 * Copyright (c) 2007 Borland Software Corporation
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *    bblajer (Borland) - initial API and implementation
 */

«IMPORT "http://www.eclipse.org/gmf/2006/GenModel"»
«IMPORT "http://www.eclipse.org/emf/2002/Ecore"»
«EXTENSION xpt::Util»

«DEFINE plugin FOR gmfgen::GenPlugin-»
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
«EXPAND xpt::Common::xcopyright FOR editorGen-»
<plugin>
«EXPAND fileTypes-»
«EXPAND xpt::editor::extensions::extensions FOR editorGen-»
«EXPAND xpt::application::extensions::extensions FOR editorGen.application-»
«EXPAND menu-»
«EXPAND xpt::navigator::extensions::extensions FOR editorGen.navigator-»
«EXPAND xpt::propsheet::extensions::extensions FOR editorGen.propertySheet-»
«EXPAND xpt::providers::extensions::extensions FOR editorGen-»
«EXPAND xpt::ConstraintProviders::extensions FOR editorGen-»

«EXPAND additions-»
</plugin>
«ENDDEFINE»

«DEFINE fileTypes FOR gmfgen::GenPlugin-»
  <extension point="org.eclipse.team.core.fileTypes">
    «EXPAND xpt::Common::xmlGeneratedTag»
      <fileTypes
         type="text"
         extension="«editorGen.diagramFileExtension»">
      </fileTypes>
  </extension>
«ENDDEFINE»

«DEFINE menu FOR gmfgen::GenPlugin-»
   <extension point="org.eclipse.ui.popupMenus">
     «EXPAND xpt::Common::xmlGeneratedTag»
«IF null == editorGen.application-»
      <objectContribution
            id="«iD».ui.objectContribution.IFile1"
            nameFilter="*.«editorGen.domainFileExtension»"
            objectClass="org.eclipse.core.resources.IFile">
         <action
               label="%_UI_Menu_InitDiagramFile_label"
               class="«editorGen.diagram.getInitDiagramFileActionQualifiedClassName()»"
               menubarPath="additions"
               enablesFor="1"
               id="«editorGen.diagram.getInitDiagramFileActionQualifiedClassName()»ID">
         </action>
      </objectContribution>  
	«IF !editorGen.editor.eclipseEditor-»
      <objectContribution
            id="«iD».ui.objectContribution.IFile2"
            nameFilter="*.«editorGen.diagramFileExtension»"
            objectClass="org.eclipse.core.resources.IFile">
         <action
               label="%_UI_Menu_OpenDiagramView_label"
		«LET validJavaIdentifier("OpenDiagramIn" + editorGen.modelID + "DiagramViewAction") AS className-»
               class="«editorGen.editor.packageName».«className»"
               menubarPath="additions"
               enablesFor="1"
               id="«editorGen.editor.packageName».«className»ID">
        «ENDLET-»
         </action>
      </objectContribution>
	«ENDIF-»
«ENDIF-»
      <objectContribution
            adaptable="false"
            id="«iD».ui.objectContribution.«editorGen.diagram.editPartClassName»2"
            objectClass="«editorGen.diagram.getEditPartQualifiedClassName()»">
         <action
               class="«editorGen.diagram.getLoadResourceActionQualifiedClassName()»"
               enablesFor="1"
               id="«editorGen.diagram.getLoadResourceActionQualifiedClassName()»ID"
               label="%loadResourceActionLabel"
               menubarPath="additions">
         </action>
      </objectContribution>  
   </extension>
«ENDDEFINE»

«DEFINE additions FOR gmfgen::GenPlugin-»
«ENDDEFINE»

Back to the top