[ 
https://issues.apache.org/jira/browse/NETBEANS-5851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17380881#comment-17380881
 ] 

Ludovic HOCHET commented on NETBEANS-5851:
------------------------------------------

Now running a dev build in debug, the index node is closed because in
 * platform\openide.loaders\src\org\openide\loaders\DataNode.java

the following code (line 858) will close it:

 
{code:java}
                if (DataObject.PROP_VALID.equals(ev.getPropertyName())) {
                    Object newVal = ev.getNewValue();
                    if ((newVal instanceof Boolean) && (!((Boolean) 
newVal).booleanValue())) {
                        fireNodeDestroyed();
                    }
                    return;
                }
{code}
with ev being:
{noformat}
ev = (java.beans.PropertyChangeEvent) 
java.beans.PropertyChangeEvent[propertyName=valid; oldValue=true; 
newValue=false; propagationId=null; 
source=org.netbeans.modules.html.HtmlDataObject@3ea97f25[C:\Users\Ludovic\AppData\Local\Temp\HTML5Application\public_html\index222345.html@ccc93b8:5b861224[invalid]]]{noformat}
(index222345.html is the new name for the file)

 

 

> Renaming a file in an HTML project with git support closes file after rename
> ----------------------------------------------------------------------------
>
>                 Key: NETBEANS-5851
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5851
>             Project: NetBeans
>          Issue Type: Bug
>          Components: versioncontrol - Git, web - HTML Project
>    Affects Versions: 12.4
>         Environment: Product Version: Apache NetBeans IDE 12.4
> Java: 14; OpenJDK 64-Bit Server VM 14+36-1461
> Runtime: OpenJDK Runtime Environment 14+36-1461
> System: Windows 10 version 10.0 running on amd64; Cp1252; de_DE (nb)
> User directory: C:\Users\Chris\AppData\Roaming\Netbeans\12.4
> Cache directory: C:\Users\Chris\AppData\Local\NetBeans\Cache\12.4
> Git for Windows version: 2.31.1.windows.1
>            Reporter: Christian Lenz
>            Priority: Major
>
> When I create a simple HTML5 project and initilize this project as a git 
> project and try to rename a file, which is open inside of the editor, it will 
> close the file after renaming it.
> Steps to reproduce:
> * Open NetBeans 12.4 as clean as possible
> * Create a new HTML5 project and follow the steps until the end, everything 
> default
> * Wait for opening the project
> * Right click on the project -> Versioning -> Initilize Git Repository...
> * Go to options -> keymap -> search for Rename... with category System and 
> set it to F2
> * Click ok
> * Open the index.html file and hit F2
> * Rename dialog opens
> * Change index to indexs and hit enter
> * It will close the rename dialog and also the index.html file.
> * If it doesn't work for the first time, stay in the indexs.html file, hit F2 
> again and rename it back to index and hit enter.
> * Try any other file like XML, JSON, JS etc.
> What was expected
> That the file still stays open after renaming. This just happens if I 
> initilize the project with git. If not, everything works fine and as expected.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

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

Reply via email to