Author: mes
Date: 2012-04-24 10:31:18 -0700 (Tue, 24 Apr 2012)
New Revision: 28961
Added:
csplugins/trunk/ucsd/mes/LayoutSaver/resources/
csplugins/trunk/ucsd/mes/LayoutSaver/resources/plugin.props
Modified:
csplugins/trunk/ucsd/mes/LayoutSaver/build.xml
csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverAction.java
csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverPlugin.java
Log:
changes to release the plugin
Modified: csplugins/trunk/ucsd/mes/LayoutSaver/build.xml
===================================================================
--- csplugins/trunk/ucsd/mes/LayoutSaver/build.xml 2012-04-24 01:22:55 UTC
(rev 28960)
+++ csplugins/trunk/ucsd/mes/LayoutSaver/build.xml 2012-04-24 17:31:18 UTC
(rev 28961)
@@ -1,5 +1,5 @@
-<project name="LayoutSaver" default="all" basedir=".">
+<project name="LayoutSaver" default="all" basedir="."
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!-- =================================================================== -->
<!-- Initialization target -->
@@ -16,11 +16,10 @@
<property name="optimize" value="off"/>
<property name="deprecation" value="on"/>
<property name="fork" value="false"/>
+ <property name="cytoscape.version" value="2.8.2"/>
<!-- Define the directories -->
<property name="root.dir" value="."/>
- <property name="cytoscape.dir" value="${root.dir}/../../../../cytoscape"/>
- <property name="cytoscape.lib.dir" value="${cytoscape.dir}/lib"/>
<property name="lib.dir" value="${root.dir}/lib"/>
<property name="src.dir" value="${root.dir}/src"/>
<property name="tests.dir" value="${root.dir}/tests"/>
@@ -28,39 +27,26 @@
<property name="javadoc.dir" value="${root.dir}/API"/>
<property name="log.dir" value="${build.dir}/logs" />
<property name="junit.report.dir" value="${log.dir}/junit-reports" />
+ <property name="resources.dir" value="${root.dir}/resources"/>
<!-- Define the relevant files -->
<property name="project.jar" value="${name}.jar"/>
<property name="test.jar" value="${name}-tests.jar"/>
- <!-- Define the class path - Defaults to everything in the lib.dir -->
+ <artifact:remoteRepository
+ id="cytoscape_releases"
+ url="http://code.cytoscape.org/nexus/content/repositories/releases/" />
+ <artifact:remoteRepository
+ id="cytoscape_snapshots"
+ url="http://code.cytoscape.org/nexus/content/repositories/snapshots/" />
+ <artifact:dependencies pathId="dependency.classpath">
+ <dependency groupId="cytoscape"
+ artifactId="application"
+ version="${cytoscape.version}"/>
+ </artifact:dependencies>
<path id="project.class.path">
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${cytoscape.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${cytoscape.lib.dir}">
- <include name="*.jar"/>
- </fileset>
+ <path refid="dependency.classpath"/>
</path>
-
- <!-- Define the junit class path - It needs to find what we just built -->
- <path id="junit.class.path" >
- <fileset dir="${root.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${lib.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${cytoscape.dir}">
- <include name="*.jar"/>
- </fileset>
- <fileset dir="${cytoscape.lib.dir}">
- <include name="*.jar"/>
- </fileset>
- </path>
<!-- Make sure tests is in the right place -->
<condition property="tests.ok">
@@ -85,9 +71,6 @@
deprecation="${deprecation}"
optimize="${optimize}"
fork="${fork}">
-<!--
- <compilerarg line="-Xlint:all -Xlint:-path"/>
--->
</javac>
<echo message="Successfully ran compile task!"/>
</target>
@@ -104,6 +87,7 @@
<include name="*.jar"/>
</fileset>
</unzip>
+ <copy file="${resources.dir}/plugin.props" todir="${build.dir}/layout"/>
<jar destfile="${project.jar}" >
<fileset dir="${build.dir}"
includes="**"/>
Added: csplugins/trunk/ucsd/mes/LayoutSaver/resources/plugin.props
===================================================================
--- csplugins/trunk/ucsd/mes/LayoutSaver/resources/plugin.props
(rev 0)
+++ csplugins/trunk/ucsd/mes/LayoutSaver/resources/plugin.props 2012-04-24
17:31:18 UTC (rev 28961)
@@ -0,0 +1,26 @@
+# This props file would be filled out and included in the plugin jar file.
+# This props file will be used to put information into the Plugin Manager
+# about the plugin
+
+# -- The following properties are REQUIRED -- #
+
+# The plugin name that will be displayed to users
+pluginName=LayoutSaverPlugin
+
+# Description used to give users information about the plugin such as what it
does.
+# Html tags are encouraged for formatting purposes.
+pluginDescription=A simple plugin that saves the X/Y positions of nodes in one
network so that the positions can be applied to other networks that share the
same nodes. Click on the <b>Layout→Save Node Positions</b> to save the
node positions in the current network and the Click on the
<b>Layout→Cytoscape Layouts→Apply Saved Layout</b> to apply the saved
node positions to the current network.
+
+# Plugin version number, this must be two numbers separated by a decimlal.
Ex. 0.2, 14.03
+pluginVersion=1.0
+
+# Compatible Cytoscape version
+cytoscapeVersion=2.8
+
+# Category, use one of the categories listed on the website or create your own
+pluginCategory=Other
+
+# List of authors. Note each author and institution pair are separated by a :
(colon)
+# each additional author institution pair must be separated from other pairs
bye a ; (semicolon)
+pluginAuthorsIntsitutions=Mike Smoot:UCSD
+
Modified: csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverAction.java
===================================================================
--- csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverAction.java
2012-04-24 01:22:55 UTC (rev 28960)
+++ csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverAction.java
2012-04-24 17:31:18 UTC (rev 28961)
@@ -40,16 +40,18 @@
import cytoscape.Cytoscape;
import cytoscape.view.CyNetworkView;
import cytoscape.data.CyAttributes;
-import javax.swing.AbstractAction;
+import cytoscape.util.CytoscapeAction;
import java.awt.event.ActionEvent;
+import javax.swing.event.MenuEvent;
import java.util.Iterator;
import giny.model.Node;
import giny.view.NodeView;
-class LayoutSaverAction extends AbstractAction {
+class LayoutSaverAction extends CytoscapeAction {
LayoutSaverAction() {
- super("Save Node Positions in Current Layout");
+ super("Save Node Positions");
+ setPreferredMenu("Layout");
}
public static final String X_LOC = "saved_x_location";
@@ -70,4 +72,8 @@
nodeAttrs.setAttribute(n.getIdentifier(),Y_LOC,nv.getYPosition());
}
}
+
+ public void menuSelected(MenuEvent e) {
+ enableForNetworkAndView();
+ }
}
Modified: csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverPlugin.java
===================================================================
--- csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverPlugin.java
2012-04-24 01:22:55 UTC (rev 28960)
+++ csplugins/trunk/ucsd/mes/LayoutSaver/src/layout/LayoutSaverPlugin.java
2012-04-24 17:31:18 UTC (rev 28961)
@@ -51,9 +51,8 @@
* Constructor
*/
public LayoutSaverPlugin() {
- Cytoscape.getDesktop().getCyMenus().getOperationsMenu().add(new
LayoutSaverAction());
+ Cytoscape.getDesktop().getCyMenus().addAction(new
LayoutSaverAction());
CyLayouts.addLayout(new ApplySavedLayout(), "Cytoscape
Layouts");
- throw new Error("hello broken system");
}
/**
--
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.