<commit_before><?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.commands">
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.UnfoldEntryActionsHandler"
            description="Unfold Entry Actions"
            id="com.yakindu.sct.refactoring.unfoldEntryActions"
            name="Unfold Entry Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.UnfoldExitActionsHandler"
            description="Unfold Exit Actions"
            id="com.yakindu.sct.refactoring.unfoldExitActions"
            name="Unfold Exit Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.GroupStatesIntoCompositeHandler"
            description="Group states into composite state"
            id="com.yakindu.sct.refactoring.groupStates"
            name="Group Into Composite">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.FoldIncomingActionsHandler"
            description="Fold Incoming Actions"
            id="com.yakindu.sct.refactoring.foldInActions"
            name="Fold Incoming Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.FoldOutgoingActionsHandler"
            description="Fold Outgoing Actions"
            id="com.yakindu.sct.refactoring.foldOutActions"
            name="Fold Outgoing Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.RenameElementHandler"
            description="Rename Element"
            id="com.yakindu.sct.refactoring.renameElement"
            name="Rename Element">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.ExtractSubdiagramHandler"
            description="Extract Subdiagram"
            id="com.yakindu.sct.refactoring.extractSubDiagram"
            name="Extract Subdiagram">
      </command>
       <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.InlineSubdiagramHandler"
            description="Inline Subdiagram"
            id="com.yakindu.sct.refactoring.inlineSubDiagram"
            name="Inline Subdiagram">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
         <menu
               id="refactorMenu"
               label="Refactor">
            <command
                  commandId="com.yakindu.sct.refactoring.foldInActions"
                  label="Fold Incoming Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.foldOutActions"
                  label="Fold Outgoing Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.groupStates"
                  label="Group States Into Composite"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="multipleStatesSelected">
                  </reference>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.unfoldEntryActions"
                  label="Unfold Entry Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.unfoldExitActions"
                  label="Unfold Exit Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
             <command
                  commandId="com.yakindu.sct.refactoring.extractSubDiagram"
                  label="Extract Subdiagram"
                  style="push">
                     style="push">
               <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
             <command
                  commandId="com.yakindu.sct.refactoring.inlineSubDiagram"
                  label="Inline Subdiagram"
                  style="push">
                   <visibleWhen
                     checkEnabled="false">
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
               </visibleWhen>
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="popup:de.itemis.xtext.utils.jface.viewers.StyledTextXtextAdapterContextMenu">
         <menu
               id="org.yakindu.refactoring"
               label="Refactoring">
            <command
                  commandId="com.yakindu.sct.refactoring.renameElement"
                  label="Rename..."
                  style="push">
            </command>
         </menu>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.core.expressions.definitions">
      <definition
            id="oneStateSelected">
         <with
               variable="selection">
            <and>
               <count
                     value="1">
               </count>
               <iterate
                     ifEmpty="false"
                     operator="and">
                  <instanceof
                        value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
                  </instanceof>
               </iterate>
            </and>
         </with>
      </definition>
      <definition
            id="multipleStatesSelected">
         <with
               variable="selection">
            <iterate
                  ifEmpty="false"
                  operator="and">
               <instanceof
                     value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
               </instanceof>
            </iterate>
         </with>
      </definition>
   </extension>
   <extension
         point="org.eclipse.ui.startup">
      <startup
            class="org.yakindu.sct.refactoring.Activator">
      </startup>
   </extension>

</plugin>
<commit_msg>Restricted refactoring menu contributions to statechart diagram editor.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension
         point="org.eclipse.ui.commands">
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.UnfoldEntryActionsHandler"
            description="Unfold Entry Actions"
            id="com.yakindu.sct.refactoring.unfoldEntryActions"
            name="Unfold Entry Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.UnfoldExitActionsHandler"
            description="Unfold Exit Actions"
            id="com.yakindu.sct.refactoring.unfoldExitActions"
            name="Unfold Exit Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.GroupStatesIntoCompositeHandler"
            description="Group states into composite state"
            id="com.yakindu.sct.refactoring.groupStates"
            name="Group Into Composite">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.FoldIncomingActionsHandler"
            description="Fold Incoming Actions"
            id="com.yakindu.sct.refactoring.foldInActions"
            name="Fold Incoming Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.FoldOutgoingActionsHandler"
            description="Fold Outgoing Actions"
            id="com.yakindu.sct.refactoring.foldOutActions"
            name="Fold Outgoing Actions">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.RenameElementHandler"
            description="Rename Element"
            id="com.yakindu.sct.refactoring.renameElement"
            name="Rename Element">
      </command>
      <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.ExtractSubdiagramHandler"
            description="Extract Subdiagram"
            id="com.yakindu.sct.refactoring.extractSubDiagram"
            name="Extract Subdiagram">
      </command>
       <command
            defaultHandler="org.yakindu.sct.refactoring.handlers.impl.InlineSubdiagramHandler"
            description="Inline Subdiagram"
            id="com.yakindu.sct.refactoring.inlineSubDiagram"
            name="Inline Subdiagram">
      </command>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="popup:org.eclipse.gmf.runtime.diagram.ui.DiagramEditorContextMenu">
         <menu
               id="refactorMenu"
               label="Refactor">
            <command
                  commandId="com.yakindu.sct.refactoring.foldInActions"
                  label="Fold Incoming Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.foldOutActions"
                  label="Fold Outgoing Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.groupStates"
                  label="Group States Into Composite"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="multipleStatesSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.unfoldEntryActions"
                  label="Unfold Entry Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
            <command
                  commandId="com.yakindu.sct.refactoring.unfoldExitActions"
                  label="Unfold Exit Actions"
                  style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
             <command
                  commandId="com.yakindu.sct.refactoring.extractSubDiagram"
                  label="Extract Subdiagram"
                  style="push">
                     style="push">
               <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
             <command
                  commandId="com.yakindu.sct.refactoring.inlineSubDiagram"
                  label="Inline Subdiagram"
                  style="push">
                   <visibleWhen
                     checkEnabled="false">
                  <and>
                  <reference
                        definitionId="oneStateSelected">
                  </reference>
                  <with
                        variable="activeEditorId">
                     <equals
                           value="org.yakindu.sct.ui.editor.editor.StatechartDiagramEditor">
                     </equals>
                  </with>
                  </and>
               </visibleWhen>
            </command>
         </menu>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="popup:de.itemis.xtext.utils.jface.viewers.StyledTextXtextAdapterContextMenu">
         <menu
               id="org.yakindu.refactoring"
               label="Refactoring">
            <command
                  commandId="com.yakindu.sct.refactoring.renameElement"
                  label="Rename..."
                  style="push">
            </command>
         </menu>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.core.expressions.definitions">
      <definition
            id="oneStateSelected">
         <with
               variable="selection">
            <and>
               <count
                     value="1">
               </count>
               <iterate
                     ifEmpty="false"
                     operator="and">
                  <instanceof
                        value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
                  </instanceof>
               </iterate>
            </and>
         </with>
      </definition>
      <definition
            id="multipleStatesSelected">
         <with
               variable="selection">
            <iterate
                  ifEmpty="false"
                  operator="and">
               <instanceof
                     value="org.yakindu.sct.ui.editor.editparts.StateEditPart">
               </instanceof>
            </iterate>
         </with>
      </definition>
   </extension>
   <extension
         point="org.eclipse.ui.startup">
      <startup
            class="org.yakindu.sct.refactoring.Activator">
      </startup>
   </extension>

</plugin>

{'fraction_non_alphanumeric': 0.09647407407407407, 'fraction_numerical': 0.0007111111111111111, 'mean_word_length': 1.288271186440678, 'pattern_counts': {'":': 0, '<': 249, '<?xml version=': 2, '>': 251, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5822730', 'n_tokens_mistral': 4281, 'n_tokens_neox': 4074, 'n_words': 545}