public override bool ShowEntry(ICompletionEntry entry) { if (HasFromAndImport) { return ShowEntryForImportIdentifier(entry); } return ShowEntryForImportModule(entry); }
public override bool ShowEntry(ICompletionEntry o) { IClass c = o as IClass; if (c != null && c.IsAbstract) { return(false); } if (ExpressionContext.Attribute.ShowEntry(o)) { return(true); } if (c == null) { return(false); } foreach (IClass baseType in c.ClassInheritanceTree) { if (baseType.FullyQualifiedName == "Boo.Lang.Compiler.AbstractAstAttribute") { return(true); } } return(false); }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (c != null) { if (!allowVoid) { if (c.FullyQualifiedName == "System.Void" || c.FullyQualifiedName == "void") { return(false); } } foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) { return(true); } } if (!c.IsStatic && c.ClassType != ClassType.Module) { return(true); } } return(false); }
public CompletionData(ICompletionEntry text, ExpressionResult expressionResult) { ExpressionResult = expressionResult; Text = text.Name; Content = text.Name; Description = text.ToString(); }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (c == null) { return(false); } if (isObjectCreation) { if (c.IsAbstract || c.IsStatic) { return(false); } if (c.ClassType == ClassType.Enum || c.ClassType == ClassType.Interface) { return(false); } } if (baseClass == null) { return(true); } return(c.IsTypeInInheritanceTree(baseClass)); }
public override bool ShowEntry(ICompletionEntry o) { IClass c = o as IClass; if (c != null) { // use this hack to show dummy classes like "short" // (go from the dummy class to the real class) if (c.Methods.Count > 0) { c = c.Methods[0].DeclaringType; } switch (c.FullyQualifiedName) { case "System.Byte": case "System.SByte": case "System.Int16": case "System.UInt16": case "System.Int32": case "System.UInt32": case "System.Int64": case "System.UInt64": return(true); default: return(false); } } else { return(false); } }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (c != null) { foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) { return(true); } } if (c.ClassType == ClassType.Interface) { return(true); } if (c.ClassType == ClassType.Class) { if (!c.IsSealed && !c.IsStatic) { return(true); } } } return(false); }
public override bool ShowEntry(ICompletionEntry entry) { if (HasFromAndImport) { return(ShowEntryForImportIdentifier(entry)); } return(ShowEntryForImportModule(entry)); }
public void GetCompletionItemsFromModule_MathModule_LastCompletionItemIsAsterisk() { List <ICompletionEntry> items = completion.GetCompletionItemsFromModule("math"); int lastItem = items.Count - 1; ICompletionEntry lastCompletionItem = items[lastItem]; NamespaceEntry expectedCompletionItem = new NamespaceEntry("*"); Assert.AreEqual(expectedCompletionItem, lastCompletionItem); }
void AddCodeElement(ICompletionEntry entry) { var namespaceEntry = entry as NamespaceEntry; var classEntry = entry as IClass; if (namespaceEntry != null) { AddCodeNamespace(namespaceEntry); } else if (classEntry != null) { AddCodeClass(classEntry); } }
bool ShowEntryForImportIdentifier(ICompletionEntry entry) { if (entry is IMethod) { return true; } else if (entry is IField) { return true; } else if (entry is IClass) { return true; } else if (entry is NamespaceEntry) { return IsImportAll(entry); } return false; }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (allowImportClasses && c != null) { return(c.HasPublicOrInternalStaticMembers); } return(false); }
public override bool ShowEntry(ICompletionEntry o) { if (opType == 0) { return(a.ShowEntry(o) || b.ShowEntry(o)); } else if (opType == 1) { return(a.ShowEntry(o) && b.ShowEntry(o)); } else { return(a.ShowEntry(o) ^ b.ShowEntry(o)); } }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (c != null && !c.IsAbstract) { return(c.IsTypeInInheritanceTree(c.ProjectContent.SystemTypes.Attribute.GetUnderlyingClass())); } else { return(false); } }
bool ShowEntryForImportIdentifier(ICompletionEntry entry) { if (entry is IMethod) { return(true); } else if (entry is IField) { return(true); } else if (entry is IClass) { return(true); } else if (entry is NamespaceEntry) { return(IsImportAll(entry)); } return(false); }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) { return(true); } IClass c = o as IClass; if (c != null) { foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) { return(true); } } if (c.ClassType == expectedType) { return(true); } } return(false); }
bool IsImportAll(ICompletionEntry entry) { return PythonImportCompletion.ImportAll.Equals(entry); }
bool ShowEntryForImportModule(ICompletionEntry entry) { return(entry is NamespaceEntry); }
public override bool ShowEntry(ICompletionEntry o) { return(true); }
public abstract bool ShowEntry(ICompletionEntry o);
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (c == null) return false; if (isObjectCreation) { if (c.IsAbstract || c.IsStatic) return false; if (c.ClassType == ClassType.Enum || c.ClassType == ClassType.Interface) return false; } if (baseClass == null) return true; return c.IsTypeInInheritanceTree(baseClass); }
public override bool ShowEntry(ICompletionEntry o) { return true; }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (c != null) { if (!allowVoid) { if (c.FullyQualifiedName == "System.Void" || c.FullyQualifiedName == "void") return false; } foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) return true; } if (!c.IsStatic && c.ClassType != ClassType.Module) return true; } return false; }
bool IsImportAll(ICompletionEntry entry) { return(PythonImportCompletion.ImportAll.Equals(entry)); }
public override bool ShowEntry(ICompletionEntry o) { IClass c = o as IClass; if (c != null) { // use this hack to show dummy classes like "short" // (go from the dummy class to the real class) if (c.Methods.Count > 0) { c = c.Methods[0].DeclaringType; } switch (c.FullyQualifiedName) { case "System.Byte": case "System.SByte": case "System.Int16": case "System.UInt16": case "System.Int32": case "System.UInt32": case "System.Int64": case "System.UInt64": return true; default: return false; } } else { return false; } }
public override bool ShowEntry(ICompletionEntry o) { if (opType == 0) return a.ShowEntry(o) || b.ShowEntry(o); else if (opType == 1) return a.ShowEntry(o) && b.ShowEntry(o); else return a.ShowEntry(o) ^ b.ShowEntry(o); }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (c != null) { foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) return true; } if (c.ClassType == expectedType) return true; } return false; }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (allowImportClasses && c != null) { return c.HasPublicOrInternalStaticMembers; } return false; }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (c != null && !c.IsAbstract) { return c.IsTypeInInheritanceTree(c.ProjectContent.SystemTypes.Attribute.GetUnderlyingClass()); } else { return false; } }
bool ShowEntryForImportModule(ICompletionEntry entry) { return entry is NamespaceEntry; }
public override bool ShowEntry(ICompletionEntry o) { if (!(o is IEntity)) return true; IClass c = o as IClass; if (c != null) { foreach (IClass innerClass in c.InnerClasses) { if (ShowEntry(innerClass)) return true; } if (c.ClassType == ClassType.Interface) return true; if (c.ClassType == ClassType.Class) { if (!c.IsSealed && !c.IsStatic) return true; } } return false; }
public RCompletion(ICompletionEntry entry) { _entry = entry; }