summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4ba1c57)
site/swingjs/j2s/com/stevesoft/core.js
Applying a simple trick to use a custom core file.
1) In buildcore.xml:
<!-- concatentate the stevesoft files -->
<concat destfile="${site.path}/j2s/com/stevesoft/core.js">
<fileset dir="${site.path}/j2s/com/stevesoft">
<include name="**/*.js" />
<exclude name="core.js" />
<exclude name="Regex.js" />
</fileset>
</concat>
<antcall target="call-core">
<param name="call-core.name" value="_stevesoft" />
<param name="call-core.list" value="com/stevesoft/core.js" />
</antcall>
2) In com/stevesoft, add a line that loads j2s/core/core_stevesoft.z.js
static
{
/**
* @j2sNative
*
* swingjs.JSUtil.loadStaticResource$S("core/core_stevesoft.z.js");
*/
}
<delete quiet="true" dir="site" />
-->
<delete quiet="true" dir="site" />
-->
+
+ <!-- concatentate the stevesoft files -->
+ <concat destfile="${site.path}/j2s/com/stevesoft/core.js">
+ <fileset dir="${site.path}/j2s/com/stevesoft">
+ <include name="**/*.js" />
+ <exclude name="core.js" />
+ <exclude name="Regex.js" />
+ </fileset>
+ </concat>
+ <antcall target="call-core">
+ <param name="call-core.name" value="_stevesoft" />
+ <param name="call-core.list" value="com/stevesoft/core.js" />
+ </antcall>
+
+
<!-- make core files -->
<echo>Building core file '${core.name}' - warnings are OK; "does not exist" is trouble</echo>
<!-- make core files -->
<echo>Building core file '${core.name}' - warnings are OK; "does not exist" is trouble</echo>
import com.stevesoft.pat.wrap.StringWrap;
import com.stevesoft.pat.wrap.StringWrap;
/** Matches a Unicode punctuation character. */
class UnicodePunct extends UniValidator
{
/** Matches a Unicode punctuation character. */
class UnicodePunct extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isPunct(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isPunct(s.charAt(from)) ? to : -1;
/** Matches a Unicode white space character. */
class UnicodeWhite extends UniValidator
{
/** Matches a Unicode white space character. */
class UnicodeWhite extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isWhite(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isWhite(s.charAt(from)) ? to : -1;
*/
class NUnicodePunct extends UniValidator
{
*/
class NUnicodePunct extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isPunct(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isPunct(s.charAt(from)) ? to : -1;
*/
class NUnicodeWhite extends UniValidator
{
*/
class NUnicodeWhite extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isWhite(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isWhite(s.charAt(from)) ? to : -1;
/** Matches a Unicode word character: an alphanumeric or underscore. */
class UnicodeW extends UniValidator
{
/** Matches a Unicode word character: an alphanumeric or underscore. */
class UnicodeW extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
if (from >= s.length())
public int validate(StringLike s, int from, int to)
{
if (from >= s.length())
/** Matches a character that is not a Unicode alphanumeric or underscore. */
class NUnicodeW extends UniValidator
{
/** Matches a character that is not a Unicode alphanumeric or underscore. */
class NUnicodeW extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
if (from >= s.length())
public int validate(StringLike s, int from, int to)
{
if (from >= s.length())
/** Matches a Unicode decimal digit. */
class UnicodeDigit extends UniValidator
{
/** Matches a Unicode decimal digit. */
class UnicodeDigit extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isDecimalDigit(s.charAt(from)) ? to
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isDecimalDigit(s.charAt(from)) ? to
/** Matches a character that is not a Unicode digit. */
class NUnicodeDigit extends UniValidator
{
/** Matches a character that is not a Unicode digit. */
class NUnicodeDigit extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isDecimalDigit(s.charAt(from)) ? to
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isDecimalDigit(s.charAt(from)) ? to
/** Matches a Unicode math character. */
class UnicodeMath extends UniValidator
{
/** Matches a Unicode math character. */
class UnicodeMath extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isMath(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isMath(s.charAt(from)) ? to : -1;
/** Matches a non-math Unicode character. */
class NUnicodeMath extends UniValidator
{
/** Matches a non-math Unicode character. */
class NUnicodeMath extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isMath(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isMath(s.charAt(from)) ? to : -1;
/** Matches a Unicode currency symbol. */
class UnicodeCurrency extends UniValidator
{
/** Matches a Unicode currency symbol. */
class UnicodeCurrency extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isCurrency(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isCurrency(s.charAt(from)) ? to : -1;
/** Matches a non-currency symbol Unicode character. */
class NUnicodeCurrency extends UniValidator
{
/** Matches a non-currency symbol Unicode character. */
class NUnicodeCurrency extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isCurrency(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isCurrency(s.charAt(from)) ? to : -1;
/** Matches a Unicode alphabetic character. */
class UnicodeAlpha extends UniValidator
{
/** Matches a Unicode alphabetic character. */
class UnicodeAlpha extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isAlphabetic(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && Prop.isAlphabetic(s.charAt(from)) ? to : -1;
/** Matches a non-alphabetic Unicode character. */
class NUnicodeAlpha extends UniValidator
{
/** Matches a non-alphabetic Unicode character. */
class NUnicodeAlpha extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isAlphabetic(s.charAt(from)) ? to
public int validate(StringLike s, int from, int to)
{
return from < s.length() && !Prop.isAlphabetic(s.charAt(from)) ? to
/** Matches an upper case Unicode character. */
class UnicodeUpper extends UniValidator
{
/** Matches an upper case Unicode character. */
class UnicodeUpper extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && isUpper(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && isUpper(s.charAt(from)) ? to : -1;
/** Matches an upper case Unicode character. */
class UnicodeLower extends UniValidator
{
/** Matches an upper case Unicode character. */
class UnicodeLower extends UniValidator
{
public int validate(StringLike s, int from, int to)
{
return from < s.length() && isLower(s.charAt(from)) ? to : -1;
public int validate(StringLike s, int from, int to)
{
return from < s.length() && isLower(s.charAt(from)) ? to : -1;
*/
public class Regex extends RegRes implements FilenameFilter
{
*/
public class Regex extends RegRes implements FilenameFilter
{
+
+ static
+ {
+ /**
+ * @j2sNative
+ *
+ * swingjs.JSUtil.loadStaticResource$S("core/core_stevesoft.z.js");
+ */
+ }
+
/**
* BackRefOffset gives the identity number of the first pattern. Version 1.0
* used zero, version 1.1 uses 1 to be more compatible with perl.
/**
* BackRefOffset gives the identity number of the first pattern. Version 1.0
* used zero, version 1.1 uses 1 to be more compatible with perl.
/** Essentially clones the Regex object */
public Regex(Regex r)
{
/** Essentially clones the Regex object */
public Regex(Regex r)
{
dontMatchInQuotes = r.dontMatchInQuotes;
esc = r.esc;
ignoreCase = r.ignoreCase;
dontMatchInQuotes = r.dontMatchInQuotes;
esc = r.esc;
ignoreCase = r.ignoreCase;
* patterns are equal as well as the most recent match. If a Regex is compare
* with a RegRes, only the result of the most recent match is compared.
*/
* patterns are equal as well as the most recent match. If a Regex is compare
* with a RegRes, only the result of the most recent match is compared.
*/
public boolean equals(Object o)
{
if (o instanceof Regex)
public boolean equals(Object o)
{
if (o instanceof Regex)
}
/** A clone by any other name would smell as sweet. */
}
/** A clone by any other name would smell as sweet. */
public Object clone()
{
return new Regex(this);
public Object clone()
{
return new Regex(this);
- return (Regex) getClass().newInstance();
+ return getClass().newInstance();
} catch (InstantiationException ie)
{
return null;
} catch (InstantiationException ie)
{
return null;
{
if (p instanceof Any && p.next == null)
{
{
if (p instanceof Any && p.next == null)
{
- return (Pattern) new DotMulti(lo, hi);
+ return new DotMulti(lo, hi);
}
return RegOpt.safe4fm(p) ? (Pattern) new FastMulti(lo, hi, p)
: (Pattern) new Multi(lo, hi, p);
}
return RegOpt.safe4fm(p) ? (Pattern) new FastMulti(lo, hi, p)
: (Pattern) new Multi(lo, hi, p);
* representations. Also be prepared to see some strange output if your
* characters are not printable.
*/
* representations. Also be prepared to see some strange output if your
* characters are not printable.
*/
public String toString()
{
if (false && thePattern == null)
public String toString()
{
if (false && thePattern == null)
*
* @see com.stevesoft.pat.FileRegex
*/
*
* @see com.stevesoft.pat.FileRegex
*/
public boolean accept(File dir, String s)
{
return search(s);
public boolean accept(File dir, String s)
{
return search(s);
javajs/util/Lst.js
javajs/util/PT.js
javajs/util/SB.js
javajs/util/Lst.js
javajs/util/PT.js
javajs/util/SB.js
+javax/net/ssl/HttpsUrlConnection.js
javax/swing/AbstractAction.js
javax/swing/AbstractButton.js
javax/swing/AbstractListModel.js
javax/swing/AbstractAction.js
javax/swing/AbstractButton.js
javax/swing/AbstractListModel.js
javajs/util/Lst.js
javajs/util/PT.js
javajs/util/SB.js
javajs/util/Lst.js
javajs/util/PT.js
javajs/util/SB.js
+javax/net/ssl/HttpsUrlConnection.js
javax/swing/AbstractAction.js
javax/swing/AbstractButton.js
javax/swing/AbstractListModel.js
javax/swing/AbstractAction.js
javax/swing/AbstractButton.js
javax/swing/AbstractListModel.js