Why doesn't JDT set .project "projects"?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Why doesn't JDT set .project "projects"?

Mickael Istria-5
Hi all,

While I'm investigating about how to maybe improve the WorkspaceJob in general, I've noticed that despite the Eclipse Resource model allows to use .project to define dependency between projects, JDT seems to not set the "projects" nodes in the .project.
I understand it does it in its own .classpath, but I think it's a pity to not try to place such typical project dependency model on the lowest layer that supports it. Note that the same project could be listed as a project reference in .project as well as .classpath, those don't have to be exclusive. Having in on the .project as well would allow further optimizations of the Build Workspace job, independently of JDT, but that would still be profitable to JDT.
I imagine their are reasons why this is not done. Does anyone know what these could be?

Thanks in advance for your enlightenment ;)
--
Mickael Istria
Eclipse IDE developer, at Red Hat Developers community
Elected Committer Representative at the Eclipse Foundation board of directors

_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Christian Dietrich


---
Gesendet von Boxer | http://getboxer.com

Hi there is a new concept of dynamic references jdt now does make use of. We at xtext fight currently with the same problem 
_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Daniel Megert
In reply to this post by Mickael Istria-5
See https://bugs.eclipse.org/46668as an entry point into the discussion/decision.

Dani



From:        Mickael Istria <[hidden email]>
To:        "Eclipse JDT general developers list." <[hidden email]>
Date:        21.11.2017 11:38
Subject:        [jdt-dev] Why doesn't JDT set .project "projects"?
Sent by:        [hidden email]




Hi all,

While I'm investigating about how to maybe improve the WorkspaceJob in general, I've noticed that despite the Eclipse Resource model allows to use .project to define dependency between projects, JDT seems to not set the "projects" nodes in the .project.
I understand it does it in its own .classpath, but I think it's a pity to not try to place such typical project dependency model on the lowest layer that supports it. Note that the same project could be listed as a project reference in .project as well as .classpath, those don't have to be exclusive. Having in on the .project as well would allow further optimizations of the Build Workspace job, independently of JDT, but that would still be profitable to JDT.
I imagine their are reasons why this is not done. Does anyone know what these could be?

Thanks in advance for your enlightenment ;)
--
Mickael Istria
Eclipse IDE developer, at Red Hat Developers community
Elected Committer Representative at the Eclipse Foundation board of directors_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__dev.eclipse.org_mailman_listinfo_jdt-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=1UITCR5rxUZHSFczvfaNFK4ymEbEiccRX7VKchpqz0Y&m=KaljcVgVt8ZwXJsSpCnSPWsxMZ7cmudfOldGfYJvNUY&s=6As4JeMR-kMAPfmJFkwEzpyPceu9az_C7SBvb4F7leU&e=



_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Daniel Megert
In reply to this post by Mickael Istria-5
> Hi there is a new concept of dynamic references jdt now does make use of.

That was introduced in 2003. Not really "new" ;-).

Dani



From:        Christian Dietrich <[hidden email]>
To:        Mickael Istria <[hidden email]>, "Eclipse JDT general developers list." <[hidden email]>
Date:        21.11.2017 11:51
Subject:        Re: [jdt-dev]        Why doesn't JDT set .project "projects"?
Sent by:        [hidden email]






---
Gesendet von Boxer |
http://getboxer.com

Hi there is a new concept of dynamic references jdt now does make use of. We at xtext fight currently with the same problem
_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://urldefense.proofpoint.com/v2/url?u=https-3A__dev.eclipse.org_mailman_listinfo_jdt-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=1UITCR5rxUZHSFczvfaNFK4ymEbEiccRX7VKchpqz0Y&m=7cxl37wy9mmYZxAPI7y7Cu-MmH2Tl30CKriYDlHVssU&s=wPqIAZQUCdJM49VJAfOuGLn_M-tZeULo6f0gisIfldU&e=



_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Christian Dietrich
I meant the IDynamicReferenceProvider which was introduced in 3.12

_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Mickael Istria-5
In reply to this post by Daniel Megert


On Tue, Nov 21, 2017 at 12:23 PM, Daniel Megert <[hidden email]> wrote:
See https://bugs.eclipse.org/46668as an entry point into the discussion/decision.

Thanks for this link Dani.
So the reason seems to be "only" that it makes the .project dirty as well as .classpath? That seems like removing a great information just for the sake of not modifying a file with another...
Anyway, DynamicReferenceProvider can be the perfect answer to both the bug and my question. I'll dig deeper on this topic and maybe come back to this thread with more questions. Thanks for the pointer Christian!

--
Mickael Istria
Eclipse IDE developer, at Red Hat Developers community
Elected Committer Representative at the Eclipse Foundation board of directors

_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev
Reply | Threaded
Open this post in threaded view
|

Re: Why doesn't JDT set .project "projects"?

Aaron Digulla
In reply to this post by Mickael Istria-5
Am 21.11.2017 um 11:38 schrieb Mickael Istria:

> Hi all,
>
> While I'm investigating about how to maybe improve the WorkspaceJob in
> general, I've noticed that despite the Eclipse Resource model allows
> to use .project to define dependency between projects, JDT seems to
> not set the "projects" nodes in the .project.
> I understand it does it in its own .classpath, but I think it's a pity
> to not try to place such typical project dependency model on the
> lowest layer that supports it. Note that the same project could be
> listed as a project reference in .project as well as .classpath, those
> don't have to be exclusive. Having in on the .project as well would
> allow further optimizations of the Build Workspace job, independently
> of JDT, but that would still be profitable to JDT.
> I imagine their are reasons why this is not done. Does anyone know
> what these could be?

I don't know for sure but I imagine that having the dependency once is
enough. If you have two places, they can get out of sync. Which source
should then be trusted "more"? If we trust one source "more", why even
look in the other place when you can't trust it as much? If we can't
come up with a definitive rule that which source is "better", then that
would just create confusion. Every plugin would start to do it
differently. A lot of pain lies down that path.

That said, a project is not always what you expect. Take the Maven
plugin, for example. When you have a dependency in your Maven build that
happens to be in the workspace, the plugin will add the workspace
project to the build path *without* changing .project or .classpath:
Maven adds a dynamic classpath and this entry handles this case.

Why? Because the project in the workspace could be the correct name but
the wrong version. In that case, Maven would ignore the workspace
project. That's what Maven users expect to happen. Eclipse users would
be confused. Adding this special functionality in a general place would
be wrong for many reasons: A large set of the users would be always
upset, it would break stuff unnecessarily, the JDT plugins would need to
know that the Maven plugin exists and how it works and that would soon
mean that other plugins would have to add Maven special handling, too.

Regards,

--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://blog.pdark.de/

_______________________________________________
jdt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jdt-dev