summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-06-13 11:44:18 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-06-13 11:44:18 +0000
commite7e0e25335c8eb6325a8c1a39b0fda8b576e87f5 (patch)
tree6c6685570800bd762c5eaf9724c504618d38d48e /qadevOOo
parent5e00744802a98b95bb7e0e649462d48f418f4c2a (diff)
INTEGRATION: CWS qadev32 (1.7.2); FILE MERGED
2008/04/17 11:40:24 cn 1.7.2.2: RESYNC: (1.7-1.8); FILE MERGED 2008/03/12 10:13:27 cn 1.7.2.1: #i85370# parse parameter for parameters in methods like 'method1(param1,param2),method2()'
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/ComplexDescGetter.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/qadevOOo/runner/helper/ComplexDescGetter.java b/qadevOOo/runner/helper/ComplexDescGetter.java
index e111173a0efc..9e7a6563e594 100644
--- a/qadevOOo/runner/helper/ComplexDescGetter.java
+++ b/qadevOOo/runner/helper/ComplexDescGetter.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ComplexDescGetter.java,v $
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
* This file is part of OpenOffice.org.
*
@@ -84,16 +84,23 @@ public class ComplexDescGetter extends DescGetter {
int index = className.indexOf("::");
if (index != -1) {
+ // case1: method()
+ // case2: method(param1,param2)
+ // case3: method1(param1,param2),method2(param1,param2)
String method = className.substring(index + 2);
className = className.substring(0, index);
Vector methods = new Vector();
- StringTokenizer t = new StringTokenizer(method, ",");
- while (t.hasMoreTokens()) {
- String m = t.nextToken();
- if (m.endsWith("()"))
- m = m.substring(0, m.length() - 2);
- methods.add(m);
+
+ String[] split = method.split("(?<=\\)),(?=\\w+)");
+
+ for (int i = 0; i < split.length; i++) {
+ String meth = split[i];
+
+ if (meth.endsWith("()")) meth = meth.substring(0, meth.length() - 2);
+
+ methods.add(meth);
}
+
methodNames = new String[methods.size()];
methodNames = (String[])methods.toArray(methodNames);
}