Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » ICompilationUnit and IMethod
ICompilationUnit and IMethod [message #260956] Fri, 03 July 2009 16:37 Go to next message
Eclipse UserFriend
Hi Guys,

Thanks for all your help. I have the following questions.

1)
How can i check if an ICompilotionUnit is a normal class or an interface.
I would like to use different image for a normal class and another image
if the ICompilotionUnit is an interface.


2)
How can i know if an IMethod is a constructor or a normal method.


Thanks for your help.


Regards,
Eddy Freeman
Re: ICompilationUnit and IMethod [message #260964 is a reply to message #260956] Mon, 06 July 2009 03:19 Go to previous messageGo to next message
Eclipse UserFriend
ICompilationUnit represent .java files whereas IType represent classes and
interfaces. So you should see IType.isClass() IType.isInterface().

To find out if an IMethod is a constructor see IMethod.isConstructor()
Re: ICompilationUnit and IMethod [message #261019 is a reply to message #260956] Mon, 06 July 2009 10:54 Go to previous message
Eclipse UserFriend
Eddy Freeman wrote:
> Hi Guys,
>
> Thanks for all your help. I have the following questions.
>
> 1)
> How can i check if an ICompilotionUnit is a normal class or an
> interface. I would like to use different image for a normal class and
> another image if the ICompilotionUnit is an interface.
Not that this is already possible if you check 'Java Type Indicator' on
General > Appearance > Label Decorations preference page.

Dani
>
>
> 2)
> How can i know if an IMethod is a constructor or a normal method.
>
>
> Thanks for your help.
>
>
> Regards,
> Eddy Freeman
>
Previous Topic:Reuse basic Java Editor
Next Topic:First opening of javadoc fails
Goto Forum:
  


Current Time: Fri Sep 19 10:42:08 EDT 2025

Powered by FUDForum. Page generated in 0.03346 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top