Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-core-dev] Handle cycle dependencies using JDT

Hi Raphael,

Sorry for the earlier reply. I didn't see you're using 2 different projects
and not packages.

In your case, there's a build path cycle because both P1 and P2 are on each
other's build path. Can you elaborate what is it that you want to know
here? Do you, as a user want to get rid of this error so that Eclipse can
compile your projects, or do you want to do this programatically? [Anyway,
its best if you open a new thread on the forum]


Thanks and Regards
--------------------------------------------------------
Ayushman Jain
Eclipse JDT/Core Committer
ayushman_jain@xxxxxxxxxx
Ph: +919742257437
Twitter @ayushman_jain
--------------------------------------------------------




From:	Ayushman Jain1/India/IBM
To:	jdt-core-dev@xxxxxxxxxxx
Date:	26/09/2011 12:01
Subject:	Re: [jdt-core-dev] Handle cycle dependencies using JDT


Hi Raphael,

There's no cyclic dependency as such in your code. You're referencing 2
classes from each other which is perfectly ok and allowed. A cyclic
dependency is a more relevant term for the following scenario

class A{
    A() {
         new B();
    }
}

class B{
    B() {
         new C();
    }
}

class C{
    C() {
         new A();
    }
}


So in order to compile your code there's nothing special that you have to
do. If you're looking for how to use JDT to prorgramatically compile java
classes, please refer to the Help>JDT plug-in developer guide> Programmer's
guide> JDT core> Compiling java code.

In future,please use the eclipse JDT forums to ask questions. This mailing
list is reserved for JDT development related discussions.


Thanks and Regards
--------------------------------------------------------
Ayushman Jain
Eclipse JDT/Core Committer
ayushman_jain@xxxxxxxxxx
Ph: +919742257437
Twitter @ayushman_jain
--------------------------------------------------------





From:	Srikanth S Adayapalam/India/IBM
To:	Ayushman Jain1/India/IBM@IBMIN
Date:	26/09/2011 11:06
Subject:	Fw: [jdt-core-dev] Handle cycle dependencies using JDT



----- Forwarded by Srikanth S Adayapalam/India/IBM on 26-09-11 11:06 AM
-----

From:	Raphael Moita <raphael.moita@xxxxxxxxx>
To:	jdt-core-dev@xxxxxxxxxxx
Date:	23-09-11 06:35 PM
Subject:	[jdt-core-dev] Handle cycle dependencies using JDT
Sent by:	jdt-core-dev-bounces@xxxxxxxxxxx



Hi guys,


Does someone know how I could use JDT to compile a simple example of cycle
dependency like the one I'm describing below?


Proj1


                Class1 {


                                Class2 c2;


                }





Proj2


                Class2 {


                                Class1 c1;


                }



I know Eclipse does this magic using JDT but I'd like to know how it
happens behind the scenes. Has someone already done that or could point me
out where I can find some examples to help me?


* let's disregard the reasons I have these cycles ok ?  :)


I'd apreciate any help


Thanks in advance


--
[Raphael Moita_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev






Back to the top