import net.sourceforge.phpeclipse.builder.PHPIdentifierLocation;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
/** Token determines last which declarations are allowed for proposal */
private int fLastSignificantToken;
+ private IProject fProject;
private IFile fFile;
// private String fFileName;
* Creates the template engine for a particular context type.
* See <code>TemplateContext</code> for supported context types.
*/
- public DeclarationEngine(ContextType contextType, int lastSignificantToken, IFile file) {
+ public DeclarationEngine(IProject project, ContextType contextType, int lastSignificantToken, IFile file) {
// Assert.isNotNull(contextType);
+ fProject = project;
fContextType = contextType;
fLastSignificantToken = lastSignificantToken;
if (maxProposals-- < 0) {
return;
}
- fProposals.add(new DeclarationProposal(identifier, location, context, region, viewer));
+ fProposals.add( new DeclarationProposal(fProject, identifier, location, context, region, viewer));
}
}
}