MantisBT - ParaView
View Issue Details
0013092ParaViewFeaturepublic2012-04-13 10:222016-08-12 09:59
Ian Curington 
Utkarsh Ayachit 
highminorhave not tried
closedmoved 
3.14.1 
git-master 
ParaViewPro
usability
0013092: Environment Variables in Statefile Data paths, Missing data visual indicator, scroll long lists
PROBLEM:
  Saved state files are written with full data paths, requiring adjustment if moved. No visible indication if reloaded data paths are valid. If 10+ data files in state file, list becomes too long for screen size, no scrolling facility.

SOLUTION:
  Add environment variable support in data path names, making state files portable. Add visual RED/GREEN indicated for valid data paths, add Qt scrollbar.

PATCH:
   patched files: pqFixStateFilenamesDialog.[h,cxx], vtkSMStateLoader.cxx
   action: copy pqFixStateFilenamesDialog to ParaView-3.14.0\Qt\Components
           copy vtkSMStateLoader to ParaView-3.14.0\ParaViewCore\ServerManager

    DESCRIPTION: State files with filenames often require to be updated with locations of used files on new machine. Our
    patch makes this process easier and faster by allowing pathnames to contain environment variables and by adding
    indicators to "Fix Paths in State File" dialog about missing filename or directory. Also, scrolling area is added
    to the dialog to handle cases if there is large number of input files specified in state file. In case of environment
    variables, supported syntax is %VAR_NAME%, ${VAR_NAME} and $VAR_NAME. In the latest case ($VAR_NAME), VAR_NAME must be
    from [a-zA-Z0-9_-]+ language. Beside each filename box in "Fis Paths in State File" dialog is added indicator which
    when its green, currently specified file / directory is found on current machine. If it is yellow, it should be checked
    because algorithm was unable to check if it is semantically correct, and if it is red, user shoud double-check and
    possibly replace content of appropriate text-box. Also, if environment variables are present, they are replaced with
    its content (value).

    CHANGES: To make this patch, following changes were made (ParaView source patch):

       - QMap<pqFileChooserWidget*, QLabel*> IndicatorsMappings parameters is added to pqFixStateFilenamesDialog
           class declaration in pqFixStateFilenamesDialog.h,
       - QMap, pqFileChooserWidget and QLabel classes are included at the beginning of pqFixStateFilenamesDialog.h,
       - At the beginning of the file pqFixStateFilenamesDialog.cxx, new function is added SetIndicator() which
         initializes indicator's color for passed content of text-box,
       - At the beginning of the file pqFixStateFilenamesDialog.cxx, new function is added ResolveEnvironmentVariables()
         which replaces environment variables from input strings with environment variable's contents,
       - In pqFixStateFilenamesDialog class constructor, ResolveEnvironmentVariables() is called to resolve environment
         variables in every path,
       - In pqFixStateFilenamesDialog class constructor, QScrollArea is added and populated by group-boxes,
       - In pqFixStateFilenamesDialog class constructor, IndicatorsMappings table is populated and indicators are
         initialized and
       - In pqFixStateFilenamesDialog::onFileNamesChanged() is added logic for setting indicator green if file exists
         or red if file doesn't exist.
       - Added ResolveEnvironmentVariables() and TraverseTree() routines at the beginning of vtkSMStateLoader.cxx. Also
         added calling of TraverseTree() in vtkSMStateLoader::LoadStateInternal() routine.



No tags attached.
cxx vtkSMStateLoader.cxx (23,658) 2012-04-13 10:22
https://www.vtk.org/Bug/file/9156/vtkSMStateLoader.cxx
cxx pqFixStateFilenamesDialog.cxx (21,742) 2012-04-13 10:23
https://www.vtk.org/Bug/file/9157/pqFixStateFilenamesDialog.cxx
? pqFixStateFilenamesDialog.h (3,086) 2012-04-13 10:24
https://www.vtk.org/Bug/file/9158/pqFixStateFilenamesDialog.h
cxx pqFixStateFilenamesDialog-UPDATE-20july2012.cxx (22,703) 2012-07-20 09:05
https://www.vtk.org/Bug/file/9236/pqFixStateFilenamesDialog-UPDATE-20july2012.cxx
png 20-07-2012 13-43-56.png (51,753) 2012-07-20 09:08
https://www.vtk.org/Bug/file/9237/20-07-2012%2013-43-56.png
png
Issue History
2012-04-13 10:22Ian CuringtonNew Issue
2012-04-13 10:22Ian CuringtonFile Added: vtkSMStateLoader.cxx
2012-04-13 10:23Ian CuringtonFile Added: pqFixStateFilenamesDialog.cxx
2012-04-13 10:24Ian CuringtonFile Added: pqFixStateFilenamesDialog.h
2012-04-23 10:38Utkarsh AyachitCategory(No Category) => Feature
2012-04-23 10:41Utkarsh AyachitProjectTBD => ParaViewPro
2012-07-20 09:04Ian CuringtonNote Added: 0028885
2012-07-20 09:05Ian CuringtonFile Added: pqFixStateFilenamesDialog-UPDATE-20july2012.cxx
2012-07-20 09:08Ian CuringtonFile Added: 20-07-2012 13-43-56.png
2012-07-20 09:09Ian CuringtonNote Added: 0028886
2012-07-21 10:10Utkarsh AyachitAssigned To => Utkarsh Ayachit
2012-07-21 10:10Utkarsh AyachitTarget Version => 4.0
2012-07-29 07:09Ian CuringtonNote Added: 0028963
2012-07-29 07:09Ian CuringtonNote Added: 0028964
2012-10-18 13:49Utkarsh AyachitTarget Version4.0 => git-master
2016-08-12 09:59Kitware RobotNote Added: 0038190
2016-08-12 09:59Kitware RobotStatusbacklog => closed
2016-08-12 09:59Kitware RobotResolutionopen => moved

Notes
(0028885)
Ian Curington   
2012-07-20 09:04   
Please remove pqFixStateFilenamesDialog.cxx (21,742 bytes) 2012-04-13 10:23,
replace with new file pqFixStateFilenamesDialog-UPDATE-20july2012.cxx
(0028886)
Ian Curington   
2012-07-20 09:09   
Screenshot added showing visual representation changes provided by this patch.
(0028963)
Ian Curington   
2012-07-29 07:09   
On Tue, Jul 24, 2012 at 8:30 AM, Utkarsh commented:
"...couple of issues with the patch:
1. SetIndicator(..) won't work in client-server mode. We need to be
smart about this in client-server mode and consolidates the tests to
avoid performance degradation for a large number of files.
2. Duplication of ResolveEnvironmentVariables()
3. Style issues: indentation, missing {} after if (), etc."
(0028964)
Ian Curington   
2012-07-29 07:09   
OK thank you, we will take a look at these issues.
(0038190)
Kitware Robot   
2016-08-12 09:59   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current ParaView Issues page linked in the banner at the top of this page.