Author: ruschein
Date: 2011-09-02 13:56:25 -0700 (Fri, 02 Sep 2011)
New Revision: 26703

Modified:
   
core3/impl/trunk/viewmodel-impl/impl/src/main/java/org/cytoscape/view/model/internal/NetworkViewFactoryImpl.java
   core3/impl/trunk/viewmodel-impl/pom.xml
Log:
Nice performance optimisation.

Modified: 
core3/impl/trunk/viewmodel-impl/impl/src/main/java/org/cytoscape/view/model/internal/NetworkViewFactoryImpl.java
===================================================================
--- 
core3/impl/trunk/viewmodel-impl/impl/src/main/java/org/cytoscape/view/model/internal/NetworkViewFactoryImpl.java
    2011-09-02 20:53:14 UTC (rev 26702)
+++ 
core3/impl/trunk/viewmodel-impl/impl/src/main/java/org/cytoscape/view/model/internal/NetworkViewFactoryImpl.java
    2011-09-02 20:56:25 UTC (rev 26703)
@@ -1,7 +1,9 @@
 package org.cytoscape.view.model.internal;
 
+
 import java.util.Properties;
 
+import org.cytoscape.di.util.DIUtil;
 import org.cytoscape.event.CyEventHelper;
 import org.cytoscape.model.CyNetwork;
 import org.cytoscape.property.CyProperty;
@@ -9,8 +11,8 @@
 import org.cytoscape.view.model.CyNetworkView;
 import org.cytoscape.view.model.CyNetworkViewFactory;
 
-public class NetworkViewFactoryImpl implements CyNetworkViewFactory {
 
+public class NetworkViewFactoryImpl implements CyNetworkViewFactory {
        private final CyEventHelper eventHelper;
        private final CyServiceRegistrar registrar;
 
@@ -20,15 +22,13 @@
         * @param eventHelper
         */
        public NetworkViewFactoryImpl(final CyEventHelper eventHelper, final 
CyServiceRegistrar registrar) {
-
                if (eventHelper == null)
                        throw new NullPointerException("CyEventHelper is null");
-               this.eventHelper = eventHelper;
+               this.eventHelper = DIUtil.stripProxy(eventHelper);
 
                if (registrar == null)
                        throw new NullPointerException("CyServiceRegistrar is 
null");
-
-               this.registrar = registrar;
+               this.registrar = DIUtil.stripProxy(registrar);
        }
 
        @Override
@@ -38,7 +38,6 @@
 
        @Override
        public CyNetworkView getNetworkView(final CyNetwork network, final 
Boolean useThreshold) {
-
                CyNetworkView view;
 
                if (!useThreshold) {

Modified: core3/impl/trunk/viewmodel-impl/pom.xml
===================================================================
--- core3/impl/trunk/viewmodel-impl/pom.xml     2011-09-02 20:53:14 UTC (rev 
26702)
+++ core3/impl/trunk/viewmodel-impl/pom.xml     2011-09-02 20:56:25 UTC (rev 
26703)
@@ -63,6 +63,11 @@
                additional dependencies necessary for the integration tests 
(it) should be 
                kept in the it/pom.xml -->
        <dependencies>
+                <dependency>
+                        <groupId>org.cytoscape</groupId>
+                        <artifactId>di-util-api</artifactId>
+                        <scope>provided</scope>
+                </dependency>
                <dependency>
                        <groupId>org.cytoscape</groupId>
                        <artifactId>viewmodel-api</artifactId>

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to