/** * Checks whether all includes exists, if they are outside of the project, add a link to the file * to the project * * @param includes */ private void processIncludes(List<OutlineNode> includes, IEditorInput input) { IProject project = getCurrentProject(); if (project == null) return; IFile referFile = (IFile) input.getAdapter(IFile.class); if (referFile == null) return; for (OutlineNode node : includes) { IFile f = null; IFile mainTexFile = TexlipseProperties.getProjectSourceFile(project); if (mainTexFile != null) { // Includes are always relative to the main file f = TexProjectParser.findIFile(node.getName(), mainTexFile, project); } if (f == null) { // Try finding it relative to refering file f = TexProjectParser.findIFile(node.getName(), referFile, project); } if (f == null) { MarkerHandler marker = MarkerHandler.getInstance(); String errorMsg = MessageFormat.format( TexlipsePlugin.getResourceString("parseErrorIncludeNotFound"), new Object[] {node.getName()}); marker.createErrorMarker(referFile, errorMsg, node.getBeginLine()); } } }