[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] get name of the anonymous class

Unfortunately, Java model elements don't work without the context of a Java project.
So, yes, it is unlikely to work for you.

Now, I am less hopeful of finding another way. These things (the anonymous names)
are decided much later in the compilation process and not sure DOM, which solely
works with source code has the capability to find that. May be others can correct me
if I am wrong.

Regards,
Jay


Inactive hide details for Alex Lovkov ---11/04/2019 02:46:47 PM---I just tried all methods which return something:) I read in dAlex Lovkov ---11/04/2019 02:46:47 PM---I just tried all methods which return something:) I read in docs: that if I don't use java-plugin, I

From: Alex Lovkov <charmik1994@xxxxxxxxx>
To: Jayaprakash Arthanareeswaran <jarthana@xxxxxxxxxx>
Cc: "Eclipse JDT general developers list." <jdt-dev@xxxxxxxxxxx>
Date: 11/04/2019 02:46 PM
Subject: Re: [jdt-dev] get name of the anonymous class





I just tried all methods which return something:) 
I read in docs: that if I don't use java-plugin, I can specify ASTParser by unitName and Environment, but it didn't help me at all. .getJavaElement returns null anyway, from your code. So how can I get real name of anonymous class? Like Main$1$2 for example? Is it really possible? Thanks!

чт, 11 апр. 2019 г. в 06:41, Jayaprakash Arthanareeswaran <jarthana@xxxxxxxxxx>:


--
С Уважением, Ловков А.С.