Newbie question: include path vs build path [message #545006] |
Tue, 06 July 2010 10:44  |
Mauro Molinari Messages: 285 Registered: July 2009 |
Senior Member |
|
|
Hi all!
I'm new to PDT and I have some (I think) basic questions. I tried to
read some documentation, but some things are not yet clear to me.
First of all, what's the difference between "include path" and "build
path"? PDT help says:
INCLUDE PATH:
"The PHP Include Path is a set of locations that is used for finding
resources referenced by include/require statements.
Note:
Adding libraries or external projects elements to your project's Include
Path will also make elements defined in these resources available as
content assist options."
---
BUILD PATH:
"The PHP build process scans all resources that are on the project's PHP
Build Path so that elements defined within them can be made available
for Content Assist options."
So, include path seems to be related to "include/require statements",
while build path seems to be related to "content assist". However,
libraries and external project which contain resources I need to use (so
that they are available in content assist) must be set in the include
path, not in the build path. Why?
I'm used to Java development where there's only one concept of build
path: what is on build path is available for both content assist and
runtime retrieving. Other folders which are not on build path are
available at runtime for resource retrieving but are not used for code
assist and such. So, why does PDT have two different concepts?
Last question: when you create a PHP project there's the option to "use
project as source folder" or "create separate folders for source files
and public resources". In the latter case, a "public" folder is created
in the project, which neither is in the include path, nor in the build
path. What's it for? What does PDT mean by "public resources"?
Thanks in advance,
Mauro.
|
|
|
|
|
Re: Newbie question: include path vs build path [message #546373 is a reply to message #546264] |
Mon, 12 July 2010 14:44  |
Mauro Molinari Messages: 285 Registered: July 2009 |
Senior Member |
|
|
Il 12/07/2010 12.18, sNop ha scritto:
> Here is some info:
> http://wiki.eclipse.org/images/6/6f/Include_build.pdf ( it's from this site: http://wiki.eclipse.org/PDT/2.0_Plan )
> http://www.eclipse.org/pdt/release-notes/pdt2_0.php
This helps a lot, thank you.
However, I would have some considerations.
It would be much more simple to understand if there were just the
concept of "path" and "buildpath". I mean, I would expect the buildpath
to be just a subset of the include path, as is in Java Project, so that
I can mark any of the sources in the project path as belonging to build
path. As of now, there are instead two totally independent pages to
configure one and the other.
In my scenario, when a dependency between two projects were defined, the
build path of the dependant project could be made up by its build path
and that of the needed project.
Moreover, if I understood it right, libraries are something more related
to buildpath than to includepath, aren't they? However, as of now I have
to set up them in the include path, not in the build path.
In other words: the PHP engine considers the buildpath for PHP
resources, BUT external PHP resources are taken from the includepath
instead...
Mauro.
|
|
|
Powered by
FUDForum. Page generated in 0.02197 seconds