Author: kono Date: 2011-05-12 15:11:45 -0700 (Thu, 12 May 2011) New Revision: 25037
Added: core3/archetypes/trunk/cyaction-plugin/ core3/archetypes/trunk/cyaction-plugin/pom.xml core3/archetypes/trunk/cyaction-plugin/src/ core3/archetypes/trunk/cyaction-plugin/src/main/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/maven/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.classpath core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.project core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.maven.ide.eclipse.prefs core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/osgi.bnd core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/pom.xml core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/internal/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/internal/MenuAction.java core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context-osgi.xml core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context.xml core3/archetypes/trunk/cyaction-plugin/src/test/ core3/archetypes/trunk/cyaction-plugin/src/test/resources/ core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/ core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/ core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/archetype.properties core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/goal.txt Modified: core3/archetypes/trunk/api-provider-plugin/ core3/archetypes/trunk/pom.xml Log: CyAction Plugin Archetype had been added. Property changes on: core3/archetypes/trunk/api-provider-plugin ___________________________________________________________________ Added: svn:ignore + target .settings .classpath .project Added: core3/archetypes/trunk/cyaction-plugin/pom.xml =================================================================== --- core3/archetypes/trunk/cyaction-plugin/pom.xml (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/pom.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,37 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.cytoscape</groupId> + <artifactId>archetypes-parent</artifactId> + <version>${parent.version}</version> + </parent> + + <groupId>org.cytoscape.archetypes</groupId> + <artifactId>cyaction-plugin</artifactId> + <packaging>maven-archetype</packaging> + <name>Cytoscape 3 Archetype - Creates a CyAction for Cytoscape 3 desktop application</name> + + <build> + <plugins> + <!-- The point of this code is to use the archetype we just created and + use it to generate a project and then build the project, which will test + that our archetype still works. <plugin> <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-invoker-plugin</artifactId> <executions> <execution> <id>integration-test</id> + <goals> <goal>install</goal> <goal>run</goal> </goals> </execution> </executions> + <configuration> <cloneProjectsTo>${project.build.directory}/it/projects</cloneProjectsTo> + <goals> <goal>org.apache.maven.plugins:maven-archetype-plugin:generate</goal> + </goals> <localRepositoryPath>${project.build.directory}/it/repo</localRepositoryPath> + <pomIncludes> <pomInclude>*</pomInclude> </pomIncludes> <projectsDirectory>${basedir}/src/it/projects</projectsDirectory> + <postBuildHookScript>verify.bsh</postBuildHookScript> <properties> <archetypeArtifactId>${project.artifactId}</archetypeArtifactId> + <archetypeGroupId>${project.groupId}</archetypeGroupId> <archetypeRepository>local</archetypeRepository> + <archetypeVersion>${project.version}</archetypeVersion> <goals>verify</goals> + <interactiveMode>false</interactiveMode> </properties> <streamLogs>true</streamLogs> + </configuration> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> + <version>2.4.1</version> <executions> <execution> <id>auto-clean</id> <phase>initialize</phase> + <goals> <goal>clean</goal> </goals> </execution> </executions> </plugin> --> + </plugins> + </build> +</project> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/META-INF/maven/archetype-metadata.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="cyaction-plugin" + xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <fileSets> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + <fileSet filtered="true" encoding="UTF-8"> + <directory>src/main/resources</directory> + <includes> + <include>**/*.xml</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8"> + <directory>.settings</directory> + <includes> + <include>**/*.prefs</include> + </includes> + </fileSet> + <fileSet filtered="true" encoding="UTF-8"> + <directory></directory> + <includes> + <include>.classpath</include> + <include>.project</include> + </includes> + </fileSet> + <fileSet encoding="UTF-8"> + <directory></directory> + <includes> + <include>osgi.bnd</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.classpath =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.classpath (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.classpath 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,12 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"/> + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"/> + <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="target/classes"/> +</classpath> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.project =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.project (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.project 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,27 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>cy3-simple-plugin</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.maven.ide.eclipse.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.maven.ide.eclipse.maven2Nature</nature> + </natures> +</projectDescription> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.eclipse.jdt.core.prefs 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,3 @@ +#Thu May 12 11:36:17 PDT 2011 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.maven.ide.eclipse.prefs =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.maven.ide.eclipse.prefs (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/.settings/org.maven.ide.eclipse.prefs 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,8 @@ +#Thu May 12 11:35:36 PDT 2011 +activeProfiles= +eclipse.preferences.version=1 +fullBuildGoals=process-test-resources +resolveWorkspaceProjects=true +resourceFilterGoals=process-resources resources\:testResources +skipCompilerPlugin=true +version=1 Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/osgi.bnd =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/osgi.bnd (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/osgi.bnd 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,7 @@ +#----------------------------------------------------------------- +# Use this file to add customized Bnd instructions for the bundle +#----------------------------------------------------------------- + +Import-Package: * +Private-Package: ${bundle.namespace}.internal.* +Export-Package: ${bundle.namespace} Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/pom.xml =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/pom.xml (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/pom.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <properties> + <bundle.symbolicName>${groupId}.${artifactId}</bundle.symbolicName> + <bundle.namespace>${groupId}</bundle.namespace> + </properties> + + <modelVersion>4.0.0</modelVersion> + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> + + <name>${bundle.symbolicName} [${bundle.namespace}]</name> + + <packaging>bundle</packaging> + + <build> + <resources> + <resource> + <directory>src/main/resources</directory> + </resource> + </resources> + <!-- Cytoscape requires Java 1.6 --> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.6</source> + <target>1.6</target> + <optimize>true</optimize> + <showWarnings>true</showWarnings> + <showDeprecation>true</showDeprecation> + <compilerArguments> + <Xmaxwarns>10000</Xmaxwarns> + <Xmaxerrs>10000</Xmaxerrs> + </compilerArguments> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <redirectTestOutputToFile>true</redirectTestOutputToFile> + </configuration> + </plugin> + <plugin> + <groupId>org.ops4j</groupId> + <artifactId>maven-pax-plugin</artifactId> + <version>1.5-SNAPSHOT</version> + <extensions>true</extensions> + </plugin> + <!-- Generates the OSGi metadata based on the osgi.bnd file. --> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>1.4.3</version> + <configuration> + <instructions> + <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName> + <Bundle-Version>${pom.version}</Bundle-Version> + <_include>-osgi.bnd</_include> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + + <!-- Links to the Cytoscape Maven repositories. --> + <repositories> + <repository> + <id>cytoscape_snapshots</id> + <snapshots> + </snapshots> + <releases> + <enabled>false</enabled> + </releases> + <name>Cytoscape Snapshots</name> + <url>http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/</url> + </repository> + <repository> + <id>cytoscape_releases</id> + <snapshots> + <enabled>false</enabled> + </snapshots> + <releases> + </releases> + <name>Cytoscape Releases</name> + <url>http://cytoscape.wodaklab.org/nexus/content/repositories/releases/</url> + </repository> + </repositories> + + <!-- Dependencies needed to compile this project. --> + <dependencies> + <dependency> + <groupId>org.cytoscape</groupId> + <artifactId>swing-application-api</artifactId> + <version>3.0.0-alpha2-SNAPSHOT</version> + </dependency> + <dependency> + <groupId>org.cytoscape</groupId> + <artifactId>session-api</artifactId> + <version>3.0.0-alpha3-SNAPSHOT</version> + </dependency> + + <!-- Logging --> + <dependency> + <groupId>org.ops4j.pax.logging</groupId> + <artifactId>pax-logging-api</artifactId> + <version>1.5.2</version> + <scope>provided</scope> + </dependency> + + <!-- dependencies specifically for unit testing --> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.8.2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.cytoscape</groupId> + <artifactId>test-support</artifactId> + <version>3.0.0-alpha2-SNAPSHOT</version> + <scope>test</scope> + </dependency> + </dependencies> + +</project> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/internal/MenuAction.java =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/internal/MenuAction.java (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/java/internal/MenuAction.java 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,31 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +package ${package}.internal; + +import java.awt.event.ActionEvent; + +import javax.swing.JOptionPane; + +import org.cytoscape.application.swing.AbstractCyAction; +import org.cytoscape.session.CyApplicationManager; + + +/** + * Creates a new menu item under Plugins menu section. + * + */ +public class MenuAction extends AbstractCyAction { + + public MenuAction(final CyApplicationManager applicationManager, final String menuTitle) { + super(menuTitle, applicationManager); + setPreferredMenu("Plugins"); + } + + public void actionPerformed(ActionEvent e) { + + // Write your own function here. + JOptionPane.showMessageDialog(null, "Hello Cytoscape World!"); + + } +} Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context-osgi.xml =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context-osgi.xml (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context-osgi.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,29 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/osgi + http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd" + default-lazy-init="false"> + + + <!-- ================= Import =========================== --> + + <!-- Import OSGi service from service registry --> + <osgi:reference id="cyApplicationManagerServiceRef" + interface="org.cytoscape.session.CyApplicationManager" /> + + + <!-- ================= Export =========================== --> + + <!-- Export the instance as an OSGi service --> + <osgi:service id="menuActionService" ref="menuAction" + interface="org.cytoscape.application.swing.CyAction" /> + + +</beans> Added: core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context.xml =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context.xml (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/bundle-context.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,21 @@ +#set( $symbol_pound = '#' ) +#set( $symbol_dollar = '$' ) +#set( $symbol_escape = '\' ) +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context-2.5.xsd"> + + <!-- Create an instance (bean) of the class --> + <bean id="menuAction" class="${package}.internal.MenuAction"> + <!-- Inject an OSGi service as a constructor argument --> + <constructor-arg ref="cyApplicationManagerServiceRef" /> + <constructor-arg value="Hello World Plugin" /> + </bean> + +</beans> Added: core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/archetype.properties =================================================================== --- core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/archetype.properties (rev 0) +++ core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/archetype.properties 2011-05-12 22:11:45 UTC (rev 25037) @@ -0,0 +1,4 @@ +#Thu May 12 14:18:22 PDT 2011 +version=0.1-SNAPSHOT +groupId=archetype.it +artifactId=basic Added: core3/archetypes/trunk/cyaction-plugin/src/test/resources/projects/basic/goal.txt =================================================================== Modified: core3/archetypes/trunk/pom.xml =================================================================== --- core3/archetypes/trunk/pom.xml 2011-05-12 21:50:04 UTC (rev 25036) +++ core3/archetypes/trunk/pom.xml 2011-05-12 22:11:45 UTC (rev 25037) @@ -23,6 +23,7 @@ <modules> <module>api-provider-plugin</module> <module>task-plugin</module> + <module>cyaction-plugin</module> </modules> <scm> -- 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.
