1914-1-2

Adapter createListChangeAdapter() { if (listChangeItemProvider == null) { listChangeItemProvider = new ListChangeItemProvider(this); } return listChangeItemProvider; } /** * This keeps track of the one adapter used for all {@link org.eclipse.emf.ecore.change.ResourceChange} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ResourceChangeItemProvider resourceChangeItemProvider; /** * This creates an adapter for a {@link org.eclipse.emf.ecore.change.ResourceChange}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter createResourceChangeAdapter() { if (resourceChangeItemProvider == null) { resourceChangeItemProvider = new ResourceChangeItemProvider(this); } return resourceChangeItemProvider; } /** * This keeps track of the one adapter used for all {@link org.eclipse.emf.ecore.change.FeatureMapEntry} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected FeatureMapEntryItemProvider featureMapEntryItemProvider; /** * This creates an adapter for a {@link org.eclipse.emf.ecore.change.FeatureMapEntry}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter createFeatureMapEntryAdapter() { if (featureMapEntryItemProvider == null) { featureMapEntryItemProvider = new FeatureMapEntryItemProvider(this); } return featureMapEntryItemProvider; } /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComposeableAdapterFactory getRootAdapterFactory() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } /** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean isFactoryForType(Object type) { return supportedTypes.contains(type) || super.isFactoryForType(type); } /** * This implementation substitutes the factory itself as the key for the adapter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object adapt(Object object, Object type) { if (isFactoryForType(type)) { Object adapter = super.adapt(object, type); if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) { return adapter; } } return null; } /** * This adds a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void addListener(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); } /** * This removes a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void removeListener(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } /** * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void fireNotifyChanged(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }
Adapter createXMLInfoAdapter() { if (xmlInfoItemProvider == null) { xmlInfoItemProvider = new XMLInfoItemProvider(this); } return xmlInfoItemProvider; } /** * This keeps track of the one adapter used for all {@link org.eclipse.emf.mapping.ecore2xml.XMLMap} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected XMLMapItemProvider xmlMapItemProvider; /** * This creates an adapter for a {@link org.eclipse.emf.mapping.ecore2xml.XMLMap}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter createXMLMapAdapter() { if (xmlMapItemProvider == null) { xmlMapItemProvider = new XMLMapItemProvider(this); } return xmlMapItemProvider; } /** * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected ENamedElementToXMLInfoMapEntryItemProvider eNamedElementToXMLInfoMapEntryItemProvider; /** * This creates an adapter for a {@link java.util.Map.Entry}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter createENamedElementToXMLInfoMapEntryAdapter() { if (eNamedElementToXMLInfoMapEntryItemProvider == null) { eNamedElementToXMLInfoMapEntryItemProvider = new ENamedElementToXMLInfoMapEntryItemProvider(this); } return eNamedElementToXMLInfoMapEntryItemProvider; } /** * This returns the root adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComposeableAdapterFactory getRootAdapterFactory() { return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory(); } /** * This sets the composed adapter factory that contains this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) { this.parentAdapterFactory = parentAdapterFactory; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean isFactoryForType(Object type) { return supportedTypes.contains(type) || super.isFactoryForType(type); } /** * This implementation substitutes the factory itself as the key for the adapter. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Adapter adapt(Notifier notifier, Object type) { return super.adapt(notifier, this); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object adapt(Object object, Object type) { if (isFactoryForType(type)) { Object adapter = super.adapt(object, type); if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter))) { return adapter; } } return null; } /** * This adds a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void addListener(INotifyChangedListener notifyChangedListener) { changeNotifier.addListener(notifyChangedListener); } /** * This removes a listener. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void removeListener(INotifyChangedListener notifyChangedListener) { changeNotifier.removeListener(notifyChangedListener); } /** * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void fireNotifyChanged(Notification notification) { changeNotifier.fireNotifyChanged(notification); if (parentAdapterFactory != null) { parentAdapterFactory.fireNotifyChanged(notification); } }

Clone fragments detected by clone detection tool
File path: /emf-2.4.1/src/org/eclipse/emf/ecore/change/provider/ChangeItemProviderAdapterFactory.java |  | File path: /emf-2.4.1/src/org/eclipse/emf/mapping/ecore2xml/provider/Ecore2XMLItemProviderAdapterFactory.java
Method name: `` |  | Method name: ``
Number of AST nodes: 0 |  | Number of AST nodes: 0

1

    Adapter createListChangeAdapter()↵

1

    Adapter createXMLInfoAdapter()↵

2

      {↵

2

      {↵

3

        if (listChangeItemProvider == null)↵

3

        if (xmlInfoItemProvider == null)↵

4

        {↵

4

        {↵

5

          listChangeItemProvider = new ListChangeItemProvider(this);↵

5

          xmlInfoItemProvider = new XMLInfoItemProvider(this);↵

6

        }↵

6

        }↵

7

        return listChangeItemProvider;↵

7

        return xmlInfoItemProvider;↵

8

      }↵

8

      }↵

9

      /**↵

9

      /**↵

10

       * This keeps track of the one adapter used for all {@link org.eclipse.emf.ecore.change.ResourceChange} instances.↵

10

       * This keeps track of the one adapter used for all {@link org.eclipse.emf.mapping.ecore2xml.XMLMap} instances.↵

11

       * <!-- begin-user-doc -->↵

11

       * <!-- begin-user-doc -->↵

12

       * <!-- end-user-doc -->↵

12

       * <!-- end-user-doc -->↵

13

       * @generated↵

13

       * @generated↵

14

       */↵

14

       */↵

15

      protected ResourceChangeItemProvider resourceChangeItemProvider;↵

15

      protected XMLMapItemProvider xmlMapItemProvider;↵

16

      /**↵

16

      /**↵

17

       * This creates an adapter for a {@link org.eclipse.emf.ecore.change.ResourceChange}.↵

17

       * This creates an adapter for a {@link org.eclipse.emf.mapping.ecore2xml.XMLMap}.↵

18

       * <!-- begin-user-doc -->↵

18

       * <!-- begin-user-doc -->↵

19

       * <!-- end-user-doc -->↵

19

       * <!-- end-user-doc -->↵

20

       * @generated↵

20

       * @generated↵

21

       */↵

21

       */↵

22

      @Override↵

22

      @Override↵

23

      public Adapter createResourceChangeAdapter()↵

23

      public Adapter createXMLMapAdapter()↵

24

      {↵

24

      {↵

25

        if (resourceChangeItemProvider == null)↵

25

        if (xmlMapItemProvider == null)↵

26

        {↵

26

        {↵

27

          resourceChangeItemProvider = new ResourceChangeItemProvider(this);↵

27

          xmlMapItemProvider = new XMLMapItemProvider(this);↵

28

        }↵

28

        }↵

29

        return resourceChangeItemProvider;↵

29

        return xmlMapItemProvider;↵

30

      }↵

30

      }↵

31

      /**↵

31

      /**↵

32

       * This keeps track of the one adapter used for all {@link org.eclipse.emf.ecore.change.FeatureMapEntry} instances.↵

32

       * This keeps track of the one adapter used for all {@link java.util.Map.Entry} instances.↵

33

       * <!-- begin-user-doc -->↵

33

       * <!-- begin-user-doc -->↵

34

       * <!-- end-user-doc -->↵

34

       * <!-- end-user-doc -->↵

35

       * @generated↵

35

       * @generated↵

36

       */↵

36

       */↵

37

      protected FeatureMapEntryItemProvider featureMapEntryItemProvider;↵

37

      protected ENamedElementToXMLInfoMapEntryItemProvider eNamedElementToXMLInfoMapEntryItemProvider;↵

38

      /**↵

38

      /**↵

39

       * This creates an adapter for a {@link org.eclipse.emf.ecore.change.FeatureMapEntry}.↵

39

       * This creates an adapter for a {@link java.util.Map.Entry}.↵

40

       * <!-- begin-user-doc -->↵

40

       * <!-- begin-user-doc -->↵

41

       * <!-- end-user-doc -->↵

41

       * <!-- end-user-doc -->↵

42

       * @generated↵

42

       * @generated↵

43

       */↵

43

       */↵

44

      @Override↵

44

      @Override↵

45

      public Adapter createFeatureMapEntryAdapter()↵

45

      public Adapter createENamedElementToXMLInfoMapEntryAdapter()↵

46

      {↵

46

      {↵

47

        if (featureMapEntryItemProvider == null)↵

47

        if (eNamedElementToXMLInfoMapEntryItemProvider == null)↵

48

        {↵

48

        {↵

49

          featureMapEntryItemProvider = new FeatureMapEntryItemProvider(this);↵

49

          eNamedElementToXMLInfoMapEntryItemProvider = new ENamedElementToXMLInfoMapEntryItemProvider(this);↵

50

        }↵

50

        }↵

51

        return featureMapEntryItemProvider;↵

51

        return eNamedElementToXMLInfoMapEntryItemProvider;↵

52

      }↵

52

      }↵

53

      /**↵

53

      /**↵

54

       * This returns the root adapter factory that contains this factory.↵

54

       * This returns the root adapter factory that contains this factory.↵

55

       * <!-- begin-user-doc -->↵

55

       * <!-- begin-user-doc -->↵

56

       * <!-- end-user-doc -->↵

56

       * <!-- end-user-doc -->↵

57

       * @generated↵

57

       * @generated↵

58

       */↵

58

       */↵

59

      public ComposeableAdapterFactory getRootAdapterFactory()↵

59

      public ComposeableAdapterFactory getRootAdapterFactory()↵

60

      {↵

60

      {↵

61

        return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();↵

61

        return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();↵

62

      }↵

62

      }↵

63

      /**↵

63

      /**↵

64

       * This sets the composed adapter factory that contains this factory.↵

64

       * This sets the composed adapter factory that contains this factory.↵

65

       * <!-- begin-user-doc -->↵

65

       * <!-- begin-user-doc -->↵

66

       * <!-- end-user-doc -->↵

66

       * <!-- end-user-doc -->↵

67

       * @generated↵

67

       * @generated↵

68

       */↵

68

       */↵

69

      public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵

69

      public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory)↵

70

      {↵

70

      {↵

71

        this.parentAdapterFactory = parentAdapterFactory;↵

71

        this.parentAdapterFactory = parentAdapterFactory;↵

72

      }↵

72

      }↵

73

      /**↵

73

      /**↵

74

       * <!-- begin-user-doc -->↵

74

       * <!-- begin-user-doc -->↵

75

       * <!-- end-user-doc -->↵

75

       * <!-- end-user-doc -->↵

76

       * @generated↵

76

       * @generated↵

77

       */↵

77

       */↵

78

      @Override↵

78

      @Override↵

79

      public boolean isFactoryForType(Object type)↵

79

      public boolean isFactoryForType(Object type)↵

80

      {↵

80

      {↵

81

        return supportedTypes.contains(type) || super.isFactoryForType(type);↵

81

        return supportedTypes.contains(type) || super.isFactoryForType(type);↵

82

      }↵

82

      }↵

83

      /**↵

83

      /**↵

84

       * This implementation substitutes the factory itself as the key for the adapter.↵

84

       * This implementation substitutes the factory itself as the key for the adapter.↵

85

       * <!-- begin-user-doc -->↵

85

       * <!-- begin-user-doc -->↵

86

       * <!-- end-user-doc -->↵

86

       * <!-- end-user-doc -->↵

87

       * @generated↵

87

       * @generated↵

88

       */↵

88

       */↵

89

      @Override↵

89

      @Override↵

90

      public Adapter adapt(Notifier notifier, Object type)↵

90

      public Adapter adapt(Notifier notifier, Object type)↵

91

      {↵

91

      {↵

92

        return super.adapt(notifier, this);↵

92

        return super.adapt(notifier, this);↵

93

      }↵

93

      }↵

94

      /**↵

94

      /**↵

95

       * <!-- begin-user-doc -->↵

95

       * <!-- begin-user-doc -->↵

96

       * <!-- end-user-doc -->↵

96

       * <!-- end-user-doc -->↵

97

       * @generated↵

97

       * @generated↵

98

       */↵

98

       */↵

99

      @Override↵

99

      @Override↵

100

      public Object adapt(Object object, Object type)↵

100

      public Object adapt(Object object, Object type)↵

101

      {↵

101

      {↵

102

        if (isFactoryForType(type))↵

102

        if (isFactoryForType(type))↵

103

        {↵

103

        {↵

104

          Object adapter = super.adapt(object, type);↵

104

          Object adapter = super.adapt(object, type);↵

105

          if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵

105

          if (!(type instanceof Class) || (((Class<?>)type).isInstance(adapter)))↵

106

          {↵

106

          {↵

107

            return adapter;↵

107

            return adapter;↵

108

          }↵

108

          }↵

109

        }↵

109

        }↵

110

        return null;↵

110

        return null;↵

111

      }↵

111

      }↵

112

      /**↵

112

      /**↵

113

       * This adds a listener.↵

113

       * This adds a listener.↵

114

       * <!-- begin-user-doc -->↵

114

       * <!-- begin-user-doc -->↵

115

       * <!-- end-user-doc -->↵

115

       * <!-- end-user-doc -->↵

116

       * @generated↵

116

       * @generated↵

117

       */↵

117

       */↵

118

      public void addListener(INotifyChangedListener notifyChangedListener)↵

118

      public void addListener(INotifyChangedListener notifyChangedListener)↵

119

      {↵

119

      {↵

120

        changeNotifier.addListener(notifyChangedListener);↵

120

        changeNotifier.addListener(notifyChangedListener);↵

121

      }↵

121

      }↵

122

      /**↵

122

      /**↵

123

       * This removes a listener.↵

123

       * This removes a listener.↵

124

       * <!-- begin-user-doc -->↵

124

       * <!-- begin-user-doc -->↵

125

       * <!-- end-user-doc -->↵

125

       * <!-- end-user-doc -->↵

126

       * @generated↵

126

       * @generated↵

127

       */↵

127

       */↵

128

      public void removeListener(INotifyChangedListener notifyChangedListener)↵

128

      public void removeListener(INotifyChangedListener notifyChangedListener)↵

129

      {↵

129

      {↵

130

        changeNotifier.removeListener(notifyChangedListener);↵

130

        changeNotifier.removeListener(notifyChangedListener);↵

131

      }↵

131

      }↵

132

      /**↵

132

      /**↵

133

       * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.↵

133

       * This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.↵

134

       * <!-- begin-user-doc -->↵

134

       * <!-- begin-user-doc -->↵

135

       * <!-- end-user-doc -->↵

135

       * <!-- end-user-doc -->↵

136

       * @generated↵

136

       * @generated↵

137

       */↵

137

       */↵

138

      public void fireNotifyChanged(Notification notification)↵

138

      public void fireNotifyChanged(Notification notification)↵

139

      {↵

139

      {↵

140

        changeNotifier.fireNotifyChanged(notification);↵

140

        changeNotifier.fireNotifyChanged(notification);↵

141

        if (parentAdapterFactory != null)↵

141

        if (parentAdapterFactory != null)↵

142

        {↵

142

        {↵

143

          parentAdapterFactory.fireNotifyChanged(notification);↵

143

          parentAdapterFactory.fireNotifyChanged(notification);↵

144

        }↵

144

        }↵

145

      }

145

      }

See real code fragment |  | See real code fragment

Summary
Number of common nesting structure subtrees | 0
Number of refactorable cases | 0
Number of non-refactorable cases | 0
Time elapsed for finding largest common nesting structure subtrees (ms) | 0.0
Clones location |
Number of node comparisons | 0