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);
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?