Skip to content

Commit

Permalink
merged branch maven
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbrenner committed Feb 19, 2012
2 parents f241529 + 88c89dd commit 2f8f20c
Show file tree
Hide file tree
Showing 219 changed files with 278 additions and 94 deletions.
19 changes: 5 additions & 14 deletions Droplet/.classpath
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="test"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="lib" path="lib/jgoodies-binding-2.5.1.jar"/>
<classpathentry kind="lib" path="lib/jgoodies-common-1.2.1.jar"/>
<classpathentry kind="lib" path="lib/RXTXcomm.jar"/>
<classpathentry kind="lib" path="lib/commons-lang3-3.1.jar"/>
<classpathentry kind="lib" path="lib/commons-io-2.1.jar"/>
<classpathentry kind="lib" path="lib/spi.jar"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="src" path=".apt_generated">
<attributes>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="lib" path="lib/spi.jar"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 1 addition & 0 deletions Droplet/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/bin
/build
/release
6 changes: 6 additions & 0 deletions Droplet/.project
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
3 changes: 2 additions & 1 deletion Droplet/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Sat Feb 04 11:32:07 CET 2012
#Sun Feb 19 11:51:53 CET 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
Expand All @@ -9,6 +9,7 @@ org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.processAnnotations=enabled
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
Expand Down
5 changes: 5 additions & 0 deletions Droplet/.settings/org.eclipse.m2e.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#Sun Feb 19 11:36:03 CET 2012
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
11 changes: 8 additions & 3 deletions Droplet/RELEASE-NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
================================================================================
Title: Release Notes
Version: 0.1b
Date: 2012/02/18
Date: 2012/02/19
Author: Stefan Brenner
--------------------------------------------------------------------------------

Expand All @@ -18,8 +18,6 @@ Release 0.1b
================================================================================
T O D O S
================================================================================
* make devices moveable
or map device numbers to pins on MC, make configurable
* build bundles

* correct dsc-protocol.txt
Expand All @@ -30,11 +28,16 @@ Release 0.1b
* Fix UI Layout Issues
* Analyse Heap Dump with lots of devices and actions
* Test on Linux especially RxTx
* Exception handling for RxTx


================================================================================
I D E A S
================================================================================
* use ant for build process (jarbuilder)
* direct device control: send OFF to all that are ON when closing
* make devices moveable
or map device numbers to pins on MC, make configurable
* Create own Spinner for easier round delay input
* Drag&Drop Device Panels and Actions
* Add colored logging messages
Expand Down Expand Up @@ -94,6 +97,8 @@ NEW FEATURES:

NOTES:
* Had to use RXTX-2.1.7 due to compatibility problems on OSX
* had to use librxtxSerial.jnilib from http://blog.iharder.net/2009/08/18/rxtx-java-6-and-librxtxserial-jnilib-on-intel-mac-os-x/
due to problems with 32/64bit on mac
* A maximum of 11 Actions per Device can be used with the arduino
* The maximum amount of devices and actions depends on the amount of memory of the arduino
* Tested on Windows 7 and Mac OSX 10.6.8
Expand Down
74 changes: 0 additions & 74 deletions Droplet/build.xml

This file was deleted.

4 changes: 3 additions & 1 deletion Droplet/launch/Droplet MacOSX.launch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
<listEntry value="/Droplet/src/com/stefanbrenner/droplet/ui/DropletMainFrame.java"/>
<listEntry value="/Droplet/src/main/java/com/stefanbrenner/droplet/ui/DropletMainFrame.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
Expand All @@ -10,7 +10,9 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.stefanbrenner.droplet.ui.DropletMainFrame"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Droplet"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-d32 -Xmx256M -Djava.library.path=lib"/>
</launchConfiguration>
2 changes: 2 additions & 0 deletions Droplet/launch/Droplet Win64.launch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
</listAttribute>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.stefanbrenner.droplet.ui.DropletMainFrame"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Droplet"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx256M&#13;&#10;-Djava.library.path=${project_loc}\lib"/>
</launchConfiguration>
2 changes: 2 additions & 0 deletions Droplet/launch/DropletTestSuite.launch
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.stefanbrenner.droplet.suite.DropletTestSuite"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="Droplet"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
</launchConfiguration>
Binary file removed Droplet/lib/RXTXcomm.jar
Binary file not shown.
Binary file removed Droplet/lib/RXTXcomm_NEW.jar
Binary file not shown.
Binary file removed Droplet/lib/commons-io-2.1.jar
Binary file not shown.
Binary file removed Droplet/lib/commons-lang3-3.1.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-animation-1.3.0.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-binding-2.5.1.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-common-1.2.1.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-forms-1.4.2.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-looks-2.4.2.jar
Binary file not shown.
Binary file removed Droplet/lib/jgoodies-validation-2.3.2.jar
Binary file not shown.
Binary file removed Droplet/lib/librxtxSerial_NEW.jnilib
Binary file not shown.
33 changes: 33 additions & 0 deletions Droplet/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.stefanbrenner</groupId>
<artifactId>droplet</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>binding</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.rxtx</groupId>
<artifactId>rxtx</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>mrj</groupId>
<artifactId>MRJToolkitStubs</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,20 @@
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;

import com.apple.mrj.MRJAboutHandler;
import com.apple.mrj.MRJApplicationUtils;
import com.apple.mrj.MRJPrefsHandler;
import com.apple.mrj.MRJQuitHandler;
import com.stefanbrenner.droplet.model.IDropletContext;
import com.stefanbrenner.droplet.model.internal.Droplet;
import com.stefanbrenner.droplet.model.internal.DropletContext;
import com.stefanbrenner.droplet.ui.actions.ExitAction;
import com.stefanbrenner.droplet.ui.actions.PreferencesAction;
import com.stefanbrenner.droplet.ui.actions.StartAction;
import com.stefanbrenner.droplet.utils.DropletFonts;
import com.stefanbrenner.droplet.utils.UiUtils;

public class DropletMainFrame extends JFrame {
public class DropletMainFrame extends JFrame implements MRJAboutHandler, MRJQuitHandler, MRJPrefsHandler {

private static final long serialVersionUID = 1L;

Expand Down Expand Up @@ -193,6 +200,13 @@ public void propertyChange(PropertyChangeEvent evt) {
}
}

// register handlers for mac events
if (UiUtils.isMacOS()) {
MRJApplicationUtils.registerAboutHandler(this);
MRJApplicationUtils.registerQuitHandler(this);
MRJApplicationUtils.registerPrefsHandler(this);
}

// finishing frame settings
// make frame as small as possible
// pack();
Expand All @@ -207,4 +221,20 @@ public void propertyChange(PropertyChangeEvent evt) {
dropletContext.addLoggingMessage("Welcome to Droplet!");

}

@Override
public void handlePrefs() throws IllegalStateException {
new PreferencesAction(this, dropletContext).actionPerformed(null);
}

@Override
public void handleQuit() {
new ExitAction(this, dropletContext).actionPerformed(null);
}

@Override
public void handleAbout() {
new AboutDialog(this).setVisible(true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ public void actionPerformed(ActionEvent event) {
JDialog dialog = new AddDeviceDialog(getFrame(), getDropletContext());
dialog.setVisible(true);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
*/
public class UiUtils {

private static boolean macOS = System.getProperty("mrj.version") != null;

public static boolean isMacOS() {
return macOS;
}

/**
* Returns a string representing the time in millis in the format h min sec
* ms.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by org.mangosdk.spi.processor.SpiProcessor (0.2.4)
# Sun, 19 Feb 2012 16:33:13 +0100
com.stefanbrenner.droplet.service.impl.DropletMessageProtocol
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Generated by org.mangosdk.spi.processor.SpiProcessor (0.2.4)
# Sun, 19 Feb 2012 16:33:13 +0100
com.stefanbrenner.droplet.service.impl.ArduinoService
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Generated by org.mangosdk.spi.processor.SpiProcessor (0.2.4)
# Sun, 19 Feb 2012 16:33:13 +0100
com.stefanbrenner.droplet.utils.PluginProviderTest$TestServiceProvider1
com.stefanbrenner.droplet.utils.PluginProviderTest$TestServiceProvider2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
AddDeviceAction.title=Add device
ExitAction.mnemonic=X
ExitAction.title=Exit
NewAction.1=Droplet
NewAction.description=New Droplet Configuration
NewAction.mnemonic=N
NewAction.title=New
NewAction.unsavedChanges=Unsaved changes will be lost
OpenAsTemplateAction.description=Open Droplet Configuration as Template
OpenAsTemplateAction.mnemonic=T
OpenAsTemplateAction.title=Open as Template...
OpenFileAction.description=Open Droplet Configuration
OpenFileAction.mnemonic=O
OpenFileAction.title=Open...
PreferencesAction.Title=Preferences
SaveAsFileAction.description=Save Droplet Configuration in new file
SaveAsFileAction.title=Save As...
SaveFileAction.1=Droplet
SaveFileAction.description=Save Droplet Configuration
SaveFileAction.extensionNotAllowed=File Extension not allowed
SaveFileAction.mnemonic=S
SaveFileAction.overwriteFile=Overwrite existing file?
SaveFileAction.title=Save
SaveFileAction.wrongExtension=Wrong file extension
SaveFileAction.fileNotFound=File not found
SendAction.description=Send actual configuration to microcontroller
SendAction.NoActions=No actions
SendAction.NoDevices=No devices
SendAction.NoDevicesDefined=There are no devices defined
SendAction.NoEnabledActions=There are no enabled actions
SendAction.title=Send
ShowAction.description=Show actual configuration on microcontroller
ShowAction.title=Show
StartAction.description=Send actual configuration to microcontroller and start one cycle
StartAction.title=Start
CancelAction.description=Cancel current execution
CancelAction.title=Cancel
DeviceOnAction.title=ON
DeviceOffAction.title=OFF
Loading

0 comments on commit 2f8f20c

Please sign in to comment.