protected IStructuredSelection selection; /** * Remember the workbench during initialization. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IWorkbench workbench; /** * Caches the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected List<String> initialObjectNames; /** * This just records the information. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore"))); } /** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : ecorePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames;
protected IStructuredSelection selection; /** * Remember the workbench during initialization. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected IWorkbench workbench; /** * Caches the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected List<String> initialObjectNames; /** * This just records the information. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void init(IWorkbench workbench, IStructuredSelection selection) { this.workbench = workbench; this.selection = selection; setWindowTitle(Ecore2EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label")); setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(Ecore2EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore2Ecore"))); } /** * Returns the names of the types that can be created as the root object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected Collection<String> getInitialObjectNames() { if (initialObjectNames == null) { initialObjectNames = new ArrayList<String>(); for (EClassifier eClassifier : ecore2EcorePackage.getEClassifiers()) { if (eClassifier instanceof EClass) { EClass eClass = (EClass)eClassifier; if (!eClass.isAbstract()) { initialObjectNames.add(eClass.getName()); } } } Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator()); } return initialObjectNames;
Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/presentation/EcoreModelWizard.java File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2ecore/presentation/Ecore2EcoreModelWizard.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
protected IStructuredSelection selection;
1
protected IStructuredSelection selection;
2
  /**
2
  /**
3
   * Remember the workbench during initialization.
3
   * Remember the workbench during initialization.
4
   * <!-- begin-user-doc -->
4
   * <!-- begin-user-doc -->
5
   * <!-- end-user-doc -->
5
   * <!-- end-user-doc -->
6
   * @generated
6
   * @generated
7
   */
7
   */
8
  protected IWorkbench workbench;
8
  protected IWorkbench workbench;
9
  /**
9
  /**
10
   * Caches the names of the types that can be created as the root object.
10
   * Caches the names of the types that can be created as the root object.
11
   * <!-- begin-user-doc -->
11
   * <!-- begin-user-doc -->
12
   * <!-- end-user-doc -->
12
   * <!-- end-user-doc -->
13
   * @generated
13
   * @generated
14
   */
14
   */
15
  protected List<String> initialObjectNames;
15
  protected List<String> initialObjectNames;
16
  /**
16
  /**
17
   * This just records the information.
17
   * This just records the information.
18
   * <!-- begin-user-doc -->
18
   * <!-- begin-user-doc -->
19
   * <!-- end-user-doc -->
19
   * <!-- end-user-doc -->
20
   * @generated
20
   * @generated
21
   */
21
   */
22
  public void init(IWorkbench workbench, IStructuredSelection selection)
22
  public void init(IWorkbench workbench, IStructuredSelection selection)
23
  {
23
  {
24
    this.workbench = workbench;
24
    this.workbench = workbench;
25
    this.selection = selection;
25
    this.selection = selection;
26
    setWindowTitle(EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
26
    setWindowTitle(Ecore2EcoreEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
27
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore")));
27
    setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(Ecore2EcoreEditorPlugin.INSTANCE.getImage("full/wizban/NewEcore2Ecore")));
28
  }
28
  }
29
  /**
29
  /**
30
   * Returns the names of the types that can be created as the root object.
30
   * Returns the names of the types that can be created as the root object.
31
   * <!-- begin-user-doc -->
31
   * <!-- begin-user-doc -->
32
   * <!-- end-user-doc -->
32
   * <!-- end-user-doc -->
33
   * @generated
33
   * @generated
34
   */
34
   */
35
  protected Collection<String> getInitialObjectNames()
35
  protected Collection<String> getInitialObjectNames()
36
  {
36
  {
37
    if (initialObjectNames == null)
37
    if (initialObjectNames == null)
38
    {
38
    {
39
      initialObjectNames = new ArrayList<String>();
39
      initialObjectNames = new ArrayList<String>();
40
      for (EClassifier eClassifier : ecorePackage.getEClassifiers())
40
      for (EClassifier eClassifier : ecore2EcorePackage.getEClassifiers())
41
      {
41
      {
42
        if (eClassifier instanceof EClass)
42
        if (eClassifier instanceof EClass)
43
        {
43
        {
44
          EClass eClass = (EClass)eClassifier;
44
          EClass eClass = (EClass)eClassifier;
45
          if (!eClass.isAbstract())
45
          if (!eClass.isAbstract())
46
          {
46
          {
47
            initialObjectNames.add(eClass.getName());
47
            initialObjectNames.add(eClass.getName());
48
          }
48
          }
49
        }
49
        }
50
      }
50
      }
51
      Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
51
      Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
52
    }
52
    }
53
    return initialObjectNames;
53
    return initialObjectNames;
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