Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[ve-dev] Access project from VE Plugin

Dear VE Team,


1. How does one get access to the JavaProject of the Visual Class from the
VE plug-in?

2. Is it possible to access a particular class from that project and
instantiate it say in the Plugin class?

Thanks and regards,

Janak


PS: I could do the following from the Plugin class, but it doesn't seem to
be the right way and also I can't  create an instance of IType:

	IResource r =
ResourcesPlugin.getWorkspace().getRoot().findMember("ULCVELocalContainer");
			IProject project = (IProject) r;
			IJavaProject javaProject = JemProjectUtilities.getJavaProject(project);
			try {
				IType type =
javaProject.findType("com.canoo.ve.licensecheck.LoadedClassCheck");
				if (type.isClass()) {
					System.out.println("Class found");
				}
			} catch (JavaModelException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}




Back to the top