<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
	<!-- Extension Points -->
	
   <extension-point id="expressions" name="org.yakindu.sct.ui.editor.expressions" schema="schema/expressions.exsd"/>
   <extension-point id="org.yakindu.sct.ui.editor.proposals" name="proposals" schema="schema/org.yakindu.sct.ui.editor.proposals.exsd"/>
  
    <!-- Editor -->
  
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor"
            contributorClass="org.yakindu.sct.ui.editor.editor.StatechartDiagramActionbarContributor"
            default="true"
            extensions="sct"
            icon="icons/obj16/logo-16.png"
            id="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor"
            matchingStrategy="org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditorMatchingStrategy"
            name="YAKINDU Statechart Editor">
      </editor>
   </extension>
   
     <!-- Element Types -->
   
   <extension
         point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
      <metamodel
            nsURI="http://www.yakindu.org/sct/sgraph/2.0.0">
         <metamodelType
               eclass="Statechart"
               icon="icons/obj16/logo-16.png"
               id="org.yakindu.sct.ui.editor.Statechart"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="Statechart">
            <param
                  name="semanticHint"
                  value="Statechart">
            </param>
               
         </metamodelType>
         <metamodelType
               eclass="Region"
                edithelper="org.yakindu.sct.ui.editor.edithelper.RegionEditHelper"
               icon="icons/obj16/Region-16.png"
               id="org.yakindu.sct.ui.editor.Region"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="Region">
            <param
                  name="semanticHint"
                  value="Region">
            </param>
         </metamodelType>
         <metamodelType
               eclass="State"
               edithelper="org.yakindu.sct.ui.editor.edithelper.StateEditHelper"
               icon="icons/obj16/State-16.png"
               id="org.yakindu.sct.ui.editor.State"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="State">
            <param
                  name="semanticHint"
                  value="State">
            </param>
         </metamodelType>
          <metamodelType
               eclass="State"
               edithelper="org.yakindu.sct.ui.editor.edithelper.StateEditHelper"
               icon="icons/obj16/Composite-State-16.png"
               id="org.yakindu.sct.ui.editor.CompositeState"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="CompositeState">
            <param
                  name="semanticHint"
                  value="State">
            </param>
         </metamodelType>
          <metamodelType
               eclass="State"
               edithelper="org.yakindu.sct.ui.editor.edithelper.StateEditHelper"
               icon="icons/obj16/Orthogonal-State-16.png"
               id="org.yakindu.sct.ui.editor.OrthogonalState"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="OrthogonalState">
            <param
                  name="semanticHint"
                  value="State">
            </param>
         </metamodelType>
          <metamodelType
               eclass="State"
               edithelper="org.yakindu.sct.ui.editor.edithelper.StateEditHelper"
               icon="icons/obj16/Submachine-State-16.png"
               id="org.yakindu.sct.ui.editor.SubmachineState"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="SubmachineState">
            <param
                  name="semanticHint"
                  value="SubmachineState">
            </param>
         </metamodelType>
         
         <metamodelType
               eclass="Transition"
               edithelper="org.yakindu.sct.ui.editor.edithelper.TransitionEditHelper"
               icon="icons/obj16/transition-16.png"
               id="org.yakindu.sct.ui.editor.Transition"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="Transition">
            <param
                  name="semanticHint"
                  value="Transition">
            </param>
         </metamodelType>
         <metamodelType
               eclass="Choice"
               edithelper="org.yakindu.sct.ui.editor.edithelper.VertexEditHelper"
               icon="icons/obj16/Choice-16.png"
               id="org.yakindu.sct.ui.editor.Choice"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="Choice">
            <param
                  name="semanticHint"
                  value="Choice">
            </param>
         </metamodelType>
         <metamodelType
               eclass="Entry"
               edithelper="org.yakindu.sct.ui.editor.edithelper.EntryEditHelper"
               icon="icons/obj16/Initial-State-16.png"
               id="org.yakindu.sct.ui.editor.Entry"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="Entry">
            <param
                  name="semanticHint"
                  value="Entry">
            </param>
         </metamodelType>
         <metamodelType
               eclass="Entry"
               edithelper="org.yakindu.sct.ui.editor.edithelper.EntryEditHelper"
               icon="icons/obj16/Shallow-History-16.png"
               id="org.yakindu.sct.ui.editor.ShallowHistory"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="ShallowHistory">
            <param
                  name="semanticHint"
                  value="ShallowHistory">
            </param>
         </metamodelType>
         <metamodelType
               eclass="Entry"
               edithelper="org.yakindu.sct.ui.editor.edithelper.EntryEditHelper"
               icon="icons/obj16/Deep-History-16.png"
               id="org.yakindu.sct.ui.editor.DeepHistory"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="DeepHistory">
            <param
                  name="semanticHint"
                  value="DeepHistory">
            </param>
         </metamodelType>
         <metamodelType
               eclass="FinalState"
               edithelper="org.yakindu.sct.ui.editor.edithelper.VertexEditHelper"
               icon="icons/obj16/Final-State-16.png"
               id="org.yakindu.sct.ui.editor.FinalState"
               kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
               name="FinalState">
            <param
                  name="semanticHint"
                  value="FinalState">
            </param>
         </metamodelType>
          <metamodelType
                eclass="Exit"
                edithelper="org.yakindu.sct.ui.editor.edithelper.VertexEditHelper"
                icon="icons/obj16/Exit-Point-16.png"
                id="org.yakindu.sct.ui.editor.Exit"
                kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
                name="Exit">
            <param
                  name="semanticHint"
                  value="Exit">
            </param>
         </metamodelType>
          <metamodelType
                eclass="Synchronization"
                edithelper="org.yakindu.sct.ui.editor.edithelper.VertexEditHelper"
                icon="icons/obj16/Synchronization-16.png"
                id="org.yakindu.sct.ui.editor.Synchronization"
                kind="org.eclipse.gmf.runtime.emf.type.core.IHintedType"
                name="Synchronization">
            <param
                  name="semanticHint"
                  value="Synchronization">
            </param>
         </metamodelType>
          <adviceBinding
                class="org.yakindu.sct.ui.editor.edithelper.StatechartEditHelperAdvice"
                id="org.yakindu.sct.ui.editor.StatechartAdviceBinding"
                inheritance="none"
                typeId="org.yakindu.sct.ui.editor.Statechart">
          </adviceBinding>
         </metamodel>
   </extension>
   
   <!-- Contribution Item Provider -->
   <extension point="org.eclipse.gmf.runtime.common.ui.services.action.contributionItemProviders">
      <contributionItemProvider
            class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContributionItemProvider"
            checkPluginLoaded="false">
         <Priority name="Low"/>
         <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider">
            <popupStructuredContributionCriteria objectClass="org.yakindu.sct.ui.editor.editparts.StatechartTextEditPart"/>
            <popupStructuredContributionCriteria objectClass="org.yakindu.sct.ui.editor.editparts.StatechartTextExpressionEditPart"/>
            <popupPredefinedItem id="editGroup" remove="true"/>
         </popupContribution>
         <popupContribution class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramContextMenuProvider">
			<popupStructuredContributionCriteria objectClass="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart"/>
			<popupPredefinedItem id="deleteFromDiagramAction" remove="true"/>
		</popupContribution>
      </contributionItemProvider>
   </extension>
   
  <!-- View Provider -->
   
   <extension
         point="org.eclipse.gmf.runtime.diagram.core.viewProviders">
      <viewProvider
            class="org.yakindu.sct.ui.editor.providers.StatechartDiagramViewProvider">
         <Priority
               name="Highest">
         </Priority>
      </viewProvider>
   </extension>
   
   <!-- EditPart Provider -->
   
   <extension
         point="org.eclipse.gmf.runtime.diagram.ui.editpartProviders">
      <editpartProvider
            class="org.yakindu.sct.ui.editor.providers.StatechartDiagramEditPartProvider">
         <Priority
               name="Lowest">
         </Priority>
      </editpartProvider>
   </extension>
   <extension
         point="org.eclipse.ui.newWizards">
     <category id="YAKINDU" name="Yakindu"/>
      <wizard
            category="YAKINDU"
            class="org.yakindu.sct.ui.editor.wizards.CreationWizard"
            icon="icons/obj16/logo-16.png"
            id="org.yakindu.sct.ui.editor.StatechartDiagramWizard"
            name="YAKINDU Statechart Model"
            project="false">
      </wizard>
   </extension>
   
   <!-- Palette Provider -->
   
   <extension
         point="org.eclipse.gmf.runtime.diagram.ui.paletteProviders">
      <paletteProvider
            class="org.yakindu.sct.ui.editor.providers.StatechartPaletteProvider">
         <contribution
               factoryClass="org.yakindu.sct.ui.editor.editor.StatechartDiagramPaletteFactory">
            <entry
                  id="tools"
                  kind="drawer"
                  label="Tools"
                  path="/">
                   <expand
                         force="true">
                     </expand>
            </entry>
             <entry
                   description="Creates a transition"
                   id="org.yakindu.sct.ui.editor.Transition"
                   kind="tool"
                   label="Transition"
                   large_icon="icons/obj32/transition-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/transition-16.png">
             </entry>
             
             <entry
                  description="Creates a state"
                  id="org.yakindu.sct.ui.editor.State"
                  kind="tool"
                  label="State"
                  large_icon="icons/obj32/State-32.png"
                  path="/tools/"
                  small_icon="icons/obj16/State-16.png">
                   <expand
                         force="true">
                           <content>
                           </content>
                     </expand>
            </entry>
            <entry
                  kind="stack" id="stack" path="/tools/" >
            </entry>
             <entry
                  description="Creates a composite state"
                  id="org.yakindu.sct.ui.editor.CompositeState"
                  kind="tool"
                  label="Composite State"
                  large_icon="icons/obj32/Composite-State-32.png"
                  path="/tools/stack/"
                  small_icon="icons/obj16/Composite-State-16.png">
                   <expand
                         force="true">
                           <content>
                           </content>
                     </expand>
            </entry>
             <entry
                  description="Creates a orthogonal state"
                  id="org.yakindu.sct.ui.editor.OrthogonalState"
                  kind="tool"
                  label="Orthogonal State"
                  large_icon="icons/obj32/Orthogonal-State-32.png"
                  path="/tools/stack/"
                  small_icon="icons/obj16/Orthogonal-State-16.png">
                   <expand
                         force="true">
                           <content>
                           </content>
                     </expand>
            </entry>
            <!--  <entry
                  description="Creates a sub submachine state"
                  id="org.yakindu.sct.ui.editor.SubmachineState"
                  kind="tool"
                  label="Submachine State"
                  large_icon="icons/obj32/Submachine-State-32.png"
                  path="/tools/stack/"
                  small_icon="icons/obj16/Submachine-State-16.png">
                   <expand
                         force="true">
                           <content>
                           </content>
                     </expand>
            </entry>
            -->
             <entry
                   description="Creates a region"
                   id="org.yakindu.sct.ui.editor.Region"
                   kind="tool"
                   label="Region"
                   large_icon="icons/obj32/Region-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Region-16.png">
             </entry>
             <entry
                   description="Creates an initial entry node"
                   id="org.yakindu.sct.ui.editor.Entry"
                   kind="tool"
                   label="Initial entry node"
                   large_icon="icons/obj32/Initial-State-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Initial-State-16.png">
             </entry>
              <entry
                   description="Creates a shallow history"
                   id="org.yakindu.sct.ui.editor.ShallowHistory"
                   kind="tool"
                   label="Shallow History"
                   large_icon="icons/obj32/Shallow-History-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Shallow-History-16.png">
             </entry>
             <entry
                   description="Creates a deep history"
                   id="org.yakindu.sct.ui.editor.DeepHistory"
                   kind="tool"
                   label="Deep History"
                   large_icon="icons/obj32/Deep-History-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Deep-History-16.png">
             </entry>
             <entry
                   description="Creates a final state"
                   id="org.yakindu.sct.ui.editor.FinalState"
                   kind="tool"
                   label="Final State"
                   large_icon="icons/obj32/Final-State-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Final-State-16.png">
             </entry>
             <entry
                   description="Creates an exit node"
                   id="org.yakindu.sct.ui.editor.Exit"
                   kind="tool"
                   label="Exit Node"
                   large_icon="icons/obj32/Exit-Point-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Exit-Point-16.png">
             </entry>
             <entry
                   description="Creates a choice"
                   id="org.yakindu.sct.ui.editor.Choice"
                   kind="tool"
                   label="Choice"
                   large_icon="icons/obj32/Choice-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Choice-16.png">
             </entry>
             <entry
                   description="Creates a synchronization"
                   id="org.yakindu.sct.ui.editor.Synchronization"
                   kind="tool"
                   label="Synchronization"
                   large_icon="icons/obj32/Synchronization-32.png"
                   path="/tools/"
                   small_icon="icons/obj16/Synchronization-16.png">
             </entry>
         </contribution>
         <Priority
               name="Lowest">
         </Priority>
         <editor
               class="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
         </editor>
      </paletteProvider>
   </extension>

<!-- Property Tabs -->

<extension point="org.eclipse.ui.views.properties.tabbed.propertyContributor" id="prop-contrib">
      <propertyContributor
            contributorId="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor"
            labelProvider="org.yakindu.sct.ui.editor.propertysheets.SheetLabelProvider">
         <propertyCategory category="domain"/>
         <propertyCategory category="visual"/>
         <propertyCategory category="extra"/>
      </propertyContributor>
   </extension>

 <extension point="org.eclipse.ui.views.properties.tabbed.propertyTabs" id="proptabs">
      <propertyTabs contributorId="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
          <propertyTab
             category="domain"
             id="property.tab.domain"
             label="Model"/>
          <propertyTab
             category="visual"
             id="property.tab.AppearancePropertySection"
             label="Appearance"/>
          <propertyTab
             category="visual"
             id="property.tab.DiagramPropertySection"
             label="Diagram"/>
      </propertyTabs>
   </extension>
   
   <extension point="org.eclipse.ui.views.properties.tabbed.propertySections" id="propsections">
      <propertySections contributorId="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
		<!-- State model section -->         
         <propertySection
            id="property.section.domain.state" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.StatePropertySection">
           <input type="org.yakindu.sct.ui.editor.editparts.StateEditPart"/>
           <input type="org.yakindu.sct.ui.editor.editparts.StateNameEditPart"/>
           <input type="org.yakindu.sct.ui.editor.editparts.StateTextCompartmentEditPart"/>
           <input type="org.yakindu.sct.ui.editor.editparts.StateTextCompartmentExpressionEditPart"/>
         </propertySection>
        <!-- Statechart model section -->         
         <propertySection
            id="property.section.domain.statechart" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.StatechartPropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.StatechartNameEditPart"/>
            <input type="org.yakindu.sct.ui.editor.editparts.StatechartTextEditPart"/>
            <input type="org.yakindu.sct.ui.editor.editparts.StatechartTextExpressionEditPart"/>
         </propertySection>
        <!-- Transition model section -->         
         <propertySection
            id="property.section.domain.transition" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.TransitionPropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.TransitionEditPart"/>
               <input type="org.yakindu.sct.ui.editor.editparts.TransitionExpressionEditPart"/>
         </propertySection>
           <!-- Entry model section -->         
         <propertySection
            id="property.section.domain.entry" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.EntryPropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.EntryEditPart"/>
         </propertySection>
            <!-- Exit model section -->         
         <propertySection
            id="property.section.domain.exit" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.ExitPropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.ExitEditPart"/>
         </propertySection>
            <!-- Region model section -->         
         <propertySection
            id="property.section.domain.region" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.RegionPropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.RegionEditPart"/>
         </propertySection>
            <!-- Choice model section -->         
         <propertySection
            id="property.section.domain.choice" 
            tab="property.tab.domain"
            class="org.yakindu.sct.ui.editor.propertysheets.ChoicePropertySection">
            <input type="org.yakindu.sct.ui.editor.editparts.ChoiceEditPart"/>
         </propertySection>
         
         <propertySection id="property.section.ConnectorAppearancePropertySection" 
            filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ConnectionEditPartPropertySectionFilter" 
            class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ConnectionAppearancePropertySection" 
            tab="property.tab.AppearancePropertySection">
         </propertySection>
         <propertySection id="property.section.ShapeColorAndFontPropertySection" 
            filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.ShapeEditPartPropertySectionFilter" 
            class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.ShapeColorsAndFontsPropertySection" 
            tab="property.tab.AppearancePropertySection">
         </propertySection> 
         <propertySection id="property.section.DiagramColorsAndFontsPropertySection" 
            filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter" 
            class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.appearance.DiagramColorsAndFontsPropertySection" 
            tab="property.tab.AppearancePropertySection">
         </propertySection>     
         <propertySection id="property.section.RulerGridPropertySection" 
            filter="org.eclipse.gmf.runtime.diagram.ui.properties.filters.DiagramEditPartPropertySectionFilter" 
            class="org.eclipse.gmf.runtime.diagram.ui.properties.sections.grid.RulerGridPropertySection" 
            tab="property.tab.DiagramPropertySection">
         </propertySection>     
      </propertySections>
   </extension>

   <!-- Modeling Assistant -->
   
   <extension
         point="org.eclipse.gmf.runtime.emf.ui.modelingAssistantProviders">
      <modelingAssistantProvider
            class="org.yakindu.sct.ui.editor.assistent.StatechartModelingAssistantProvider">
         <Priority
               name="Lowest">
         </Priority>
         <object
               class="org.yakindu.sct.ui.editor.editparts.RegionEditPart"
               id="Region">
         </object>
         <object
               class="org.yakindu.sct.ui.editor.editparts.StateEditPart"
               id="State">
         </object>
         <object
               class="org.yakindu.sct.ui.editor.editparts.RegionCompartmentEditPart"
               id="Region_Compartment">
         </object>
         <object
               class="org.yakindu.sct.ui.editor.editparts.StateCompartmentEditPart"
               id="State_Compartment">
         </object>
      </modelingAssistantProvider>
   </extension>
   <extension
            point="org.eclipse.ui.preferencePages">
        <page
            category="org.yakindu.sct.ui.preferences.root"
            class="org.yakindu.sct.ui.editor.preferences.StatechartAppearancePreferencePage"
            id="com.yakindu.sct.ui.appearance"
            name="Diagram Appearance">
        </page>
    </extension>
   <extension
         point="org.eclipse.core.runtime.preferences">
      <initializer
            class="org.yakindu.sct.ui.editor.preferences.PreferenceInitializer">
      </initializer>
   </extension>
   
   <!-- marker && validation -->
    <extension id="org.yakindu.sct.ui.editor.diagnostic" name="Statechart Diagram problems" point="org.eclipse.core.resources.markers">
      <super type="org.eclipse.core.resources.problemmarker"/>
      <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
      <super type="org.eclipse.xtext.ui.check.fast" />
      <persistent value="true"/>
   </extension>   
   
    <extension id="org.yakindu.sct.ui.editor.xtext.diagnostic" name="Statechart Expression problems" point="org.eclipse.core.resources.markers">
      <super type="org.eclipse.core.resources.problemmarker"/>
      <super type="org.eclipse.gmf.runtime.common.ui.services.marker"/>
      <super type="org.eclipse.xtext.ui.check.fast" />
      <persistent value="true"/>
   </extension>   
  
   <extension point="org.eclipse.gmf.runtime.common.ui.services.markerNavigationProviders" id="markers-navigation">
      <MarkerNavigationProvider class="org.yakindu.sct.ui.editor.providers.StatechartMarkerNavigationProvider">
         <MarkerType name="org.yakindu.sct.ui.editor.diagnostic"/>
           <MarkerType name="org.yakindu.sct.ui.editor.xtext.diagnostic"/>
         <Priority name="Medium"/>
      </MarkerNavigationProvider>
   </extension>
   	
   	<!-- Decoration Providers -->
   <extension id="validationDecoratorProvider" name="ValidationDecorations" point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders">
      <decoratorProvider class="org.yakindu.sct.ui.editor.providers.StatechartValidationDecorationProvider">
         <Priority name="Lowest"/>
         <object class="org.eclipse.gmf.runtime.diagram.ui.editparts.IPrimaryEditPart(org.eclipse.gmf.runtime.diagram.ui)" id="PRIMARY_VIEW"/>
         <context decoratorTargets="PRIMARY_VIEW"/>
      </decoratorProvider>
   </extension>
   <extension point="org.eclipse.gmf.runtime.diagram.ui.decoratorProviders"> 
		<decoratorProvider class="org.yakindu.sct.ui.editor.submachine.SubmachineDecorationProvider"> 
			<Priority name="Lowest" />
 		</decoratorProvider> 
 </extension> 
   
   <!-- Global Action handler -->
    <extension point="org.eclipse.gmf.runtime.common.ui.services.action.globalActionHandlerProviders" id="global-print-actions">
      <GlobalActionHandlerProvider
         class="org.eclipse.gmf.runtime.diagram.ui.printing.render.providers.DiagramWithPrintGlobalActionHandlerProvider"
         id="Print handler">
         <Priority name="Lowest"/>
         <ViewId id="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="print"/>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
      <GlobalActionHandlerProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.DiagramGlobalActionHandlerProvider" id="global-actions">
         <Priority name="Lowest">
         </Priority>
         <ViewId id="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
            <ElementType class="org.yakindu.sct.ui.editor.editparts.ChoiceEditPart">
               <GlobalActionId actionId="delete">
               </GlobalActionId>
                  <GlobalActionId actionId="save">
               </GlobalActionId>
                  <GlobalActionId actionId="copy">
               </GlobalActionId>
                  <GlobalActionId actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.EntryEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
             <ElementType
                  class="org.eclipse.gmf.runtime.diagram.ui.editparts.NoteEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
             <ElementType
                  class="org.eclipse.gmf.runtime.diagram.ui.internal.editparts.TextEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.ExitEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.FinalStateEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.TransitionEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.RegionEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="paste">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.StateEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="paste">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.SynchronizationEditPart">
               <GlobalActionId
                     actionId="delete">
               </GlobalActionId>
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="cut">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.StateTextCompartmentEditPart">
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="paste">
               </GlobalActionId>
            </ElementType>
            <ElementType
                  class="org.yakindu.sct.ui.editor.editparts.StatechartDiagramEditPart">
               <GlobalActionId
                     actionId="save">
               </GlobalActionId>
               <GlobalActionId
                     actionId="copy">
               </GlobalActionId>
               <GlobalActionId
                     actionId="paste">
               </GlobalActionId>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
       <GlobalActionHandlerProvider class="org.eclipse.gmf.runtime.diagram.ui.providers.ide.providers.DiagramIDEGlobalActionHandlerProvider" id="ideActionHandlerProvider">
         <Priority name="Lowest">
         </Priority>
         <ViewId id="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
            <ElementType class="org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart">
               <GlobalActionId actionId="bookmark">
               </GlobalActionId>
            </ElementType>
         </ViewId>
      </GlobalActionHandlerProvider>
      </extension>
   
   <!-- context menu contribution -->
<extension point="org.eclipse.ui.commands">
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.SetInitialEntryKindCommand"
       id="org.yakindu.sct.ui.editor.commands.SetInitialEntryKindCommand"
       name="Set Initial Entry Kind">
	</command>
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.SetDeepHistoryEntryKindCommand"
       id="org.yakindu.sct.ui.editor.commands.SetDeepHistoryEntryKindCommand"
       name="Set Deep History Entry Kind">
 	</command>
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.SetShallowHistoryEntryKindCommand"
       id="org.yakindu.sct.ui.editor.commands.SetShallowHistoryEntryKindCommand"
       name="Set Shallow History Entry Kind">
 	</command>
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.ToggleSubRegionLayoutCommand"
       id="org.yakindu.sct.ui.editor.commands.ToggleSubRegionLayoutCommand"
       name="Toggle Subregion Layout">
 	</command>
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.ToggleShowDocumentationCommand"
       id="org.yakindu.sct.ui.editor.commands.ToggleShowDocumentation"
       name="Toggle Documentation">
 	</command>
 	<command
       defaultHandler="org.yakindu.sct.ui.editor.commands.CreateSubdiagramCommand"
       id="org.yakindu.sct.ui.editor.commands.CreateSubdiagram"
       name="Create Subdiagram">
 	</command>
</extension>

<extension
       point="org.eclipse.ui.menus">
    <menuContribution
          allPopups="false"
          locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
       <menu
             id="changeEntryKindMenu"
             label="Change Entry Kind">
          <command
                commandId="org.yakindu.sct.ui.editor.commands.SetInitialEntryKindCommand"
                label="Initial"
                style="push">
             <visibleWhen
                   checkEnabled="false">
                <reference
                      definitionId="oneEntrySelected">
                </reference>
             </visibleWhen>
          </command>
          <command
                commandId="org.yakindu.sct.ui.editor.commands.SetDeepHistoryEntryKindCommand"
                label="Deep History"
                style="push">
             <visibleWhen
                   checkEnabled="false">
                <reference
                      definitionId="oneEntrySelected">
                </reference>
             </visibleWhen>
          </command>
          <command
                commandId="org.yakindu.sct.ui.editor.commands.SetShallowHistoryEntryKindCommand"
                label="Shallow History"
                style="push">
             <visibleWhen
                   checkEnabled="false">
                <reference
                      definitionId="oneEntrySelected">
                </reference>
             </visibleWhen>
          </command>
       </menu>
       <command
             commandId="org.yakindu.sct.ui.editor.commands.ToggleSubRegionLayoutCommand"
             label="Toggle Subregion Alignment"
             style="push">
          <visibleWhen
                checkEnabled="false">
             <with
                   variable="selection">
                <iterate
                      ifEmpty="false"
                      operator="and">
                   <instanceof
                         value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
                   </instanceof>
                </iterate>
             </with>
          </visibleWhen>
       </command>
       <command
             commandId="org.yakindu.sct.ui.editor.commands.ToggleShowDocumentation"
             label="Toggle Documentation"
             style="push">
          <visibleWhen
                checkEnabled="false">
             <with
                   variable="selection">
                <iterate
                      ifEmpty="false"
                      operator="and">
                   <or>
                      <instanceof
                            value="org.yakindu.sct.ui.editor.editparts.TransitionEditPart">
                      </instanceof>
                        <instanceof
                            value="org.yakindu.sct.ui.editor.editparts.TransitionExpressionEditPart">
                      </instanceof>
                      <instanceof
                            value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
                      </instanceof>
                      <instanceof
                            value="org.yakindu.sct.ui.editor.editparts.StatechartTextEditPart">
                      </instanceof>
                      
                   </or>
                </iterate>
             </with>
          </visibleWhen>
       </command>
        <command
             commandId="org.yakindu.sct.ui.editor.commands.CreateSubdiagram"
             label="Create Subdiagram"
             style="push">
          <visibleWhen
                checkEnabled="false">
             <with
                   variable="selection">
                <iterate
                      ifEmpty="false"
                      operator="and">
                   <or>
                      <instanceof
                            value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
                      </instanceof>
                   </or>
                </iterate>
             </with>
          </visibleWhen>
       </command>
    </menuContribution>
 </extension>
 
 <extension
       point="org.eclipse.core.expressions.definitions">
    <definition
          id="oneEntrySelected">
       <with
             variable="selection">
          <and>
             <count
                   value="1">
             </count>
             <iterate
                   ifEmpty="false"
                   operator="and">
                <instanceof
                      value="org.yakindu.sct.ui.editor.editparts.EntryEditPart">
                </instanceof>
             </iterate>
          </and>
       </with>
    </definition>
 </extension>


<!-- Patched Clipboard support -->
 <extension
         point="org.eclipse.gmf.runtime.emf.clipboard.core.clipboardSupport">
      <factory
            class="org.yakindu.sct.ui.editor.clipboardsupport.ClipboardSupportFactory"
            nsURI="http://www.eclipse.org/gmf/runtime/1.0.2/notation"
            priority="medium">
      </factory>
   </extension>
  <!-- Added default templates -->
 <extension
       point="org.yakindu.sct.ui.editor.proposals">
       <ContentProposal
             id="org.yakindu.sct.ui.editor.proposal.subregion"
             label="Add Subregion"
             modification="org.yakindu.sct.ui.editor.editor.proposals.AddCompositeModification">
       </ContentProposal>
       <ContentProposal
             description="Adds an outgoing state "
             id="org.yakindu.sct.ui.editor.proposal.outgoingstate"
             label="Add outgoing state"
             modification="org.yakindu.sct.ui.editor.editor.proposals.AddOutgoingStateModification">
       </ContentProposal>
 </extension>   
   
</plugin>
