Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

various updates#232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
BobHanson merged 28 commits intojava2script:masterfromBobHanson:master
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
28 commits
Select commitHold shift + click to select a range
cf4480e
updated to show correct resource action with URL->URI->File
BobHansonFeb 25, 2024
847a0d6
Font metrics upgrade
BobHansonMar 3, 2024
ec5cf1f
JMenuBar height tweak; Clazz fix for strings now in exceptions
BobHansonMar 3, 2024
a712ed2
Fix for 4.2 Jmol ArrayList and Enum
BobHansonMar 19, 2024
8dd3a82
fixes for 4.2 j2sjmol.js
BobHansonApr 10, 2024
3b6b3c9
HTML5Video update for Chrome frame callback
BobHansonMay 10, 2024
21ef2ea
BigInt.modPow fix for large int*int overflow
BobHansonMay 10, 2024
d89e8df
update HTML5Video
BobHansonMay 28, 2024
6c6b9db
impossible match catch
BobHansonJun 21, 2024
1430ff0
formatting only
BobHansonJun 21, 2024
f3d8985
supress unlikely target
BobHansonJun 21, 2024
eaf26f7
adds MediaInfo WASM for getting video metadata
BobHansonJun 21, 2024
48a7898
adds Integer.getString(String, int)
BobHansonJun 22, 2024
4bdcdb6
adds Integer.getString(String, int); allows for null applet stub
BobHansonJun 24, 2024
80a2799
residual Floats in CU and GifEncoder
BobHansonJun 25, 2024
8ba7785
incorporates j2sComboBox, j2sMenu, and J2sSlider into JQueryUI.java
BobHansonJun 28, 2024
b807960
fixes in Lst for OpenJDK compliance
BobHansonJul 17, 2024
ea846db
fixes PT.isMatch
BobHansonJul 17, 2024
2910a8f
array initialization fix -- SwingJS only
BobHansonAug 14, 2024
8ca18fb
j2s.core.jar update for new byte[] {'c'}
BobHansonAug 14, 2024
739ea06
SwingJS-site.zip; JSmouse.java
BobHansonNov 8, 2024
99386f8
update j2sApplet.js
BobHansonNov 9, 2024
9d2f277
Jmol-j2s-site.zip, JSmolJavaExt fix
BobHansonNov 23, 2024
a80e2dc
Fixes for JSTextBoxUI not reporting 4 for min width
BobHansonNov 25, 2024
ba167cc
Just testing Google's NGram API
BobHansonNov 27, 2024
84ea1a2
JSTextUI update
BobHansonDec 2, 2024
970e778
ZipInputStream fix to allow odd zero-length file format; file opener
BobHansonDec 20, 2024
61b4fc1
Merge pull request #278 from java2script/master
BobHansonDec 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modifiedsources/net.sf.j2s.core/dist/swingjs/SwingJS-site.zip
View file
Open in desktop
Binary file not shown.
Binary file modifiedsources/net.sf.j2s.core/dist/swingjs/j2s.core.jar
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Binary file not shown.
2 changes: 1 addition & 1 deletionsources/net.sf.j2s.core/dist/swingjs/timestamp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
20240225103130
20241217101652
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
20240225103130
20241217101652
4 changes: 3 additions & 1 deletionsources/net.sf.j2s.core/src/j2s/CorePlugin.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,11 +26,13 @@ public class CorePlugin extends Plugin {
* the actual "x.y.z" version is specified in plugin.xml.
*
*/
public static String VERSION = "5.0.1-v2";
public static String VERSION = "5.0.1-v4";

// if you change the x.x.x number, be sure to also indicate that in
// j2sApplet.js and also (Bob only) update.bat, update-clean.bat

// BH 2024.07.14 -- 5.0.1-v4 fixes numerical array initializer using characters ['a','b',...]
// BH 2024.02.22 -- 5.0.1-v3 fixes long extension issue causing MutableBitInteger to miscalculate subtraction(no change in version #)
// BH 2023.11.27 -- 5.0.1-v2 final refactoring and creatiton of J2SUtil
// BH 2023.11.21 -- 5.0.1-v2 adds Java8 syntaxes for try and switch; removes dependency for instanceOf and exception checking
// BH 2023.11.09 -- 5.0.1-v1 merges Jmol legacy (.j2sjmol) with Java8//11 (.j2s)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2100,7 +2100,7 @@ public boolean visit(ArrayCreation node) {
buffer.append(" Clazz.newBooleanArray(");
boxList(dim, ", ");
buffer.append(", false)");
} else {
} else {
if (dim != null && dim.size() > 1) {
buffer.append(" Clazz.newArray(");
boxList(dim, ", ");
Expand DownExpand Up@@ -2140,6 +2140,8 @@ public boolean visit(ArrayInitializer node) {
buffer.append("]");
return false;
}
// note that this does NOT allow for new byte[] {'a', 'b', 'c'}
// only implemented that for SwingJS
if (elementType.isPrimitive()) {
String typeCode = elementType.getName();
if ("int".equals(typeCode)
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,11 @@
// TODO: superclass inheritance for JAXB XmlAccessorType
// TODO: Transpiler bug allows static String name, but JavaScript function().name is read-only and will be "clazz"

//BH 2024.02.22 -- 3.3.1-v7 fixes long extension issue causing MutableBitInteger to miscalculate subtraction(no change in version #)
//BH 2024.07.14 -- 5.0.1-v4 fixes numerical array initializer using characters ['a','b',...], but not new int[] { "test".charAt(3) }
//BH 2024.02.22 -- 5.0.1-v3 fixes long extension issue causing MutableBitInteger to miscalculate subtraction(no change in version #)
//BH 2023.11.27 -- 5.0.1-v2 final refactoring and creatiton of J2SUtil
//BH 2023.11.21 -- 5.0.1-v2 adds Java8 syntaxes for try and switch; removes dependency for instanceOf and exception checking
//BH 2023.11.09 -- 5.0.1-v1 merges Jmol legacy (.j2sjmol) with Java8//11 (.j2s)
//BH 2023.03.29 -- 3.3.1-v7 fixes outer static method call from within lambda expression.
//BH 2023.02.09 -- 3.3.1.v6 fixes j2s.excluded.paths needing /src/xxxx
//BH 2022.06.27 -- 3.3.1-v5 fixes missing method annotations
Expand DownExpand Up@@ -3015,15 +3019,63 @@ private void addArrayConstructor(ITypeBinding binding, List<ASTNode> dim) {

public boolean visit(ArrayInitializer node) {
// as in: public String[] d = {"1", "2"};
buffer.append(clazzArray(node.resolveTypeBinding(), ARRAY_INITIALIZED));
ITypeBinding type = node.resolveTypeBinding();
buffer.append(clazzArray(type, ARRAY_INITIALIZED));
buffer.append(", [");
int toChar = toCharType(type);
@SuppressWarnings("unchecked")
List<ASTNode> expressions = node.expressions();
visitList(expressions, ", ");
List<ASTNode> ex = node.expressions();
if (toChar == 0) {
visitList(ex, ", ");
} else {
fixCharArrayInit(buffer, ex, toChar);
}
buffer.append("])");
return false;
}

private static int toCharType(ITypeBinding type) {
switch (type == null ? "" : type.getName()) {
case "char[]":
return 1;
case "byte[]":
case "short[]":
case "int[]":
case "long[]":
case "float[]":
case "double[]":
return -1;
default:
return 0;
}
}

private void fixCharArrayInit(StringBuffer buffer, List<ASTNode> list, int toChar) {
for (Iterator<ASTNode> iter = list.iterator(); iter.hasNext();) {
int pt = buffer.length();
appendBoxingNode(iter.next(), false, null, false, false);
if (toChar != 0) {
String s = buffer.substring(pt);
// only fix "x" and number
// not fixed: int[] a = new int[] {"test".charAt(0)}
try {
if (pt > 0 && (s.charAt(0) == '"') != (toChar == 1)) {
buffer.replace(pt, buffer.length(),
(toChar == 1 ?
"\"" + ((char) Integer.parseInt(s)) + "\""
: s.length() == 3 ? "" + (byte) s.charAt(1) : s)
);
}
} catch (@SuppressWarnings("unused") Exception e) {
// ignore
}
}
if (!iter.hasNext())
return;
buffer.append(", ");
}
}

public boolean visit(Assignment node) {
// note that this is not
// var x = ..... -- that is a visit(VariableDeclaration)
Expand DownExpand Up@@ -4431,8 +4483,6 @@ private void addNonCharacter(Expression exp) {
switch (name) {
case "char":
case "Character":
addOperand(exp, false);
break;
case "Byte":
case "Short":
case "Integer":
Expand Down
Binary file modifiedsources/net.sf.j2s.java.core/dist/SwingJS-site.zip
View file
Open in desktop
Binary file not shown.
Binary file removedsources/net.sf.j2s.java.core/dist/j2s.core.jar
View file
Open in desktop
Binary file not shown.
Binary file modifiedsources/net.sf.j2s.java.core/dist_to_jsmol/Jmol-j2s-site.zip
View file
Open in desktop
Binary file not shown.
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1002,6 +1002,8 @@ return buf.join('');

if(String.prototype.$replace==null){
java.lang.String=String;
Clazz._setDeclared("String", String);

if(Clazz._supportsNativeObject){
for(var i=0;i<Clazz._extendedObjectMethods.length;i++){
var p=Clazz._extendedObjectMethods[i];
Expand DownExpand Up@@ -1075,9 +1077,7 @@ for(i=0;i<arr.length-1;i++){
funStr+="\""+arr[i]+"\" + $"+orders[i]+" + ";
}
funStr+="\""+arr[i]+"\"; }";
var f=null;
eval(funStr)
return f;
return eval(funStr);
};

sp.replaceAll=function(exp,str){
Expand DownExpand Up@@ -1666,6 +1666,8 @@ c$.get = function(o, i){return o[i]};
javautil.Date=Date;
Date.TYPE="javautil.Date";
Date.__CLASS_NAME__="Date";
Clazz._setDeclared("java.util.Date", Date);
Clazz._setDeclared("Date", Date);
Clazz.implementOf(Date,[java.io.Serializable,java.lang.Comparable]);
Clazz.defineMethod(javautil.Date,"clone",
function(){
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp