Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
11.3
-
None
-
Product Version: Apache NetBeans IDE DEV (Build dev-f25af78881f4ad29aec81c301c4d00974db2db76)
Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS
Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS
System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
User directory: C:\Users\Chrl\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Chrl\AppData\Local\NetBeans\Cache\devProduct Version: Apache NetBeans IDE DEV (Build dev-f25af78881f4ad29aec81c301c4d00974db2db76) Java: 11.0.2; Java HotSpot(TM) 64-Bit Server VM 11.0.2+9-LTS Runtime: Java(TM) SE Runtime Environment 11.0.2+9-LTS System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb) User directory: C:\Users\Chrl\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Chrl\AppData\Local\NetBeans\Cache\dev
Description
Its about the new LSP/Textmate UI integration and It is about error handling, because the behaviour is not very nice.
Steps to reproduce:
- Open a project (Only to initialize the editor and the specific options)
- Open Tools -> Options -> Editor -> Language Servers
- Click on Add
- Leave everything empty
- Click on on
- Liune will be added with default icon and the placeholder word "files"
- Hit apply in the options window.
- See error message thrown.
java.io.FileNotFoundException:
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.<init>(FileInputStream.java:157)
at org.eclipse.tm4e.core.registry.Registry.loadGrammarFromPathSync(Registry.java:140)
at org.netbeans.modules.lsp.client.options.LanguageStorage.findScope(LanguageStorage.java:231)
[catch] at org.netbeans.modules.lsp.client.options.LanguageStorage.lambda$store$1(LanguageStorage.java:115)
at org.openide.filesystems.FileUtil$2.run(FileUtil.java:413)
at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:397)
at org.openide.filesystems.FileUtil.runAtomicAction(FileUtil.java:417)
at org.netbeans.modules.lsp.client.options.LanguageStorage.store(LanguageStorage.java:65)
at org.netbeans.modules.lsp.client.options.LanguageServersPanel.store(LanguageServersPanel.java:193)
at org.netbeans.modules.lsp.client.options.LanguageServersOptionsPanelController$1.run(LanguageServersOptionsPanelController.java:51)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
So I prefer to add validation. Make the name not optional. It should have a name. thats all. Icon also but you add the default one, that is okish. Maybe the lexer file need also be required, I think this is why the error is thrown.