Listing other project class method's

I have problem accessing class methods. My task is to make eclipse plug-in to get selected file's (from another project), name of class and list out class methods. I figured out how to get class name, but i don't know how to access that class as an class (Class ). Here's what I've got

@Override

public Object execute(ExecutionEvent event) throws ExecutionException {

String className = "";

Object firstElement;

ISelectionService service = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService();

IStructuredSelection structured = (IStructuredSelection) service.getSelection();

/* Getting first element of selected structure (path and workspace)*/

firstElement = structured.getFirstElement();

IResource resource = (IResource) Platform.getAdapterManager().getAdapter(firstElement, IResource.class);

/* Extracting class...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts