CloneSet15


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
184210.998class_body_declarations[6]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
11841207
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java
21841406
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java
Next
Last
Clone Instance
1
Line Count
184
Source Line
1207
Source File
E:/TSE/Projects-CloneDR/emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java

/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void hideTabs() {
  if (getPageCount() <= 1) {
    setPageText(0, "");
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(1);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y + 6);
    }
  }
}

/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void showTabs() {
  if (getPageCount() > 1) {
    setPageText(0, getString("_UI_SelectionPage_label"));
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y - 6);
    }
  }
}

/**
 * This is used to track the active viewer.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override protected void pageChange(int pageIndex) {
  super.pageChange(pageIndex);
  if (contentOutlinePage != null) {
    handleContentOutlineSelection(contentOutlinePage.getSelection());
  }
}

/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked") @Override public Object getAdapter(Class key) {
  if (key.equals(IContentOutlinePage.class )) {
    return showOutlineView() ? getContentOutlinePage(): null;
  }
  else
    if (key.equals(IPropertySheetPage.class )) {
      return getPropertySheetPage();
    }
    else
      if (key.equals(IGotoMarker.class )) {
        return this ;
      }
      else {
        return super.getAdapter(key);
      }
}

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
  if (contentOutlinePage == null) {
    // The content outline is just a tree.
    //
    class MyContentOutlinePage extends ContentOutlinePage {
      @Override public void createControl(Composite parent) {
        super.createControl(parent);
        contentOutlineViewer = getTreeViewer();
        contentOutlineViewer.addSelectionChangedListener(this );
        // Set up the tree viewer.
        //
        contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        contentOutlineViewer.setInput(editingDomain.getResourceSet());
        // Make sure our popups work.
        //
        createContextMenuFor(contentOutlineViewer);
        if ( !editingDomain.getResourceSet().getResources().isEmpty()) {
          // Select the root object in the view.
          //
          contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        }
      }

      @Override public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
        super.makeContributions(menuManager, toolBarManager, statusLineManager);
        contentOutlineStatusLineManager = statusLineManager;
      }

      @Override public void setActionBars(IActionBars actionBars) {
        super.setActionBars(actionBars);
        getActionBarContributor().shareGlobalActions(this, actionBars);
      }
    }
    contentOutlinePage = new MyContentOutlinePage();
    // Listen to selection so that we can handle it is a special way.
    //
    contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
                                                     // This ensures that we handle selections correctly.
                                                     //
                                                     public void selectionChanged(SelectionChangedEvent event) {
                                                       handleContentOutlineSelection(event.getSelection());
                                                     }
                                                   } );
  }
  return contentOutlinePage;
}

/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
  if (propertySheetPage == null) {
    propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
                          @Override public void setSelectionToViewer(List<? > selection) {
                            EcoreEditor.this.setSelectionToViewer(selection);
                            EcoreEditor.this.setFocus();
                          }

                          @Override public void setActionBars(IActionBars actionBars) {
                            super.setActionBars(actionBars);
                            getActionBarContributor().shareGlobalActions(this, actionBars);
                          }
                        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
  }
  return propertySheetPage;
}


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

/**
 * If there is just one page in the multi-page editor part,
 * this hides the single tab at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void hideTabs() {
  if (getPageCount() <= 1) {
    setPageText(0, ""); //$NON-NLS-1$
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(1);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y + 6);
    }
  }
}

/**
 * If there is more than one page in the multi-page editor part,
 * this shows the tabs at the bottom.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected void showTabs() {
  if (getPageCount() > 1) {
    setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y - 6);
    }
  }
}

/**
 * This is used to track the active viewer.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override protected void pageChange(int pageIndex) {
  super.pageChange(pageIndex);
  if (contentOutlinePage != null) {
    handleContentOutlineSelection(contentOutlinePage.getSelection());
  }
}

/**
 * This is how the framework determines which interfaces we implement.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@SuppressWarnings("unchecked") @Override public Object getAdapter(Class key) {
  if (key.equals(IContentOutlinePage.class )) {
    return showOutlineView() ? getContentOutlinePage(): null;
  }
  else
    if (key.equals(IPropertySheetPage.class )) {
      return getPropertySheetPage();
    }
    else
      if (key.equals(IGotoMarker.class )) {
        return this ;
      }
      else {
        return super.getAdapter(key);
      }
}

/**
 * This accesses a cached version of the content outliner.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IContentOutlinePage getContentOutlinePage() {
  if (contentOutlinePage == null) {
    // The content outline is just a tree.
    //
    class MyContentOutlinePage extends ContentOutlinePage {
      @Override public void createControl(Composite parent) {
        super.createControl(parent);
        contentOutlineViewer = getTreeViewer();
        contentOutlineViewer.addSelectionChangedListener(this );
        // Set up the tree viewer.
        //
        contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        contentOutlineViewer.setInput(editingDomain.getResourceSet());
        // Make sure our popups work.
        //
        createContextMenuFor(contentOutlineViewer);
        if ( !editingDomain.getResourceSet().getResources().isEmpty()) {
          // Select the root object in the view.
          //
          contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        }
      }

      @Override public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
        super.makeContributions(menuManager, toolBarManager, statusLineManager);
        contentOutlineStatusLineManager = statusLineManager;
      }

      @Override public void setActionBars(IActionBars actionBars) {
        super.setActionBars(actionBars);
        getActionBarContributor().shareGlobalActions(this, actionBars);
      }
    }
    contentOutlinePage = new MyContentOutlinePage();
    // Listen to selection so that we can handle it is a special way.
    //
    contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
                                                     // This ensures that we handle selections correctly.
                                                     //
                                                     public void selectionChanged(SelectionChangedEvent event) {
                                                       handleContentOutlineSelection(event.getSelection());
                                                     }
                                                   } );
  }
  return contentOutlinePage;
}

/**
 * This accesses a cached version of the property sheet.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public IPropertySheetPage getPropertySheetPage() {
  if (propertySheetPage == null) {
    propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
                          @Override public void setSelectionToViewer(List<? > selection) {
                            Ecore2XMLEditor.this.setSelectionToViewer(selection);
                            Ecore2XMLEditor.this.setFocus();
                          }

                          @Override public void setActionBars(IActionBars actionBars) {
                            super.setActionBars(actionBars);
                            getActionBarContributor().shareGlobalActions(this, actionBars);
                          }
                        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
  }
  return propertySheetPage;
}


Clone AbstractionParameter Count: 1Parameter Bindings

/**
   * If there is just one page in the multi-page editor part,
   * this hides the single tab at the bottom.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
protected void hideTabs() {
  if (getPageCount() <= 1) {
    setPageText(0, ""); //$NON-NLS-1$
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(1);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y + 6);
    }
  }
}

/**
   * If there is more than one page in the multi-page editor part,
   * this shows the tabs at the bottom.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
protected void showTabs() {
  if (getPageCount() > 1) {
    setPageText(0, getString("_UI_SelectionPage_label")); //$NON-NLS-1$
    if (getContainer() instanceof CTabFolder) {
      ((CTabFolder) getContainer()).setTabHeight(SWT.DEFAULT);
      Point point = getContainer().getSize();
      getContainer().setSize(point.x, point.y - 6);
    }
  }
}

/**
   * This is used to track the active viewer.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
@Override protected void pageChange(int pageIndex) {
  super.pageChange(pageIndex);
  if (contentOutlinePage != null) {
    handleContentOutlineSelection(contentOutlinePage.getSelection());
  }
}

/**
   * This is how the framework determines which interfaces we implement.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
@SuppressWarnings("unchecked") @Override public Object getAdapter(Class key) {
  if (key.equals(IContentOutlinePage.class )) {
    return showOutlineView() ? getContentOutlinePage(): null;
  }
  else
    if (key.equals(IPropertySheetPage.class )) {
      return getPropertySheetPage();
    }
    else
      if (key.equals(IGotoMarker.class )) {
        return this ;
      }
      else {
        return super.getAdapter(key);
      }
}

/**
   * This accesses a cached version of the content outliner.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public IContentOutlinePage getContentOutlinePage() {
  if (contentOutlinePage == null) {
    // The content outline is just a tree.
    //
    class MyContentOutlinePage extends ContentOutlinePage {
      @Override public void createControl(Composite parent) {
        super.createControl(parent);
        contentOutlineViewer = getTreeViewer();
        contentOutlineViewer.addSelectionChangedListener(this );
        // Set up the tree viewer.
        //
        contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
        contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
        contentOutlineViewer.setInput(editingDomain.getResourceSet());
        // Make sure our popups work.
        //
        createContextMenuFor(contentOutlineViewer);
        if ( !editingDomain.getResourceSet().getResources().isEmpty()) {
          // Select the root object in the view.
          //
          contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
        }
      }

      @Override public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager) {
        super.makeContributions(menuManager, toolBarManager, statusLineManager);
        contentOutlineStatusLineManager = statusLineManager;
      }

      @Override public void setActionBars(IActionBars actionBars) {
        super.setActionBars(actionBars);
        getActionBarContributor().shareGlobalActions(this, actionBars);
      }
    }
    contentOutlinePage = new MyContentOutlinePage();
    // Listen to selection so that we can handle it is a special way.
    //
    contentOutlinePage.addSelectionChangedListener(new ISelectionChangedListener() {
                                                     // This ensures that we handle selections correctly.
                                                     //
                                                     public void selectionChanged(SelectionChangedEvent event) {
                                                       handleContentOutlineSelection(event.getSelection());
                                                     }
                                                   } );
  }
  return contentOutlinePage;
}

/**
   * This accesses a cached version of the property sheet.
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public IPropertySheetPage getPropertySheetPage() {
  if (propertySheetPage == null) {
    propertySheetPage = new ExtendedPropertySheetPage(editingDomain) {
                          @Override public void setSelectionToViewer(List<? > selection) {
                             [[#variable146ce740]].this.setSelectionToViewer(selection);
                             [[#variable146ce740]].this.setFocus();
                          }

                          @Override public void setActionBars(IActionBars actionBars) {
                            super.setActionBars(actionBars);
                            getActionBarContributor().shareGlobalActions(this, actionBars);
                          }
                        };
    propertySheetPage.setPropertySourceProvider(new AdapterFactoryContentProvider(adapterFactory));
  }
  return propertySheetPage;
}
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#146ce740]]
EcoreEditor 
12[[#146ce740]]
Ecore2XMLEditor