Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Q: I would like to change the .pl extension because of conflict with perl
files in a project.
A:
No need to rebuild anything. It's configurable, though not very
obvious, i have to admit.
There are two things you need to change. First, in the eclipse preferences (windows→preferences) go to the preferences page general→editors→file associations. There you can remove the PL Editor from the files ending with *.pl, define a new file type and associate the PL Editor with it. Second, in the project properties of your prolog projects, go to the property page named “Prolog Project Properties”. There is a setting labeled “Inclusion Pattern”. This a regular expression filenames have to match to be considered as prolog source code by the builder.
You will notice that it always defaults to “.*\.pl” for new projects. This default is currently hardwired, so you will have to change it to your prefered pattern each time you create a new prolog project.
Making the default configureable is on my todo list for the next release (though i cannot say when it will come out, i am pretty much consumed by my diploma thesis)
If you still feel like recompiling the pdt, you can also change the default setting in the source code
The full source code of the pdt should be included in the plugins jars. The relevant plugin is org.cs3.pdt.core.
Open the type
org.cs3.pdt.core.internal.natures.PrologProjectNature
and have a look at the method
public Option[] getOptions()
It initializes an array of property descriptions and there respective defaults, including the “inclusion pattern” setting mentioned above. I guess you find your way around from there, otherwise let me know.