DLTKSearchScopeFactory factory = DLTKSearchScopeFactory.getInstance();
IDLTKLanguageToolkit toolkit = null;
ProjectManager manager = ProjectManagement.getProjectManager(getNature());
if(manager instanceof DltkProjectManager){
DltkProjectManager dltkManager = (DltkProjectManager)manager;
toolkit = dltkManager.getLanguageToolkit(dltkManager.getNatureId());
}
if (toolkit == null && project != null){
for(String nature : ProjectManagement.getProjectManagerNatures()){
if(project.hasNature(nature)){
manager = ProjectManagement.getProjectManager(nature);
if(manager instanceof DltkProjectManager){
DltkProjectManager dltkManager = (DltkProjectManager)manager;
toolkit = dltkManager.getLanguageToolkit(dltkManager.getNatureId());
break;
}
}
}
}