japi-cvs Mailing List for JAPI (Page 35)
Status: Beta
Brought to you by:
christianhujer
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(115) |
May
(11) |
Jun
(5) |
Jul
(2) |
Aug
(10) |
Sep
(35) |
Oct
(14) |
Nov
(49) |
Dec
(27) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(57) |
Feb
(1) |
Mar
|
Apr
(2) |
May
(25) |
Jun
(134) |
Jul
(76) |
Aug
(34) |
Sep
(27) |
Oct
(5) |
Nov
|
Dec
(1) |
| 2008 |
Jan
(3) |
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(63) |
Nov
(30) |
Dec
(43) |
| 2009 |
Jan
(10) |
Feb
(420) |
Mar
(67) |
Apr
(3) |
May
(61) |
Jun
(21) |
Jul
(19) |
Aug
|
Sep
(6) |
Oct
(16) |
Nov
(1) |
Dec
|
| 2010 |
Jan
(1) |
Feb
|
Mar
|
Apr
(7) |
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|
From: <chr...@us...> - 2007-07-30 20:15:34
|
Revision: 560
http://japi.svn.sourceforge.net/japi/?rev=560&view=rev
Author: christianhujer
Date: 2007-07-30 13:15:31 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
javadoc: Added missing @serial tags.
Modified Paths:
--------------
libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java
Modified: libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java
===================================================================
--- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-07-30 20:13:50 UTC (rev 559)
+++ libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-07-30 20:15:31 UTC (rev 560)
@@ -26,12 +26,12 @@
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
+import java.net.URL;
import java.util.Enumeration;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.SortedSet;
import java.util.TreeSet;
-import java.net.URL;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
@@ -42,8 +42,8 @@
import javax.swing.JTextArea;
import javax.swing.SwingConstants;
import net.sf.japi.swing.ActionFactory;
+import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jetbrains.annotations.NotNull;
/**
* Class for constructing and showing About dialogs.
@@ -111,16 +111,20 @@
/** Default number of columns in a textarea in an AboutDialog. */
private static final int TEXT_COLUMNS = 80;
- /** Action Factory of the application, used to retrieve application logo, name and licenses. */
+ /** Action Factory of the application, used to retrieve application logo, name and licenses.
+ * @serial include
+ */
@NotNull private final ActionFactory actionFactory;
/**
* The main tabs.
+ * @serial include
*/
@NotNull private final JTabbedPane tabs;
/**
* The tabs in the license tab.
+ * @serial include
*/
@NotNull private final JTabbedPane licensePane;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-30 20:13:52
|
Revision: 559
http://japi.svn.sourceforge.net/japi/?rev=559&view=rev
Author: christianhujer
Date: 2007-07-30 13:13:50 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
Added TODO: ActionFactory should be Serializable.
Modified Paths:
--------------
libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java
Modified: libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java
===================================================================
--- libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-07-30 20:10:49 UTC (rev 558)
+++ libs/swing-action/trunk/src/net/sf/japi/swing/ActionFactory.java 2007-07-30 20:13:50 UTC (rev 559)
@@ -159,6 +159,7 @@
* @todo think about toolbar configuration
* @todo eventually rename this ActionBuilder and provide an ActionBuilderFactory.
* @todo whether a dialog is a onetime dialog should be a property and user configurable
+ * @todo Implement serialization.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public final class ActionFactory {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-30 20:10:55
|
Revision: 558
http://japi.svn.sourceforge.net/japi/?rev=558&view=rev
Author: christianhujer
Date: 2007-07-30 13:10:49 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
[ 1763561 ] checkstyle fails for missing generics param in class doc
Modified Paths:
--------------
libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
Modified: libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
===================================================================
--- libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java 2007-07-29 20:51:31 UTC (rev 557)
+++ libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java 2007-07-30 20:10:49 UTC (rev 558)
@@ -28,6 +28,8 @@
/**
* A Comparator for properties, compares two objects based on a Java Beans Property.
*
+ * @param <T> Property type to compare.
+ * @param <C> Class of which to compare a property.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
* @todo think whether net.sf.japi.lang really is the correct package or this should rather go to something like net.sf.japi.beans or net.sf.japi.util.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-29 20:51:34
|
Revision: 557
http://japi.svn.sourceforge.net/japi/?rev=557&view=rev
Author: christianhujer
Date: 2007-07-29 13:51:31 -0700 (Sun, 29 Jul 2007)
Log Message:
-----------
Fixed bug in ListControlPanel behaviour.
Added more unit tests for ListControlPanel.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java
libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java 2007-07-29 20:50:47 UTC (rev 556)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java 2007-07-29 20:51:31 UTC (rev 557)
@@ -143,14 +143,44 @@
}
}
- private void updateActionStates() {
+ /** Updates the states of the actions. */
+ protected void updateActionStates() {
assert list == null || list.getModel() == model;
- final boolean top = list == null || list.getSelectedIndex() == 0;
- final boolean bottom = list == null || list.getSelectedIndex() == model.getSize() - 1;
+ final boolean noSelection = list == null || model.getSize() == 0 || list.getSelectedIndex() == -1;
+ final boolean top = noSelection || list.getSelectedIndex() == 0;
+ final boolean bottom = noSelection || list.getSelectedIndex() == model.getSize() - 1;
moveToTop.setEnabled(!top);
moveUp.setEnabled(!top);
moveDown.setEnabled(!bottom);
moveToBottom.setEnabled(!bottom);
}
+ /** Returns the action for moving an element to top.
+ * @return The action for moving an element to top.
+ */
+ @NotNull public Action getMoveToTop() {
+ return moveToTop;
+ }
+
+ /** Returns the action for moving an element up.
+ * @return The action for moving an element up.
+ */
+ @NotNull public Action getMoveUp() {
+ return moveUp;
+ }
+
+ /** Returns the action for moving an element down.
+ * @return The action for moving an element down.
+ */
+ @NotNull public Action getMoveDown() {
+ return moveDown;
+ }
+
+ /** Returns the action for moving an element to bottom.
+ * @return The action for moving an element to bottom.
+ */
+ @NotNull public Action getMoveToBottom() {
+ return moveToBottom;
+ }
+
} // class ListControlPanel
Modified: libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java
===================================================================
--- libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java 2007-07-29 20:50:47 UTC (rev 556)
+++ libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java 2007-07-29 20:51:31 UTC (rev 557)
@@ -19,12 +19,13 @@
package test.net.sf.japi.swing.list;
-import java.awt.BorderLayout;
-import javax.swing.JFrame;
import javax.swing.JList;
-import javax.swing.JScrollPane;
+import javax.swing.ListSelectionModel;
import net.sf.japi.swing.list.ArrayListModel;
import net.sf.japi.swing.list.ListControlPanel;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
import org.junit.Test;
/** Test for {@link ListControlPanel}.
@@ -32,19 +33,104 @@
*/
public class ListControlPanelTest {
- /** Tests that a ListControlPanel works. */
+ /** The model for testing. */
+ private ArrayListModel<String> model;
+
+ /** The JList for testing. */
+ private JList list;
+
+ /** The ListControlPanel to test. */
+ private ListControlPanel testling;
+
+ /** Initializes the test data. */
+ @Before
+ public void setUp() {
+ model = new ArrayListModel<String>();
+ list = new JList(model);
+ testling = new ListControlPanel(list, model);
+ }
+
+ /** Removes the test data. */
+ @After
+ public void tearDown() {
+ }
+
+ /** Tests that the actions of a ListControlPanel for an empty model are disabled. */
@Test
- public void testListControlPanel() {
- final ArrayListModel<String> model = new ArrayListModel<String>();
+ public void testEmptyListDisabled() {
+ Assert.assertFalse("For an empty model, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For an empty model, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For an empty model, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For an empty model, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ }
+
+ /** Tests that the actions of a ListControlPanel for a singleton model are disabled. */
+ @Test
+ public void testSingletonListDisabled() {
model.add("foo");
+ final ListSelectionModel selectionModel = list.getSelectionModel();
+ selectionModel.setSelectionInterval(-1, -1);
+ Assert.assertFalse("For a 1-element model, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 1-element model, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 1-element model, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 1-element model, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(0, 0);
+ Assert.assertFalse("For a 1-element model, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 1-element model, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 1-element model, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 1-element model, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ }
+
+ /** Tests that the actions of a ListControlPanel for a two element model are disabled / enabled correctly. */
+ @Test
+ public void testTwoElementListEnabled() {
+ model.add("foo");
model.add("bar");
+ final ListSelectionModel selectionModel = list.getSelectionModel();
+ selectionModel.setSelectionInterval(-1, -1);
+ Assert.assertFalse("For a 2-element model without selection, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 2-element model without selection, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 2-element model without selection, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 2-element model without selection, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(0, 0);
+ Assert.assertFalse("For a 2-element model with top selection, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 2-element model with top selection, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertTrue("For a 2-element model with top selection, down must be enabled.", testling.getMoveDown().isEnabled());
+ Assert.assertTrue("For a 2-element model with top selection, bottom must be enabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(1, 1);
+ Assert.assertTrue("For a 2-element model with bottom selection, top must be enabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertTrue("For a 2-element model with bottom selection, up must be enabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 2-element model with bottom selection, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 2-element model with bottom selection, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ }
+
+ /** Tests that the actions of a ListControlPanel for a three element model are disabled / enabled correctly. */
+ @Test
+ public void testThreeElementListEnabled() {
+ model.add("foo");
+ model.add("bar");
model.add("buzz");
- final JList list = new JList(model);
- final JFrame f = new JFrame("Test");
- final ListControlPanel testling = new ListControlPanel(list, model);
- f.add(new JScrollPane(list));
- f.add(testling, BorderLayout.LINE_END);
- f.pack();
+ final ListSelectionModel selectionModel = list.getSelectionModel();
+ selectionModel.setSelectionInterval(-1, -1);
+ Assert.assertFalse("For a 3-element model without selection, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 3-element model without selection, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 3-element model without selection, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 3-element model without selection, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(0, 0);
+ Assert.assertFalse("For a 3-element model with top selection, top must be disabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertFalse("For a 3-element model with top selection, up must be disabled.", testling.getMoveUp().isEnabled());
+ Assert.assertTrue("For a 3-element model with top selection, down must be enabled.", testling.getMoveDown().isEnabled());
+ Assert.assertTrue("For a 3-element model with top selection, bottom must be enabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(1, 1);
+ Assert.assertTrue("For a 3-element model with middle selection, top must be enabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertTrue("For a 3-element model with middle selection, up must be enabled.", testling.getMoveUp().isEnabled());
+ Assert.assertTrue("For a 3-element model with middle selection, down must be enabled.", testling.getMoveDown().isEnabled());
+ Assert.assertTrue("For a 3-element model with middle selection, bottom must be enabled.", testling.getMoveToBottom().isEnabled());
+ selectionModel.setSelectionInterval(2, 2);
+ Assert.assertTrue("For a 3-element model with bottom selection, top must be enabled.", testling.getMoveToTop().isEnabled());
+ Assert.assertTrue("For a 3-element model with bottom selection, up must be enabled.", testling.getMoveUp().isEnabled());
+ Assert.assertFalse("For a 3-element model with bottom selection, down must be disabled.", testling.getMoveDown().isEnabled());
+ Assert.assertFalse("For a 3-element model with bottom selection, bottom must be disabled.", testling.getMoveToBottom().isEnabled());
}
} // class ListControlPanelTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-29 20:50:49
|
Revision: 556
http://japi.svn.sourceforge.net/japi/?rev=556&view=rev
Author: christianhujer
Date: 2007-07-29 13:50:47 -0700 (Sun, 29 Jul 2007)
Log Message:
-----------
Added German translation.
Added Paths:
-----------
libs/swing-list/trunk/src/net/sf/japi/swing/list/action_de.properties
Added: libs/swing-list/trunk/src/net/sf/japi/swing/list/action_de.properties
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/action_de.properties (rev 0)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/action_de.properties 2007-07-29 20:50:47 UTC (rev 556)
@@ -0,0 +1,23 @@
+#
+# JAPI libs-swing-list is a library for lists in swing.
+# Copyright (C) 2007 Christian Hujer.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+moveToTop.text=Anfang
+moveUp.text=Rauf
+moveDown.text=Runter
+moveToBottom.text=Ende
Property changes on: libs/swing-list/trunk/src/net/sf/japi/swing/list/action_de.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-29 19:57:58
|
Revision: 555
http://japi.svn.sourceforge.net/japi/?rev=555&view=rev
Author: christianhujer
Date: 2007-07-29 12:57:56 -0700 (Sun, 29 Jul 2007)
Log Message:
-----------
Fixed checkstyle warning by encapsulating fields.
Suppressed IntelliJ IDEA warning for magic number 0.5f.
Modified Paths:
--------------
libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java
Modified: libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java
===================================================================
--- libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java 2007-07-29 19:22:12 UTC (rev 554)
+++ libs/swing-extlib/trunk/src/net/sf/japi/swing/ToolBarLayout.java 2007-07-29 19:57:56 UTC (rev 555)
@@ -198,11 +198,13 @@
/** {@inheritDoc} */
@Override public float getLayoutAlignmentX(final Container parent) {
+ //noinspection MagicNumber
return 0.5f;
}
/** {@inheritDoc} */
@Override public float getLayoutAlignmentY(final Container parent) {
+ //noinspection MagicNumber
return 0.5f;
}
@@ -400,12 +402,12 @@
/** Region constraint.
* @serial include
*/
- public Region region;
+ private Region region;
/** Position constraint.
* @serial include
*/
- public int position;
+ private int position;
/** Create Constraint. */
public ToolBarConstraints() {
@@ -420,6 +422,34 @@
this.position = position;
}
+ /** Returns the region constraint of this ToolBarConstraints.
+ * @return The region constraint of this ToolBarConstraints.
+ */
+ public Region getRegion() {
+ return region;
+ }
+
+ /** Sets the region constraint of this ToolBarConstraints.
+ * @param region The region constraint for this ToolBarConstraints.
+ */
+ public void setRegion(final Region region) {
+ this.region = region;
+ }
+
+ /** Returns the position constraint of this ToolBarConstraints.
+ * @return The position constraint of this ToolBarConstraints.
+ */
+ public int getPosition() {
+ return position;
+ }
+
+ /** Sets the position constraint of this ToolBarConstraints.
+ * @param position The position constraint of this ToolBarConstraints.
+ */
+ public void setPosition(final int position) {
+ this.position = position;
+ }
+
} // class ToolBarConstraint
} // class ToolBarLayoutManager
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-29 19:22:18
|
Revision: 554
http://japi.svn.sourceforge.net/japi/?rev=554&view=rev
Author: christianhujer
Date: 2007-07-29 12:22:12 -0700 (Sun, 29 Jul 2007)
Log Message:
-----------
[ 1758846 ] Multiple command file inclusion fails
Modified Paths:
--------------
libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java
libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest.java
Added Paths:
-----------
libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster
libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave1
libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave2
Modified: libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java
===================================================================
--- libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-07-15 10:32:03 UTC (rev 553)
+++ libs/argparser/trunk/src/net/sf/japi/io/args/ArgParser.java 2007-07-29 19:22:12 UTC (rev 554)
@@ -19,6 +19,7 @@
package net.sf.japi.io.args;
+import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.lang.reflect.InvocationTargetException;
@@ -77,7 +78,7 @@
this.command = command;
commandClass = command.getClass();
initMethods();
- final List<String> argList = getAllArguments(Arrays.asList(args));
+ final List<String> argList = getAllArguments(new File("."), Arrays.asList(args));
argIterator = argList.listIterator();
parse();
checkRequiredMethods();
@@ -95,10 +96,11 @@
/**
* Returns a list of all arguments after parsing arguments files.
+ * @param context File relative to which @-inclusions have to be resolved.
* @param args arguments before parsing argument files.
* @return all arguments after parsing argument files.
*/
- public List<String> getAllArguments(@NotNull final List<String> args) {
+ public List<String> getAllArguments(@NotNull final File context, @NotNull final List<String> args) {
final List<String> argList = new ArrayList<String>(args);
for (final ListIterator<String> iterator = argList.listIterator(); iterator.hasNext();) {
final String arg = iterator.next();
@@ -107,7 +109,9 @@
}
if (arg.startsWith("@")) {
iterator.remove();
- for (final String insertArg : getAllArguments(readFromFile(arg.substring(1)))) {
+ final String filename = arg.substring(1);
+ final File file = new File(context.getParentFile(), filename);
+ for (final String insertArg : getAllArguments(file, readFromFile(file))) {
iterator.add(insertArg);
}
}
@@ -117,14 +121,14 @@
/**
* Returns a tokenized unparsed list of arguments from an arguments file.
- * @param filename Argument file to read.
+ * @param file Argument file to read.
* @return all arguments from that argument file.
*/
- public List<String> readFromFile(@NotNull final String filename) {
+ public List<String> readFromFile(@NotNull final File file) {
final List<String> args = new ArrayList<String>();
final TokenReader in;
try {
- in = new TokenReader(new FileInputStream(filename));
+ in = new TokenReader(new FileInputStream(file));
} catch (final FileNotFoundException e) {
// TODO TODO TODO TODO TODO
return args;
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest.java 2007-07-15 10:32:03 UTC (rev 553)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest.java 2007-07-29 19:22:12 UTC (rev 554)
@@ -262,6 +262,26 @@
}
/**
+ * Tests that including multiple command files from a command file works.
+ * @throws RequiredOptionsMissingException (unexpected)
+ * @throws TerminalException (unexpected)
+ * @throws UnknownOptionException (unexpected)
+ * @throws MissingArgumentException (unexpected)
+ * @see <a href="http://sourceforge.net/tracker/index.php?func=detail&aid=1758846&group_id=149894&atid=776737">[ 1758846 ] Multiple command file inclusion fails</a>
+ */
+ @Test
+ public void testOptionsFromFileMultiple() throws RequiredOptionsMissingException, MissingArgumentException, TerminalException, UnknownOptionException {
+ final MockCommand command = new MockCommand();
+ ArgParser.parseAndRun(command, "@src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster");
+ final List<String> args = command.getArgs();
+ Assert.assertEquals("Option value must be stored.", "fooInput", command.getInput());
+ Assert.assertTrue("Run must be called even with zero arguments.", command.isRunCalled());
+ Assert.assertEquals("Arguments must be stored.", 2, args.size());
+ Assert.assertEquals("Argument foo must be stored.", "foo", args.get(0));
+ Assert.assertEquals("Argument bar must be stored.", "bar", args.get(1));
+ }
+
+ /**
* Tests that single dash options also work.
* @throws RequiredOptionsMissingException (unexpected)
* @throws TerminalException (unexpected)
Added: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster (rev 0)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster 2007-07-29 19:22:12 UTC (rev 554)
@@ -0,0 +1,3 @@
+@ArgParserTest_MultipleOptionsFileSlave1
+@ArgParserTest_MultipleOptionsFileSlave2
+-i fooInput
\ No newline at end of file
Property changes on: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileMaster
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave1
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave1 (rev 0)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave1 2007-07-29 19:22:12 UTC (rev 554)
@@ -0,0 +1 @@
+foo
\ No newline at end of file
Property changes on: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave1
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave2
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave2 (rev 0)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave2 2007-07-29 19:22:12 UTC (rev 554)
@@ -0,0 +1 @@
+bar
\ No newline at end of file
Property changes on: libs/argparser/trunk/src/test/net/sf/japi/io/args/ArgParserTest_MultipleOptionsFileSlave2
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-15 10:32:08
|
Revision: 553
http://svn.sourceforge.net/japi/?rev=553&view=rev
Author: christianhujer
Date: 2007-07-15 03:32:03 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Improved test documentation.
Modified Paths:
--------------
libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java
libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java
libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java
libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java
libs/swing-action/trunk/src/test/net/sf/japi/swing/ActionFactoryTest.java
libs/swing-action/trunk/src/test/net/sf/japi/swing/ReflectionActionTest.java
tools/cstyle/trunk/src/test/net/sf/japi/cstyle/CStyleTest.java
tools/string2bytes/trunk/src/test/net/sf/japi/string2bytes/CodecStepTest.java
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/AbstractConverterTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -52,7 +52,7 @@
}
/**
- * Tests whether creating a Converter works.
+ * Tests that creating a Converter works.
* @throws Exception (unexpected)
*/
public void testAbstractConverter() throws Exception {
@@ -60,7 +60,7 @@
}
/**
- * Tests whether convert throws a NullPointerException if invoked with <code>null</code>.
+ * Tests that convert throws a NullPointerException if invoked with <code>null</code>.
* @throws Exception In case of test problems.
*/
@SuppressWarnings({"ConstantConditions"})
@@ -76,7 +76,7 @@
}
/**
- * Tests whether getting the target class works.
+ * Tests that getting the target class works.
* @throws Exception In case of test problems.
*/
@Test
@@ -85,7 +85,7 @@
}
/**
- * Tests whether the testling has a proper description for the default locale.
+ * Tests that the testling has a proper description for the default locale.
* @throws Exception In case of unexpected errors.
*/
@Test
@@ -97,7 +97,7 @@
}
/**
- * Tests whether the testling has a proper display name.
+ * Tests that the testling has a proper display name.
* @throws Exception In case of unexpected errors.
*/
@Test
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/ConverterRegistryTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -19,15 +19,15 @@
package test.net.sf.japi.io.args.converter;
+import java.io.File;
+import java.util.Locale;
+import net.sf.japi.io.args.converter.ConstructorConverter;
+import net.sf.japi.io.args.converter.Converter;
import net.sf.japi.io.args.converter.ConverterRegistry;
-import net.sf.japi.io.args.converter.Converter;
import net.sf.japi.io.args.converter.NoConverterFoundException;
-import net.sf.japi.io.args.converter.ConstructorConverter;
+import org.jetbrains.annotations.NotNull;
+import org.junit.Assert;
import org.junit.Test;
-import org.junit.Assert;
-import org.jetbrains.annotations.NotNull;
-import java.util.Locale;
-import java.io.File;
/**
* Test for {@link ConverterRegistry}.
@@ -46,7 +46,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#getInstance()} works.
+ * Tests that {@link ConverterRegistry#getInstance()} works.
* @throws Exception (unexpected)
*/
@Test
@@ -56,7 +56,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#getConverter(Class)} works.
+ * Tests that {@link ConverterRegistry#getConverter(Class)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -68,7 +68,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#register(Converter)} works.
+ * Tests that {@link ConverterRegistry#register(Converter)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -77,7 +77,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#convert(Class, String)} and {@link ConverterRegistry#convert(Class, Locale, String)} work.
+ * Tests that {@link ConverterRegistry#convert(Class, String)} and {@link ConverterRegistry#convert(Class, Locale, String)} work.
* @throws Exception (unexpected)
*/
@Test
@@ -87,7 +87,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#convert(Class, String)} will automatically create a converter with a constructor.
+ * Tests that {@link ConverterRegistry#convert(Class, String)} will automatically create a converter with a constructor.
* @throws Exception (unexpected)
*/
@Test
@@ -97,7 +97,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#convert(Class, String)} will throw the appropriate exception if no constructor converter is available.
+ * Tests that {@link ConverterRegistry#convert(Class, String)} will throw the appropriate exception if no constructor converter is available.
* @throws Exception (unexpected)
*/
@Test(expected = NoConverterFoundException.class)
@@ -106,7 +106,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#convert(Class, Locale, String)} will throw the appropriate exception if no constructor converter is available.
+ * Tests that {@link ConverterRegistry#convert(Class, Locale, String)} will throw the appropriate exception if no constructor converter is available.
* @throws Exception (unexpected)
*/
@Test(expected = NoConverterFoundException.class)
@@ -115,7 +115,7 @@
}
/**
- * Tests whether {@link ConverterRegistry#getConstructorConverter(Class)} returns appropriate values.
+ * Tests that {@link ConverterRegistry#getConstructorConverter(Class)} returns appropriate values.
* @throws Exception (unexpected)
*/
@Test
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/IntegerConverterTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -38,7 +38,7 @@
}
/**
- * Tests whether instanciating a IntegerConverter works.
+ * Tests that instanciating a IntegerConverter works.
* @throws Exception (unexpected)
*/
@Test
@@ -47,7 +47,7 @@
}
/**
- * Tests whether converting an arbitrary text throws a NumberFormatException.
+ * Tests that converting an arbitrary text throws a NumberFormatException.
* @throws NumberFormatException Expected exception that's thrown if the test case is successful.
* @throws Exception In case of unexpected errors.
*/
@@ -57,7 +57,7 @@
}
/**
- * Tests whether converting decimal (10-base) integer numbers works correclty.
+ * Tests that converting decimal (10-base) integer numbers works correclty.
* @throws Exception In case of unexpected errors.
*/
@Test
@@ -68,7 +68,7 @@
}
/**
- * Tests whether converting hexadecimal (16-base) integer numbers works correctly.
+ * Tests that converting hexadecimal (16-base) integer numbers works correctly.
* @throws Exception In case of unexpected errors.
*/
@Test
@@ -79,7 +79,7 @@
}
/**
- * Tests whether converting octal (8-base) integer numbers works correctly.
+ * Tests that converting octal (8-base) integer numbers works correctly.
* @throws Exception In case of unexpected errors.
*/
@Test
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/NoConverterFoundExceptionTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -30,7 +30,7 @@
public class NoConverterFoundExceptionTest {
/**
- * Tests whether the target type is stored correctly.
+ * Tests that the target type is stored correctly.
* @throws Exception (unexpected)
*/
@Test
@@ -40,7 +40,7 @@
}
/**
- * Tests whether the target type is stored correctly.
+ * Tests that the target type is stored correctly.
* @throws Exception (unexpected)
*/
@Test
Modified: libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java
===================================================================
--- libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/argparser/trunk/src/test/net/sf/japi/io/args/converter/StringConverterTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -38,7 +38,7 @@
}
/**
- * Tests whether instanciating a StringConverter works.
+ * Tests that instanciating a StringConverter works.
* @throws Exception (unexpected)
*/
@Test
@@ -47,7 +47,7 @@
}
/**
- * Tests whether {@link StringConverter} has a public default constructor.
+ * Tests that {@link StringConverter} has a public default constructor.
* @throws Exception In case of unexpected errors.
*/
@Test
Modified: libs/swing-action/trunk/src/test/net/sf/japi/swing/ActionFactoryTest.java
===================================================================
--- libs/swing-action/trunk/src/test/net/sf/japi/swing/ActionFactoryTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/swing-action/trunk/src/test/net/sf/japi/swing/ActionFactoryTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -36,7 +36,7 @@
public class ActionFactoryTest {
/**
- * Tests whether {@link ActionFactory#find(JMenuBar, Action)} works.
+ * Tests that {@link ActionFactory#find(JMenuBar, Action)} works.
* @throws Exception (unexpected)
*/
@Test(expected = NullPointerException.class)
@@ -46,7 +46,7 @@
}
/**
- * Tests whether {@link ActionFactory#find(JMenuBar, Action)} works.
+ * Tests that {@link ActionFactory#find(JMenuBar, Action)} works.
* @throws Exception (unexpected)
*/
@Test(expected = NullPointerException.class)
@@ -56,7 +56,7 @@
}
/**
- * Tests whether {@link ActionFactory#find(JMenuBar, Action)} works.
+ * Tests that {@link ActionFactory#find(JMenuBar, Action)} works.
* @throws Exception (unexpected)
*/
@Test(expected = NullPointerException.class)
@@ -66,7 +66,7 @@
}
/**
- * Tests whether {@link ActionFactory#find(JMenuBar, Action)} works.
+ * Tests that {@link ActionFactory#find(JMenuBar, Action)} works.
* @throws Exception (expected)
*/
@Test(expected = NullPointerException.class)
@@ -75,7 +75,7 @@
ActionFactory.find(new JMenu(), null);
}
/**
- * Tests whether {@link ActionFactory#find(JMenuBar, Action)} works.
+ * Tests that {@link ActionFactory#find(JMenuBar, Action)} works.
* @throws Exception (unexpected)
*/
@Test
Modified: libs/swing-action/trunk/src/test/net/sf/japi/swing/ReflectionActionTest.java
===================================================================
--- libs/swing-action/trunk/src/test/net/sf/japi/swing/ReflectionActionTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ libs/swing-action/trunk/src/test/net/sf/japi/swing/ReflectionActionTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -59,7 +59,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test(expected = IllegalArgumentException.class)
@@ -68,7 +68,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -79,7 +79,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -90,7 +90,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test(expected = IllegalArgumentException.class)
@@ -99,7 +99,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test(expected = IllegalArgumentException.class)
@@ -108,7 +108,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -118,7 +118,7 @@
}
/**
- * Tests whether {@link ReflectionAction#putValue(String, Object)} works.
+ * Tests that {@link ReflectionAction#putValue(String, Object)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -131,7 +131,7 @@
}
/**
- * Tests whether {@link ReflectionAction#actionPerformed(ActionEvent)} works.
+ * Tests that {@link ReflectionAction#actionPerformed(ActionEvent)} works.
* @throws Exception (unexpected)
*/
@Test
@@ -143,7 +143,7 @@
}
/**
- * Tests whether {@link ReflectionAction#actionPerformed(ActionEvent)} works.
+ * Tests that {@link ReflectionAction#actionPerformed(ActionEvent)} works.
* @throws Exception (unexpected)
*/
@Test(expected = Exception.class)
Modified: tools/cstyle/trunk/src/test/net/sf/japi/cstyle/CStyleTest.java
===================================================================
--- tools/cstyle/trunk/src/test/net/sf/japi/cstyle/CStyleTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ tools/cstyle/trunk/src/test/net/sf/japi/cstyle/CStyleTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -20,15 +20,15 @@
package test.net.sf.japi.cstyle;
import net.sf.japi.cstyle.CStyle;
+import org.junit.Assert;
import org.junit.Test;
-import org.junit.Assert;
/** Unit test for {@link CStyle}.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class CStyleTest {
- /** Tests whether {@link CStyle#parse(char)} works. */
+ /** Tests that {@link CStyle#parse(char)} works. */
@Test public void testParse() {
final CStyle testling = new CStyle();
final String testString = "if (foo > 'x') { // check x\n printf(\"%d\");\n}";
@@ -39,7 +39,7 @@
Assert.assertEquals("mode now must be NORMAL.", CStyle.PhysicalMode.NORMAL, testling.getPhysicalMode());
}
- /** Tests whether {@link CStyle#reset()} works. */
+ /** Tests that {@link CStyle#reset()} works. */
@Test public void testReset() {
final CStyle testling = new CStyle();
testling.parse('\'');
Modified: tools/string2bytes/trunk/src/test/net/sf/japi/string2bytes/CodecStepTest.java
===================================================================
--- tools/string2bytes/trunk/src/test/net/sf/japi/string2bytes/CodecStepTest.java 2007-07-15 10:26:38 UTC (rev 552)
+++ tools/string2bytes/trunk/src/test/net/sf/japi/string2bytes/CodecStepTest.java 2007-07-15 10:32:03 UTC (rev 553)
@@ -20,13 +20,13 @@
package test.net.sf.japi.string2bytes;
import net.sf.japi.string2bytes.CodecStep;
+import net.sf.japi.string2bytes.EntityCodec;
+import net.sf.japi.string2bytes.IdentityCodec;
import net.sf.japi.string2bytes.StringCodec;
-import net.sf.japi.string2bytes.IdentityCodec;
-import net.sf.japi.string2bytes.EntityCodec;
-import org.junit.Test;
+import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-import org.junit.After;
+import org.junit.Test;
/**
* Test for {@link CodecStep}.
@@ -65,7 +65,7 @@
}
/**
- * Tests whether {@link CodecStep#CodecStep(StringCodec, String)} works.
+ * Tests that {@link CodecStep#CodecStep(StringCodec, String)} works.
* @throws Exception (unexpected)
*/
@Test public void testCodecStep() throws Exception {
@@ -75,7 +75,7 @@
/**
- * Tests whether {@link CodecStep#getCharset()} works.
+ * Tests that {@link CodecStep#getCharset()} works.
* @throws Exception (unexpected)
*/
@Test public void testGetCharset() throws Exception {
@@ -83,7 +83,7 @@
}
/**
- * Tests whether {@link CodecStep#setCharset(String)} works.
+ * Tests that {@link CodecStep#setCharset(String)} works.
* @throws Exception (unexpected)
*/
@Test public void testSetCharset() throws Exception {
@@ -93,7 +93,7 @@
}
/**
- * Tests whether {@link CodecStep#getCodec()} works.
+ * Tests that {@link CodecStep#getCodec()} works.
* @throws Exception (unexpected)
*/
@Test public void testGetCodec() throws Exception {
@@ -101,7 +101,7 @@
}
/**
- * Tests whether {@link CodecStep#setCodec(StringCodec)} works.
+ * Tests that {@link CodecStep#setCodec(StringCodec)} works.
* @throws Exception (unexpected)
*/
@Test public void testSetCodec() throws Exception {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-15 10:26:41
|
Revision: 552
http://svn.sourceforge.net/japi/?rev=552&view=rev
Author: christianhujer
Date: 2007-07-15 03:26:38 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Removed Arrays2Test from historic - this now is in libs-util.
Removed Paths:
-------------
historic/trunk/src/test/net/sf/japi/util/Arrays2Test.java
Deleted: historic/trunk/src/test/net/sf/japi/util/Arrays2Test.java
===================================================================
--- historic/trunk/src/test/net/sf/japi/util/Arrays2Test.java 2007-07-15 10:25:22 UTC (rev 551)
+++ historic/trunk/src/test/net/sf/japi/util/Arrays2Test.java 2007-07-15 10:26:38 UTC (rev 552)
@@ -1,56 +0,0 @@
-/* JAPI - (Yet another (hopefully) useful) Java API
- *
- * Copyright (C) 2004-2006 Christian Hujer
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-package test.net.sf.japi.util;
-
-import java.util.Arrays;
-import junit.framework.TestCase;
-import net.sf.japi.util.Arrays2;
-
-/** Test for {@link Arrays2}.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public class Arrays2Test extends TestCase {
-
- /** {@inheritDoc} */
- @Override public void setUp() throws Exception {
- super.setUp();
- }
-
- /** {@inheritDoc} */
- @Override public void tearDown() throws Exception {
- super.tearDown();
- }
-
- /** Test case for {@link Arrays2#concat(double[]...)}. */
- @SuppressWarnings({"ImplicitNumericConversion"})
- public void testConcat() throws Exception {
- final byte[] data1Orig = {1, 2, 3};
- final byte[] data2Orig = {4, 5, 6, 7};
- final byte[] data1Copy = data1Orig.clone();
- final byte[] data2Copy = data2Orig.clone();
- final byte[] concatExpected = {1, 2, 3, 4, 5, 6, 7};
- final byte[] concatResult = Arrays2.concat(data1Copy, data2Copy);
- assertTrue("Original arrays must be unmodified", Arrays.equals(data1Orig, data1Copy));
- assertTrue("Original arrays must be unmodified", Arrays.equals(data2Orig, data2Copy));
- assertTrue("Concatenation must correctly concatenate", Arrays.equals(concatExpected, concatResult));
- }
-
-} // class Arrays2Test
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-15 10:25:23
|
Revision: 551
http://svn.sourceforge.net/japi/?rev=551&view=rev
Author: christianhujer
Date: 2007-07-15 03:25:22 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Changed dependency so historic builds again from within IntelliJ IDEA.
Modified Paths:
--------------
historic/trunk/historic.iml
Modified: historic/trunk/historic.iml
===================================================================
--- historic/trunk/historic.iml 2007-07-15 10:24:27 UTC (rev 550)
+++ historic/trunk/historic.iml 2007-07-15 10:25:22 UTC (rev 551)
@@ -9,6 +9,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="annotations" level="project" />
+ <orderEntry type="module" module-name="libs-lang" />
<orderEntryProperties />
</component>
<component name="copyright">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-15 10:24:29
|
Revision: 550
http://svn.sourceforge.net/japi/?rev=550&view=rev
Author: christianhujer
Date: 2007-07-15 03:24:27 -0700 (Sun, 15 Jul 2007)
Log Message:
-----------
Minor changes in documentation.
Modified Paths:
--------------
libs/net/trunk/src/net/sf/japi/net/Forwarder.java
site/trunk/src/doc/start.xhtml
Modified: libs/net/trunk/src/net/sf/japi/net/Forwarder.java
===================================================================
--- libs/net/trunk/src/net/sf/japi/net/Forwarder.java 2007-07-14 17:03:06 UTC (rev 549)
+++ libs/net/trunk/src/net/sf/japi/net/Forwarder.java 2007-07-15 10:24:27 UTC (rev 550)
@@ -34,6 +34,7 @@
/** Main program.
* @param args command line arguments (currently ignored)
* @throws IOException In case of I/O problems.
+ * @todo Extract main() into a tool that uses argparser.
*/
public static void main(final String... args) throws IOException {
final ServerSocket serverSocket = new ServerSocket(Integer.parseInt(args[0]));
Modified: site/trunk/src/doc/start.xhtml
===================================================================
--- site/trunk/src/doc/start.xhtml 2007-07-14 17:03:06 UTC (rev 549)
+++ site/trunk/src/doc/start.xhtml 2007-07-15 10:24:27 UTC (rev 550)
@@ -15,9 +15,6 @@
<title>JAPI - (Yet another (hopefully) useful) Java API</title>
</head>
<body>
- <p>
- (Yet another (hopefully) useful) Java API. Latest release version: <strong>0.9.0</strong>
- </p>
<h2>What is JAPI?</h2>
<p>
JAPI is a set of Java API extension libraries intended to make life easier for Java application developers.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 17:03:07
|
Revision: 549
http://svn.sourceforge.net/japi/?rev=549&view=rev
Author: christianhujer
Date: 2007-07-14 10:03:06 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added German translation.
Added Paths:
-----------
libs/swing-about/trunk/src/net/sf/japi/swing/about/action_de.properties
Added: libs/swing-about/trunk/src/net/sf/japi/swing/about/action_de.properties
===================================================================
--- libs/swing-about/trunk/src/net/sf/japi/swing/about/action_de.properties (rev 0)
+++ libs/swing-about/trunk/src/net/sf/japi/swing/about/action_de.properties 2007-07-14 17:03:06 UTC (rev 549)
@@ -0,0 +1,29 @@
+#
+# JAPI libs-swing-about is a library for adding an about dialog to an application with little effort.
+# Copyright (C) 2007 Christian Hujer.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+# Warning: This file MUST be ISO-8859-1
+# See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#encoding
+
+about.title=\xDCber {0}
+license.title=Lizenz
+license.missing=Konnte Lizenz-Text nicht laden.
+aboutTab.title=\xDCber
+aboutRuntimeProperties.title=Runtime Properties
+aboutBuildProperties.title=Build Properties
+unknown=unbekannt
Property changes on: libs/swing-about/trunk/src/net/sf/japi/swing/about/action_de.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 17:02:58
|
Revision: 548
http://svn.sourceforge.net/japi/?rev=548&view=rev
Author: christianhujer
Date: 2007-07-14 10:02:57 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Changed unknown build information to be read from a bundle.
Modified Paths:
--------------
libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java
libs/swing-about/trunk/src/net/sf/japi/swing/about/action.properties
Modified: libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java
===================================================================
--- libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-07-14 16:57:32 UTC (rev 547)
+++ libs/swing-about/trunk/src/net/sf/japi/swing/about/AboutDialog.java 2007-07-14 17:02:57 UTC (rev 548)
@@ -96,7 +96,6 @@
* @author Andreas Kirschbaum
* @todo Allow configuring the build information
* @todo Allow reading the information from a specified bundle instead of an ActionFactory.
- * @todo Allow passing a known ActionFactory instance
*/
public class AboutDialog extends JPanel {
@@ -112,7 +111,7 @@
/** Default number of columns in a textarea in an AboutDialog. */
private static final int TEXT_COLUMNS = 80;
- /** Action Factory to create Actions. */
+ /** Action Factory of the application, used to retrieve application logo, name and licenses. */
@NotNull private final ActionFactory actionFactory;
/**
@@ -233,9 +232,9 @@
* @return component for about tab
*/
@NotNull private JComponent buildAboutTab() {
- String buildNumber = "unknown";
- String buildDeveloper = "unknown";
- String buildTstamp = "unknown";
+ String buildNumber = ACTION_FACTORY.getString("unknown");
+ String buildDeveloper = ACTION_FACTORY.getString("unknown");
+ String buildTstamp = ACTION_FACTORY.getString("unknown");
try {
final ResourceBundle bundle = ResourceBundle.getBundle("build");
try {
Modified: libs/swing-about/trunk/src/net/sf/japi/swing/about/action.properties
===================================================================
--- libs/swing-about/trunk/src/net/sf/japi/swing/about/action.properties 2007-07-14 16:57:32 UTC (rev 547)
+++ libs/swing-about/trunk/src/net/sf/japi/swing/about/action.properties 2007-07-14 17:02:57 UTC (rev 548)
@@ -26,3 +26,4 @@
aboutTab.title=About
aboutRuntimeProperties.title=Runtime Properties
aboutBuildProperties.title=Build Properties
+unknown=unknown
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 16:57:33
|
Revision: 547
http://svn.sourceforge.net/japi/?rev=547&view=rev
Author: christianhujer
Date: 2007-07-14 09:57:32 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added exception test cases.
Modified Paths:
--------------
libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java
Modified: libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java
===================================================================
--- libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java 2007-07-14 16:57:14 UTC (rev 546)
+++ libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ArrayListModelTest.java 2007-07-14 16:57:32 UTC (rev 547)
@@ -227,6 +227,46 @@
testling.removeListDataListener(listenerMock);
}
+ /** Tests that remove() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testRemoveIAE() {
+ new ArrayListModel<String>().remove("foo");
+ }
+
+ /** Tests that moveToTop() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveToTopIAE() {
+ new ArrayListModel<String>().moveToTop("foo");
+ }
+
+ /** Tests that moveUp() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveUpIAE() {
+ new ArrayListModel<String>().moveUp("foo");
+ }
+
+ /** Tests that moveDown() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveDownIAE() {
+ new ArrayListModel<String>().moveDown("foo");
+ }
+
+ /** Tests that moveToBottom() with an uncontained element throws an IllegalArgumentException.
+ * @throws IllegalArgumentException (expected).
+ */
+ @Test(expected = IllegalArgumentException.class)
+ public void testMoveToBottomIAE() {
+ new ArrayListModel<String>().moveToBottom("foo");
+ }
+
/** Asserts a certain size and order after a move.
* @param message Message to issue in case the size and order are not as expected.
* @param model Testling to check.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 16:57:15
|
Revision: 546
http://svn.sourceforge.net/japi/?rev=546&view=rev
Author: christianhujer
Date: 2007-07-14 09:57:14 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Improved synchronization code.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 16:51:38 UTC (rev 545)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 16:57:14 UTC (rev 546)
@@ -95,9 +95,7 @@
/** {@inheritDoc} */
public boolean moveToTop(final int index) {
- synchronized (list) {
- return move(null, index, 0);
- }
+ return move(null, index, 0);
}
/** {@inheritDoc} */
@@ -114,9 +112,7 @@
/** {@inheritDoc} */
public boolean moveUp(final int index) {
- synchronized (list) {
- return move(null, index, index - 1);
- }
+ return move(null, index, index - 1);
}
/** {@inheritDoc} */
@@ -133,9 +129,7 @@
/** {@inheritDoc} */
public boolean moveDown(final int index) {
- synchronized (list) {
- return move(null, index, index + 1);
- }
+ return move(null, index, index + 1);
}
/** {@inheritDoc} */
@@ -152,9 +146,7 @@
/** {@inheritDoc} */
public boolean moveToBottom(final int index) {
- synchronized (list) {
- return move(null, index, list.size() - 1);
- }
+ return move(null, index, list.size() - 1);
}
/** Performs the move operation of an element.
@@ -164,15 +156,17 @@
* @return <code>true</code> if the element was moved and the event was fired, otherwise <code>false</code>.
*/
private boolean move(@Nullable final E e, final int oldIndex, final int newIndex) {
- if (oldIndex == newIndex || oldIndex < 0 || newIndex < 0 || newIndex >= list.size()) {
- return false;
+ synchronized (list) {
+ if (oldIndex == newIndex || oldIndex < 0 || newIndex < 0 || newIndex >= list.size()) {
+ return false;
+ }
+ assert e == null || list.indexOf(e) == oldIndex;
+ final E moving = list.remove(oldIndex);
+ list.add(newIndex, moving);
+ assert e == null || list.indexOf(e) == newIndex;
+ fireContentsChanged(this, oldIndex, newIndex);
+ return true;
}
- assert e == null || list.indexOf(e) == oldIndex;
- final E moving = list.remove(oldIndex);
- list.add(newIndex, moving);
- assert e == null || list.indexOf(e) == newIndex;
- fireContentsChanged(this, oldIndex, newIndex);
- return true;
}
/** {@inheritDoc} */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 16:51:41
|
Revision: 545
http://svn.sourceforge.net/japi/?rev=545&view=rev
Author: christianhujer
Date: 2007-07-14 09:51:38 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Changed remove() to throw IllegalArgumentException for not-contained elements to be consistent with move() operations.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 16:42:49 UTC (rev 544)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 16:51:38 UTC (rev 545)
@@ -19,9 +19,9 @@
package net.sf.japi.swing.list;
-import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.jetbrains.annotations.Nullable;
/** ArrayList-backed implementation of {@link MutableListModel}.
@@ -68,7 +68,7 @@
/** {@inheritDoc} */
public boolean remove(final E e) {
if (!list.contains(e)) {
- return false;
+ throw new IllegalArgumentException("Element " + e + " not part of " + this);
}
final int index;
final boolean retVal;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 16:42:51
|
Revision: 544
http://svn.sourceforge.net/japi/?rev=544&view=rev
Author: christianhujer
Date: 2007-07-14 09:42:49 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Changed MutableListModel to extend Iterable.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 15:54:37 UTC (rev 543)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 16:42:49 UTC (rev 544)
@@ -21,6 +21,7 @@
import java.util.List;
import java.util.ArrayList;
+import java.util.Iterator;
import org.jetbrains.annotations.Nullable;
/** ArrayList-backed implementation of {@link MutableListModel}.
@@ -174,4 +175,9 @@
return true;
}
+ /** {@inheritDoc} */
+ public Iterator<E> iterator() {
+ return list.iterator();
+ }
+
} // class ArrayListModel
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java 2007-07-14 15:54:37 UTC (rev 543)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java 2007-07-14 16:42:49 UTC (rev 544)
@@ -25,7 +25,7 @@
* @param <E> element type of this ListModel.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public interface MutableListModel<E> extends ListModel {
+public interface MutableListModel<E> extends ListModel, Iterable<E> {
/** {@inheritDoc} */
E getElementAt(final int index);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 15:54:38
|
Revision: 543
http://svn.sourceforge.net/japi/?rev=543&view=rev
Author: christianhujer
Date: 2007-07-14 08:54:37 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added ant build.
Added Paths:
-----------
libs/swing-list/trunk/build.xml
libs/swing-list/trunk/module.properties
Added: libs/swing-list/trunk/build.xml
===================================================================
--- libs/swing-list/trunk/build.xml (rev 0)
+++ libs/swing-list/trunk/build.xml 2007-07-14 15:54:37 UTC (rev 543)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ JAPI libs-swing-list is a library for lists in swing.
+ ~ Copyright (C) 2007 Christian Hujer.
+ ~
+ ~ This library is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU Lesser General Public
+ ~ License as published by the Free Software Foundation; either
+ ~ version 2.1 of the License, or (at your option) any later version.
+ ~
+ ~ This library is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this library; if not, write to the Free Software
+ ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ -->
+<!DOCTYPE project [
+ <!ENTITY commonBuild SYSTEM "common/commonBuild.xml">
+]>
+<project name="japi lib swing-about" default="all">
+
+ &commonBuild;
+
+</project>
Property changes on: libs/swing-list/trunk/build.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ LF
Added: libs/swing-list/trunk/module.properties
===================================================================
--- libs/swing-list/trunk/module.properties (rev 0)
+++ libs/swing-list/trunk/module.properties 2007-07-14 15:54:37 UTC (rev 543)
@@ -0,0 +1,24 @@
+#
+# JAPI libs-swing-list is a library for lists in swing.
+# Copyright (C) 2007 Christian Hujer.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+#
+
+update.focus=none
+module.version=trunk
+module.name=japi-lib-swing-list
+module.shortname=swing-list
+module.title=SwingList
Property changes on: libs/swing-list/trunk/module.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 15:54:01
|
Revision: 542
http://svn.sourceforge.net/japi/?rev=542&view=rev
Author: christianhujer
Date: 2007-07-14 08:54:00 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Fixed javadoc issues.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 15:53:53 UTC (rev 541)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 15:54:00 UTC (rev 542)
@@ -29,7 +29,9 @@
*/
public class ArrayListModel<E> extends AbstractMutableListModel<E> {
- /** The ArrayList that backs this ArrayListModel. */
+ /** The ArrayList that backs this ArrayListModel.
+ * @serial include
+ */
private final List<E> list = new ArrayList<E>();
/** Creates a new ArrayListModel.
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java 2007-07-14 15:53:53 UTC (rev 541)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ListControlPanel.java 2007-07-14 15:54:00 UTC (rev 542)
@@ -39,22 +39,34 @@
/** The ActionFactory for creating the actions. */
@NotNull private static final ActionFactory ACTION_FACTORY = ActionFactory.getFactory("net.sf.japi.swing.list");
- /** Action for moving to top. */
+ /** Action for moving to top.
+ * @serial include
+ */
@NotNull private final Action moveToTop = ACTION_FACTORY.createAction(false, "moveToTop", this);
- /** Action for moving up. */
+ /** Action for moving up.
+ * @serial include
+ */
@NotNull private final Action moveUp = ACTION_FACTORY.createAction(false, "moveUp", this);
- /** Action for moving down. */
+ /** Action for moving down.
+ * @serial include
+ */
@NotNull private final Action moveDown = ACTION_FACTORY.createAction(false, "moveDown", this);
- /** Action for moving to bottom. */
+ /** Action for moving to bottom.
+ * @serial include
+ */
@NotNull private final Action moveToBottom = ACTION_FACTORY.createAction(false, "moveToBottom", this);
- /** The list that provides the information about the current selection. */
+ /** The list that provides the information about the current selection.
+ * @serial include
+ */
@NotNull private JList list;
- /** The model to control. */
+ /** The model to control.
+ * @serial include
+ */
@NotNull private MutableListModel model;
/** Creates a ListControlPanel.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 15:53:55
|
Revision: 541
http://svn.sourceforge.net/japi/?rev=541&view=rev
Author: christianhujer
Date: 2007-07-14 08:53:53 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added missing build library that this module depends on.
Added Paths:
-----------
libs/swing-list/trunk/lib/
libs/swing-list/trunk/lib/japi-lib-swing-action-trunk.jar
Added: libs/swing-list/trunk/lib/japi-lib-swing-action-trunk.jar
===================================================================
(Binary files differ)
Property changes on: libs/swing-list/trunk/lib/japi-lib-swing-action-trunk.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 15:51:04
|
Revision: 540
http://svn.sourceforge.net/japi/?rev=540&view=rev
Author: christianhujer
Date: 2007-07-14 08:51:01 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Fixed automatic test execution issue.
Modified Paths:
--------------
libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java
Modified: libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java
===================================================================
--- libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java 2007-07-14 15:50:53 UTC (rev 539)
+++ libs/swing-list/trunk/src/test/net/sf/japi/swing/list/ListControlPanelTest.java 2007-07-14 15:51:01 UTC (rev 540)
@@ -45,12 +45,6 @@
f.add(new JScrollPane(list));
f.add(testling, BorderLayout.LINE_END);
f.pack();
- f.setVisible(true);
- try {
- Thread.sleep(100000);
- } catch (final InterruptedException ignore) {
- // ignore
- }
}
} // class ListControlPanelTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 15:50:55
|
Revision: 539
http://svn.sourceforge.net/japi/?rev=539&view=rev
Author: christianhujer
Date: 2007-07-14 08:50:53 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
libs/swing-list/trunk/src/net/sf/japi/swing/list/AbstractMutableListModel.java
libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/AbstractMutableListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/AbstractMutableListModel.java 2007-07-14 10:40:40 UTC (rev 538)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/AbstractMutableListModel.java 2007-07-14 15:50:53 UTC (rev 539)
@@ -22,6 +22,7 @@
import javax.swing.AbstractListModel;
/** The abstract definition for the data model that provides a List with its contents in a mutable fashion.
+ * @param <E> element type of this ListModel.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public abstract class AbstractMutableListModel<E> extends AbstractListModel implements MutableListModel<E> {
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 10:40:40 UTC (rev 538)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/ArrayListModel.java 2007-07-14 15:50:53 UTC (rev 539)
@@ -23,7 +23,8 @@
import java.util.ArrayList;
import org.jetbrains.annotations.Nullable;
-/**
+/** ArrayList-backed implementation of {@link MutableListModel}.
+ * @param <E> element type of this ListModel.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class ArrayListModel<E> extends AbstractMutableListModel<E> {
Modified: libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java
===================================================================
--- libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java 2007-07-14 10:40:40 UTC (rev 538)
+++ libs/swing-list/trunk/src/net/sf/japi/swing/list/MutableListModel.java 2007-07-14 15:50:53 UTC (rev 539)
@@ -22,6 +22,7 @@
import javax.swing.ListModel;
/** A MutableListModel is a list model that additionally provides operations for adding and moving the list's elements.
+ * @param <E> element type of this ListModel.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public interface MutableListModel<E> extends ListModel {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 10:40:41
|
Revision: 538
http://svn.sourceforge.net/japi/?rev=538&view=rev
Author: christianhujer
Date: 2007-07-14 03:40:40 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added property comparator.
Added Paths:
-----------
libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
libs/lang/trunk/src/net/sf/japi/lang/package-info.java
libs/lang/trunk/src/test/net/sf/japi/lang/PropertyComparatorTest.java
libs/lang/trunk/src/test/net/sf/japi/lang/package-info.java
Added: libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
===================================================================
--- libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java (rev 0)
+++ libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java 2007-07-14 10:40:40 UTC (rev 538)
@@ -0,0 +1,134 @@
+/*
+ * JAPI libs-lang is a library that contains some useful classes regarding java.lang.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package net.sf.japi.lang;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Comparator;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/**
+ * A Comparator for properties, compares two objects based on a Java Beans Property.
+ *
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @todo think whether net.sf.japi.lang really is the correct package or this should rather go to something like net.sf.japi.beans or net.sf.japi.util.
+ */
+public class PropertyComparator<T, C> implements Comparator<C> {
+
+ /** The target class. */
+ @Nullable private final Class<C> targetClass;
+
+ /** The comparator to compare the property value. */
+ @Nullable private final Comparator<T> delegate;
+
+ /** The name of the property to get. */
+ private final String propertyName;
+
+ /** The getter to read the property. */
+ @Nullable private final Method getter;
+
+ /** Create a PropertyComparator.
+ * @param targetClass The target class of which properties should be compared, maybe <code>null</code> in which case the target class will be evaluated dynamically.
+ * @param propertyName Name of the property to compare.
+ * @param delegate Delegate comparator for the property, maybe <code>null</code> in which natural ordering of the property will be assumed; the property type must implement {@link Comparable} then.
+ */
+ public PropertyComparator(@Nullable final Class<C> targetClass, @NotNull final String propertyName, @Nullable final Comparator<T> delegate) {
+ this.targetClass = targetClass;
+ this.propertyName = propertyName;
+ this.delegate = delegate;
+ getter = targetClass == null ? null : getPropertyGetter(targetClass, propertyName);
+ }
+
+ /** {@inheritDoc} */
+ public int compare(final C o1, final C o2) {
+ try {
+ final Method o1Getter = getter != null ? getter : getPropertyGetter(o1.getClass(), propertyName);
+ final Method o2Getter = getter != null ? getter : getPropertyGetter(o2.getClass(), propertyName);
+ final Object o1Value = o1Getter.invoke(o1);
+ final Object o2Value = o2Getter.invoke(o2);
+ if (delegate == null) {
+ return ((Comparable) o1Value).compareTo((Comparable) o2Value);
+ } else {
+ return delegate.compare((T) o1Value, (T) o2Value);
+ }
+ } catch (final IllegalAccessException e) {
+ throw new IllegalAccessError(e.getMessage());
+ } catch (final InvocationTargetException e) {
+ throw new RuntimeException(e); // TODO use something better than RuntimeException
+ }
+ }
+
+ /** Returns the property getter for the specified class and property name.
+ * @param targetClass Class to get property getter for.
+ * @param propertyName Name of the property to get getter for.
+ * @return Getter Method for the specified property.
+ */
+ public static Method getPropertyGetter(@NotNull final Class targetClass, @NotNull final String propertyName) {
+ try { // try getFoo()
+ final StringBuilder getterName = new StringBuilder();
+ getterName.append("get");
+ getterName.append(propertyName);
+ getterName.setCharAt(3, Character.toUpperCase(getterName.charAt(3)));
+ return targetClass.getMethod(getterName.toString());
+ } catch (final NoSuchMethodException ignore) {
+ // one more try: boolean property name.
+ }
+ try { // try isFoo()
+ final StringBuilder getterName = new StringBuilder();
+ getterName.append("is");
+ getterName.append(propertyName);
+ getterName.setCharAt(2, Character.toUpperCase(getterName.charAt(2)));
+ return targetClass.getMethod(getterName.toString());
+ } catch (final NoSuchMethodException ignore) {
+ // one more try: property name.
+ }
+ try { // try foo()
+ return targetClass.getMethod(propertyName);
+ } catch (final NoSuchMethodException ignore) {
+ // one more try: property name.
+ }
+ throw new NoSuchMethodError("Property Getter for property " + propertyName + " in class " + targetClass);
+ }
+
+ /** Returns the property name of the property that's compared by this PropertyComparator.
+ * @return Property name.
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /** Returns the target class this PropertyComparator operates on.
+ * @return Target class or <code>null</code> if this PropertyComparator uses dynamic class evaluation.
+ */
+ @Nullable
+ public Class<C> getTargetClass() {
+ return targetClass;
+ }
+
+ /** Returns the delegate this PropertyComparator uses for the property value comparison.
+ * @return Delegate or <code>null</code> if this PropertyComparator uses natural ordering.
+ */
+ @Nullable
+ public Comparator<T> getDelegate() {
+ return delegate;
+ }
+
+} // class PropertyComparator
Property changes on: libs/lang/trunk/src/net/sf/japi/lang/PropertyComparator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/lang/trunk/src/net/sf/japi/lang/package-info.java
===================================================================
--- libs/lang/trunk/src/net/sf/japi/lang/package-info.java (rev 0)
+++ libs/lang/trunk/src/net/sf/japi/lang/package-info.java 2007-07-14 10:40:40 UTC (rev 538)
@@ -0,0 +1,20 @@
+/*
+ * JAPI libs-lang is a library that contains some useful classes regarding java.lang.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package net.sf.japi.lang;
Property changes on: libs/lang/trunk/src/net/sf/japi/lang/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/lang/trunk/src/test/net/sf/japi/lang/PropertyComparatorTest.java
===================================================================
--- libs/lang/trunk/src/test/net/sf/japi/lang/PropertyComparatorTest.java (rev 0)
+++ libs/lang/trunk/src/test/net/sf/japi/lang/PropertyComparatorTest.java 2007-07-14 10:40:40 UTC (rev 538)
@@ -0,0 +1,47 @@
+/*
+ * JAPI libs-lang is a library that contains some useful classes regarding java.lang.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package test.net.sf.japi.lang;
+
+import net.sf.japi.lang.PropertyComparator;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * Test for {@link PropertyComparator}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class PropertyComparatorTest {
+
+ /** Test the use case comparing String lengths. */
+ @Test
+ public void testStringLengthExample() {
+ final String s1 = "hello";
+ final String s2 = "world";
+ final String s3 = "a";
+ final String s4 = "nice";
+ final String s5 = "day";
+ final PropertyComparator<Integer, String> lengthComparator = new PropertyComparator<Integer, String>(String.class, "length", null);
+ Assert.assertTrue(lengthComparator.compare(s1, s2) == 0);
+ Assert.assertTrue(lengthComparator.compare(s2, s3) > 0);
+ Assert.assertTrue(lengthComparator.compare(s3, s4) < 0);
+ Assert.assertTrue(lengthComparator.compare(s4, s5) > 0);
+ }
+
+} // class PropertyComparatorTest
Property changes on: libs/lang/trunk/src/test/net/sf/japi/lang/PropertyComparatorTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/lang/trunk/src/test/net/sf/japi/lang/package-info.java
===================================================================
--- libs/lang/trunk/src/test/net/sf/japi/lang/package-info.java (rev 0)
+++ libs/lang/trunk/src/test/net/sf/japi/lang/package-info.java 2007-07-14 10:40:40 UTC (rev 538)
@@ -0,0 +1,20 @@
+/*
+ * JAPI libs-lang is a library that contains some useful classes regarding java.lang.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package test.net.sf.japi.lang;
Property changes on: libs/lang/trunk/src/test/net/sf/japi/lang/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 10:38:48
|
Revision: 537
http://svn.sourceforge.net/japi/?rev=537&view=rev
Author: christianhujer
Date: 2007-07-14 03:38:44 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Added package documentation.
Modified Paths:
--------------
libs/swing-extlib/trunk/libs-swing-extlib.iml
Added Paths:
-----------
libs/swing-extlib/trunk/src/net/sf/japi/swing/package-info.java
libs/swing-extlib/trunk/src/test/
libs/swing-extlib/trunk/src/test/net/
libs/swing-extlib/trunk/src/test/net/sf/
libs/swing-extlib/trunk/src/test/net/sf/japi/
libs/swing-extlib/trunk/src/test/net/sf/japi/swing/
libs/swing-extlib/trunk/src/test/net/sf/japi/swing/package-info.java
Modified: libs/swing-extlib/trunk/libs-swing-extlib.iml
===================================================================
--- libs/swing-extlib/trunk/libs-swing-extlib.iml 2007-07-14 10:36:45 UTC (rev 536)
+++ libs/swing-extlib/trunk/libs-swing-extlib.iml 2007-07-14 10:38:44 UTC (rev 537)
@@ -5,6 +5,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" packagePrefix="test" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Added: libs/swing-extlib/trunk/src/net/sf/japi/swing/package-info.java
===================================================================
--- libs/swing-extlib/trunk/src/net/sf/japi/swing/package-info.java (rev 0)
+++ libs/swing-extlib/trunk/src/net/sf/japi/swing/package-info.java 2007-07-14 10:38:44 UTC (rev 537)
@@ -0,0 +1,23 @@
+/*
+ * JAPI libs-swing-extlib is a library holding some useful classes for extending Swing.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/** The package net.sf.japi.swing contains some minor swing extensions like additional layout managers.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+package net.sf.japi.swing;
Property changes on: libs/swing-extlib/trunk/src/net/sf/japi/swing/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
Added: libs/swing-extlib/trunk/src/test/net/sf/japi/swing/package-info.java
===================================================================
--- libs/swing-extlib/trunk/src/test/net/sf/japi/swing/package-info.java (rev 0)
+++ libs/swing-extlib/trunk/src/test/net/sf/japi/swing/package-info.java 2007-07-14 10:38:44 UTC (rev 537)
@@ -0,0 +1,23 @@
+/*
+ * JAPI libs-swing-extlib is a library holding some useful classes for extending Swing.
+ * Copyright (C) 2007 Christian Hujer.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+/** Tests for classes in {@link net.sf.japi.swing}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+package test.net.sf.japi.swing;
Property changes on: libs/swing-extlib/trunk/src/test/net/sf/japi/swing/package-info.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2007-07-14 10:36:47
|
Revision: 536
http://svn.sourceforge.net/japi/?rev=536&view=rev
Author: christianhujer
Date: 2007-07-14 03:36:45 -0700 (Sat, 14 Jul 2007)
Log Message:
-----------
Minor documentation improvements.
Modified Paths:
--------------
libs/argparser/trunk/src/doc/start.xhtml
Added Paths:
-----------
libs/argparser/trunk/src/doc/guide/
libs/argparser/trunk/src/doc/guide/start.xhtml
Added: libs/argparser/trunk/src/doc/guide/start.xhtml
===================================================================
--- libs/argparser/trunk/src/doc/guide/start.xhtml (rev 0)
+++ libs/argparser/trunk/src/doc/guide/start.xhtml 2007-07-14 10:36:45 UTC (rev 536)
@@ -0,0 +1,42 @@
+
+<!--
+ ~ JAPI libs-argparser is a library for parsing command line arguments.
+ ~ Copyright (C) 2007 Christian Hujer.
+ ~
+ ~ This library is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU Lesser General Public
+ ~ License as published by the Free Software Foundation; either
+ ~ version 2.1 of the License, or (at your option) any later version.
+ ~
+ ~ This library is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this library; if not, write to the Free Software
+ ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ -->
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <meta name="Date" content="$Date: 2006-11-26 16:38:11 +0100 (So, 26 Nov 2006) $" />
+ <title>JAPI Lib ArgParser: Guide</title>
+ </head>
+ <body>
+ <h1>JAPI Lib ArgParser: Guide</h1>
+ <p>
+ This guide shows you how to write Java programs that use JAPI Lib ArgParser.
+ </p>
+ <h2>Introduction</h2>
+ <p>
+ JAPI Lib ArgParser is a library that helps developers with command line parsing.
+ The primary target audience are Java developers that write Java programs that have a command line interface.
+ </p>
+ <p>
+ When writing a program that understands command line
+ </p>
+ </body>
+</html>
Property changes on: libs/argparser/trunk/src/doc/guide/start.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ LF
Modified: libs/argparser/trunk/src/doc/start.xhtml
===================================================================
--- libs/argparser/trunk/src/doc/start.xhtml 2007-07-14 10:34:54 UTC (rev 535)
+++ libs/argparser/trunk/src/doc/start.xhtml 2007-07-14 10:36:45 UTC (rev 536)
@@ -1,4 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ JAPI libs-argparser is a library for parsing command line arguments.
+ ~ Copyright (C) 2007 Christian Hujer.
+ ~
+ ~ This library is free software; you can redistribute it and/or
+ ~ modify it under the terms of the GNU Lesser General Public
+ ~ License as published by the Free Software Foundation; either
+ ~ version 2.1 of the License, or (at your option) any later version.
+ ~
+ ~ This library is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this library; if not, write to the Free Software
+ ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ -->
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
@@ -10,6 +29,8 @@
<h1>JAPI Lib Argparser</h1>
<p>
<em>JAPI Lib Argparser</em> is a library for parsing command line arguments.
+ </p>
+ <p>
It supports the following features:
</p>
<ul>
@@ -17,6 +38,7 @@
<li>Bean-like reflective / introspective usage</li>
<li>Java standard <abbr>i18n</abbr> / <abbr>l10n</abbr> support using properties files</li>
<li>Short (e.g. <code>-f</code>) and long (e.g. <code>--filename</code>) options</li>
+ <li>Allow long options to be written as <code>--option value</code> as well as <code>--option=value</code></li>
<li>Concatenation of short options (e.g. <code>-fiz</code> for <code>-f -i -z</code>)</li>
<li>Automatic built-in help (<code>-h</code> and <code>--help</code>)</li>
<li>Mandatory and optional options / switches</li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|