Author: mes
Date: 2010-10-28 15:52:54 -0700 (Thu, 28 Oct 2010)
New Revision: 22600
Added:
core3/plugin-api/trunk/src/test/java/org/cytoscape/plugin/CyPluginTest.java
Modified:
core3/plugin-api/trunk/pom.xml
core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/CyPlugin.java
core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/package-info.java
Log:
added javadoc and prepared for release
Modified: core3/plugin-api/trunk/pom.xml
===================================================================
--- core3/plugin-api/trunk/pom.xml 2010-10-28 22:34:25 UTC (rev 22599)
+++ core3/plugin-api/trunk/pom.xml 2010-10-28 22:52:54 UTC (rev 22600)
@@ -4,7 +4,7 @@
<parent>
<artifactId>parent</artifactId>
<groupId>org.cytoscape</groupId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</parent>
<properties>
@@ -21,6 +21,12 @@
<packaging>bundle</packaging>
+ <scm>
+
<connection>scm:svn:http://chianti.ucsd.edu/svn/core3/plugin-api/trunk</connection>
+
<developerConnection>scm:svn:svn+ssh://grenache.ucsd.edu/cellar/common/svn/core3/plugin-api/trunk</developerConnection>
+ <url>http://chianti.ucsd.edu/svn/core3/plugin-api/trunk</url>
+ </scm>
+
<repositories>
<!-- bootstrap for cytoscape dependencies, namely the parent POM
snapshots -->
<repository>
@@ -111,37 +117,37 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>event-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>model-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>viewmodel-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>work-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>vizmap-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>session-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>presentation-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
@@ -151,12 +157,12 @@
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>io-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>core-task-api</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>3.0.0-alpha1</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
Modified:
core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/CyPlugin.java
===================================================================
--- core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/CyPlugin.java
2010-10-28 22:34:25 UTC (rev 22599)
+++ core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/CyPlugin.java
2010-10-28 22:52:54 UTC (rev 22600)
@@ -3,9 +3,14 @@
/**
* The primary plugin interface for Cytoscape that all
- * plugins must extend. Plugin developer will have access
- * to most of Cytoscape 3.X services, but
- * still program in the way as in Cytoscape 2.X.
+ * plugins must extend. Plugin developers will have access
+ * to all Cytoscape 3.X services, but are not required to
+ * know about or use Maven, OSGi, or Spring.
+ * However, there are limitations on which packages may
+ * be included in the plugin jar based on those already loaded in the
classpath.
+ * To load alternative versions of the same library used by other plugins or
+ * Cytoscape itself, it will be necessary to write your plugin using OSGi
+ * and Spring.
*/
public abstract class CyPlugin {
Modified:
core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/package-info.java
===================================================================
--- core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/package-info.java
2010-10-28 22:34:25 UTC (rev 22599)
+++ core3/plugin-api/trunk/src/main/java/org/cytoscape/plugin/package-info.java
2010-10-28 22:52:54 UTC (rev 22600)
@@ -1,4 +1,5 @@
/**
- * This is Cytoscape shim APIs, which support development of Cytoscape 3.X
plugin in old way as in Cytoscape 2.X.
+ * This is the Cytoscape plugin API, which supports development of Cytoscape
3.X
+ * plugins in a manner similar to plugins developed in Cytoscape 2.X.
*/
package org.cytoscape.plugin;
Added:
core3/plugin-api/trunk/src/test/java/org/cytoscape/plugin/CyPluginTest.java
===================================================================
--- core3/plugin-api/trunk/src/test/java/org/cytoscape/plugin/CyPluginTest.java
(rev 0)
+++ core3/plugin-api/trunk/src/test/java/org/cytoscape/plugin/CyPluginTest.java
2010-10-28 22:52:54 UTC (rev 22600)
@@ -0,0 +1,28 @@
+
+package org.cytoscape.plugin;
+
+
+import org.junit.Test;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.*;
+
+
+public class CyPluginTest {
+ private static class MyPlugin extends CyPlugin {
+ MyPlugin(CyPluginAdapter a) {
+ super(a);
+ }
+ }
+
+ @Test
+ public void testGoodAdapter() {
+ CyPluginAdapter ad = mock(CyPluginAdapter.class);
+ MyPlugin m = new MyPlugin(ad);
+ assertEquals(m.adapter,ad);
+ }
+
+ @Test(expected=NullPointerException.class)
+ public void testNullAdapter() {
+ MyPlugin m = new MyPlugin(null);
+ }
+}
--
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.