| [pdt-dev] Re: phar files |
<?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()]);
ÂÂÂ }