diff options
Diffstat (limited to 'plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java')
-rw-r--r-- | plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java index 4988ba0e5f..3e7a57bab8 100644 --- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java +++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewImpl.java @@ -119,8 +119,6 @@ public class CDOViewImpl extends AbstractCDOView private String durableLockingID; - private CDOFeatureAnalyzer featureAnalyzer = CDOFeatureAnalyzer.NOOP; - private ChangeSubscriptionManager changeSubscriptionManager = new ChangeSubscriptionManager(); private AdapterManager adapterManager = new AdapterManager(); @@ -652,17 +650,19 @@ public class CDOViewImpl extends AbstractCDOView /** * @since 2.0 */ + @Deprecated public synchronized CDOFeatureAnalyzer getFeatureAnalyzer() { - return featureAnalyzer; + return options().getFeatureAnalyzer(); } /** * @since 2.0 */ + @Deprecated public synchronized void setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer) { - this.featureAnalyzer = featureAnalyzer == null ? CDOFeatureAnalyzer.NOOP : featureAnalyzer; + options.setFeatureAnalyzer(featureAnalyzer); } /** @@ -1120,7 +1120,6 @@ public class CDOViewImpl extends AbstractCDOView } changeSubscriptionManager = null; - featureAnalyzer = null; options = null; super.doDeactivate(); } @@ -1633,6 +1632,8 @@ public class CDOViewImpl extends AbstractCDOView private CDORevisionPrefetchingPolicy revisionPrefetchingPolicy = CDOUtil .createRevisionPrefetchingPolicy(NO_REVISION_PREFETCHING); + private CDOFeatureAnalyzer featureAnalyzer = CDOFeatureAnalyzer.NOOP; + private CDOStaleReferencePolicy staleReferencePolicy = CDOStaleReferencePolicy.EXCEPTION; private HashBag<CDOAdapterPolicy> changeSubscriptionPolicies = new HashBag<CDOAdapterPolicy>(); @@ -1843,6 +1844,34 @@ public class CDOViewImpl extends AbstractCDOView fireEvent(event); } + public CDOFeatureAnalyzer getFeatureAnalyzer() + { + synchronized (CDOViewImpl.this) + { + return featureAnalyzer; + } + } + + public void setFeatureAnalyzer(CDOFeatureAnalyzer featureAnalyzer) + { + if (featureAnalyzer == null) + { + featureAnalyzer = CDOFeatureAnalyzer.NOOP; + } + + IEvent event = null; + synchronized (CDOViewImpl.this) + { + if (this.featureAnalyzer != featureAnalyzer) + { + this.featureAnalyzer = featureAnalyzer; + event = new FeatureAnalyzerEventImpl(); + } + } + + fireEvent(event); + } + @Deprecated public CDOStaleReferencePolicy getStaleReferenceBehaviour() { @@ -2086,6 +2115,19 @@ public class CDOViewImpl extends AbstractCDOView /** * @author Eike Stepper */ + private final class FeatureAnalyzerEventImpl extends OptionsEvent implements FeatureAnalyzerEvent + { + private static final long serialVersionUID = 1L; + + public FeatureAnalyzerEventImpl() + { + super(OptionsImpl.this); + } + } + + /** + * @author Eike Stepper + */ @SuppressWarnings("deprecation") private final class ReferencePolicyEventImpl extends OptionsEvent implements ReferencePolicyEvent { |