mathlib-commitlog Mailing List for JMathLib - Octave, Matlab clone in java (Page 4)
Status: Beta
Brought to you by:
st_mueller
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
(4) |
Aug
(150) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(233) |
Feb
(86) |
Mar
(32) |
Apr
(26) |
May
(73) |
Jun
(45) |
Jul
(23) |
Aug
(23) |
Sep
(5) |
Oct
(80) |
Nov
(11) |
Dec
(11) |
| 2008 |
Jan
|
Feb
|
Mar
(13) |
Apr
(3) |
May
(7) |
Jun
(30) |
Jul
(12) |
Aug
(12) |
Sep
|
Oct
|
Nov
(78) |
Dec
(78) |
| 2009 |
Jan
(214) |
Feb
(79) |
Mar
(20) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <st_...@us...> - 2009-02-08 17:04:23
|
Revision: 835
http://mathlib.svn.sourceforge.net/mathlib/?rev=835&view=rev
Author: st_mueller
Date: 2009-02-08 17:04:20 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
removed applet-parameter from Interpreter-constructor
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java
JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java 2009-02-08 16:46:13 UTC (rev 834)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/GlobalValues.java 2009-02-08 17:04:20 UTC (rev 835)
@@ -10,10 +10,8 @@
package jmathlib.core.interpreter;
import java.io.*;
-import java.net.URL;
import java.util.Locale;
import java.util.Properties;
-import java.applet.Applet;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.text.NumberFormat;
@@ -34,12 +32,12 @@
/**A list of contexts*/
private ContextList contextList;
+ /** flag to indicate if JMathLib is running standalone or as applet,servlet */
+ private boolean runningStandalone = false;
+
/**Object to control function usage*/
private jmathlib.core.functions.FunctionManager functionManager;
- /** global pointer to applet */
- private Applet applet = null;
-
/**A pointer to the interpreter itself*/
private Interpreter interpreter;
@@ -59,16 +57,17 @@
* @param _interpreter = the Interpreter object
* @param _runningStandalone = true if this was run from an application
*/
- public GlobalValues(Interpreter _interpreter, boolean _runningStandalone, Applet _applet)
+ public GlobalValues(Interpreter _interpreter, boolean _runningStandalone)
{
+
+ // flag for stand alone or applet,servlet,...
+ runningStandalone = _runningStandalone;
+
// the list of contexts
contextList = new ContextList();
- // pointer to applet
- applet = _applet;
-
// the function manager for loading m-files class-files
- functionManager = new jmathlib.core.functions.FunctionManager(_runningStandalone, applet);
+ functionManager = new jmathlib.core.functions.FunctionManager(_runningStandalone);
// the graphics manager for plotting functions
graphicsManager = new jmathlib.core.graphics.GraphicsManager();
@@ -235,13 +234,14 @@
// load global properties from disc
try
{
- // check if JMathLib is running is applet or application
- if (applet != null)
+ // check if JMathLib is running as applet or application
+ if (!runningStandalone)
{
// running as applet
//System.out.println("properties applet " + getWorkingDirectory());
- URL url = new URL(applet.getCodeBase(), "JMathLib.properties");
- props.load( url.openStream() );
+ //URL url = new URL(applet.getCodeBase(), "JMathLib.properties");
+ InputStream in = GlobalValues.class.getResourceAsStream("../../../JMathLib.properties");
+ props.load( in); //url.openStream() );
}
else
{
@@ -280,7 +280,7 @@
public void storePropertiesToFile()
{
// do not try to store properties is an applet
- if (applet!=null)
+ if (!runningStandalone)
return;
// store properties back to file
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java 2009-02-08 16:46:13 UTC (rev 834)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/Interpreter.java 2009-02-08 17:04:20 UTC (rev 835)
@@ -12,7 +12,6 @@
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
import jmathlib.core.interfaces.MathLibOutput;
-import java.applet.Applet;
/**This is the main interface for the program. Any interface to the MathLib program would access
it through the functions exposed by this class.*/
@@ -30,26 +29,20 @@
/**for testing purposes additional throwing of errors can be enables */
public boolean throwErrorsB = false;
- /**Constructs the interpreter and sets the constants
- * @param _runningStandalone = true if this is being used from an application
- */
- public Interpreter(boolean _runningStandalone)
- {
- this(_runningStandalone, null);
- }
-
- /**Constructs the interpreter and sets the constants
+ /**
+ * Constructs the interpreter and sets the constants
* @param _runningStandalone = true if this is being used from an application
- * @param _applet pointer to applet structure if this is an applet and not an
- * application
*/
- public Interpreter(boolean _runningStandalone, Applet _applet)
+ public Interpreter(boolean _runningStandalone)
{
- runningStandalone = _runningStandalone;
+ // indicator if this is a stand alone application or
+ // if JMathLib is running as an applet or servlet or ... without
+ // direct access to the file system
+ runningStandalone = _runningStandalone;
// initialize global pointers, this pointer will be passed to
// all expressions for access to function manager, variable lists, contexts,...
- globals = new GlobalValues(this, runningStandalone, _applet);;
+ globals = new GlobalValues(this, runningStandalone);
// set output panel to NULL
// ?? needed? outputPanel is initialized with NULl anyway (see above)
@@ -60,7 +53,8 @@
}
- /**sets the panel to write any text to
+ /**
+ * sets the panel to write any text to
* @param _outputPanel = the panel to write to, must implement the
* MathLibOutput interface
*/
@@ -69,7 +63,8 @@
outputPanel = _outputPanel;
}
- /**returns the panel to write any text to
+ /**
+ * returns the panel to write any text to
* @return outputPanel = the panel to write to
*/
public MathLibOutput getOutputPanel()
@@ -77,7 +72,8 @@
return outputPanel;
}
- /**displays a string to the outputPanel
+ /**
+ * displays a string to the outputPanel
* @param text = the text to display
*/
public void displayText(String text)
@@ -86,7 +82,8 @@
outputPanel.displayText(text);
}
- /**saves the variable list
+ /**
+ * saves the variable list
*/
public void save()
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-08 16:46:19
|
Revision: 834
http://mathlib.svn.sourceforge.net/mathlib/?rev=834&view=rev
Author: st_mueller
Date: 2009-02-08 16:46:13 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
removed applet-parameter from Interpreter-constructor
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/applet/JMathLibGUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/applet/JMathLibGUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/applet/JMathLibGUI.java 2009-02-08 16:45:39 UTC (rev 833)
+++ JMathLib/trunk/src/jmathlib/ui/applet/JMathLibGUI.java 2009-02-08 16:46:13 UTC (rev 834)
@@ -58,7 +58,7 @@
container.add("Center", answer);
- interpreter = new Interpreter(false, this);
+ interpreter = new Interpreter(false);
interpreter.setOutputPanel(answer);
interpreter.executeExpression("startup");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-08 16:45:50
|
Revision: 833
http://mathlib.svn.sourceforge.net/mathlib/?rev=833&view=rev
Author: st_mueller
Date: 2009-02-08 16:45:39 +0000 (Sun, 08 Feb 2009)
Log Message:
-----------
removed applet-parameter from Interpreter-constructor
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/text/TextUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-02-05 21:39:14 UTC (rev 832)
+++ JMathLib/trunk/src/jmathlib/ui/text/TextUI.java 2009-02-08 16:45:39 UTC (rev 833)
@@ -29,7 +29,7 @@
functionCode = "";
exiting = false;
- interpreter = new Interpreter(true, null);
+ interpreter = new Interpreter(true);
interpreter.setOutputPanel(this);
interpreter.executeExpression("startup");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-05 22:29:14
|
Revision: 832
http://mathlib.svn.sourceforge.net/mathlib/?rev=832&view=rev
Author: st_mueller
Date: 2009-02-05 21:39:14 +0000 (Thu, 05 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/ControlException.java
JMathLib/trunk/src/jmathlib/core/interpreter/ErrorLogger.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/ControlException.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/ControlException.java 2009-02-04 19:52:35 UTC (rev 831)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/ControlException.java 2009-02-05 21:39:14 UTC (rev 832)
@@ -1,3 +1,11 @@
+/*
+ * This file is part or JMathLib
+ *
+ * Check it out at http://www.jmathlib.de
+ *
+ * Author:
+ * (c) 2002-2009
+ */
package jmathlib.core.interpreter;
import jmathlib.core.tokens.OperandToken;
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/ErrorLogger.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/ErrorLogger.java 2009-02-04 19:52:35 UTC (rev 831)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/ErrorLogger.java 2009-02-05 21:39:14 UTC (rev 832)
@@ -1,3 +1,11 @@
+/*
+ * This file is part or JMathLib
+ *
+ * Check it out at http://www.jmathlib.de
+ *
+ * Author:
+ * (c) 2002-2009
+ */
package jmathlib.core.interpreter;
import java.io.*;
@@ -20,15 +28,19 @@
return debugB;
}
- /**sets the debug flag
- @param _debug = should debug information be displayed*/
+ /**
+ * sets the debug flag
+ * @param _debug = should debug information be displayed
+ */
public static void setDebug(boolean _debug)
{
debugB = _debug;
}
- /**display a debug line to the standard output and the file MathLib.log
- @param text = the text to display*/
+ /**
+ * display a debug line to the standard output and the file MathLib.log
+ * @param text = the text to display
+ */
public static void debugLine(String text)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-04 19:52:37
|
Revision: 831
http://mathlib.svn.sourceforge.net/mathlib/?rev=831&view=rev
Author: st_mueller
Date: 2009-02-04 19:52:35 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
bugfix for a++ and a--
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java
JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java
JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java 2009-02-04 18:35:59 UTC (rev 830)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java 2009-02-04 19:52:35 UTC (rev 831)
@@ -859,9 +859,9 @@
/***********************************************************************************/
- /** parse <operand><operator> (e.g. 3! or !(a<3)) */
- /* @param */
- /* @param */
+ /** parse <operand><operator> (e.g. 3! or !(a<3)) */
+ /* @param */
+ /* @param */
/* @return */
private OperandToken parseUnaryOperator(Token nextToken, Stack operandStack)
{
Modified: JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java 2009-02-04 18:35:59 UTC (rev 830)
+++ JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java 2009-02-04 19:52:35 UTC (rev 831)
@@ -47,6 +47,7 @@
case '-':
{
// -- operator
+ // e.g. "a--" first return "a" then decrement by 1
// check if operand is a variable (e.g. a--, bar--)
if(operand instanceof VariableToken)
@@ -62,7 +63,7 @@
//getVariables().getVariable(variable).assign(op);
globals.getVariable(variable).assign(op);
- return op;
+ return result;
}
else if(operand instanceof NumberToken)
{
@@ -77,7 +78,9 @@
case '+':
{
// ++ operator
+ // e.g. "a++" first return "a" then increment by 1
+
// check if operand is a variable (e.g. a++, bar++)
if(operand instanceof VariableToken)
{
@@ -92,7 +95,7 @@
//getVariables().getVariable(variable).assign(op);
globals.getVariable(variable).assign(op);
- return op;
+ return result;
}
else if(operand instanceof NumberToken)
{
Modified: JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java 2009-02-04 18:35:59 UTC (rev 830)
+++ JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java 2009-02-04 19:52:35 UTC (rev 831)
@@ -94,12 +94,15 @@
ml.executeExpression("clear(1)");
ml.executeExpression("a=1");
ml.executeExpression("y=[11,22,33,44,55]");
- ml.executeExpression("y(a++)=77");
+ ml.executeExpression("y(a++)=77"); // "a" will be incremented after indexing
+ // y=[77,22,33,44,55]
ml.executeExpression("b=y(2)");
ml.executeExpression("c=y(a)");
- assertTrue(77.0 == ml.getScalarValueRe("b"));
+ ml.executeExpression("d=y(1)");
+ assertTrue(22.0 == ml.getScalarValueRe("b"));
assertTrue( 2.0 == ml.getScalarValueRe("a"));
- assertTrue(77.0 == ml.getScalarValueRe("c"));
+ assertTrue(22.0 == ml.getScalarValueRe("c"));
+ assertTrue(77.0 == ml.getScalarValueRe("d"));
}
// --
@@ -107,13 +110,16 @@
ml.executeExpression("clear(1)");
ml.executeExpression("a=4");
ml.executeExpression("y=[11,22,33,44,55]");
- ml.executeExpression("y(a--)=88");
+ ml.executeExpression("y(a--)=88"); // decrement will be executed after index operation
+ // y=[11,22,33,88,55]
assertTrue( 3.0 == ml.getScalarValueRe("a"));
ml.executeExpression("b=y(3)");
+ assertTrue(33.0 == ml.getScalarValueRe("b"));
+ ml.executeExpression("b=y(4)");
+ assertTrue(88.0 == ml.getScalarValueRe("b"));
ml.executeExpression("c=y(a--)");
assertTrue( 2.0 == ml.getScalarValueRe("a"));
- assertTrue(88.0 == ml.getScalarValueRe("b"));
- assertTrue(22.0 == ml.getScalarValueRe("c"));
+ assertTrue(33.0 == ml.getScalarValueRe("c"));
}
public void test460() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-04 18:36:07
|
Revision: 830
http://mathlib.svn.sourceforge.net/mathlib/?rev=830&view=rev
Author: st_mueller
Date: 2009-02-04 18:35:59 +0000 (Wed, 04 Feb 2009)
Log Message:
-----------
bugfix for a++ and a--
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java
Modified: JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java 2009-02-03 22:15:48 UTC (rev 829)
+++ JMathLib/trunk/src/jmathlib/core/interpreter/Parser.java 2009-02-04 18:35:59 UTC (rev 830)
@@ -398,10 +398,19 @@
{
// += or -=
ErrorLogger.debugLine("Parser: += or -=");
- nextToken = getNextToken(deliTyp);
- retToken = parseAssignmentOperator(nextToken, operandStack);
+ getNextToken(deliTyp);
+ retToken = parseAssignmentOperator(nextToken, operandStack);
}
+ else if((nextToken instanceof MulDivOperatorToken) &&
+ (pToken instanceof AssignmentOperatorToken))
+ {
+ // *= or /=
+ ErrorLogger.debugLine("Parser: *= or /=");
+ getNextToken(deliTyp);
+ retToken = parseAssignmentOperator(nextToken, operandStack);
+
+ }
else if( (nextToken instanceof AddSubOperatorToken)
|| (nextToken instanceof MulDivOperatorToken)
|| (nextToken instanceof PowerOperatorToken)
@@ -641,6 +650,7 @@
private OperandToken parseAssignmentOperator(Token currentToken, Stack operandStack)
{
// operator (this should be a "=" or ("+" for +=) or ("-" for -=))
+ // or "*" for *= or "/" for /=
OperatorToken operator = (OperatorToken)currentToken;
//parse right parameter
@@ -658,11 +668,20 @@
}
else if (currentToken instanceof AddSubOperatorToken)
{
- // e.g. a+=8
- tree = new Expression(operator, rightSide, new DoubleNumberToken(1.0));
+ // e.g. a+=8 -> a=a+8
+ // e.g. a-=7 -> a=a-7
+ ErrorLogger.debugLine("Parser: += or -=");
+ tree = new Expression(operator, leftSide, rightSide);
tree = new Expression(new AssignmentOperatorToken(), leftSide, tree);
- // ???????
}
+ else if (currentToken instanceof MulDivOperatorToken)
+ {
+ // e.g. a*=8 -> a=a*8
+ // e.g. a/=9 -> a=a/9
+ ErrorLogger.debugLine("Parser: *= or /=");
+ tree = new Expression(operator, leftSide, rightSide);
+ tree = new Expression(new AssignmentOperatorToken(), leftSide, tree);
+ }
return tree;
} // end parseAssignmentOperator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-03 22:15:56
|
Revision: 829
http://mathlib.svn.sourceforge.net/mathlib/?rev=829&view=rev
Author: st_mueller
Date: 2009-02-03 22:15:48 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
bugfix for a++ and a--
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java
Modified: JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java 2009-02-03 22:15:28 UTC (rev 828)
+++ JMathLib/trunk/src/jmathlib/core/tokens/UnaryOperatorToken.java 2009-02-03 22:15:48 UTC (rev 829)
@@ -61,6 +61,8 @@
String variable = ((VariableToken)operand).getName();
//getVariables().getVariable(variable).assign(op);
globals.getVariable(variable).assign(op);
+
+ return op;
}
else if(operand instanceof NumberToken)
{
@@ -89,6 +91,8 @@
String variable = ((VariableToken)operand).getName();
//getVariables().getVariable(variable).assign(op);
globals.getVariable(variable).assign(op);
+
+ return op;
}
else if(operand instanceof NumberToken)
{
@@ -106,12 +110,7 @@
}
}
- //if(result == null)
- //{
- // //return origional expression
- // result = new Expression(this, operand);
- //}
- return result;
+ return result;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-03 22:15:44
|
Revision: 828
http://mathlib.svn.sourceforge.net/mathlib/?rev=828&view=rev
Author: st_mueller
Date: 2009-02-03 22:15:28 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
bugfix for a++ and a--
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java
Modified: JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java 2009-02-03 20:09:22 UTC (rev 827)
+++ JMathLib/trunk/src/jmathlibtests/core/tokens/testUnaryOperatorToken.java 2009-02-03 22:15:28 UTC (rev 828)
@@ -95,11 +95,11 @@
ml.executeExpression("a=1");
ml.executeExpression("y=[11,22,33,44,55]");
ml.executeExpression("y(a++)=77");
- ml.executeExpression("b=y(1)");
+ ml.executeExpression("b=y(2)");
ml.executeExpression("c=y(a)");
assertTrue(77.0 == ml.getScalarValueRe("b"));
assertTrue( 2.0 == ml.getScalarValueRe("a"));
- assertTrue(22.0 == ml.getScalarValueRe("c"));
+ assertTrue(77.0 == ml.getScalarValueRe("c"));
}
// --
@@ -108,11 +108,12 @@
ml.executeExpression("a=4");
ml.executeExpression("y=[11,22,33,44,55]");
ml.executeExpression("y(a--)=88");
- ml.executeExpression("b=y(4)");
- ml.executeExpression("c=y(a)");
+ assertTrue( 3.0 == ml.getScalarValueRe("a"));
+ ml.executeExpression("b=y(3)");
+ ml.executeExpression("c=y(a--)");
+ assertTrue( 2.0 == ml.getScalarValueRe("a"));
assertTrue(88.0 == ml.getScalarValueRe("b"));
- assertTrue( 3.0 == ml.getScalarValueRe("a"));
- assertTrue(33.0 == ml.getScalarValueRe("c"));
+ assertTrue(22.0 == ml.getScalarValueRe("c"));
}
public void test460() {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-03 20:09:28
|
Revision: 827
http://mathlib.svn.sourceforge.net/mathlib/?rev=827&view=rev
Author: st_mueller
Date: 2009-02-03 20:09:22 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/src/jmathlibtests/core/interpreter/testParser.java
Modified: JMathLib/trunk/src/jmathlibtests/core/interpreter/testParser.java
===================================================================
--- JMathLib/trunk/src/jmathlibtests/core/interpreter/testParser.java 2009-02-01 21:03:14 UTC (rev 826)
+++ JMathLib/trunk/src/jmathlibtests/core/interpreter/testParser.java 2009-02-03 20:09:22 UTC (rev 827)
@@ -332,6 +332,75 @@
assertEquals(-1.0, ml.getScalarValueRe("a"), 0.001);
}
+
+ public void testPlusPlus01() {
+ ml.executeExpression("a=5;");
+ ml.executeExpression("a++;");
+ assertEquals(6.0, ml.getScalarValueRe("a"), 0.001);
+ }
+ public void testPlusPlus02() {
+ ml.executeExpression("58++;");
+ assertEquals(59.0, ml.getScalarValueRe("ans"), 0.001);
+ }
+
+ public void testMinusMinus01() {
+ ml.executeExpression("a=5;");
+ ml.executeExpression("a--;");
+ assertEquals(4.0, ml.getScalarValueRe("a"), 0.001);
+ }
+ public void testMinusMinus02() {
+ ml.executeExpression("58--;");
+ assertEquals(57.0, ml.getScalarValueRe("ans"), 0.001);
+ }
+
+ public void testPlusAssign01() {
+ ml.executeExpression("a=5;");
+ ml.executeExpression("a+=3;");
+ assertEquals(8.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testPlusAssign02() {
+ ml.executeExpression("a=23;");
+ ml.executeExpression("a+=8;");
+ assertEquals(31.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testMinusAssign01() {
+ ml.executeExpression("a=55;");
+ ml.executeExpression("a-=3;");
+ assertEquals(52.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testMinusAssign02() {
+ ml.executeExpression("a=40;");
+ ml.executeExpression("a-=8;");
+ assertEquals(32.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testMulAssign01() {
+ ml.executeExpression("a=5;");
+ ml.executeExpression("a*=3;");
+ assertEquals(15.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testMulAssign02() {
+ ml.executeExpression("a=40;");
+ ml.executeExpression("a*=2;");
+ assertEquals(80.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testDivAssign01() {
+ ml.executeExpression("a=9;");
+ ml.executeExpression("a/=3;");
+ assertEquals(3.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
+ public void testDivAssign02() {
+ ml.executeExpression("a=40;");
+ ml.executeExpression("a/=2;");
+ assertEquals(20.0, ml.getScalarValueRe("a"), 0.001);
+ }
+
/************* matrix ****************************************/
public void testMatrix01() {
double[][] dr = {{1.0, 2.0, 1.0},{3.0, 4.0, 5.0}};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 21:03:20
|
Revision: 826
http://mathlib.svn.sourceforge.net/mathlib/?rev=826&view=rev
Author: st_mueller
Date: 2009-02-01 21:03:14 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
addeds support for "cut","copy","paste"
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/ui/awt/GUI.java
Modified: JMathLib/trunk/src/jmathlib/ui/awt/GUI.java
===================================================================
--- JMathLib/trunk/src/jmathlib/ui/awt/GUI.java 2009-02-01 21:02:30 UTC (rev 825)
+++ JMathLib/trunk/src/jmathlib/ui/awt/GUI.java 2009-02-01 21:03:14 UTC (rev 826)
@@ -1,17 +1,18 @@
package jmathlib.ui.awt;
import jmathlib.core.interfaces.RemoteAccesible;
+import jmathlib.core.interpreter.ErrorLogger;
import jmathlib.core.interpreter.Interpreter;
-//import jmathlib.ui.common.console;
import java.awt.*;
import java.awt.event.*;
+import java.awt.datatransfer.*;
/**
- * Simple GUI for the MathLib package.
+ * Simple GUI for the JMathLib package.
* Some options may be given in the command line, by example:
- * <kbd>localhost# java MathLib.GUI.GUI -width=320 -height=200</kbd>.
+ * <kbd>localhost# java jmathlib.ui.awt.GUI -width=320 -height=200</kbd>.
* <p>
* <b>Command line options</b>
* <ul>
@@ -20,7 +21,7 @@
* </ul>
* </p>
*/
-public class GUI extends Frame implements WindowListener, ActionListener, RemoteAccesible
+public class GUI extends Frame implements WindowListener, ActionListener, RemoteAccesible, ClipboardOwner
{
/*The menubar container.*/
private MenuBar mainMenuBar;
@@ -46,9 +47,6 @@
/**Constant with the application title.*/
private final String TITLE="JMathLib GUI";
- /**Flag storing whether the program is running as an application or an applet*/
- private boolean runningStandalone;
-
/**The area used for user input and where the answers are displayed*/
private Console answer;
@@ -62,6 +60,7 @@
if (o == newFileMenuItem)
{
+
}
else if (o == openFileMenuItem)
{
@@ -86,16 +85,48 @@
}
else if (o == exitFileMenuItem)
{
- close();
+ close();
}
else if (o == cutEditMenuItem)
{
+ // get text from textarea
+ String s = answer.getSelectedText();
+
+ // replace selected text with empty string
+ answer.replaceRange("", answer.getSelectionStart(), answer.getSelectionEnd());
+
+ // copy selected string to system clipboard
+ StringSelection sel = new StringSelection(s);
+ Clipboard clip = getToolkit().getSystemClipboard();
+ clip.setContents(sel, this);
}
- else if (o == copyEditMenuItem)
+ else if (o == copyEditMenuItem)
{
+ // get text from textarea
+ String s = answer.getSelectedText();
+
+ // copy selected string to system clipboard
+ StringSelection sel = new StringSelection(s);
+ Clipboard clip = getToolkit().getSystemClipboard();
+ clip.setContents(sel, this);
}
else if (o == pasteEditMenuItem)
{
+ // paste from system clipboard to textarea
+ Clipboard clip = getToolkit().getSystemClipboard();
+ Transferable cont = clip.getContents(this);
+ if (cont!=null)
+ {
+ try
+ {
+ String s = (String)cont.getTransferData(DataFlavor.stringFlavor);
+ answer.insert(s, answer.getCaretPosition());
+ }
+ catch (Exception ex)
+ {
+ ErrorLogger.debugLine("clipboard not STRING");
+ }
+ }
}
else if (o == aboutHelpMenuItem)
{
@@ -113,10 +144,17 @@
plotWindowMenuItem.setEnabled(false);
consoleWindowMenuItem.setEnabled(true);
}
+ } // end actionPerformed
+
+ /**
+ * @param
+ * @param
+ */
+ public void lostOwnership(Clipboard clip, Transferable cont)
+ {
+ ErrorLogger.debugLine("clipboard has been changed");
}
-
-
/**
* Command-line parameter handler
* Takes control of the size of the main window
@@ -165,6 +203,7 @@
else
System.out.println(args[i] + ": Invalid option.");
}
+
// Let's resize the window...
Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
if (width == -1)
@@ -184,75 +223,71 @@
this.dispose();
System.exit(0);
}
-
/**Create the main graphical interface (menu, buttons, delays...).*/
public GUI(String[] args)
{
- //this is an application, so set to true
- runningStandalone = true;
- this.argumentHandler(args);
+ this.argumentHandler(args);
- this.setVisible(false);
- this.setLayout(new BorderLayout());
- this.setBackground(new Color(214,211,206));
- //Get the size of the screen
- Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
- //position the frame in the centre of the screen
- this.setLocation((d.width-getSize().width) / 2,
- (d.height-getSize().height) / 2);
- this.addWindowListener(this);
- this.setResizable(true);
- this.setVisible(true);
-
- // add image to window
- Toolkit tk = Toolkit.getDefaultToolkit();
- Image icon = tk.getImage(GUI.class.getResource("smalllogo.gif"));
- MediaTracker mt = new MediaTracker(this);
- mt.addImage(icon,0);
- try {
- mt.waitForAll();
- }
- catch (InterruptedException e){ ;}
- this.setIconImage(icon);
-
- this.setTitle(TITLE + " [1/4] Initializing menus");
- InitMenuBar(this);
+ this.setVisible(false);
+ this.setLayout(new BorderLayout());
+ this.setBackground(new Color(214,211,206));
+ //Get the size of the screen
+ Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
+ //position the frame in the centre of the screen
+ this.setLocation((d.width-getSize().width) / 2,
+ (d.height-getSize().height) / 2);
+ this.addWindowListener(this);
+ this.setResizable(true);
+ this.setVisible(true);
+
+ // add image to window
+ Toolkit tk = Toolkit.getDefaultToolkit();
+ Image icon = tk.getImage(GUI.class.getResource("smalllogo.gif"));
+ MediaTracker mt = new MediaTracker(this);
+ mt.addImage(icon,0);
+ try {
+ mt.waitForAll();
+ }
+ catch (InterruptedException e){ ;}
+ this.setIconImage(icon);
+
+ this.setTitle(TITLE + " [1/4] Initializing menus");
+ InitMenuBar(this);
- this.setTitle(TITLE + " [2/4] Initializing console window");
- InitConsole();
+ this.setTitle(TITLE + " [2/4] Initializing console window");
+ InitConsole();
- this.setTitle(TITLE + " [3/4] Initializing interpreter");
- interpreter = new Interpreter(runningStandalone);
- interpreter.setOutputPanel(answer);
-
-
- this.setTitle(TITLE + " - [4/4] running startup script");
- interpreter.executeExpression("startup;");
- //interpreter.executeExpression("messageoftheday");
- answer.displayPrompt();
+ this.setTitle(TITLE + " [3/4] Initializing interpreter");
+ interpreter = new Interpreter(true);
+ interpreter.setOutputPanel(answer);
+
+
+ this.setTitle(TITLE + " - [4/4] running startup script");
+ interpreter.executeExpression("startup;");
+ //interpreter.executeExpression("messageoftheday");
+ answer.displayPrompt();
- // silent check for updates
- interpreter.executeExpression("checkforupdates('-silent')");
+ // silent check for updates
+ interpreter.executeExpression("checkforupdates('-silent')");
- this.setTitle(TITLE + " - Console Window");
+ this.setTitle(TITLE + " - Console Window");
- // in case an update is available inform the user
- String u = interpreter.globals.getProperty("update.newversionavailable");
- if ((u!=null) && u.equals("yes"))
- {
- this.setTitle(TITLE + " - (NEW version available: type update at prompt)");
- String s = interpreter.globals.getProperty("update.newversionavailable.message01");
- if (s==null)
- answer.displayText("A NEW version of JMathLib is available\n type update or visit www.jmathlib.de");
- else
- answer.displayText(s);
-
- answer.displayPrompt();
- }
+ // in case an update is available inform the user
+ String u = interpreter.globals.getProperty("update.newversionavailable");
+ if ((u!=null) && u.equals("yes"))
+ {
+ this.setTitle(TITLE + " - (NEW version available: type update at prompt)");
+ String s = interpreter.globals.getProperty("update.newversionavailable.message01");
+ if (s==null)
+ answer.displayText("A NEW version of JMathLib is available\n type update or visit www.jmathlib.de");
+ else
+ answer.displayText(s);
+ answer.displayPrompt();
+ }
- }
+ } // end GUI
/**The main console initializer.*/
private void InitConsole()
@@ -280,35 +315,51 @@
separator1 = new MenuItem("-");
separator2 = new MenuItem("-");
+
newFileMenuItem = new MenuItem("New");
newFileMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_N));
newFileMenuItem.addActionListener(listener);
+
openFileMenuItem = new MenuItem("Open");
openFileMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_O));
openFileMenuItem.addActionListener(listener);
+
saveFileMenuItem = new MenuItem("Save");
saveFileMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_S));
saveFileMenuItem.addActionListener(listener);
+
saveAsFileMenuItem = new MenuItem("Save as...");
saveAsFileMenuItem.addActionListener(listener);
+
checkForUpdatesMenuItem = new MenuItem("Check for updates");
checkForUpdatesMenuItem.addActionListener(listener);
+
exitFileMenuItem = new MenuItem("Exit");
exitFileMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_E));
exitFileMenuItem.addActionListener(listener);
+
cutEditMenuItem = new MenuItem("Cut");
+ cutEditMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_X));
cutEditMenuItem.addActionListener(listener);
+
copyEditMenuItem = new MenuItem("Copy");
+ copyEditMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_C));
copyEditMenuItem.addActionListener(listener);
+
pasteEditMenuItem = new MenuItem("Paste");
+ pasteEditMenuItem.setShortcut(new MenuShortcut(KeyEvent.VK_V));
pasteEditMenuItem.addActionListener(listener);
+
consoleWindowMenuItem = new MenuItem("Console Window");
consoleWindowMenuItem.setEnabled(false);
consoleWindowMenuItem.addActionListener(listener);
+
plotWindowMenuItem = new MenuItem("Plot Window");
plotWindowMenuItem.addActionListener(listener);
+
aboutHelpMenuItem = new MenuItem("About...");
aboutHelpMenuItem.addActionListener(listener);
+
fileMenu.add(newFileMenuItem);
fileMenu.add(openFileMenuItem);
fileMenu.add(separator1);
@@ -328,7 +379,10 @@
this.setMenuBar(mainMenuBar);
}
- /**Interpret the last command line entered*/
+ /**
+ * Interpret the last command line entered
+ * @param
+ */
public void interpretLine(String line)
{
String answerString = interpreter.executeExpression(line);
@@ -336,36 +390,61 @@
answer.displayPrompt();
}
+ /**
+ *
+ * @param args
+ */
public static void main (String[] args)
{
- GUI myGui = new GUI(args);
+ GUI gui = new GUI(args);
}
+ /**
+ *
+ */
public void windowActivated(WindowEvent e)
{
}
+ /**
+ *
+ */
public void windowClosed(WindowEvent e)
{
}
+ /**
+ *
+ */
public void windowClosing(WindowEvent e)
{
close();
}
+ /**
+ *
+ */
public void windowDeactivated(WindowEvent e)
{
}
+ /**
+ *
+ */
public void windowDeiconified(WindowEvent e)
{
}
+ /**
+ *
+ */
public void windowIconified(WindowEvent e)
{
}
+ /**
+ *
+ */
public void windowOpened(WindowEvent e)
{
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 21:02:33
|
Revision: 825
http://mathlib.svn.sourceforge.net/mathlib/?rev=825&view=rev
Author: st_mueller
Date: 2009-02-01 21:02:30 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/ChangeLog.txt
Modified: JMathLib/trunk/ChangeLog.txt
===================================================================
--- JMathLib/trunk/ChangeLog.txt 2009-02-01 18:17:35 UTC (rev 824)
+++ JMathLib/trunk/ChangeLog.txt 2009-02-01 21:02:30 UTC (rev 825)
@@ -9,14 +9,15 @@
---- HISTORY ------------------------------------------------------------------
2009/02/xx stefan:
-2009/02/01 stefan: added a directory for temporary file /tmp
- changed the doc-build in order to facilitate the /tmp
+2009/02/01 stefan: Added "cut","paste","copy" to AWT GUI.
+ Added "ctrl-x","ctrl-v","ctrl-c" to AWT GUI.
+2009/02/01 stefan: Added a directory for temporary file /tmp
+ Changed the doc-build in order to facilitate the /tmp
directory.
-
-2009/02/01 stefan: changed location of webfunctionslist.dat from being
+2009/02/01 stefan: Changed location of webfunctionslist.dat from being
in bin/jmathlib to beeing in bin/
-2009/01/31 stefan: changed handling of properties. Moved JMathLib.properties
+2009/01/31 stefan: Changed handling of properties. Moved JMathLib.properties
to src/JMathLib.properties. On first start of JMathLib
it checks if it finds JMathLib.properties in root, if not
it will load the file from the bin/JMathLib.properties file.
@@ -24,14 +25,14 @@
The applet version always reads from the bin/ directory,
it cannot save the properties back to the web server anyway.
-2009/01/30 stefan: changed handling of properties
- removed getLocalProperty, setLocalProperty
- renamed getGlobalProperty into getProperty
- renamed setGlobalProperty into setProperty
+2009/01/30 stefan: Changed handling of properties
+ Removed getLocalProperty, setLocalProperty
+ Renamed getGlobalProperty into getProperty
+ Renamed setGlobalProperty into setProperty
JMathLib.local.properties is obsolete
JMathLib.propertis is the master now
-2009/01/26 stefan: changed MathLibException into JMathLibException
+2009/01/26 stefan: Changed MathLibException into JMathLibException
2009/01/25 stefan: JMathLib has not been thread save for more than one
instance of Interpreter.class. I removed the static
@@ -41,29 +42,30 @@
2009/01/09 stefan: Changed the parser, now parsing of cd somedirectory
is possible. Also cd("somedirectory") still works.
-2009/01/04 stefan: added the euler number to VariableToken.java as predefined
+2009/01/04 stefan: Added the euler number to VariableToken.java as predefined
variable
+
2009/01/04 stefan: pi.int documentation for pi
2009/01/04 stefan: e.int documentation for euler number
-2008/12/31 stefan: added toolbox/jmathlib/system/quit.java
-2008/12/31 stefan: added toolbox/jmathlib/system/exit.m
-2008/12/31 stefan: added toolbox/jmathlib/io/pwd.java
+2008/12/31 stefan: Added toolbox/jmathlib/system/quit.java
+2008/12/31 stefan: Added toolbox/jmathlib/system/exit.m
+2008/12/31 stefan: Added toolbox/jmathlib/io/pwd.java
-2008/12/30 stefan: added jmathlib/ui/text/TextUI.java first version of textual
+2008/12/30 stefan: Added jmathlib/ui/text/TextUI.java first version of textual
user interface.
2008/12/28 stefan: jmathlib/ui/applet/JMathLibGUI.java code cleanup and bugfixing
-2008/12/27 stefan: moved code from MFileWebLoader.java to WebFunctionLoader.java
-2008/12/27 stefan: removed MFileWebLoader.java
-2008/12/27 stefan: added plusplus.int describing the ++ command
-2008/12/27 stefan: added minusminus.int describing the -- command
-2008/12/27 stefan: bugfix for DoubleNumberToken.java support for
+2008/12/27 stefan: Moved code from MFileWebLoader.java to WebFunctionLoader.java
+2008/12/27 stefan: Removed MFileWebLoader.java
+2008/12/27 stefan: Added plusplus.int describing the ++ command
+2008/12/27 stefan: Added minusminus.int describing the -- command
+2008/12/27 stefan: Bugfix for DoubleNumberToken.java support for
[1,0,3].^0 = [1,1,1] and 0.^[1,0,2] = [0,1,0]
-2008/12/26 stefan: added toolbox/jmathlib/system/format.java for formatting numbers
-2008/12/26 stefan: changed GlobalValues.java RootObject.java for formatting numbers
+2008/12/26 stefan: Added toolbox/jmathlib/system/format.java for formatting numbers
+2008/12/26 stefan: Changed GlobalValues.java RootObject.java for formatting numbers
2008/12/15 stefan: added jmathlib.sh for starting JMathLib on unix
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 18:17:40
|
Revision: 824
http://mathlib.svn.sourceforge.net/mathlib/?rev=824&view=rev
Author: st_mueller
Date: 2009-02-01 18:17:35 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/build.properties
Modified: JMathLib/trunk/build.properties
===================================================================
--- JMathLib/trunk/build.properties 2009-02-01 17:42:22 UTC (rev 823)
+++ JMathLib/trunk/build.properties 2009-02-01 18:17:35 UTC (rev 824)
@@ -31,7 +31,7 @@
dist.dir = ${build.dir}/upload/jmathlib
web.dest = ${build.dir}/upload/website
-packages=MathLib.Tokens,MathLib.Interpreter,MathLib.Functions,MathLib.Casts,MathLib.GUI,MathLib.Functions.Matrix,MathLib.Functions.Graphics,MathLib.Functions.General,MathLib.Functions.IO,MathLib.Functions.Polynomial,MathLib.Functions.String,MathLib.Functions.System,MathLib.Functions.Trigonometric,MathLib.Constants,MathLib.Graphics,MathLib.Functions.Graphics.Graph2d,MathLib.Functions.Graphics.Graph3d,MathLib.TUI
+# packages=MathLib.Tokens,MathLib.Interpreter,MathLib.Functions,MathLib.Casts,MathLib.GUI,MathLib.Functions.Matrix,MathLib.Functions.Graphics,MathLib.Functions.General,MathLib.Functions.IO,MathLib.Functions.Polynomial,MathLib.Functions.String,MathLib.Functions.System,MathLib.Functions.Trigonometric,MathLib.Constants,MathLib.Graphics,MathLib.Functions.Graphics.Graph2d,MathLib.Functions.Graphics.Graph3d,MathLib.TUI
test.class=jmathlibtests.AllTests
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 17:42:24
|
Revision: 823
http://mathlib.svn.sourceforge.net/mathlib/?rev=823&view=rev
Author: st_mueller
Date: 2009-02-01 17:42:22 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
documentation bugfixes
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/specfun/beta.m
JMathLib/trunk/src/jmathlib/toolbox/specfun/betaln.m
Modified: JMathLib/trunk/src/jmathlib/toolbox/specfun/beta.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/specfun/beta.m 2009-02-01 17:38:22 UTC (rev 822)
+++ JMathLib/trunk/src/jmathlib/toolbox/specfun/beta.m 2009-02-01 17:42:22 UTC (rev 823)
@@ -62,5 +62,5 @@
</programlisting>
@NOTES
@SEE
-gammaln, gammainc, betaln
+gammaln, betaln
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/specfun/betaln.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/specfun/betaln.m 2009-02-01 17:38:22 UTC (rev 822)
+++ JMathLib/trunk/src/jmathlib/toolbox/specfun/betaln.m 2009-02-01 17:42:22 UTC (rev 823)
@@ -66,5 +66,5 @@
</programlisting>
@NOTES
@SEE
-gammaln, gammainc, beta
+gammaln, beta
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 17:38:23
|
Revision: 822
http://mathlib.svn.sourceforge.net/mathlib/?rev=822&view=rev
Author: st_mueller
Date: 2009-02-01 17:38:22 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
moved the temporary doc files to /tmp
Modified Paths:
--------------
JMathLib/trunk/build.xml
Modified: JMathLib/trunk/build.xml
===================================================================
--- JMathLib/trunk/build.xml 2009-02-01 17:37:46 UTC (rev 821)
+++ JMathLib/trunk/build.xml 2009-02-01 17:38:22 UTC (rev 822)
@@ -218,7 +218,7 @@
<!-- xml to fo -->
<target name="xmltofo" description="convert xml to fo" depends="">
<java jar="libs/saxon.jar" fork="true">
- <arg line="-o doc/src/doc.fo doc/src/doc.xml
+ <arg line="-o tmp/doc.fo doc/src/doc.xml
doc/DocBook/xsl/fo/docbook.xsl" />
<arg value='paper.type="A4"' />
<arg value='chunk.section.depth="0"' />
@@ -233,7 +233,7 @@
<!-- fo to pdf -->
<target name="fotopdf" description="convert fo to pdf" depends="">
<java jar="libs/fop.jar" fork="true">
- <arg value="doc/src/doc.fo" />
+ <arg value="tmp/doc.fo" />
<arg value='-d' />
<arg value="${upload.dir}/JMathLibManual_${version}.pdf" />
</java>
@@ -374,7 +374,7 @@
<fileset dir="${dist.dir}/bin">
<include name="**" />
<exclude name="JMathLib.properties"/>
- <exclude name="jmathlib/webFunctionsList.dat"/>
+ <exclude name="webFunctionsList.dat"/>
<exclude name="jmathlib/core/functions/FileFunctionLoader.class"/>
<exclude name="jmathlib/core/functions/MFileLoader.class"/>
<exclude name="jmathlib/core/functions/SFunction.class"/>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 17:37:55
|
Revision: 821
http://mathlib.svn.sourceforge.net/mathlib/?rev=821&view=rev
Author: st_mueller
Date: 2009-02-01 17:37:46 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
documentation bugfixes
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/general/global.java
JMathLib/trunk/src/jmathlib/toolbox/general/size.java
JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/global.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/global.java 2009-02-01 17:36:26 UTC (rev 820)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/global.java 2009-02-01 17:37:46 UTC (rev 821)
@@ -121,6 +121,6 @@
</programlisting>
@NOTES
@SEE
-isglobal, isvarname
+isglobal
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/size.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/size.java 2009-02-01 17:36:26 UTC (rev 820)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/size.java 2009-02-01 17:37:46 UTC (rev 821)
@@ -78,6 +78,6 @@
</programlisting>
@NOTES
@SEE
-rowcount, colcount, row, col, ndims
+rows, columns, row, col, ndims
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java 2009-02-01 17:36:26 UTC (rev 820)
+++ JMathLib/trunk/src/jmathlib/toolbox/general/uint8.java 2009-02-01 17:37:46 UTC (rev 821)
@@ -69,7 +69,7 @@
</programlisting>
@SEE
-double, int16, int8, uint16, uint32, uint64
+double, int16, int8, uint16, uint32
*/
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 17:36:28
|
Revision: 820
http://mathlib.svn.sourceforge.net/mathlib/?rev=820&view=rev
Author: st_mueller
Date: 2009-02-01 17:36:26 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
documentation bugfixes
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java
Added Paths:
-----------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/internal/eps.int
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java 2009-02-01 17:35:36 UTC (rev 819)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/cla.java 2009-02-01 17:36:26 UTC (rev 820)
@@ -37,13 +37,13 @@
@GROUP
graphics
@SYNTAX
-clf
+cla
@DOC
clear current figure
@EXAMPLES
.
@NOTES
@SEE
-gca, gco, gcbo, gcbf, cla
+gca, clf, gcf, get, set
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java 2009-02-01 17:35:36 UTC (rev 819)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/clf.java 2009-02-01 17:36:26 UTC (rev 820)
@@ -43,6 +43,6 @@
.
@NOTES
@SEE
-gca, gco, gcbo, gcbf, cla
+gca, cla, gcf, get, set
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java 2009-02-01 17:35:36 UTC (rev 819)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gca.java 2009-02-01 17:36:26 UTC (rev 820)
@@ -33,6 +33,6 @@
.
@NOTES
@SEE
-gcf, gco, gcbo, gcbf
+gcf, get, set
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java 2009-02-01 17:35:36 UTC (rev 819)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/graphics/gcf.java 2009-02-01 17:36:26 UTC (rev 820)
@@ -32,6 +32,6 @@
.
@NOTES
@SEE
-gca, gco, gcbo, gcbf
+gca, get, set
*/
Added: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/internal/eps.int
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/internal/eps.int (rev 0)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/internal/eps.int 2009-02-01 17:36:26 UTC (rev 820)
@@ -0,0 +1,25 @@
+/*
+@GROUP
+general
+@SYNTAX
+eps
+@DOC
+smallest number epsilon
+@EXAMPLES
+<programlisting>
+eps
+</programlisting>
+@NOTES
+.
+@SEE
+e, pi, i, j
+*/
+
+/*
+%!@testcase
+%! ml.executeExpression("clear('all');");
+%! ml.executeExpression("a=eps;");
+%! assertEquals( 0, ml.getScalarValueRe("a"), 0.0001);
+%! assertTrue(0 == ml.getScalarValueIm("a"));
+%!
+*/
\ 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: <st_...@us...> - 2009-02-01 17:35:38
|
Revision: 819
http://mathlib.svn.sourceforge.net/mathlib/?rev=819&view=rev
Author: st_mueller
Date: 2009-02-01 17:35:36 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
documentation bugfixes
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/col.m
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/columns.m
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/row.m
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/rows.m
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/col.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/col.m 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/col.m 2009-02-01 17:35:36 UTC (rev 819)
@@ -16,6 +16,8 @@
col([1,2;3,4], 1) = [1;3]
col([1,2;3,4], 2) = [2;4]
</programlisting>
+@NOTES
+.
@SEE
columns, rows, row
*/
\ No newline at end of file
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/columns.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/columns.m 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/columns.m 2009-02-01 17:35:36 UTC (rev 819)
@@ -12,7 +12,11 @@
@SYNTAX
answer = columns (value)
@DOC
+.
@EXAMPLES
+.
@NOTES
+.
@SEE
+col, row, rows
*/
\ No newline at end of file
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/eye.java 2009-02-01 17:35:36 UTC (rev 819)
@@ -71,6 +71,6 @@
eye(3) = [1,0,0;0,1,0;0,0,1]
</programlisting>
@SEE
-identity
+ones, zeros
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/row.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/row.m 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/row.m 2009-02-01 17:35:36 UTC (rev 819)
@@ -18,6 +18,6 @@
row([1,2;3,4],2) = [3,4]
</programlisting>
@SEE
-col, row, columns
+col, rows, columns
*/
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/rows.m
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/rows.m 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/matrix/rows.m 2009-02-01 17:35:36 UTC (rev 819)
@@ -17,5 +17,5 @@
</programlisting>
@NOTES
@SEE
-
+row, col, columns
*/
\ No newline at end of file
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java 2009-02-01 13:54:21 UTC (rev 818)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java 2009-02-01 17:35:36 UTC (rev 819)
@@ -148,6 +148,6 @@
@EXAMPLES
createfunctionslist()
@SEE
-path, setpath, rmpath
+path, rmpath, update, checkforupdates
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 13:54:23
|
Revision: 818
http://mathlib.svn.sourceforge.net/mathlib/?rev=818&view=rev
Author: st_mueller
Date: 2009-02-01 13:54:21 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/ChangeLog.txt
Modified: JMathLib/trunk/ChangeLog.txt
===================================================================
--- JMathLib/trunk/ChangeLog.txt 2009-02-01 13:51:17 UTC (rev 817)
+++ JMathLib/trunk/ChangeLog.txt 2009-02-01 13:54:21 UTC (rev 818)
@@ -1,14 +1,21 @@
ChangeLog of JMathLib
----- Functional Changes: version 0.9.2 -> 0.x.x ------------------------------
+---- Functional Changes: version 0.9.3 -> 0.x.x ------------------------------
New functions:
Updated functions:
---- HISTORY ------------------------------------------------------------------
-2009/01/xx stefan:
+2009/02/xx stefan:
+2009/02/01 stefan: added a directory for temporary file /tmp
+ changed the doc-build in order to facilitate the /tmp
+ directory.
+
+2009/02/01 stefan: changed location of webfunctionslist.dat from being
+ in bin/jmathlib to beeing in bin/
+
2009/01/31 stefan: changed handling of properties. Moved JMathLib.properties
to src/JMathLib.properties. On first start of JMathLib
it checks if it finds JMathLib.properties in root, if not
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 13:51:21
|
Revision: 817
http://mathlib.svn.sourceforge.net/mathlib/?rev=817&view=rev
Author: st_mueller
Date: 2009-02-01 13:51:17 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
moved the temporary doc files to /tmp
Modified Paths:
--------------
JMathLib/trunk/doc/src/doc.xml
Modified: JMathLib/trunk/doc/src/doc.xml
===================================================================
--- JMathLib/trunk/doc/src/doc.xml 2009-02-01 13:51:09 UTC (rev 816)
+++ JMathLib/trunk/doc/src/doc.xml 2009-02-01 13:51:17 UTC (rev 817)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!DOCTYPE book SYSTEM "../DocBook/v4.5/docbookx.dtd" [
<!ENTITY preface SYSTEM "preface.xml">
- <!ENTITY functions SYSTEM "functions.xml">
+ <!ENTITY functions SYSTEM "../../tmp/functions.xml">
<!ENTITY license SYSTEM "lgpl.xml">
<!ENTITY faq SYSTEM "faq.xml">
<!ENTITY history SYSTEM "history.xml">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 13:51:13
|
Revision: 816
http://mathlib.svn.sourceforge.net/mathlib/?rev=816&view=rev
Author: st_mueller
Date: 2009-02-01 13:51:09 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
moved the temporary doc files to /tmp
Modified Paths:
--------------
JMathLib/trunk/doc/tools/builddocs.bat
Modified: JMathLib/trunk/doc/tools/builddocs.bat
===================================================================
--- JMathLib/trunk/doc/tools/builddocs.bat 2009-02-01 12:44:26 UTC (rev 815)
+++ JMathLib/trunk/doc/tools/builddocs.bat 2009-02-01 13:51:09 UTC (rev 816)
@@ -1,15 +1,19 @@
rem
-cd doc\
+cd tmp
mkdir functions
+cd ..
+cd doc\
+
+
cd tools\
echo "building function docs"
-perl createdocs.pl ../functions/ ../../src/jmathlib/toolbox
+perl createdocs.pl ../../tmp/functions/ ../../src/jmathlib/toolbox
echo "creating alphabetical list"
-perl createdoclist_xml.pl ../src ../functions
+perl createdoclist_xml.pl ../../tmp ../../tmp/functions
rem echo "creating bug/ to-do and history list"
rem perl createtdbh.pl
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 12:44:29
|
Revision: 815
http://mathlib.svn.sourceforge.net/mathlib/?rev=815&view=rev
Author: st_mueller
Date: 2009-02-01 12:44:26 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
directory for temporary data
Added Paths:
-----------
JMathLib/trunk/tmp/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 12:43:14
|
Revision: 814
http://mathlib.svn.sourceforge.net/mathlib/?rev=814&view=rev
Author: st_mueller
Date: 2009-02-01 12:43:08 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
added all libs for creating the documentation files to SVN
Added Paths:
-----------
JMathLib/trunk/libs/
JMathLib/trunk/libs/avalon-framework-4.2.0.jar
JMathLib/trunk/libs/batik-all-1.7.jar
JMathLib/trunk/libs/commons-io-1.3.1.jar
JMathLib/trunk/libs/commons-logging-1.0.4.jar
JMathLib/trunk/libs/fop.jar
JMathLib/trunk/libs/saxon-jdom.jar
JMathLib/trunk/libs/saxon-xml-apis.jar
JMathLib/trunk/libs/saxon.jar
JMathLib/trunk/libs/serializer-2.7.0.jar
JMathLib/trunk/libs/xalan-2.7.0.jar
JMathLib/trunk/libs/xercesImpl-2.7.1.jar
JMathLib/trunk/libs/xml-apis-1.3.04.jar
JMathLib/trunk/libs/xml-apis-ext-1.3.04.jar
JMathLib/trunk/libs/xmlgraphics-commons-1.3.1.jar
Added: JMathLib/trunk/libs/avalon-framework-4.2.0.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/avalon-framework-4.2.0.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/batik-all-1.7.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/batik-all-1.7.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/commons-io-1.3.1.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/commons-io-1.3.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/commons-logging-1.0.4.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/commons-logging-1.0.4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/fop.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/fop.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/saxon-jdom.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/saxon-jdom.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/saxon-xml-apis.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/saxon-xml-apis.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/saxon.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/saxon.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/serializer-2.7.0.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/serializer-2.7.0.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/xalan-2.7.0.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/xalan-2.7.0.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/xercesImpl-2.7.1.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/xercesImpl-2.7.1.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/xml-apis-1.3.04.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/xml-apis-1.3.04.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/xml-apis-ext-1.3.04.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/xml-apis-ext-1.3.04.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: JMathLib/trunk/libs/xmlgraphics-commons-1.3.1.jar
===================================================================
(Binary files differ)
Property changes on: JMathLib/trunk/libs/xmlgraphics-commons-1.3.1.jar
___________________________________________________________________
Added: 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: <st_...@us...> - 2009-02-01 12:38:21
|
Revision: 813
http://mathlib.svn.sourceforge.net/mathlib/?rev=813&view=rev
Author: st_mueller
Date: 2009-02-01 12:38:19 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
changed location of webfunctionslist.dat
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java
Modified: JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java
===================================================================
--- JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java 2009-02-01 12:37:09 UTC (rev 812)
+++ JMathLib/trunk/src/jmathlib/toolbox/jmathlib/system/createfunctionslist.java 2009-02-01 12:38:19 UTC (rev 813)
@@ -1,4 +1,3 @@
-package jmathlib.toolbox.jmathlib.system;
/* This file is part or JMathLib
@@ -8,6 +7,7 @@
//ToDo: do not include empty directories in the list
// relative path names
+package jmathlib.toolbox.jmathlib.system;
import jmathlib.core.tokens.*;
import jmathlib.core.tokens.numbertokens.DoubleNumberToken;
@@ -60,7 +60,6 @@
// create file to store all class-, m-files and images
File funcFile = new File(globals.getWorkingDirectory().getAbsoluteFile() +
File.separator + "bin" +
- File.separator + "jmathlib" +
File.separator + "webFunctionsList.dat");
BufferedWriter outWriter = new BufferedWriter( new FileWriter(funcFile));
ErrorLogger.debugLine("funcFile ="+funcFile.toString());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-02-01 12:37:17
|
Revision: 812
http://mathlib.svn.sourceforge.net/mathlib/?rev=812&view=rev
Author: st_mueller
Date: 2009-02-01 12:37:09 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
changed location of webfunctionslist.dat
Modified Paths:
--------------
JMathLib/trunk/src/jmathlib/core/functions/WebFunctionLoader.java
Modified: JMathLib/trunk/src/jmathlib/core/functions/WebFunctionLoader.java
===================================================================
--- JMathLib/trunk/src/jmathlib/core/functions/WebFunctionLoader.java 2009-01-31 20:09:04 UTC (rev 811)
+++ JMathLib/trunk/src/jmathlib/core/functions/WebFunctionLoader.java 2009-02-01 12:37:09 UTC (rev 812)
@@ -6,63 +6,75 @@
import java.util.*;
-/**Class for storing and managing the m- and p-functions
- */
+/**Class for storing and managing the m- and p-functions */
public class WebFunctionLoader extends FunctionLoader
{
boolean pFileCachingEnabledB = false;
private URL codeBase;
private String directory;
- private Vector functionListV = new Vector(30); // paths to external function for applet usage
+
+ // paths to external function for applet usage
+ private Vector functionListV = new Vector(30);
/**Default constructor*/
public WebFunctionLoader(URL _codeBase, String _directory)
{
- codeBase = _codeBase;
+ codeBase = _codeBase;
directory = _directory;
- try {
+ try
+ {
System.out.println("WebFunctionLoader: new url"+ codeBase.toString());
- URL url = new URL(codeBase, "jmathlib/webFunctionsList.dat");
+ URL url = new URL(codeBase, "webFunctionsList.dat");
InputStream in = url.openStream();
BufferedReader br = new BufferedReader(new InputStreamReader(in));
// read each line of the functions list
String line = null;
- while ((line = br.readLine()) != null) {
+ while ((line = br.readLine()) != null)
+ {
System.out.println("read =" + line);
- if (!line.startsWith("#")) {
+ if (!line.startsWith("#"))
functionListV.addElement(line);
- //functionLoaders.add(new MFileWebLoader(applet.getCodeBase(), line));
- }
}
- } catch (Exception ex) {
+ }
+ catch (Exception ex) {
//ErrorLogger.debugLine("FunctionManager: applet error");
ex.printStackTrace();
}
}
- public URL getCodeBase() {
- return codeBase;
+ /**
+ *
+ * @return
+ */
+ public URL getCodeBase()
+ {
+ return codeBase;
}
- public String getDirectory() {
- return directory;
+ /**
+ *
+ * @return
+ */
+ public String getDirectory()
+ {
+ return directory;
}
- /**loads an .m-file via the web
- @param directory = the directory containing the file
- @param mFileName = the name of the m file
- @return the result of the file as a FunktionToken*/
+ /**
+ * loads an .m-file via the web
+ * @param directory = the directory containing the file
+ * @param mFileName = the name of the m file
+ * @return the result of the file as a FunktionToken
+ */
public Function findFunction(String functionName)
{
//JMH TBD find functions on the classpath
-
-
String code = "";
UserFunction function = (UserFunction)getCachedFunction(functionName);
if (function != null)
@@ -178,8 +190,8 @@
}
- /** set caching of p-file to on of off
- *
+ /**
+ * set caching of p-file to on of off
* @param pFileCaching true= caching of p-files on; false: caching of p-files off
*/
public void setPFileCaching(boolean pFileCaching)
@@ -187,8 +199,8 @@
pFileCachingEnabledB = pFileCaching;
}
- /** return whether of not caching of p-files is enabled of not
- *
+ /**
+ * return whether of not caching of p-files is enabled of not
* @return status of caching p-files
*/
public boolean getPFileCaching()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <st_...@us...> - 2009-01-31 20:09:09
|
Revision: 811
http://mathlib.svn.sourceforge.net/mathlib/?rev=811&view=rev
Author: st_mueller
Date: 2009-01-31 20:09:04 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
Modified Paths:
--------------
JMathLib/trunk/ChangeLog.txt
Modified: JMathLib/trunk/ChangeLog.txt
===================================================================
--- JMathLib/trunk/ChangeLog.txt 2009-01-31 17:39:16 UTC (rev 810)
+++ JMathLib/trunk/ChangeLog.txt 2009-01-31 20:09:04 UTC (rev 811)
@@ -9,6 +9,14 @@
---- HISTORY ------------------------------------------------------------------
2009/01/xx stefan:
+2009/01/31 stefan: changed handling of properties. Moved JMathLib.properties
+ to src/JMathLib.properties. On first start of JMathLib
+ it checks if it finds JMathLib.properties in root, if not
+ it will load the file from the bin/JMathLib.properties file.
+ It will always be saved in the root directory.
+ The applet version always reads from the bin/ directory,
+ it cannot save the properties back to the web server anyway.
+
2009/01/30 stefan: changed handling of properties
removed getLocalProperty, setLocalProperty
renamed getGlobalProperty into getProperty
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|