Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Newbie question: include path vs build path
Newbie question: include path vs build path [message #545006] Tue, 06 July 2010 06:44 Go to next message
Mauro Molinari is currently offline Mauro Molinari
Messages: 278
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 #546218 is a reply to message #545006] Mon, 12 July 2010 04:01 Go to previous messageGo to next message
Mauro Molinari is currently offline Mauro Molinari
Messages: 278
Registered: July 2009
Senior Member
Anybody can help on this? :-(
Re: Newbie question: include path vs build path [message #546264 is a reply to message #546218] Mon, 12 July 2010 06:18 Go to previous messageGo to next message
sNop is currently offline sNop
Messages: 281
Registered: July 2009
Senior Member
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig3FA1085A40AA0B3F0B1B84AD
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: quoted-printable

Here is some info:
http://wiki.eclipse.org/images/6/6f/Include_build.pdf ( it's from this si=
te: http://wiki.eclipse.org/PDT/2.0_Plan )
http://www.eclipse.org/pdt/release-notes/pdt2_0.php

On 12. 7. 2010 10:01, Mauro Molinari wrote:
> Anybody can help on this? :-(


--------------enig3FA1085A40AA0B3F0B1B84AD
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkw66+wACgkQkCAxuhXMpxXikgCeLBDltBnuR6hjj5LdZDl/ XRJf
6WEAn2vEwK3cnxTzSnITzt6DTmSihCV4
=VtvC
-----END PGP SIGNATURE-----

--------------enig3FA1085A40AA0B3F0B1B84AD--
Re: Newbie question: include path vs build path [message #546373 is a reply to message #546264] Mon, 12 July 2010 10:44 Go to previous message
Mauro Molinari is currently offline Mauro Molinari
Messages: 278
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.
Previous Topic:New features in the XDebug 2.1 should be max. utilize by PDT
Next Topic:Upgrading PHP project from 5.2 to 5.3 question
Goto Forum:
  


Current Time: Thu Aug 21 10:09:27 EDT 2014

Powered by FUDForum. Page generated in 0.02330 seconds