Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Advice on creating a special Type Dialog
Advice on creating a special Type Dialog [message #284533] Wed, 27 April 2005 04:06
Eclipse UserFriend
I have what I thought was a simple problem, I should have known better...

I am writing a plugin to edit a configuration file for some software. The
config file has places where a Java type must be specified. This type
would exist in a project in the Workspace. I have 2 scenarios, one where
the type must implement a specifc interface and another where it must
extend a specific base class.

In my editor I create a TypeSelectionDialog using an IJavaSearchScope:

IJavaSearchScope scope = SearchEngine.createHierarchyScope(jType);
SelectionDialog dialog = JavaUI.createTypeDialog(shell,
PlatformUI.getWorkbench().getProgressService(),
scope,
IJavaElementSearchConstants.CONSIDER_CLASSES,
false,
"*");

In the code above, when jType is an abstract class this gives a dialog
with the subtypes and supertypes - so java.lang.Object is listed. This
would be invalid [for my requirements] as it is a supertype.

Similarly, if my Interface has a type hierarchy then the super interfaces
are also listed.

It would also be nice if abstract classes were not listed.

After much searching through Eclipse I still can't find the answer. I
found a promising type, org.eclipse.jdt.core.ITypeHierarchy, but the only
implementation is in an internal package and it isn't trivial.

Can anybody help?
Regards,

Tim.
Previous Topic:IToolBarManager/CoolBarManager
Next Topic:Using classpath variable on a native library
Goto Forum:
  


Current Time: Wed Jun 04 02:46:51 EDT 2025

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

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

Back to the top