You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/09/13 12:50:47 UTC

[GitHub] [netbeans] alex-code opened a new issue, #4629: Access/visibility declaration lost when changing with auto complete

alex-code opened a new issue, #4629:
URL: https://github.com/apache/netbeans/issues/4629

   ### Apache NetBeans version
   
   Apache NetBeans 15 release candidate
   
   ### What happened
   
   I'm on NB15 using it for PHP dev.
   
   When changing an existing visibility declaration on a class property or method pressing enter or clicking it from the auto complete list will remove it.
   
   ### How to reproduce
   
   Create a new method in class.
   ```php
   private function test() {}
   ```
   Highlight `private` and start to type `pu` to get the auto complete list.
   ![image](https://user-images.githubusercontent.com/1797626/189904691-743a66ca-d5f0-441f-b0cb-2f7b338863e3.png)
   Hit enter or double click `public` from the list.
   
   The visibility declaration is cleared.
   
   ### Did this work correctly in an earlier version?
   
   Apache NetBeans 14
   
   ### Operating System
   
   Windows 10 Pro
   
   ### JDK
   
   13.0.2+8
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] troizet commented on issue #4629: Access/visibility declaration lost when changing with auto complete

Posted by GitBox <gi...@apache.org>.
troizet commented on issue #4629:
URL: https://github.com/apache/netbeans/issues/4629#issuecomment-1246199705

   The error is reproduced on NetBeans 15 on 
   ```
   Debian GNU/Linux 10 (buster)
   OpenJDK 64-Bit Server VM 11.0.16+8-post-Debian-1deb10u1
   ```
   and on
   ```
   Ubuntu 20.04.4 LTS
   OpenJDK 64-Bit Server VM 11.0.16+8-post-Ubuntu-0ubuntu120.04
   ```
   
   <details>
     <summary>Stacktrace error:</summary>
   
   ```
   java.lang.NullPointerException
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.shouldOpenCompletionAfter(CodeTemplateInsertHandler.java:518)
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.stateChanged(CodeTemplateInsertHandler.java:469)
   	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.fireEvent(TextRegionManager.java:215)
   	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.activateTextSync(TextRegionManager.java:415)
   	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.releaseLastGroups(TextRegionManager.java:425)
   	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager.removeUpdateUpdate(TextRegionManager.java:751)
   	at org.netbeans.lib.editor.codetemplates.textsync.TextRegionManager$UpdateDocListener.removeUpdate(TextRegionManager.java:1124)
   	at org.netbeans.editor.BaseDocument.firePreRemoveUpdate(BaseDocument.java:1118)
   	at org.netbeans.editor.BaseDocument.removeUpdate(BaseDocument.java:1130)
   	at org.netbeans.editor.BaseDocument.handleRemove(BaseDocument.java:982)
   	at org.netbeans.editor.BaseDocument$FilterBypassImpl.replace(BaseDocument.java:2647)
   	at java.desktop/javax.swing.text.DocumentFilter.replace(DocumentFilter.java:120)
   	at org.openide.text.CloneableEditorSupport$DocFilter.replace(CloneableEditorSupport.java:2380)
   	at org.netbeans.editor.BaseDocument.replace(BaseDocument.java:1050)
   	at org.netbeans.modules.php.editor.indent.TokenFormatter$1.replaceSimpleString(TokenFormatter.java:2805)
   	at org.netbeans.modules.php.editor.indent.TokenFormatter$1.replaceString(TokenFormatter.java:2694)
   	at org.netbeans.modules.php.editor.indent.TokenFormatter$1.run(TokenFormatter.java:2174)
   	at org.netbeans.editor.GuardedDocument.runAtomic(GuardedDocument.java:296)
   	at org.netbeans.modules.php.editor.indent.TokenFormatter.reformat(TokenFormatter.java:401)
   	at org.netbeans.modules.php.editor.indent.PHPFormatter.reformat(PHPFormatter.java:67)
   	at org.netbeans.modules.csl.core.GsfReformatTask$1.run(GsfReformatTask.java:95)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
   	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:132)
   	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:116)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
   	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
   	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
   	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
   	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
   	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
   Caused: org.netbeans.modules.parsing.spi.ParseException
   	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:186)
   	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
   [catch] at org.netbeans.modules.csl.core.GsfReformatTask.reformat(GsfReformatTask.java:83)
   	at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:550)
   	at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:309)
   	at org.netbeans.modules.editor.indent.IndentImpl.reformat(IndentImpl.java:349)
   	at org.netbeans.modules.editor.indent.api.Reformat.reformat(Reformat.java:129)
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.run(CodeTemplateInsertHandler.java:352)
   	at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:333)
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.insertTemplate(CodeTemplateInsertHandler.java:258)
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateInsertHandler.processTemplate(CodeTemplateInsertHandler.java:229)
   	at org.netbeans.lib.editor.codetemplates.CodeTemplateManagerOperation.insert(CodeTemplateManagerOperation.java:273)
   	at org.netbeans.lib.editor.codetemplates.api.CodeTemplate.insert(CodeTemplate.java:82)
   	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.defaultSubstituteText(GsfCompletionItem.java:359)
   	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.substituteText(GsfCompletionItem.java:329)
   	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem.defaultAction(GsfCompletionItem.java:481)
   	at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.defaultAction(GsfCompletionItem.java:96)
   	at org.netbeans.modules.editor.completion.CompletionImpl.dispatchKeyEvent(CompletionImpl.java:785)
   	at org.netbeans.modules.editor.completion.CompletionImpl.keyPressed(CompletionImpl.java:386)
   	at java.desktop/java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:258)
   	at java.desktop/java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:257)
   	at java.desktop/java.awt.Component.processKeyEvent(Component.java:6593)
   	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2849)
   	at java.desktop/java.awt.Component.processEvent(Component.java:6412)
   	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
   	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5011)
   	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
   	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
   	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
   	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:870)
   	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1139)
   	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1009)
   	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:835)
   	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4892)
   	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
   	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
   	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4843)
   	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
   	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.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
   	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
   	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
   	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:742)
   	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)
   ```
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien closed issue #4629: Access/visibility declaration lost when changing with auto complete

Posted by GitBox <gi...@apache.org>.
mbien closed issue #4629: Access/visibility declaration lost when changing with auto complete
URL: https://github.com/apache/netbeans/issues/4629


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists