protected IEditorPart activeEditorPart; /** * This keeps track of the current selection provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ISelectionProvider selectionProvider; /** * This action opens the Properties view. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IAction showPropertiesViewAction = new Action(EcoreEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) { @Override public void run() { try { getPage().showView("org.eclipse.ui.views.PropertySheet"); } catch (PartInitException exception) { EcoreEditorPlugin.INSTANCE.log(exception); } } }; /** * This action refreshes the viewer of the current editor if the editor * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IAction refreshViewerAction = new Action(EcoreEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) { @Override public boolean isEnabled() { return activeEditorPart instanceof IViewerProvider; } @Override public void run() { if (activeEditorPart instanceof IViewerProvider) { Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); if (viewer != null) { viewer.refresh(); } } } }; /** * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor * generated for the current selection by the item provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<IAction> createChildActions; /** * This is the menu manager into which menu contribution items should be added for CreateChild actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IMenuManager createChildMenuManager; /** * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor * generated for the current selection by the item provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<IAction> createSiblingActions; /** * This is the menu manager into which menu contribution items should be added for CreateSibling actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IMenuManager createSiblingMenuManager;
protected IEditorPart activeEditorPart; /** * This keeps track of the current selection provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ISelectionProvider selectionProvider; /** * This action opens the Properties view. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IAction showPropertiesViewAction = new Action(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) //$NON-NLS-1$ { @Override public void run() { try { getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$ } catch (PartInitException exception) { Ecore2XMLUIPlugin.INSTANCE.log(exception); } } }; /** * This action refreshes the viewer of the current editor if the editor * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IAction refreshViewerAction = new Action(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) //$NON-NLS-1$ { @Override public boolean isEnabled() { return activeEditorPart instanceof IViewerProvider; } @Override public void run() { if (activeEditorPart instanceof IViewerProvider) { Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer(); if (viewer != null) { viewer.refresh(); } } } }; /** * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor * generated for the current selection by the item provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<IAction> createChildActions; /** * This is the menu manager into which menu contribution items should be added for CreateChild actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IMenuManager createChildMenuManager; /** * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor * generated for the current selection by the item provider. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<IAction> createSiblingActions; /** * This is the menu manager into which menu contribution items should be added for CreateSibling actions. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IMenuManager createSiblingMenuManager;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreActionBarContributor.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/presentation/Ecore2XMLActionBarContributor.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected IEditorPart activeEditorPart;
1
protected IEditorPart activeEditorPart;
2
  /**
2
  /**
3
   * This keeps track of the current selection provider.
3
   * This keeps track of the current selection provider.
4
   * <!-- begin-user-doc -->
4
   * <!-- begin-user-doc -->
5
   * <!-- end-user-doc -->
5
   * <!-- end-user-doc -->
6
   * @generated
6
   * @generated
7
   */
7
   */
8
  protected ISelectionProvider selectionProvider;
8
  protected ISelectionProvider selectionProvider;
9
  /**
9
  /**
10
   * This action opens the Properties view.
10
   * This action opens the Properties view.
11
   * <!-- begin-user-doc -->
11
   * <!-- begin-user-doc -->
12
   * <!-- end-user-doc -->
12
   * <!-- end-user-doc -->
13
   * @generated
13
   * @generated
14
   */
14
   */
15
  protected IAction showPropertiesViewAction =
15
  protected IAction showPropertiesViewAction =
16
    new Action(EcoreEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item"))
16
    new Action(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) //$NON-NLS-1$
17
    {
17
    {
18
      @Override
18
      @Override
19
      public void run()
19
      public void run()
20
      {
20
      {
21
        try
21
        try
22
        {
22
        {
23
          getPage().showView("org.eclipse.ui.views.PropertySheet");
23
          getPage().showView("org.eclipse.ui.views.PropertySheet"); //$NON-NLS-1$
24
        }
24
        }
25
        catch (PartInitException exception)
25
        catch (PartInitException exception)
26
        {
26
        {
27
          EcoreEditorPlugin.INSTANCE.log(exception);
27
          Ecore2XMLUIPlugin.INSTANCE.log(exception);
28
        }
28
        }
29
      }
29
      }
30
    };
30
    };
31
  /**
31
  /**
32
   * This action refreshes the viewer of the current editor if the editor
32
   * This action refreshes the viewer of the current editor if the editor
33
   * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
33
   * implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
34
   * <!-- begin-user-doc -->
34
   * <!-- begin-user-doc -->
35
   * <!-- end-user-doc -->
35
   * <!-- end-user-doc -->
36
   * @generated
36
   * @generated
37
   */
37
   */
38
  protected IAction refreshViewerAction =
38
  protected IAction refreshViewerAction =
39
    new Action(EcoreEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item"))
39
    new Action(Ecore2XMLUIPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) //$NON-NLS-1$
40
    {
40
    {
41
      @Override
41
      @Override
42
      public boolean isEnabled()
42
      public boolean isEnabled()
43
      {
43
      {
44
        return activeEditorPart instanceof IViewerProvider;
44
        return activeEditorPart instanceof IViewerProvider;
45
      }
45
      }
46
      @Override
46
      @Override
47
      public void run()
47
      public void run()
48
      {
48
      {
49
        if (activeEditorPart instanceof IViewerProvider)
49
        if (activeEditorPart instanceof IViewerProvider)
50
        {
50
        {
51
          Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
51
          Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
52
          if (viewer != null)
52
          if (viewer != null)
53
          {
53
          {
54
            viewer.refresh();
54
            viewer.refresh();
55
          }
55
          }
56
        }
56
        }
57
      }
57
      }
58
    };
58
    };
59
  /**
59
  /**
60
   * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
60
   * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
61
   * generated for the current selection by the item provider.
61
   * generated for the current selection by the item provider.
62
   * <!-- begin-user-doc -->
62
   * <!-- begin-user-doc -->
63
   * <!-- end-user-doc -->
63
   * <!-- end-user-doc -->
64
   * @generated
64
   * @generated
65
   */
65
   */
66
  protected Collection<IAction> createChildActions;
66
  protected Collection<IAction> createChildActions;
67
  /**
67
  /**
68
   * This is the menu manager into which menu contribution items should be added for CreateChild actions.
68
   * This is the menu manager into which menu contribution items should be added for CreateChild actions.
69
   * <!-- begin-user-doc -->
69
   * <!-- begin-user-doc -->
70
   * <!-- end-user-doc -->
70
   * <!-- end-user-doc -->
71
   * @generated
71
   * @generated
72
   */
72
   */
73
  protected IMenuManager createChildMenuManager;
73
  protected IMenuManager createChildMenuManager;
74
  /**
74
  /**
75
   * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
75
   * This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
76
   * generated for the current selection by the item provider.
76
   * generated for the current selection by the item provider.
77
   * <!-- begin-user-doc -->
77
   * <!-- begin-user-doc -->
78
   * <!-- end-user-doc -->
78
   * <!-- end-user-doc -->
79
   * @generated
79
   * @generated
80
   */
80
   */
81
  protected Collection<IAction> createSiblingActions;
81
  protected Collection<IAction> createSiblingActions;
82
  /**
82
  /**
83
   * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
83
   * This is the menu manager into which menu contribution items should be added for CreateSibling actions.
84
   * <!-- begin-user-doc -->
84
   * <!-- begin-user-doc -->
85
   * <!-- end-user-doc -->
85
   * <!-- end-user-doc -->
86
   * @generated
86
   * @generated
87
   */
87
   */
88
  protected IMenuManager createSiblingMenuManager;
88
  protected IMenuManager createSiblingMenuManager;
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0