Permalink
Browse files

Added the ability to fetch repository-logs at runtime.

Using runrepositoryfetch.bat, the user is now able to start codeswarm alternatively with a swing-frame. 

This frame asks the user for a repository location, a username and a password for the repository.
It is able to connect to any svn-repository, since it uses svnkit to fetch the repository-log.
The repository-log gets fetched and converted to the xml-format, codeswarm expects as input.
The xml-file is cached until the latestRevision of the remote repository changes.
See javadoc for detailed information.

git-svn-id: http://codeswarm.googlecode.com/svn/trunk@235 eda9c206-d64f-0410-a2f2-67f3fa0499ed
  • Loading branch information...
1 parent fb9feea commit 5d0452a47c33e20f65bcf826b1ee39ff9e37e881 kraeusen committed Aug 7, 2008
View
@@ -20,8 +20,17 @@
<target name="build" depends="init" description="Compiles">
<echo>Running BUILD</echo>
<mkdir dir="${build}" />
- <javac destdir="${build}" srcdir="${src}"
-classpath="${lib}/core.jar;${lib}/xml.jar;${lib}/jogl.jar;${lib}/opengl.jar;${lib}/vecmath.jar" debug="true" deprecation="false" />
+ <path id="library.classpath">
+ <pathelement path="lib/" />
+ <pathelement location="lib/core.jar" />
+ <pathelement location="lib/xml.jar" />
+ <pathelement location="lib/jogl.jar" />
+ <pathelement location="lib/opengl.jar" />
+ <pathelement location="lib/vecmath.jar" />
+ <pathelement location="lib/svnkit.jar" />
+ <pathelement location="lib/swing-layout-1.0.3.jar" />
+ </path>
+ <javac destdir="${build}" srcdir="${src}" classpathref="library.classpath" debug="true" deprecation="false" />
<copy file="${src}/particle.png" todir="${build}" />
</target>
@@ -43,7 +52,7 @@ classpath="${lib}/core.jar;${lib}/xml.jar;${lib}/jogl.jar;${lib}/opengl.jar;${li
<target name="run" depends="jar" description="Runs the program">
<echo>Running code_swarm</echo>
- <java classname="code_swarm" fork="true">
+ <java classname="MainView" fork="true">
<jvmarg value="-Xmx1000m" />
<arg value="data/sample.config"/>
<classpath>
View
@@ -0,0 +1,5 @@
+#see http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/LogManager.html
+.level=SEVERE
+org.codeswarm.level=FINEST
+handlers=java.util.logging.ConsoleHandler
+java.util.logging.ConsoleHandler.level = ALL
View
Binary file not shown.
View
Binary file not shown.
View
@@ -0,0 +1,43 @@
+@ECHO OFF
+REM run.bat : code_swarm launching script
+REM need the config file as first parameter
+
+REM TODO : take care of multiple parameters
+SET params="%1"
+set default_config="data/sample.config"
+
+REM basic command line parameters check
+IF %params%=="" (
+ REM asking user for a config file
+ ECHO Specify a config file, or type
+ SET /p params="ENTER for default one [%default_config%] : "
+)
+IF %params%=="" (
+ SET params=%default_config%
+)
+
+REM help requested ?
+IF "%1"=="/?" goto help
+IF "%1"=="/H" goto help
+IF "%1"=="-h" goto help
+IF "%1"=="--help" goto help
+goto binaryCheck
+:help
+ REM if help needed, print it and exit
+ echo usage: run configfile
+ echo data/sample.config is the default config file"
+ exit
+
+:binaryCheck
+REM checking for code_swarm java binaries
+IF NOT EXIST dist\code_swarm.jar (
+ echo no code_swarm binaries !
+ echo needing to build it with 'ant' and 'javac' java-sdk
+ echo auto-trying the ant command...
+ call ant
+)
+
+REM running
+REM echo %params%
+echo code_swarm project !
+java -Xmx1000m -classpath dist/code_swarm.jar;lib/core.jar;lib/xml.jar;lib/vecmath.jar;lib/svnkit.jar;lib/swing-layout-1.0.3.jar;. MainView %params%
View
@@ -123,7 +123,7 @@ public CodeSwarmConfig(String configFileName) throws IOException
p = new Properties( this.createDefaults() );
p.load( new FileInputStream(configFileName) );
}
-
+
private Properties createDefaults()
{
Properties def = new Properties();
@@ -155,6 +155,17 @@ public Color getBackground()
}
/**
+ * Specify the path to the Xml-input file containing the repository
+ * entries.<br />
+ * Further versions should not use input-file but an abstract view
+ * of the repository-entries.
+ * @see EventList
+ * @param filePath the path to the Xml-input file.
+ */
+ public void setInputFile(String filePath){
+ p.setProperty(INPUT_FILE_KEY, filePath);
+ }
+ /**
*
* @param key
* @param defValue
View
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+ <Properties>
+ <Property name="defaultCloseOperation" type="int" value="2"/>
+ </Properties>
+ <SyntheticProperties>
+ <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+ </SyntheticProperties>
+ <AuxValues>
+ <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="2"/>
+ <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+ <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+ <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+ </AuxValues>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" attributes="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Component id="userName" pref="305" max="32767" attributes="0"/>
+ <Component id="repositoryURL" alignment="0" pref="305" max="32767" attributes="0"/>
+ <Component id="password" alignment="0" pref="305" max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ <Group type="102" alignment="1" attributes="0">
+ <Component id="clearCache" min="-2" max="-2" attributes="0"/>
+ <EmptySpace pref="242" max="32767" attributes="0"/>
+ <Component id="goButton" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="repositoryURL" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="userName" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="password" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace type="unrelated" max="-2" attributes="0"/>
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="goButton" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="clearCache" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ <EmptySpace max="32767" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="RepositoryURL"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Username"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel3">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Password"/>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JTextField" name="repositoryURL">
+ </Component>
+ <Component class="javax.swing.JTextField" name="userName">
+ </Component>
+ <Component class="javax.swing.JPasswordField" name="password">
+ </Component>
+ <Component class="javax.swing.JButton" name="goButton">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="GO"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="goButtonActionPerformed"/>
+ </Events>
+ </Component>
+ <Component class="javax.swing.JButton" name="clearCache">
+ <Properties>
+ <Property name="text" type="java.lang.String" value="Clear Cache"/>
+ </Properties>
+ <Events>
+ <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="clearCacheActionPerformed"/>
+ </Events>
+ </Component>
+ </SubComponents>
+</Form>
Oops, something went wrong.

0 comments on commit 5d0452a

Please sign in to comment.