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);
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);
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreEditor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLEditor.java
Method name: IContentOutlinePage getContentOutlinePage() Method name: IContentOutlinePage getContentOutlinePage()
Number of AST nodes: 13 Number of AST nodes: 13
1
super.createControl(parent);
1
super.createControl(parent);
2
          contentOutlineViewer = getTreeViewer();
2
          contentOutlineViewer = getTreeViewer();
3
          contentOutlineViewer.addSelectionChangedListener(this);
3
          contentOutlineViewer.addSelectionChangedListener(this);
4
          // Set up the tree viewer.
4
          // Set up the tree viewer.
5
          //
5
          //
6
          contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
6
          contentOutlineViewer.setContentProvider(new AdapterFactoryContentProvider(adapterFactory));
7
          contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
7
          contentOutlineViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
8
          contentOutlineViewer.setInput(editingDomain.getResourceSet());
8
          contentOutlineViewer.setInput(editingDomain.getResourceSet());
9
          // Make sure our popups work.
9
          // Make sure our popups work.
10
          //
10
          //
11
          createContextMenuFor(contentOutlineViewer);
11
          createContextMenuFor(contentOutlineViewer);
12
          if (!editingDomain.getResourceSet().getResources().isEmpty())
12
          if (!editingDomain.getResourceSet().getResources().isEmpty())
13
          {
13
          {
14
            // Select the root object in the view.
14
            // Select the root object in the view.
15
            //
15
            //
16
            contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
16
            contentOutlineViewer.setSelection(new StructuredSelection(editingDomain.getResourceSet().getResources().get(0)), true);
17
          }
17
          }
18
        }
18
        }
19
        @Override
19
        @Override
20
        public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
20
        public void makeContributions(IMenuManager menuManager, IToolBarManager toolBarManager, IStatusLineManager statusLineManager)
21
        {
21
        {
22
          super.makeContributions(menuManager, toolBarManager, statusLineManager);
22
          super.makeContributions(menuManager, toolBarManager, statusLineManager);
23
          contentOutlineStatusLineManager = statusLineManager;
23
          contentOutlineStatusLineManager = statusLineManager;
24
        }
24
        }
25
        @Override
25
        @Override
26
        public void setActionBars(IActionBars actionBars)
26
        public void setActionBars(IActionBars actionBars)
27
        {
27
        {
28
          super.setActionBars(actionBars);
28
          super.setActionBars(actionBars);
29
          getActionBarContributor().shareGlobalActions(this, actionBars);
29
          getActionBarContributor().shareGlobalActions(this, actionBars);
Summary
Number of common nesting structure subtrees1
Number of refactorable cases0
Number of non-refactorable cases1
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones locationClones are in different classes having the same super class
Number of node comparisons0
  1. {Non-refactorable}
    Mapping Summary
    Number of mapped statements0
    Number of unmapped statements in the first code fragment0
    Number of unmapped statements in the second code fragment0
    Time elapsed for statement mapping (ms)0.0
    Clone typeUnknown type
    Mapped Statements
    ID Statement ID Statement
    Precondition Violations (0)
    Row Violation