Community
Participate
Working Groups
These two problems look similar. 1. Delegate variable declaration and initialization procudes invalid Java. ======= EGL code === library User {} function invokeTheTest() exeLibTestMtd executeLibTestMethod = executeLibTest; end function executeLibTest(testName String) returns (MultiStatus) multi MultiStatus; return (multi); end end Record MultiStatus testCnt int; firstFailedTestName String; end delegate executeLibTestMethod(testName String) returns (MultiStatus) end ============== Java code ============ public void invokeTheTest() { org.eclipse.edt.javart.Delegate exeLibTestMtd = new org.eclipse.edt.javart.Delegate(); exeLibTestMtd = new org.eclipse.edt.javart.Delegate("executeLibTest", this, String.class); } ======== Compile Error ================= The constructor Delegate() is undefined 2. External Type without an empty constructor ========= EGL Code ====== handler CreateResultFile function createFile(fileDirectory String in, fullFileName String in, fileContent String in) myfile File = new File(fileDirectory); createdDirs boolean = myfile.mkdirs(); if(createdDirs) syslib.writeStdOut("directories created"); end end end ExternalType File type JavaObject {packageName = "java.io"} constructor (pathname String In); function getAbsolutePath() returns (String); function createNewFile() returns (boolean); function mkdirs() returns (boolean); function exists() returns (boolean); end ========= Java code ===== public void createFile(String fileDirectory, String fullFileName, String fileContent) { File myfile = new File(); myfile = new File(fileDirectory); boolean createdDirs = false; createdDirs = myfile.mkdirs(); if (createdDirs) { String eze$Temp2 = Constants.EMPTY_STRING; eze$Temp2 = "directories created"; SysLib.writeStdout(eze$Temp2); } } ============ Compile Error =========== The constructor File() is undefined
Problem two has been resolved. Still getting the issue with the Delegate constructor
I changed FunctionTemplate to put in the proper type (AnyBoxedObject) for Out and Inout parameters when we make a Delegate object.
verified
Created attachment 202998 [details] Archived file of Project
Closing this defect.