User to user discussion and support for UltraEdit, UEStudio, UltraCompare, and other IDM applications.

Project, workspace, and file management issues
5 posts Page 1 of 1
All my source code lives on a remote AIX box. I have created a UE project with entries for all my source files. I have created a script on the AIX box to fire off the make for my program. I have a project tool configured to use plink (from the putty tools) to run that script remotely and I capture all the output generated to an output window. All of that works great, and I get an output window containing, for example:

Code: Select all
off
   xlc_r -c -g -O3 -qstrict -q64 -qfullpath -qcpluscmt -qhalt=w -bnoquiet -I/opt/IBM/db2/V10.5/include -I/infosol/common/src -I/infosol/audit/src2 -DHAVE_GETLINE -DNO_MQ -DNO_MQTBL audit2.c
"audit2.c", line 4364.19: 1506-045 (S) Undeclared identifier ppszReqRsp.
"audit2.c", line 4365.17: 1506-045 (S) Undeclared identifier pszPost.
make: The error code from the last command is 1.

Stop.

My problem comes when I double click the error. It wants to open up the file as if it lived in my local documents directory. What I would like it to do is to open the matching file name from my project, if there is a match, before it tries to find the file in some default location. Changing the default file location would not help for a couple of reasons. One, I don't think the default path can handle an FTP location and two, not all my source will be in a single directory. Common source lives in its own directory, project specific source in another, and so on.
I'm not sure what your problem is.

How should UltraEdit know which local file to open if the file was compiled on a remote machine and error message contains just the file name without any path?

Searching all files of a project for a file with identical name as in error message might work for your project. But on thinking on a web project with many index.php and an error message containing only "index.php" this approach must fail by design.

"Set Default Path for Relative Paths..." not working (fixed) lists what UltraEdit does to find the file without full path in output window.

For your special use case I would suggest to add an option like --remote local project path for the script executed on remote machine to run the build. If this option is present on calling the script, the script filters the output messages of the compiler and prepends to each file name the passed local project path (and reformats warning/error message a little bit).

For example on your Windows computer the project is in D:\My Projects\ProjectX and therefore the script on remote machine is started with the additional parameters

--remote "D:\My Projects\ProjectX"

The remote executed script filters now output of compiler and therefore captured by UltraEdit is the output:

Code: Select all
D:\My Projects\ProjectX\audit2.c:4364:19: 1506-045 (S) Undeclared identifier ppszReqRsp.
D:\My Projects\ProjectX\audit2.c:4365:17: 1506-045 (S) Undeclared identifier pszPost.

If audit2.c is not in root project directory but in one of its subdirectories, it would be better the compiler outputs the file name with path relative to project directory on remote machine. I think in this case UltraEdit would find also the right local file as project directory path + relative path + file name gives a positive local file match.
Best regards from Austria
If I read your reply correctly, your idea hinges on having a local copy of those remote files. The only way I can see that not becoming a logistical nightmare would be to have my remote make file update my local copies. To be sure everything was synced, I would think the make would not only have to update the local copy of the c file, but also any specified h file dependencies, something like:

Code: Select all
VPATH = $(COMMON):$(ADPHIMM):$(DES):$(PK):$(MQ):$(MAPSRC)

...

adphimm.o: adphimm.c adphimm.h sigfuncs.h optfile.h taskid.h thdtable.h log.h mqfuncs2.h sslcon.h dstxpi.h
   $(CC) $(CFLAGS) $<
        udplocal -d$VPATH adphimm.c adphimm.h sigfuncs.h optfile.h taskid.h thdtable.h log.h mqfuncs2.h sslcon.h dstxpi.h

I guess that could work, but I would still prefer the option of having UltraEdit look in my project for the file first. That doesn't seem any more arbitrary than looking in some default directory as it does now. I think having it as an option would address this circumstance nicely. If the project were properly constructed, then any file being compiled would already be in the project's file list, I don't see the ambiguity in matching those file names for the ones in compiler generated messages. Seems like worst case, I would have what I have now, the double click doesn't jump me to my source. And in the usual course of events, it would position me properly in my source file. For a web project, you wouldn't enable this option.

Just a quick note, the files in my project are not local files, they are all of the form:

FTP::FTP_ACCOUNT\//dir/subdir/file

With that said, if that default directory option could be a path list that would accept full blown entries like the FTP one above, that could work. It would potentially be MUCH slower than just picking a match from the project file list...
Aha, I understand now more about your problem. Your project contains only FTP files, no local files. I did not expect this.

This is a completely different approach to what I use for my projects. I have always all project files local, build them local (with a cross-compiler if for an embedded controller) and upload/program the result files to the target system after successful build and execute/debug them there.

I have no experience with a project configuration you use, i.e. all files of project are remote files with no local copy.

Do you know the power tip Link remote directories to local directories which I think most users working with projects with remote files use?

However, as far as I know (and I'm just a user like you) UE currently does not support a search in list of project files for a file with a matching file name when it analyzes a message in output window containing a file name without path and there is no option to enable such a project files search. You could send a feature request email to IDM support for such a feature in a future version.

I could think of an UltraEdit script which takes contents in output window (or an edit window when capturing is done to an edit window instead of output window which would be better here), extracts all file names from error and warning messages, gets the list of project file names, searches in this list for the files in captured output, opens those files, sets bookmarks in case of multiple warnings/errors in same file, and outputs reformatted captured output to edit file or now better to output window. The bookmark viewer can then be used to jump to those lines.

I think it is possible with an UltraEdit script to run the user/project tool which calls the remote build, and then makes all above so that you see in output window what you want to see and have the file names in output window necessary for being able to open them in UltraEdit if the script should not open them all itself. There is already the script function GetListOfFiles. The rest would not be really difficult to code for experienced UltraEdit/JavaScript script writers.
Best regards from Austria
I also work with remote files and do not keep them on my local computer. But when I need to open a file from my project to fix it after a test (most of my code work is in IDL so there are no make files as IDL compiles on execution) I just click on the name of the file in the Project tab in File View. I don't have my projects set to load all files when I open the Project file as the server is not always available. I cntrl-click to select the files I need to work on in the File View and right-click to open them (or just double click on a single file).

Clicking on the file in File View versus in the Output Window doesn't seem to be too much of an extra effort.
5 posts Page 1 of 1
cron