SelectionDialog sd = JavaUI.createTypeDialog(new Shell(), null, SearchEngine.createWorkspaceScope(),
IJavaElementSearchConstants.CONSIDER_CLASSES_AND_INTERFACES, false);
sd.open();
Object[] objects = sd.getResult();
if (null != objects && objects.length > 0) {
ConfigurationManager configuration = ConfigurationManager.getInstance(interpolation.getResource().getProject());
IType type = (IType) objects[0];
try {
configuration.addContextValue(
new ContextValue(interpolation.getFirstToken(),
configuration.getClass(type.getFullyQualifiedName()), null), interpolation.getResource());
}
catch (ClassNotFoundException e) {
Plugin.log(e);
}
}