@Override
protected void scan(PhpModule phpModule, FileObject currentFile, int offset) {
reset();
// scan
final FuelPhpControllerVisitor visitor = new FuelPhpControllerVisitor(currentFile, offset);
try {
scanController(visitor, currentFile);
} catch (ParseException ex) {
Exceptions.printStackTrace(ex);
}
// set view items
Set<String> viewModelPath = visitor.getViewModelPath();
Set<String> viewPath = visitor.getViewPath();
if (!viewModelPath.isEmpty()) {
viewPath.addAll(viewModelPath);
}
setGoToItems(viewPath, FILE_TYPE.VIEW, false);
setGoToItems(visitor.getAllViewPath(), FILE_TYPE.VIEW, true);
setGoToItems(viewModelPath, FILE_TYPE.VIEW_MODEL, false);
setGoToItems(visitor.getAllViewModelPath(), FILE_TYPE.VIEW_MODEL, true);
// sort
sort(viewItems);
sort(viewModelItems);
sort(allViewItems);