Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » How to open IType and IMember objects
How to open IType and IMember objects [message #530804] Sat, 01 May 2010 03:05 Go to next message
Eclipse UserFriend
ICompilationUnit unit=mypackage.getCompilationUnit("SuperClass.java");
ICompilationUnit unit1=mypackage.getCompilationUnit("SubClass.java");
System.out.println("before IMember");
unit.open(null);
unit1.open(null);

IType destinationType=unit.getType("SuperClass.java");


IType sourceType=unit1.getType("SubClass.java");
originalJavaMember=(IMember)sourceType;


//////////////////////////////////////////////////////////// /////////////////
I have written above code, but I am getting the following error:
"Java Model Exception: Java Model Status [SubClass.java [in SubClass.java [in pull [in src [in org.moreunit.plugin]]]] does not exist]"
When I do unit.open it will open the file and I can access all member variables in the project. But when I convert iCompilationUnit into Itype by doing
IType destinationType=unit.getType("SuperClass.java");

The file is no longer opened I get the exception of Java Model. Any hint how to open the Itype and Imember, so that I can get its member methods.


Re: How to open IType and IMember objects [message #531086 is a reply to message #530804] Mon, 03 May 2010 12:27 Go to previous messageGo to next message
Eclipse UserFriend
You might want to try:

IType destinationType=unit.getType("SuperClass");

instead.

Let me know if it works.

Olivier
Re: How to open IType and IMember objects [message #531223 is a reply to message #531086] Tue, 04 May 2010 04:57 Go to previous message
Eclipse UserFriend
it works fine now..thanka for the help..Smile
Previous Topic:Eclipse Galileo on Ubuntu
Next Topic:remote debugger customization
Goto Forum:
  


Current Time: Tue Apr 15 02:56:34 EDT 2025

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

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

Back to the top