Reputation: 35
Why do I get this error "OpenTypeSelectionDialog cannot be resolved to a type" when I am trying to use OpenTypeSelectionDialog in my code?
Here's the code:
Shell sParent = JavaPlugin.getActiveWorkbenchShell();
SelectionDialog dialog = new OpenTypeSelectionDialog(sParent, true,
PlatformUI.getWorkbench().getProgressService(),null, IJavaSearchConstants.TYPE);
Upvotes: 0
Views: 130
Reputation: 2537
you should open your plugin.xml file in your project, dependencies tab and add org.eclipse.jdt.ui as plugin dependency, after that organize imports and you should be OK.
Upvotes: 1
Reputation: 816
You get this error when compiler is not able to find file/class containing code for specified Java class. There are a number of places where Types can be included, 1. Have you imported the Type for which you are getting error. 2. You also might have specified the wrong place (by a misspelling, perhaps) 3. You might want to check if library containing missing Type is not included in classpath.
Check if you are able to locate the class file?
Upvotes: 0