Re: [eclipse-clp-users] add ownership of .pro files (and drop ownership of .pl files)?

From: Kish Shen <kisshen_at_...5...>
Date: Sun, 29 Nov 2009 22:27:47 +0000
-dp- wrote:
> There is a source tree of .pro Prolog files (from source control server)
> that I would like to use in my application and have ECLiPSe "own" them and
> all other .pro files on my OS (Windows 7) in the way that it owns .ecl and
> .pl files. I would like to avoid forking the source tree just to change file
> extensions.
> 
> At the same time, .pl files are usually owned by Perl and I would like to
> configure ECLiPSe to give up ownership of them.
> 
> I've looked in the user manual but didn't find any advice about this. This
> isn't critically important, but would be nice to use the .pro extension to
> indicate files containing "pure Prolog" and reserve .ecl for those that
> involve constraint libraries and such.
> 

You have not been very clear about what you mean by "ownership", for 
Windows and ECLiPSe, I can think of 3 situations:

1) Being able to use ECLiPSe predicates (such as compile/1) without 
giving the extension (.ecl etc.). As Joachim said in his post, you can 
change this with prolog_suffix flag in set_flag/3.

2) If you are usinfg TkECLiPSe, when you invoke a command that uses the 
file selection widget, there is a default file extension filter that 
filters out files without the .ecl or .pl extensions. Currently this is 
hard-wired into the Tcl code. You can change this by changing the Tcl 
source. In the file eclipse_tools.tcl, in the directory

<ECLiPSe>/lib_tcl

around line 200, there is the following:

set tkecl(filetypes) {
	{{ECLiPSe Files} {.ecl .pl}}
	{{ECLiPSe specific Files} {.ecl}}
	{{Prolog Files} {.pl}}
	{{ECLiPSe Precompiled Files} {.eco}}
	{{All Files} {*}}
}

If you want to change the filter for ECLiPSe files, change it to what 
you want, e.g.

	{{ECLiPSe Files} {.ecl .pro}}

The above two are for ECLiPSe on any platform, but the last is Windows 
specific:

3. If you used the self-extracting installer to install your ECLiPSe, 
this installer will associate an "ECLiPSe source" type with .ecl files.
As far as I can tell, this is done for .ecl only, and *not* for .pl files.

What the intaller does is to edit the registry entry to create the 
"ECLiPe Source" type. You can add other extension as "ECLiPSe Source" 
type using regedit, by creating a new key under HKEY_CLASSES_ROOT, e.g.
.pro (for files with .pro extensions), and then modify the (Default) 
entry, and set its data value to ECLiPSeSource (note there is no space).

An aside: we don't have access to Windows 7, and all our Windows 
specific stuff were done before Windows 7 was released. Have you had any 
problems with installing and using ECLiPSe on Windows 7?

Cheers,

Kish


-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Sun Nov 29 2009 - 22:28:03 CET

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST