hi,roy and everybody
i want to ask if other classes can show in the code assist list in the
following condition:
<?php
$a = new My|
it does not work for me.i mean no classes will be popuped!
i debug in the class GlobalTypesStrategy#getTypes
the code many days ago is
protected IType[] getTypes(AbstractCompletionContext context) throws
BadLocationException {
int mask = 0;
if (context.getCompletionRequestor().isContextInformationMode()) {
mask |= CodeAssistUtils.EXACT_NAME;
}
String prefix = context.getPrefix();
if (prefix.startsWith("$")) {
return new IType[0];
}
return CodeAssistUtils.getGlobalTypes(context.getSourceModule(),
prefix, mask);
}
and now
protected IType[] getTypes(AbstractCompletionContext context)
throws BadLocationException {
String prefix = context.getPrefix();
if (prefix.startsWith("$")) {
return EMPTY;
}
IDLTKSearchScope scope = createSearchScope();
if (context.getCompletionRequestor().isContextInformationMode()) {
return PhpModelAccess.getDefault().findTypes(prefix,
MatchRule.EXACT, trueFlag,
falseFlag | IPHPModifiers.Internal, scope, null);
}
List<IType> result = new LinkedList<IType>();
if (prefix.length() > 1 && prefix.toUpperCase().equals(prefix)) {
// Search by camel-case
IType[] types = PhpModelAccess.getDefault().findTypes(prefix,
MatchRule.CAMEL_CASE, trueFlag,
falseFlag | IPHPModifiers.Internal, scope, null);
result.addAll(Arrays.asList(types));
}
IType[] types = PhpModelAccess.getDefault().findTypes(prefix,
MatchRule.PREFIX, trueFlag, falseFlag |
IPHPModifiers.Internal,
scope, null);
result.addAll(Arrays.asList(types));
return (IType[]) result.toArray(new IType[result.size()]);
}
and in the new version code there is always a NullPointerException on the
line
result.addAll(Arrays.asList(types));
because varible types is always null.
IndexerManager.getIndexer() is always null,because there is no one single
extension for org.eclipse.dltk.core.indexer,and there are also no subclass
for the abstract class AbstractIndexer no implemention for the interface
ISearchEngine.
i want to know if you got the same condition.
or do i miss something?
thanks in advanced.
best regards
_______________________________________________
pdt-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/pdt-dev