public bool LanguageSupportsOperation (string langName, RefactorOperations operation) { IRefactorer r = LanguageBindingService.GetRefactorerForLanguage (langName); if (r == null) return false; return (r.SupportedOperations & operation) == operation; }
public bool ClassSupportsOperation (IType cls, RefactorOperations operation) { IRefactorer r = GetGeneratorForClass (cls); if (r == null) return false; return (r.SupportedOperations & operation) == operation; }
public bool LanguageSupportsOperation(string langName, RefactorOperations operation) { IRefactorer r = LanguageBindingService.GetRefactorerForLanguage(langName); if (r == null) { return(false); } return((r.SupportedOperations & operation) == operation); }
public bool ClassSupportsOperation(IType cls, RefactorOperations operation) { IRefactorer r = GetGeneratorForClass(cls); if (r == null) { return(false); } return((r.SupportedOperations & operation) == operation); }
public static bool SupportsRefactoring(DotNetProject project) { if (project == null || project.LanguageBinding == null || project.LanguageBinding.GetCodeDomProvider() == null) { return(false); } RefactorOperations ops = RefactorOperations.AddField | RefactorOperations.AddMethod | RefactorOperations.RenameField | RefactorOperations.AddAttribute; CodeRefactorer cref = IdeApp.Workspace.GetCodeRefactorer(project.ParentSolution); return(cref.LanguageSupportsOperation(project.LanguageBinding.Language, ops)); }