Exemplo n.º 1
0
		public bool LanguageSupportsOperation (string langName, RefactorOperations operation)
		{
			IRefactorer r = LanguageBindingService.GetRefactorerForLanguage (langName);
			if (r == null)
				return false;
			return (r.SupportedOperations & operation) == operation;
		}
Exemplo n.º 2
0
		public bool ClassSupportsOperation (IType cls, RefactorOperations operation)
		{
			IRefactorer r = GetGeneratorForClass (cls);
			if (r == null)
				return false;
			return (r.SupportedOperations & operation) == operation;
		}
Exemplo n.º 3
0
        public bool LanguageSupportsOperation(string langName, RefactorOperations operation)
        {
            IRefactorer r = LanguageBindingService.GetRefactorerForLanguage(langName);

            if (r == null)
            {
                return(false);
            }
            return((r.SupportedOperations & operation) == operation);
        }
Exemplo n.º 4
0
        public bool ClassSupportsOperation(IType cls, RefactorOperations operation)
        {
            IRefactorer r = GetGeneratorForClass(cls);

            if (r == null)
            {
                return(false);
            }
            return((r.SupportedOperations & operation) == operation);
        }
Exemplo n.º 5
0
        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));
        }