CloneSet112


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
43210.997method_declaration
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
143641
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreActionBarContributor.java
243285
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java
Next
Last
Clone Instance
1
Line Count
43
Source Line
641
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreActionBarContributor.java

/**
 * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
 * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
 * that can be added to the selected object and updating the menus accordingly.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void selectionChangedGen(SelectionChangedEvent event) {
  // Remove any menu items for old selection.
  //
  if (createChildMenuManager != null) {
    depopulateManager(createChildMenuManager, createChildActions);
  }
  if (createSiblingMenuManager != null) {
    depopulateManager(createSiblingMenuManager, createSiblingActions);
  }
  // Query the new selection for appropriate new child/sibling descriptors
  //
  Collection<? > newChildDescriptors = null;
  Collection<? > newSiblingDescriptors = null;
  ISelection selection = event.getSelection();
  if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
    Object object = ((IStructuredSelection) selection).getFirstElement();
    EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
    newChildDescriptors = domain.getNewChildDescriptors(object, null);
    newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
  }
  // Generate actions for selection; populate and redraw the menus.
  //
  createChildActions = generateCreateChildActions(newChildDescriptors, selection);
  createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
  if (createChildMenuManager != null) {
    populateManager(createChildMenuManager, createChildActions, null);
    createChildMenuManager.update(true);
  }
  if (createSiblingMenuManager != null) {
    populateManager(createSiblingMenuManager, createSiblingActions, null);
    createSiblingMenuManager.update(true);
  }
}


First
Previous
Clone Instance
2
Line Count
43
Source Line
285
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java

/**
 * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
 * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
 * that can be added to the selected object and updating the menus accordingly.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void selectionChanged(SelectionChangedEvent event) {
  // Remove any menu items for old selection.
  //
  if (createChildMenuManager != null) {
    depopulateManager(createChildMenuManager, createChildActions);
  }
  if (createSiblingMenuManager != null) {
    depopulateManager(createSiblingMenuManager, createSiblingActions);
  }
  // Query the new selection for appropriate new child/sibling descriptors
  //
  Collection<? > newChildDescriptors = null;
  Collection<? > newSiblingDescriptors = null;
  ISelection selection = event.getSelection();
  if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
    Object object = ((IStructuredSelection) selection).getFirstElement();
    EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
    newChildDescriptors = domain.getNewChildDescriptors(object, null);
    newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
  }
  // Generate actions for selection; populate and redraw the menus.
  //
  createChildActions = generateCreateChildActions(newChildDescriptors, selection);
  createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
  if (createChildMenuManager != null) {
    populateManager(createChildMenuManager, createChildActions, null);
    createChildMenuManager.update(true);
  }
  if (createSiblingMenuManager != null) {
    populateManager(createSiblingMenuManager, createSiblingActions, null);
    createSiblingMenuManager.update(true);
  }
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
   * This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
   * handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
   * that can be added to the selected object and updating the menus accordingly.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void [[#variable19079600]](SelectionChangedEvent event) {
  // Remove any menu items for old selection.
  //
  if (createChildMenuManager != null) {
    depopulateManager(createChildMenuManager, createChildActions);
  }
  if (createSiblingMenuManager != null) {
    depopulateManager(createSiblingMenuManager, createSiblingActions);
  }
  // Query the new selection for appropriate new child/sibling descriptors
  //
  Collection<? > newChildDescriptors = null;
  Collection<? > newSiblingDescriptors = null;
  ISelection selection = event.getSelection();
  if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
    Object object = ((IStructuredSelection) selection).getFirstElement();
    EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
    newChildDescriptors = domain.getNewChildDescriptors(object, null);
    newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
  }
  // Generate actions for selection; populate and redraw the menus.
  //
  createChildActions = generateCreateChildActions(newChildDescriptors, selection);
  createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
  if (createChildMenuManager != null) {
    populateManager(createChildMenuManager, createChildActions, null);
    createChildMenuManager.update(true);
  }
  if (createSiblingMenuManager != null) {
    populateManager(createSiblingMenuManager, createSiblingActions, null);
    createSiblingMenuManager.update(true);
  }
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#19079600]]
selectionChangedGen 
12[[#19079600]]
selectionChanged