Eclipse 2021-09 is not showing outline for javascript files - javascript
I have eclipse 2021-09 (4.21.0) installed with Wild Web Developer 0.11.0 and Node.js embedder included. Javascript files are opened with Generic Text Editor, syntax highlighting is shown but outline view is empty. Even for the most simple *.js files. Take a look at the included screenshot:
What might be wrong? How to fix it?
EDIT:
The same problems exist in a fresh, newly created workspace, with the same example javascript file.
Quick Outline (Ctrl+O) produces java.util.concurrent.TimeoutException with the following message: LanguageServer not initialized after 10s
Exception Stack Trace:
java.util.concurrent.TimeoutException
at java.base/java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1950)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2085)
at org.eclipse.lsp4e.LanguageServerWrapper.getServerCapabilities(LanguageServerWrapper.java:706)
at org.eclipse.lsp4e.LanguageServiceAccessor.lambda$12(LanguageServiceAccessor.java:557)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:176)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:497)
at org.eclipse.lsp4e.LanguageServiceAccessor.getLSPDocumentInfosFor(LanguageServiceAccessor.java:558)
at org.eclipse.lsp4e.operations.symbols.LSPSymbolInFileHandler.execute(LSPSymbolInFileHandler.java:40)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.executeCommand(KeyBindingDispatcher.java:308)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.press(KeyBindingDispatcher.java:580)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.processKeyEvent(KeyBindingDispatcher.java:647)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher.filterKeySequenceBindings(KeyBindingDispatcher.java:439)
at org.eclipse.e4.ui.bindings.keys.KeyBindingDispatcher$KeyDownFilter.handleEvent(KeyBindingDispatcher.java:96)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.filterEvent(Display.java:1270)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1059)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1084)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1069)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1111)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1107)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1536)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:4875)
at org.eclipse.swt.widgets.Canvas.WM_CHAR(Canvas.java:345)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4753)
at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:340)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4958)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3624)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1041)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
Session data:
eclipse.buildId=4.21.0.I20210906-0500
java.version=15.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
It seems like a symptom of https://github.com/eclipse/wildwebdeveloper/issues/294 . Monitor the issue for potential workarounds and resolutions.
Related
Atom language-jenkins plugin to support Jenkinsfile name with wildcard?
The Atom editor plugin language-jenkins highlights the syntax for Jenkinsfile. However, my Jenkinsfiles are not always named Jenkinsfile, but usually have extension: Jenkinsfile-x86, Jenkinsfile-arm, Jenkinsfile-test, etc. How would I need to modify the Atom plugin source code in order to support any file name starting with Jenkinsfile*? This poor man's solution works, but...: 'fileTypes': [ 'Jenkinsfile', 'Jenkinsfile-x86', 'Jenkinsfile-arm', 'Jenkinsfile-test' ]
"ReferenceError: $jscomp is not defined" when changing output language spec by google-closure-compiler jar
I've downloaded the most recent version of compiler and i've tried to optimize js code with these flags: java -jar closure-compiler-v20211006.jar -W VERBOSE -O WHITESPACE_ONLY --language_out ECMASCRIPT5 $script_path_in --js_output_file $script_path_tmp closure compiler has optimized this lines of code: for(var extraProperty of extraProperties){ option.setAttribute(extraProperty,initialOption[extraProperty]); } into for (var $jscomp$iter$0 = $jscomp.makeIterator(extraProperties), $jscomp$key$extraProperty = $jscomp$iter$0.next(); !$jscomp$key$extraProperty.done; $jscomp$key$extraProperty = $jscomp$iter$0.next()) { var extraProperty = $jscomp$key$extraProperty.value; { option.setAttribute(extraProperty, initialOption[extraProperty]) } } And as a result i receive such error in browser: all_compressed.js Uncaught ReferenceError: $jscomp is not defined Is there a way to change language spec with this compiler without adding side dependencies into the project, or maybe it's a bug? Git bug tracker
The best option for white space only mode is to set the language out to the latest ECMASCRIPT version used by the source code (or later) to avoid runtime dependencies.
Uncaught InvalidData: data did not match any variant of untagged enum ArgsEnum
I'm enthusiastic about Deno so I'm giving it a try. Found a tutorial on building a REST API here. So, when I'm trying to run it, I get this InvalidData error: error: Uncaught InvalidData: data did not match any variant of untagged enum ArgsEnum at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11) at Object.sendAsync ($deno$/ops/dispatch_json.ts:98:10) at async Object.connect ($deno$/net.ts:216:11) at async Connection.startup (https://deno.land/x/postgres/connection.ts:138:17) at async Client.connect (https://deno.land/x/postgres/client.ts:14:5) at async Database.connect (file:///Users/svenhaaf/git/deno/logrocket_deno_api/db/database.js:17:5) Now, it looks to me that something is wrong when trying to connect to the database, but I can't really figure out what. What does this InvalidData error mean? How should I fix this? FYI my deno --version prints: deno 0.42.0 v8 8.2.308 typescript 3.8.3 Code: I cloned the repo from https://github.com/diogosouza/logrocket_deno_api, and in config.js, I edited line 1 from const env = Deno.env() to const env = Deno.env, since it looks like Deno.env became an object instead of a method.
The tutorial is not using versioned URLs, and deno-postgres version that is being used is not compatible with v0.42.0, since https://deno.land/x/postgres/mod.ts is pulling from master Change db/database.js to import from https://deno.land/x/postgres#v0.3.11/mod.ts, since v0.3.11 is the correct version for Deno v0.42.0 import { Client } from "https://deno.land/x/postgres#v0.3.11/mod.ts"; Remember to always use the version in the URL if you don't want the code to stop working when a new Deno or package version is released.
SonarQube doesn't add JavaScript coverage
We have a multi module maven project that has Java and JavaScript sub projects. For SonarQube analysis we have added configuration to JavaScript module. <sonar.sources>src</sonar.sources> <sonar.exclusions>src/test/**/*, src/**/resources/simple/**/*</sonar.exclusions> <sonar.coverage.exclusions>src/**/resources/simple/**/*, src/registerServiceWorker.js</sonar.coverage.exclusions> <sonar.projectBaseDir>.</sonar.projectBaseDir> <sonar.javascript.coveragePlugin>lcov</sonar.javascript.coveragePlugin> <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis> <sonar.javascript.jstest.reportsPath>opui-client/target/surefire-reports</sonar.javascript.jstest.reportsPath> <sonar.javascript.lcov.reportPath>coverage/lcov.info</sonar.javascript.lcov.reportPath> <sonar.language>js</sonar.language> SonarQube shows the analysis logs. Analysing [C:\Users\mzafar\opui-19dec\path\to\file\coverage\lcov.info] [WARNING] Problem during processing LCOV report: can't save DA data for line 1491 (Line with number 1491 doesn't belong to file src/modules/core/NagraGrid.js). Part of lcov.info is like this: SF:C:\Users\mzafar\path\to\js\code\src\modules\core\search\opuiSearch\AdvancedSearchOptionsPopup.js FN:89,(anonymous_0) FN:100,(anonymous_1) FN:113,(anonymous_2) FN:119,(anonymous_3) FN:125,(anonymous_4) FN:129,(anonymous_5) FN:167,(anonymous_6) FN:179,(anonymous_7) FN:188,(anonymous_8) FN:197,(anonymous_9) FN:200,(anonymous_10) FN:209,(anonymous_11) FNF:12 FNH:10 FNDA:8,(anonymous_0) FNDA:4,(anonymous_1) FNDA:1,(anonymous_2) FNDA:1,(anonymous_3) FNDA:1,(anonymous_4) FNDA:26,(anonymous_5) FNDA:26,(anonymous_6) FNDA:0,(anonymous_7) FNDA:26,(anonymous_8) FNDA:1,(anonymous_9) FNDA:1,(anonymous_10) FNDA:0,(anonymous_11) DA:10,3 DA:82,3 DA:90,8 DA:91,8 DA:101,4 DA:102,4 DA:114,1 DA:120,1 DA:121,1 DA:126,1 DA:130,26 DA:131,0 DA:134,26 DA:136,2 DA:148,2 DA:160,22 DA:168,26 DA:180,0 DA:189,26 DA:198,1 DA:201,1 DA:210,0 DA:211,0 LF:23 LH:19 BRDA:101,0,0,4 BRDA:101,0,1,0 BRDA:120,1,0,1 BRDA:120,1,1,0 BRDA:130,2,0,0 BRDA:130,2,1,26 BRDA:130,3,0,26 BRDA:130,3,1,0 BRDA:134,4,0,2 BRDA:134,4,1,2 BRDA:134,4,2,22 BRDA:195,5,0,11 BRDA:195,5,1,15 BRDA:232,6,0,25 BRDA:232,6,1,1 BRDA:247,7,0,0 BRDA:247,7,1,26 BRDA:265,8,0,0 BRDA:265,8,1,26 BRDA:275,9,0,26 BRDA:275,9,1,0 BRDA:276,10,0,26 BRDA:276,10,1,0 BRF:23 BRH:15 end_of_record But still JavaScript files coverage is 0. We are using SonarQube 6.7. Can someone help me if some configuration is wrong?
I added the latest sonar property <sonar.javascript.lcov.reportPaths>path/to/lcov.info</sonar.javascript.lcov.reportPaths> And this solved the issue for me.
Evaluating a Javascript file, expression by expression, in a NodeJS repl
Let's say I have these two lines: var a = 1; console.log(a); I want some means to send the first line to the NodeJS repl, have it evaluate, then send the second line. I've tried the default NodeJS repl, the chrome and firefox browser tools, and IntelliJ interactive scripting but they're all unfriendly. For the NodeJS repl and browsers, you need to shift-enter for multiline. For IntelliJ, it can't recognize console.log (probably because it's not a true NodeJS environment). Can you suggest some other tool?
If you use Emacs, there is nodejs-repl.el. As the github page shows, if you define the following key bindings: (add-hook 'js-mode-hook (lambda () (define-key js-mode-map (kbd "C-x C-e") 'nodejs-repl-send-last-sexp) (define-key js-mode-map (kbd "C-c C-r") 'nodejs-repl-send-region) (define-key js-mode-map (kbd "C-c C-l") 'nodejs-repl-load-file) (define-key js-mode-map (kbd "C-c C-z") 'nodejs-repl-switch-to-repl))) You can use Ctrl-c + Ctrl-r to send a highlighted region of code to the REPL pretty much like IntelliJ's Ctrl-Enter. Of course, you need to install the node.js dependencies for the REPL to work in Emacs.