UltraEdit project file

From Just Solve the File Format Problem
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{FormatInfo |subcat=Development |extensions={{ext|prj}}, {{ext|pui}} }} '''UltraEdit project files''' are used by the UltraEdit text editor from IDM Computer Solutions to ke...")
 
(Open Files section)
Line 28: Line 28:
 
The filenames of the open files in the project can be found in '''Open File''n''''' attributes, where n is a number. The attribute value is, very straightforwardly, the full name/path of the file including drive letter, like '''C:\files\somefile.txt'''. So, for instance, if you've just reorganized your system so that files are in a different place, or maybe a different drive, but you know that once you try to open an UltraEdit project that points at the old locations, UltraEdit will realize the files don't exist there any more, and "helpfully" close all of them leaving you with an empty project... well, you can prevent that by opening the project file as a text file and changing the paths to the new locations. So if you moved your files from drive C to drive D, a global replacement of "C:\" to "D:\" will work. These sorts of lines appear in both the .prj and .pui files, but the .pui file seems to be where UltraEdit actually loads its status from.
 
The filenames of the open files in the project can be found in '''Open File''n''''' attributes, where n is a number. The attribute value is, very straightforwardly, the full name/path of the file including drive letter, like '''C:\files\somefile.txt'''. So, for instance, if you've just reorganized your system so that files are in a different place, or maybe a different drive, but you know that once you try to open an UltraEdit project that points at the old locations, UltraEdit will realize the files don't exist there any more, and "helpfully" close all of them leaving you with an empty project... well, you can prevent that by opening the project file as a text file and changing the paths to the new locations. So if you moved your files from drive C to drive D, a global replacement of "C:\" to "D:\" will work. These sorts of lines appear in both the .prj and .pui files, but the .pui file seems to be where UltraEdit actually loads its status from.
  
A number of other attributes like '''Open File Line''n''''' are also there, with numeric values that apparently reflect the scroll and cursor position in each file (perhaps in byte offsets).
+
Known attributes in this section:
 +
 
 +
* '''Active File Display Mode''' – A number; not sure what it means.
 +
 
 +
* '''Active File Index''' – Another number; probably the file number of the one that is in the current tab/window with focus for editing.
 +
 
 +
* '''Open File''n''''' – Path/filename of file #n, with a file number starting at 0 and corresponding to the other attributes with the same number.
 +
 
 +
* '''Open File Line''n''''' – The byte offset in file #n where the top of the edit window for that file is currently positioned.
 +
 
 +
* '''Open File Pos''n''''' – The byte offset in file #n where the edit cursor is currently positioned.
 +
 
 +
* '''Open File Window Pos''n''''' – Followed by ten numbers, comma-separated, some of which can be negative. It apparently has something to do with how the edit window is positioned for file #n.
 +
 
 +
* '''Remember Files''' – Not sure what this means.
  
 
== Links and references ==
 
== Links and references ==
 
* [http://www.ultraedit.com/forums/viewtopic.php?f=13&t=6094 Forum thread about .pui files]
 
* [http://www.ultraedit.com/forums/viewtopic.php?f=13&t=6094 Forum thread about .pui files]
 
* [http://www.ultraedit.com/forums/viewtopic.php?f=2&t=12857 Forum thread about .prj files]
 
* [http://www.ultraedit.com/forums/viewtopic.php?f=2&t=12857 Forum thread about .prj files]

Revision as of 00:35, 14 December 2012

File Format
Name UltraEdit project file
Ontology
Extension(s) .prj, .pui

UltraEdit project files are used by the UltraEdit text editor from IDM Computer Solutions to keep track of what files are open in a project, at what point in the files the user is scrolled to and where the cursor is, and how they are positioned on the screen.

Traditionally, projects were stored in files with the .prj extension, and that is still the sort of file that is shown in the file picker when creating, loading, and saving projects. However, somewhere around 2008 or so, newer versions of UltraEdit started using an additional file with a .pui extension (for Project User Interface) which doesn't appear in any of the file pick lists, but is automatically created in the same directory as the .prj file, and which appears to be where most of the "action" takes place regarding projects these days.

There does not appear to be any online documentation about UltraEdit project files, so all of this is "original research" based on examining the files. Wikipedia frowns on original research, but this ain't Wikipedia, so...

Contents

PRJ and PUI files

The .pui file, by default, is saved in a filename which includes the computer name and username as well as the project name. Thus, a project Stuff.prj will be accompanied by a file called something like Stuff-COMPUTERNAME-username.pui, where COMPUTERNAME is the name of the computer as configured in the operating system, and username is the currently logged-in user. There's apparently an option somewhere in the convoluted configurations of UltraEdit to disable this and just use the project name. In the default configuration, these files are user and machine specific, so that if a different user loads the same project, or you do it on a different machine, only the .prj file will load and not the accompanying .pui file; a new .pui file would be created with the machine/user involved.

This is significant because, unlike in the "old days" when all the relevant project info was stored in the .prj file, nowadays the important stuff seems mostly to be done in the .pui file. The .prj file gets altered only at the time you first create it, or explicitly edit and save it with the functions in the Project menu, while the .pui file gets continuously updated to keep track of the files that are open and what point you're located at in them. So if you load a project on the same machine and user, you'll return to the exact status you were in last time you used the project, while if you load it under a different user or machine you'll be whisked back to the project's state as of whenever you first created it or explicitly modified it, which might be very different. The idea seems to be to let multiple users work on a project and maintain separate state information.

File contents

Both the .prj and .pui files are in plain text (with CRLF line breaks), so they can be examined and modified in any plain text editor (including UltraEdit itself if you open it from the File menu instead of the Project menu). Don't try to edit a project file as plain text while that project is itself open as a project, since that will make UltraEdit clash with itself in altering the file, but it's OK to edit it there while no project (or a different project) is open.

The .prj and .pui files have similar contents, consisting mostly of lines with attribute names and values separated by an equal sign (=). The order seems different (the .prj files tend to have the different attributes relating to each file together, while the .pui file has all the attributes of a given type together) but this may not have significance.

There are also a few bracketed lines, which appear to identify major sections of the file. [Open Files] is where most of the data is, but the .pui file also has a [Project Information] section, and the .prj file has [Project ID] and [Group].

Open Files section

The filenames of the open files in the project can be found in Open Filen attributes, where n is a number. The attribute value is, very straightforwardly, the full name/path of the file including drive letter, like C:\files\somefile.txt. So, for instance, if you've just reorganized your system so that files are in a different place, or maybe a different drive, but you know that once you try to open an UltraEdit project that points at the old locations, UltraEdit will realize the files don't exist there any more, and "helpfully" close all of them leaving you with an empty project... well, you can prevent that by opening the project file as a text file and changing the paths to the new locations. So if you moved your files from drive C to drive D, a global replacement of "C:\" to "D:\" will work. These sorts of lines appear in both the .prj and .pui files, but the .pui file seems to be where UltraEdit actually loads its status from.

Known attributes in this section:

  • Active File Display Mode – A number; not sure what it means.
  • Active File Index – Another number; probably the file number of the one that is in the current tab/window with focus for editing.
  • Open Filen – Path/filename of file #n, with a file number starting at 0 and corresponding to the other attributes with the same number.
  • Open File Linen – The byte offset in file #n where the top of the edit window for that file is currently positioned.
  • Open File Posn – The byte offset in file #n where the edit cursor is currently positioned.
  • Open File Window Posn – Followed by ten numbers, comma-separated, some of which can be negative. It apparently has something to do with how the edit window is positioned for file #n.
  • Remember Files – Not sure what this means.

Links and references

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox