private static boolean isProperNotification()

in src/net/sourceforge/transparent/ChangeManagement/CCaseChangeProvider.java [698:709]


  private static boolean isProperNotification( final FilePath filePath )
  {
    String oldName = filePath.getName();
    String newName = (filePath.getVirtualFile() == null) ? "" : filePath.getVirtualFile().getName();
    String oldParent = (filePath.getVirtualFileParent() == null) ? "" : filePath.getVirtualFileParent().getPath();
    String newParent = filePath.getPath().substring( 0, filePath.getPath().length() - oldName.length() - 1 );

    //  Check the case when the file is deleted - its FilePath's VirtualFile
    //  component is null and thus new name is empty.
    return newParent.equals( oldParent ) &&
           ( newName.equals( oldName ) || (StringUtil.isEmpty( newName ) && StringUtil.isEmpty( oldName ) ) );
  }