You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 57e71a7
Browse filesBrowse the repository at this point in the historyBrowse files
awaitstep('Discover the project from the real JDT server',async()=>{awaituntil(()=>execute('java.project.getAll'),projects=>projects.some(uri=>(process.platform==='win32'?fileURLToPath(uri).replace(/[\\/]$/,'').toLowerCase()===root.toLowerCase():fileURLToPath(uri).replace(/\/$/,'')===root)),'JDT project import');sources=awaitinvoke('libraries.settings',{context:{language:'zh-CN',builds:[]}});assert.equal(sources.sources[0].path,eclipse?'.classpath':'.vscode/settings.json');});
51
-
awaitstep('Save a referenced JAR and confirm JDT resolves the actual classpath',async()=>{constsource=sources.sources[0],stageFile=join(stage,'libraries-stage.json');writeFileSync(stageFile,'');awaitinvoke('compiler.prepareSettings',{operation:'editSource',sourceID:source.id,revision:source.revision,values:{libraries:[jar]},outputFile:stageFile});mkdirSync(join(root,'.vscode'),{recursive:true});renameSync(stageFile,join(root,source.path));awaitinvoke('libraries.settings',{operation:'readAfterSave',context:{language:'zh-CN',builds:[]}});if(!eclipse)awaituntil(()=>execute('java.project.getSettings',[pathToFileURL(root).href,['org.eclipse.jdt.ls.core.referencedLibraries']]),value=>value['org.eclipse.jdt.ls.core.referencedLibraries']?.includes(jar),'JDT classpath refresh');});
52
+
awaitstep('Save a referenced JAR and confirm JDT resolves the actual classpath',async()=>{constsource=sources.sources[0],stageFile=join(stage,'libraries-stage.json');writeFileSync(stageFile,'');awaitinvoke('compiler.prepareSettings',{operation:'editSource',sourceID:source.id,revision:source.revision,values:{libraries:[jar]},outputFile:stageFile});mkdirSync(join(root,'.vscode'),{recursive:true});renameSync(stageFile,join(root,source.path));awaitinvoke('libraries.settings',{operation:'readAfterSave',context:{language:'zh-CN',builds:[]}});if(!eclipse)awaituntil(()=>execute('java.project.getSettings',[pathToFileURL(root).href,['org.eclipse.jdt.ls.core.referencedLibraries']]),value=>value['org.eclipse.jdt.ls.core.referencedLibraries']?.some(path=>samePath(path,jar)),'JDT classpath refresh');});
52
53
awaitstep('Save native compiler target and verify real JDT effective settings',async()=>{sources=awaitinvoke('compiler.settings',{context:{language:'zh-CN',builds:[]}});constsource=sources.sources.find(s=>s.id==='defaults'),stageFile=join(stage,'compiler-stage.prefs');writeFileSync(stageFile,'');awaitinvoke('compiler.prepareSettings',{operation:'editSource',sourceID:source.id,revision:source.revision,values:{target:'8'},outputFile:stageFile});mkdirSync(join(root,'.settings'),{recursive:true});renameSync(stageFile,join(root,source.path));awaitinvoke('compiler.settings',{operation:'readAfterSave',context:{language:'zh-CN',builds:[]}});awaituntil(()=>execute('java.project.getSettings',[pathToFileURL(root).href,['org.eclipse.jdt.core.compiler.codegen.targetPlatform']]),value=>value['org.eclipse.jdt.core.compiler.codegen.targetPlatform']==='1.8','JDT compiler refresh');});
53
54
awaitstep('Compile with JDT, inspect Java 8 bytecode and run with the external JAR',async()=>{
0 commit comments