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 2021/01/07 07:08:53 UTC

[GitHub] [netbeans] JaroslavTulach opened a new pull request #2646: Renaming modified src.java file leads to Cannot save src.java error. Hotfix.

JaroslavTulach opened a new pull request #2646:
URL: https://github.com/apache/netbeans/pull/2646


   Using VSNB ext 12.2.252 and GraalVM 21.1.0 JDK8 CE build.
   
   * Create Micronaut App project - see [wiki](https://cwiki.apache.org/confluence/display/NETBEANS/Apache+NetBeans+extension+for+Visual+Studio+Code)
   * Click icon in Explorer to add file, name it e.g. "HellController.java"
   * paste in content for HelloController.java sample.
   * Rename the file in VSCode explorer to "HelloController.java"
   * VSNetBeans complains file was changed on disk and has to be reloaded.
   * Check the PROBLEMS window in VSCode it still lists "HellController.java" as having improperly named class.
   * Press F5 for debugging the project it prints to console   :
   ```
           Info: Saving HellController ...
           Info: Save All finished.
           and dialog appears with "Cannot save HellController" message from VSNB ext
   ```
   *    Close the folder with project and open again and it starts behave correctly
   
   The PR workarounds the problem by not showing the "complains file was changed on disk and has to be reloaded". There may be better fixes, especially when `lsp4j` starts to fully support 3.16 protocol which contains notifications like `willRename`/`didRename`.
   


----------------------------------------------------------------
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.

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] JaroslavTulach merged pull request #2646: Renaming modified src.java file leads to Cannot save src.java error. Hotfix.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach merged pull request #2646:
URL: https://github.com/apache/netbeans/pull/2646


   


----------------------------------------------------------------
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.

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] JaroslavTulach commented on pull request #2646: Renaming modified src.java file leads to Cannot save src.java error. Hotfix.

Posted by GitBox <gi...@apache.org>.
JaroslavTulach commented on pull request #2646:
URL: https://github.com/apache/netbeans/pull/2646#issuecomment-756569316


   > I vaguely thought about some "Environment"-like strategy pluggable into Loaders or 
   > Filesystems that would define strategy for files/dobjs synchronization. 
   
   There is a clash between _global_/_environment_-like solution and _local_ solution. Only `DataEditorSupport` knows what it wants exactly to do when a file is changed. That's the _local_ knowledge. I am afraid you'd need many pluggable strategies for each individual case.
   
   The best way to implement the _global_/_environment_ solution is to replace current implementation of FileSystem (e.g. `masterfs`) with another one that would be tighter integrated with VSCode workspaces concept.
   
   > strategy for files/dobjs
   
   The important difference between `FileObject` and `DataObject` in this case is __identity__. When a `FileObject` is moved or renamed, it changes identity. Moving or renaming `DataObject` keeps the identity. To match VSCode/NetBeans concepts when renaming an open and modified editor, it would be desirable to keep `DataObject`'s identity - that's not the case right now.


----------------------------------------------------------------
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.

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