diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.Designer.cs b/Rubberduck.CodeAnalysis/CodeAnalysisUI.Designer.cs new file mode 100644 index 0000000000..4d3597979d --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.Designer.cs @@ -0,0 +1,497 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Rubberduck.CodeAnalysis { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class CodeAnalysisUI { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal CodeAnalysisUI() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Rubberduck.CodeAnalysis.CodeAnalysisUI", typeof(CodeAnalysisUI).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Issue. + /// + public static string CodeInspectionResults_Issue { + get { + return ResourceManager.GetString("CodeInspectionResults_Issue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Location. + /// + public static string CodeInspectionResults_Location { + get { + return ResourceManager.GetString("CodeInspectionResults_Location", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type. + /// + public static string CodeInspectionResults_Type { + get { + return ResourceManager.GetString("CodeInspectionResults_Type", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Code Inspections. + /// + public static string CodeInspections { + get { + return ResourceManager.GetString("CodeInspections", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Inspecting.... + /// + public static string CodeInspections_Inspecting { + get { + return ResourceManager.GetString("CodeInspections_Inspecting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rubberduck Code Inspections - {0} + ///{1} issues found.. + /// + public static string CodeInspections_NumberOfIssuesFound_Plural { + get { + return ResourceManager.GetString("CodeInspections_NumberOfIssuesFound_Plural", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Rubberduck Code Inspections - {0} + ///{1} issue found.. + /// + public static string CodeInspections_NumberOfIssuesFound_Singular { + get { + return ResourceManager.GetString("CodeInspections_NumberOfIssuesFound_Singular", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Description:. + /// + public static string CodeInspectionSettingsPage_FilterByDescription { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_FilterByDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Severity:. + /// + public static string CodeInspectionSettingsPage_FilterBySeverity { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_FilterBySeverity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Inspection Severities. + /// + public static string CodeInspectionSettingsPage_InspectionSeveritySettingsLabel { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_InspectionSeveritySettingsLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Miscellaneous. + /// + public static string CodeInspectionSettingsPage_Misc { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_Misc", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Run inspections automatically on successful parse. + /// + public static string CodeInspectionSettingsPage_Misc_RunInspectionsOnSuccessfulParse { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_Misc_RunInspectionsOnSuccessfulParse", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to These identifiers will be ignored by the 'Use meaningful names' inspection.. + /// + public static string CodeInspectionSettingsPage_WhitelistedIdentifiersDescription { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_WhitelistedIdentifiersDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Allowed Identifiers. + /// + public static string CodeInspectionSettingsPage_WhitelistedIdentifiersLabel { + get { + return ResourceManager.GetString("CodeInspectionSettingsPage_WhitelistedIdentifiersLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cyclomatic Complexity. + /// + public static string CodeMetrics_Complexity { + get { + return ResourceManager.GetString("CodeMetrics_Complexity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Lines. + /// + public static string CodeMetrics_Lines { + get { + return ResourceManager.GetString("CodeMetrics_Lines", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Maximum Nesting. + /// + public static string CodeMetrics_Nesting { + get { + return ResourceManager.GetString("CodeMetrics_Nesting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Code Metrics. + /// + public static string CodeMetricsDockablePresenter_Caption { + get { + return ResourceManager.GetString("CodeMetricsDockablePresenter_Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The following project(s) cannot be compiled, which will most likely result in parser errors. Continue anyway? {0}. + /// + public static string Command_Reparse_CannotCompile { + get { + return ResourceManager.GetString("Command_Reparse_CannotCompile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to compile for parsing.. + /// + public static string Command_Reparse_CannotCompile_Caption { + get { + return ResourceManager.GetString("Command_Reparse_CannotCompile_Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The VBE setting "Compile On Demand" is currently enabled. This is not recommended as this may hide compilation errors and cause problems with parsing. Do you want to parse anyway?. + /// + public static string Command_Reparse_CompileOnDemandEnabled { + get { + return ResourceManager.GetString("Command_Reparse_CompileOnDemandEnabled", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Compile On Demand Setting. + /// + public static string Command_Reparse_CompileOnDemandEnabled_Caption { + get { + return ResourceManager.GetString("Command_Reparse_CompileOnDemandEnabled_Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to runtime expression. + /// + public static string DeclarationType_BracketedExpression { + get { + return ResourceManager.GetString("DeclarationType_BracketedExpression", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to class. + /// + public static string DeclarationType_ClassModule { + get { + return ResourceManager.GetString("DeclarationType_ClassModule", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to constant. + /// + public static string DeclarationType_Constant { + get { + return ResourceManager.GetString("DeclarationType_Constant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to control. + /// + public static string DeclarationType_Control { + get { + return ResourceManager.GetString("DeclarationType_Control", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to enum. + /// + public static string DeclarationType_Enumeration { + get { + return ResourceManager.GetString("DeclarationType_Enumeration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to enum member. + /// + public static string DeclarationType_EnumerationMember { + get { + return ResourceManager.GetString("DeclarationType_EnumerationMember", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to event. + /// + public static string DeclarationType_Event { + get { + return ResourceManager.GetString("DeclarationType_Event", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to function. + /// + public static string DeclarationType_Function { + get { + return ResourceManager.GetString("DeclarationType_Function", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to library function. + /// + public static string DeclarationType_LibraryFunction { + get { + return ResourceManager.GetString("DeclarationType_LibraryFunction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to library procedure. + /// + public static string DeclarationType_LibraryProcedure { + get { + return ResourceManager.GetString("DeclarationType_LibraryProcedure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to line label. + /// + public static string DeclarationType_LineLabel { + get { + return ResourceManager.GetString("DeclarationType_LineLabel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to parameter. + /// + public static string DeclarationType_Parameter { + get { + return ResourceManager.GetString("DeclarationType_Parameter", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to module. + /// + public static string DeclarationType_ProceduralModule { + get { + return ResourceManager.GetString("DeclarationType_ProceduralModule", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to procedure. + /// + public static string DeclarationType_Procedure { + get { + return ResourceManager.GetString("DeclarationType_Procedure", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to project. + /// + public static string DeclarationType_Project { + get { + return ResourceManager.GetString("DeclarationType_Project", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to property get accessor. + /// + public static string DeclarationType_PropertyGet { + get { + return ResourceManager.GetString("DeclarationType_PropertyGet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to property let accessor. + /// + public static string DeclarationType_PropertyLet { + get { + return ResourceManager.GetString("DeclarationType_PropertyLet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to property set accessor. + /// + public static string DeclarationType_PropertySet { + get { + return ResourceManager.GetString("DeclarationType_PropertySet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to user-defined type. + /// + public static string DeclarationType_UserDefinedType { + get { + return ResourceManager.GetString("DeclarationType_UserDefinedType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to user-defined type member. + /// + public static string DeclarationType_UserDefinedTypeMember { + get { + return ResourceManager.GetString("DeclarationType_UserDefinedTypeMember", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to variable. + /// + public static string DeclarationType_Variable { + get { + return ResourceManager.GetString("DeclarationType_Variable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You've earned the "Continuator" badge!. + /// + public static string EasterEgg_Continuator { + get { + return ResourceManager.GetString("EasterEgg_Continuator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignore. + /// + public static string EmptyLineHandling_Ignore { + get { + return ResourceManager.GetString("EmptyLineHandling_Ignore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Indent. + /// + public static string EmptyLineHandling_Indent { + get { + return ResourceManager.GetString("EmptyLineHandling_Indent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove. + /// + public static string EmptyLineHandling_Remove { + get { + return ResourceManager.GetString("EmptyLineHandling_Remove", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Filter. + /// + public static string GroupingGrid_Filter { + get { + return ResourceManager.GetString("GroupingGrid_Filter", resourceCulture); + } + } + } +} diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.cs.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.cs.resx new file mode 100644 index 0000000000..566914eb1b --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.cs.resx @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Typ + + + Problém + + + Lokace + + + Rubberduck Inspekce Kódu - {0} +{1} problém nalezen. + + + Kontroluji... + + + Rubberduck Inspekce Kódu - {0} +Nalezeno {1} problémů. + + + Závažnosti Inspekce + + + Dovolené Identifikátory + + + Různé + + + Spustit automaticky inspekce po úspěšném parsování + + + Tyto identifikátory budou ignorovány inspekcí 'Použij smysluplné názvy'. + + + Řádky + + + Cyklomatická Komplexita + + + Maximální Vnoření + + + Metrika Kódu + + + Inspekce kódu + + + VBE nastavení "Zkompilovat Na Žádost" je aktuálně povoleno. Toto není doporučeno a může vyústit v kompilační chyby a způsobit problémy při parsování. Chcete i přesto spustit parser? + + + Nastavení Zkompilování Na Žádost + + + Není možno zkompilovat pro parsování. + + + Následující projekt(y) nemohou být zkompilovány, což je s největší pravděpodobností kvůli parsovacím chybám. I přesto pokračovat? {0} + + + runtime expression + + + třída + + + konstanta + + + VBDesigner-Objekt + + + enum + + + enum člen + + + událost + + + funkce + + + funkce knihovny + + + procedura knihovny + + + označení řádku + + + parametr + + + modul + + + procedura + + + projekt + + + Get accessor vlastnosti + + + Let accessor vlastnosti + + + Set accessor vlastnosti + + + uživatelsky-definovaný typ + + + uživatelsky-definovaný člen + + + proměnná + + + Získali jste odznak "Continuator"! + + + Odsadit + + + Odstranit + + + Ignorovat + + + Filtr + + + Popis: + + + Závažnost: + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.de.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.de.resx new file mode 100644 index 0000000000..4610b4d620 --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.de.resx @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Typ + + + Problem + + + Ort + + + Rubberduck Code Untersuchung - {0} +{1} Problem gefunden. + + + Inspiziere... + + + Rubberduck Code Untersuchung - {0} +{1} Probleme gefunden. + + + Inspektionsschwere + + + Explizit erlaubte Namen + + + Verschiedenes + + + Inspektionen nach erfolgreichem Parsen automatisch starten + + + Diese Namen werden von der Inspektion "Nutze aussagekräftige Namen" ignoriert. + + + Codezeilen + + + Zyklomatische Komplexität + + + Maximale Einrückung + + + Codemetrikergebnisse + + + Code Untersuchung + + + Die VBE-Einstellung "Bei Bedarf Kompilieren" ist aktuell eingeschalten. Dies ist nicht empfohlen, da Kompilierungsfehler und Probleme beim Parsen versteckt werden können. Trotzdem Parsen? + + + Einstellung "Bei Bedarf Kompilieren" + + + Konnte nicht vor dem Parsen kompilieren. + + + Folgende(s) Projekt(e) können nicht kompiliert werden. Dies führt höchstwahrscheinlich zu Parserfehlern. Trotzdem fortfahren? {0} + + + Laufzeitausdruck + + + Klasse + + + Konstante + + + VBDesigner-Objekt + + + Enum + + + Enum-Element (Konstante) + + + Ereignis + + + Funktion + + + Bibliotheks-Funktion + + + Bibliotheksprozedur + + + Sprungmarke + + + Parameter + + + Modul + + + Prozedur + + + Projekt + + + Get-Eigenschaftsprozedur + + + Let-Eigenschaftsprozedur + + + Set-Eigenschaftsprozedur + + + Nutzerdefinierter Typ + + + Element eines nutzerdefinierten Typs + + + Variable + + + Sie haben das Abzeichen "Continuator" erhalten! + + + Einrücken + + + Entfernen + + + Ignorieren + + + Filter + + + Beschreibung: + + + Schweregrad: + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.es.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.es.resx new file mode 100644 index 0000000000..3e7f048462 --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.es.resx @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Tipo + + + Problema + + + Ubicación + + + Inspecciones del código de Rubberduck - {0} +{1} problema encontrado. + + + Inspeccionando... + + + Inspecciones del código de Rubberduck - {0} +{1} problemas encontrados. + + + Severidad de la inspección + + + Identificadores en lista blanca + + + Misceláneas + + + Ejecutar inspecciones automáticamente en el análisis exitoso + + + Estos identificadores serán ignorados por la inspección 'Usar nombres significativos'. + + + Líneas + + + Complejidad ciclomática + + + Anidamiento maximo + + + Métricas de Código + + + Inspecciones de código + + + El VBEsetting "Compile On Demand" está habilitado actualmente. No se recomienda, ya que puede ocultar errores de compilación y causar problemas con el análisis. ¿Quieres analizar de todos modos? + + + Ajuste "Compilar A Demanda" + + + No se puede compilar para analizar. + + + Los siguientes proyectos no pueden compilarse, lo que probablemente resultará en errores del analizador. ¿Continua de todas maneras? {0} + + + expresión en tiempo de ejecución + + + clase + + + constante + + + control + + + enumerar + + + enumerar miembro + + + evento + + + función + + + biblioteca de funciones + + + biblioteca de procedimientos + + + etiqueta de línea + + + parámetro + + + módulo + + + procedimiento + + + proyecto + + + propiedad Get + + + propiedad Let + + + propiedad Set + + + tipo definido por el usuario + + + miembro de tipo definido por el usuario + + + variable + + + ¡Has ganado la insignia de "Continuador"! + + + Indentar + + + Eliminar + + + Ignorar + + + Filtro + + + Descripción: + + + Severidad: + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.fr.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.fr.resx new file mode 100644 index 0000000000..d647d3adef --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.fr.resx @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Type + + + Problème + + + Emplacement + + + Inspections Rubberduck - {0} +{1} problème trouvé. + + + Inspection... + + + Inspections Rubberduck - {0} +{1} problèmes trouvés. + + + Niveau de sévérité + + + Identifiants permis + + + Autres options + + + Exécuter les inspections automatiquement + + + L'inspection des noms ignorera ces identifiants. + + + Lignes + + + Complexité Cyclomatique + + + Imbrication + + + Statistiques + + + Inspections + + + L'option VBE "Compile on demand" est présentement activée. Cette configuration n'est pas recommandée, puisqu'elle peut masquer des erreurs de compilation in interférer avec l'analyse. Poursuivre l'analyse? + + + Paramètre "Compile on demand" + + + La compilation a échoué. + + + Les projets suivants ne peuvent être compilés, ce qui causera probablement des erreurs d'analyse. Continuer? {0} + + + expression résolue à l'exécution + + + la classe + + + la constante + + + le contrôle + + + l'énumération + + + le membre de l'énumération + + + l'événement + + + la fonction + + + la fonction externe + + + la procédure externe + + + l'étiquette de ligne + + + le paramètre + + + le module + + + la procédure + + + le projet + + + l'accesseur property get + + + l'accesseur property let + + + l'accesseur property set + + + le type définit par l'utilisateur + + + le membre d'un type définit par l'utilisateur + + + la variable + + + Vous obtenez le badge "Continuator"! + + + Indenter + + + Supprimer + + + Ignorer + + + Filtrer + + + Description: + + + Sévérité: + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.it.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.it.resx new file mode 100644 index 0000000000..44148d372f --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.it.resx @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Complessità Ciclomatica + + + Righe + + + Annidamenti Massimi + + + Tipo + + + Posizione + + + Problema + + + Impostazione Compila su Richiesta + + + L'impostazione "Compila su richiesta" di VBE è attualmente abilitata. Questo non è raccomandato perché può nascondere errori di compilazione e causare problemi con l'analisi. Vuoi analizzare comunque? + + + Impossibile compilare per l'analisi. + + + Il/i seguente/i progetto/i non può/possono essere compilato/i, con probabile errore dell'analisi. Continuare comunque? {0} + + + Filtra + + + Rimuovi + + + Indenta + + + Ignora + + + Hai guadagnato il badge di "Continuatore"! + + + variabile + + + membro di tipo definito dall'utente + + + tipo definito dall'utente + + + property set accessor + + + property let accessor + + + property get accessor + + + progetto + + + procedura + + + modulo + + + parametro + + + riga di etichetta + + + libreria di procedura + + + libreria di funzione + + + funzione + + + evento + + + membro di enum + + + enum + + + controllo + + + costante + + + classe + + + espressione a runtime + + + Statistiche + + + Rubberduck Ispezioni del Codice - {0} +{1} problema trovato. + + + Rubberduck Ispezioni del Codice - {0} +{1} problemi trovati. + + + Ispezione... + + + Ispezioni del Codice + + + Gravità: + + + Descrizione: + + + Gravità dell'ispezione + + + Esegui le ispezioni automaticamente ad analisi superata + + + Varie + + + Identificatori Consentiti + + + Questi identificatori saranno ignorati dall'ispezione 'Usa nomi significativi'. + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/CodeAnalysisUI.resx b/Rubberduck.CodeAnalysis/CodeAnalysisUI.resx new file mode 100644 index 0000000000..33bba664e2 --- /dev/null +++ b/Rubberduck.CodeAnalysis/CodeAnalysisUI.resx @@ -0,0 +1,248 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Type + + + Issue + + + Location + + + Rubberduck Code Inspections - {0} +{1} issue found. + {0}=timestamp; {1}=number + + + Inspecting... + + + Rubberduck Code Inspections - {0} +{1} issues found. + {0}=timestamp; {1}=number + + + Inspection Severities + + + Allowed Identifiers + + + Miscellaneous + + + Run inspections automatically on successful parse + + + These identifiers will be ignored by the 'Use meaningful names' inspection. + + + Lines + + + Cyclomatic Complexity + + + Maximum Nesting + + + Code Metrics + + + Code Inspections + + + The VBE setting "Compile On Demand" is currently enabled. This is not recommended as this may hide compilation errors and cause problems with parsing. Do you want to parse anyway? + + + Compile On Demand Setting + + + Unable to compile for parsing. + + + The following project(s) cannot be compiled, which will most likely result in parser errors. Continue anyway? {0} + + + runtime expression + + + class + + + constant + + + control + + + enum + + + enum member + + + event + + + function + + + library function + + + library procedure + + + line label + + + parameter + + + module + + + procedure + + + project + + + property get accessor + + + property let accessor + + + property set accessor + + + user-defined type + + + user-defined type member + + + variable + + + You've earned the "Continuator" badge! + + + Indent + + + Remove + + + Ignore + + + Filter + + + Description: + + + Severity: + + \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/Inspections/Abstract/IdentifierReferenceInspectionFromDeclarationsBase.cs b/Rubberduck.CodeAnalysis/Inspections/Abstract/IdentifierReferenceInspectionFromDeclarationsBase.cs index 1d0fb5e9ea..438f148063 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Abstract/IdentifierReferenceInspectionFromDeclarationsBase.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Abstract/IdentifierReferenceInspectionFromDeclarationsBase.cs @@ -21,74 +21,6 @@ protected IdentifierReferenceInspectionFromDeclarationsBase(IDeclarationFinderPr protected virtual ICollection DisabledQuickFixes(IdentifierReference reference) => new List(); - /// - /// Gets the possible that qualifies an identifier reference in a member access expression. - /// - protected IEnumerable GetQualifierCandidates(IdentifierReference reference, DeclarationFinder finder) - { - if (reference.Context.TryGetAncestor(out var memberAccess)) - { - var parentModule = Declaration.GetModuleParent(reference.ParentScoping); - var qualifyingExpression = memberAccess.lExpression(); - if (qualifyingExpression is VBAParser.SimpleNameExprContext simpleName) - { - if (simpleName.GetText().Equals(Tokens.Me, System.StringComparison.InvariantCultureIgnoreCase)) - { - // qualifier is 'Me' - return new[] { parentModule }; - } - - // todo get the actual qualifying declaration? - return finder.MatchName(simpleName.GetText()) - .Where(candidate => !candidate.IdentifierName.Equals(reference.Declaration.IdentifierName, System.StringComparison.InvariantCultureIgnoreCase)); - } - - if (qualifyingExpression.ChildCount == 1 && qualifyingExpression.GetText().Equals(Tokens.Me, System.StringComparison.InvariantCultureIgnoreCase)) - { - // qualifier is 'Me' - return new[] { parentModule }; - } - } - - if (reference.Context.TryGetAncestor(out var dot)) - { - // qualifier is a With block - var withBlock = dot.GetAncestor(); - return finder.ContainedIdentifierReferences(new QualifiedSelection(reference.QualifiedModuleName, withBlock.GetSelection())) - .Select(r => r.Declaration).Distinct() - .Where(candidate => !candidate.Equals(reference.Declaration)); - } - - if (reference.Context.TryGetAncestor(out var callStmt)) - { - if (reference.Context.TryGetAncestor(out var lExpression)) - { - // reference is in lexpression of a call statement - - if (lExpression is VBAParser.MemberAccessExprContext member) - { - if (member.lExpression() is VBAParser.SimpleNameExprContext name) - { - if (reference.IdentifierName.Equals(name.identifier().GetText(), System.StringComparison.InvariantCultureIgnoreCase)) - { - // unqualified - return Enumerable.Empty(); - } - - return finder.MatchName(name.identifier().GetText()) - .Where(candidate => !candidate.Equals(reference.Declaration)); - } - - // todo get the actual qualifying declaration? - return finder.MatchName(member.lExpression().children.First().GetText()) - .Where(candidate => !candidate.Equals(reference.Declaration)); - } - } - } - - return Enumerable.Empty(); - } - protected override IEnumerable DoGetInspectionResults(DeclarationFinder finder) { var objectionableReferences = ObjectionableReferences(finder); diff --git a/Rubberduck.CodeAnalysis/Inspections/Abstract/ImplicitWorkbookReferenceInspectionBase.cs b/Rubberduck.CodeAnalysis/Inspections/Abstract/ImplicitWorkbookReferenceInspectionBase.cs index 93e3726393..23d0295d00 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Abstract/ImplicitWorkbookReferenceInspectionBase.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Abstract/ImplicitWorkbookReferenceInspectionBase.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using Rubberduck.Parsing.Symbols; using Rubberduck.Parsing.VBA; @@ -22,40 +23,27 @@ internal ImplicitWorkbookReferenceInspectionBase(IDeclarationFinderProvider decl "_Global", "_Application", "Global", "Application", "_Workbook", "Workbook" }; - private IReadOnlyList _relevantClasses; - private IReadOnlyList _relevantProperties; - - protected Declaration Excel { get; private set; } + protected Declaration Excel(DeclarationFinder finder) + { + return finder.BuiltInDeclarations(DeclarationType.Project) + .FirstOrDefault(project => project.IdentifierName.Equals("Excel", StringComparison.InvariantCultureIgnoreCase)); + } protected override IEnumerable ObjectionableDeclarations(DeclarationFinder finder) { - if (Excel == null) - { - if (!finder.TryFindProjectDeclaration("Excel", out var excel)) - { - return Enumerable.Empty(); - } - Excel = excel; - } - - if (_relevantClasses == null) - { - _relevantClasses = InterestingClasses - .Select(className => finder.FindClassModule(className, Excel, true)) - .OfType() - .ToList(); - } - - if (_relevantProperties == null) - { - _relevantProperties = _relevantClasses - .SelectMany(classDeclaration => classDeclaration.Members) - .OfType() - .Where(member => InterestingMembers.Contains(member.IdentifierName)) - .ToList(); - } - - return _relevantProperties; + var excel = Excel(finder); + var relevantClasses = InterestingClasses + .Select(className => finder.FindClassModule(className, excel, true)) + .OfType() + .ToList(); + + var relevantProperties = relevantClasses + .SelectMany(classDeclaration => classDeclaration.Members) + .OfType() + .Where(member => InterestingMembers.Contains(member.IdentifierName)) + .ToList(); + + return relevantProperties; } } } \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/Inspections/Abstract/InspectionBase.cs b/Rubberduck.CodeAnalysis/Inspections/Abstract/InspectionBase.cs index 23b94c9a92..4b8e227e0d 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Abstract/InspectionBase.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Abstract/InspectionBase.cs @@ -55,7 +55,7 @@ protected InspectionBase(IDeclarationFinderProvider declarationFinderProvider) /// Gets a localized string representing the type of inspection. /// /// - public virtual string InspectionTypeName => Resources.Inspections.InspectionsUI.ResourceManager.GetString($"CodeInspectionSettings_{InspectionType.ToString()}", CultureInfo.CurrentUICulture); + public virtual string InspectionTypeName => Resources.Inspections.InspectionsUI.ResourceManager.GetString($"CodeInspectionSettings_{InspectionType}", CultureInfo.CurrentUICulture); /// /// Gets a string representing the text that must be present in an diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplementedInterfaceMemberInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplementedInterfaceMemberInspection.cs index c76f098853..0ceadcaaf0 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplementedInterfaceMemberInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplementedInterfaceMemberInspection.cs @@ -73,7 +73,7 @@ private static bool IsInterfaceDeclaration(Declaration declaration) protected override string ResultDescription(Declaration declaration) { var qualifiedName = declaration.QualifiedModuleName.ToString(); - var declarationType = Resources.RubberduckUI.ResourceManager + var declarationType = CodeAnalysisUI.ResourceManager .GetString("DeclarationType_" + declaration.DeclarationType) .Capitalize(); var identifierName = declaration.IdentifierName; diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitActiveWorkbookReferenceInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitActiveWorkbookReferenceInspection.cs index a1c6da7c55..61279d1e08 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitActiveWorkbookReferenceInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitActiveWorkbookReferenceInspection.cs @@ -1,4 +1,3 @@ -using System.Collections.Generic; using System.Linq; using Rubberduck.CodeAnalysis.Inspections.Abstract; using Rubberduck.CodeAnalysis.Inspections.Attributes; @@ -45,46 +44,37 @@ internal sealed class ImplicitActiveWorkbookReferenceInspection : ImplicitWorkbo public ImplicitActiveWorkbookReferenceInspection(IDeclarationFinderProvider declarationFinderProvider) : base(declarationFinderProvider) { } - private IReadOnlyList _applicationCandidates; - protected override bool IsResultReference(IdentifierReference reference, DeclarationFinder finder) { - var qualifiers = base.GetQualifierCandidates(reference, finder); - var isQualified = qualifiers.Any(); - var document = Declaration.GetModuleParent(reference.ParentNonScoping) as DocumentModuleDeclaration; - - var isHostWorkbook = (document?.SupertypeNames.Contains("Workbook") ?? false) - && (document?.ProjectId?.Equals(reference.QualifiedModuleName.ProjectId) ?? false); - + var isQualified = reference.QualifyingReference != null; if (!isQualified) { + var document = Declaration.GetModuleParent(reference.ParentNonScoping) as DocumentModuleDeclaration; + + var isHostWorkbook = (document?.SupertypeNames.Contains("Workbook") ?? false) + && (document?.ProjectId?.Equals(reference.QualifiedModuleName.ProjectId) ?? false); + // unqualified calls aren't referring to ActiveWorkbook only inside a Workbook module: return !isHostWorkbook; } - else + + if (reference.QualifyingReference.Declaration == null) { - if (_applicationCandidates == null) - { - var applicationClass = finder.FindClassModule("Application", base.Excel, includeBuiltIn: true); - // note: underscored declarations would be for unqualified calls - var workbookClass = finder.FindClassModule("Workbook", base.Excel, includeBuiltIn: true); - var worksheetClass = finder.FindClassModule("Worksheet", base.Excel, includeBuiltIn: true); - var hostBook = finder.UserDeclarations(DeclarationType.Document) - .Cast() - .SingleOrDefault(doc => doc.ProjectId.Equals(reference.QualifiedModuleName.ProjectId) - && doc.SupertypeNames.Contains("Workbook")); + //This should really only happen on unbound member calls and then the current reference would also be unbound. + //So, if we end up here, we have no idea and bail out. + return false; + } - _applicationCandidates = finder.MatchName("Application") - .Where(m => m.Equals(applicationClass) - || (m.ParentDeclaration.Equals(workbookClass) && m.DeclarationType.HasFlag(DeclarationType.PropertyGet)) - || (m.ParentDeclaration.Equals(worksheetClass) && m.DeclarationType.HasFlag(DeclarationType.PropertyGet)) - || (m.ParentDeclaration.Equals(hostBook) && m.DeclarationType.HasFlag(DeclarationType.PropertyGet))) - .ToList(); - } + var excelProjectId = Excel(finder).ProjectId; + var applicationCandidates = finder.MatchName("Application") + .Where(m => m.ProjectId.Equals(excelProjectId) + && ( m.DeclarationType == DeclarationType.PropertyGet + || m.DeclarationType == DeclarationType.ClassModule)); - // qualified calls are referring to ActiveWorkbook if qualifier is the Application object: - return _applicationCandidates.Any(candidate => qualifiers.Any(q => q.Equals(candidate))); - } + var qualifyingDeclaration = reference.QualifyingReference.Declaration; + + // qualified calls are referring to ActiveWorkbook if qualifier is the Application object: + return applicationCandidates.Any(candidate => qualifyingDeclaration.Equals(candidate)); } protected override string ResultDescription(IdentifierReference reference) diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorkbookReferenceInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorkbookReferenceInspection.cs index d66560d6ca..0c705b86de 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorkbookReferenceInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorkbookReferenceInspection.cs @@ -1,10 +1,7 @@ using System.Collections.Generic; using System.Linq; -using Antlr4.Runtime; using Rubberduck.CodeAnalysis.Inspections.Abstract; using Rubberduck.CodeAnalysis.Inspections.Attributes; -using Rubberduck.Parsing; -using Rubberduck.Parsing.Grammar; using Rubberduck.Parsing.Symbols; using Rubberduck.Parsing.VBA; using Rubberduck.Parsing.VBA.DeclarationCaching; @@ -61,10 +58,9 @@ protected override IEnumerable ObjectionableDeclarations(Declaratio protected override bool IsResultReference(IdentifierReference reference, DeclarationFinder finder) { - var qualifiers = base.GetQualifierCandidates(reference, finder); return Declaration.GetModuleParent(reference.ParentScoping) is DocumentModuleDeclaration document - && document.SupertypeNames.Contains("Workbook") - && !qualifiers.Any(); + && document.SupertypeNames.Contains("Workbook") + && reference.QualifyingReference == null; } protected override string ResultDescription(IdentifierReference reference) diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorksheetReferenceInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorksheetReferenceInspection.cs index d7e3e47a69..0ce1d79361 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorksheetReferenceInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ImplicitContainingWorksheetReferenceInspection.cs @@ -1,7 +1,6 @@ using System.Linq; using Rubberduck.CodeAnalysis.Inspections.Abstract; using Rubberduck.CodeAnalysis.Inspections.Attributes; -using Rubberduck.Parsing; using Rubberduck.Parsing.Symbols; using Rubberduck.Parsing.VBA; using Rubberduck.Parsing.VBA.DeclarationCaching; @@ -48,7 +47,7 @@ protected override bool IsResultReference(IdentifierReference reference, Declara { return Declaration.GetModuleParent(reference.ParentNonScoping) is DocumentModuleDeclaration document && document.SupertypeNames.Contains("Worksheet") - && !(reference.Context.Parent is Parsing.Grammar.VBAParser.MemberAccessExprContext); // if it's qualified, it's not an implicit reference + && reference.QualifyingReference == null; // if it's qualified, it's not an implicit reference } protected override string ResultDescription(IdentifierReference reference) diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/MultilineParameterInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/MultilineParameterInspection.cs index 9b21dfa2c1..dd384592e3 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/MultilineParameterInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/MultilineParameterInspection.cs @@ -3,7 +3,6 @@ using Rubberduck.Parsing; using Rubberduck.Parsing.Grammar; using Rubberduck.Parsing.VBA; -using Rubberduck.Resources; namespace Rubberduck.CodeAnalysis.Inspections.Concrete { @@ -48,7 +47,7 @@ protected override string ResultDescription(QualifiedContext 3 - ? RubberduckUI.EasterEgg_Continuator + ? CodeAnalysisUI.EasterEgg_Continuator : Resources.Inspections.InspectionResults.MultilineParameterInspection, parameterText); } diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/NonReturningFunctionInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/NonReturningFunctionInspection.cs index 919794f4c8..22e82c57c4 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/NonReturningFunctionInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/NonReturningFunctionInspection.cs @@ -71,7 +71,8 @@ private bool IsAssignedByRefArgument(Declaration enclosingProcedure, IdentifierR return false; } - var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argExpression, enclosingProcedure); + var argument = argExpression.GetAncestor(); + var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argument, enclosingProcedure); // note: not recursive, by design. return parameter != null diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterCanBeByValInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterCanBeByValInspection.cs index 2af67e9394..cb2d0b4929 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterCanBeByValInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterCanBeByValInspection.cs @@ -142,7 +142,8 @@ private static bool IsPotentiallyAssignedByRefArgument(QualifiedModuleName modul return false; } - var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argExpression, module); + var argument = argExpression.GetAncestor(); + var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argument, module); if (parameter == null) { diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterNotUsedInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterNotUsedInspection.cs index b459869cc9..9a24b6e8e9 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterNotUsedInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ParameterNotUsedInspection.cs @@ -114,7 +114,7 @@ private static bool TryFindParameterIndex(ParameterDeclaration parameter, IParam private static bool ParameterAtIndexIsNotUsed(IParameterizedDeclaration declaration, int parameterIndex) { - var parameter = declaration.Parameters.ElementAtOrDefault(parameterIndex); + var parameter = declaration?.Parameters.ElementAtOrDefault(parameterIndex); return parameter != null && !parameter.References.Any(); } diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/ProcedureCanBeWrittenAsFunctionInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/ProcedureCanBeWrittenAsFunctionInspection.cs index dbd001bc1c..fcb4f63c7b 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/ProcedureCanBeWrittenAsFunctionInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/ProcedureCanBeWrittenAsFunctionInspection.cs @@ -88,7 +88,8 @@ private static bool IsUsageAsAssignedToByRefArgument(IdentifierReference referen return false; } - var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argExpression, reference.QualifiedModuleName); + var argument = argExpression.GetAncestor(); + var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argument, reference.QualifiedModuleName); if (parameter == null) { diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnassignedVariableUsageInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnassignedVariableUsageInspection.cs index a8e03a9ae3..b3280565a6 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnassignedVariableUsageInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnassignedVariableUsageInspection.cs @@ -155,7 +155,8 @@ private static bool IsAssignedByRefArgument(Declaration enclosingProcedure, Iden return false; } - var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argExpression, enclosingProcedure); + var argument = argExpression.GetAncestor(); + var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argument, enclosingProcedure); // note: not recursive, by design. return parameter != null diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseEvaluation/UnreachableCaseInspector.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseEvaluation/UnreachableCaseInspector.cs index 5d1d30ca61..53a7f09d94 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseEvaluation/UnreachableCaseInspector.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/UnreachableCaseEvaluation/UnreachableCaseInspector.cs @@ -98,23 +98,24 @@ public UnreachableCaseInspector( private UnreachableCaseInspection.CaseInspectionResultType? InvalidRangeExpressionsType(ICollection rangeClauseExpressions) { - if (rangeClauseExpressions.Any(expr => expr.IsMismatch)) + var usableClauses = rangeClauseExpressions.Where(expr => expr != null).ToList(); + if (usableClauses.Any(expr => expr.IsMismatch)) { return UnreachableCaseInspection.CaseInspectionResultType.MismatchType; } - if (rangeClauseExpressions.Any(expr => expr.IsOverflow)) + if (usableClauses.Any(expr => expr.IsOverflow)) { return UnreachableCaseInspection.CaseInspectionResultType.Overflow; } - if (rangeClauseExpressions.All(expr => expr.IsInherentlyUnreachable)) + if (usableClauses.All(expr => expr.IsInherentlyUnreachable)) { return UnreachableCaseInspection.CaseInspectionResultType.InherentlyUnreachable; } - if (rangeClauseExpressions.All(expr => - expr.IsUnreachable || expr.IsMismatch || expr.IsOverflow || expr.IsInherentlyUnreachable)) + if (usableClauses.All(expr => + expr.IsUnreachable || expr.IsMismatch|| expr.IsOverflow || expr.IsInherentlyUnreachable)) { return UnreachableCaseInspection.CaseInspectionResultType.Unreachable; } diff --git a/Rubberduck.CodeAnalysis/Inspections/Concrete/VariableNotAssignedInspection.cs b/Rubberduck.CodeAnalysis/Inspections/Concrete/VariableNotAssignedInspection.cs index fe5abbb010..d964a9e55e 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Concrete/VariableNotAssignedInspection.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Concrete/VariableNotAssignedInspection.cs @@ -69,7 +69,8 @@ private static bool IsAssignedByRefArgument(Declaration enclosingProcedure, Iden return false; } - var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argExpression, enclosingProcedure); + var argument = argExpression.GetAncestor(); + var parameter = finder.FindParameterOfNonDefaultMemberFromSimpleArgumentNotPassedByValExplicitly(argument, enclosingProcedure); // note: not recursive, by design. return parameter != null diff --git a/Rubberduck.CodeAnalysis/Inspections/Extensions/DeclarationTypeExtensions.cs b/Rubberduck.CodeAnalysis/Inspections/Extensions/DeclarationTypeExtensions.cs index c1d3914a53..30c83a769f 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Extensions/DeclarationTypeExtensions.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Extensions/DeclarationTypeExtensions.cs @@ -1,6 +1,5 @@ using System.Globalization; using Rubberduck.Parsing.Symbols; -using Rubberduck.Resources; namespace Rubberduck.CodeAnalysis.Inspections.Extensions { @@ -9,7 +8,7 @@ public static class DeclarationTypeExtensions //ToDo: Move this to resources. (This will require moving resource lookups to Core.) public static string ToLocalizedString(this DeclarationType type) { - return RubberduckUI.ResourceManager.GetString("DeclarationType_" + type, CultureInfo.CurrentUICulture); + return CodeAnalysisUI.ResourceManager.GetString("DeclarationType_" + type, CultureInfo.CurrentUICulture); } } } \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/Inspections/Logistics/Inspector.cs b/Rubberduck.CodeAnalysis/Inspections/Logistics/Inspector.cs index 03cf73cf2a..fbee1bdac3 100644 --- a/Rubberduck.CodeAnalysis/Inspections/Logistics/Inspector.cs +++ b/Rubberduck.CodeAnalysis/Inspections/Logistics/Inspector.cs @@ -63,7 +63,7 @@ public async Task> FindIssuesAsync(RubberduckPars } token.ThrowIfCancellationRequested(); - state.OnStatusMessageUpdate(RubberduckUI.CodeInspections_Inspecting); + state.OnStatusMessageUpdate(CodeAnalysisUI.CodeInspections_Inspecting); var allIssues = new ConcurrentBag(); token.ThrowIfCancellationRequested(); diff --git a/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.Designer.cs b/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.Designer.cs index c7d0c0aed7..1bf28617db 100644 --- a/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.Designer.cs +++ b/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.Designer.cs @@ -12,7 +12,7 @@ namespace Rubberduck.CodeAnalysis.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] public sealed partial class CodeInspectionDefaults : global::System.Configuration.ApplicationSettingsBase { private static CodeInspectionDefaults defaultInstance = ((CodeInspectionDefaults)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new CodeInspectionDefaults()))); @@ -38,121 +38,117 @@ public static CodeInspectionDefaults Default { "CodeInspection Name=\"ImplicitByRefModifierInspection\" Severity=\"Hint\" Inspection" + "Type=\"CodeQualityIssues\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n " + - " \r\n \r\n \r\n \r\n " + - " \r\n \r\n " + - " \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n" + - " \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n " + - "\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n <" + + "CodeInspection Name=\"EmptyWhileWendBlockInspection\" Severity=\"Warning\" Inspectio" + + "nType=\"MaintainabilityAndReadabilityIssues\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n " + + " \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n <" + - "CodeInspection Name=\"IsMissingWithNonArgumentParameterInspection\" Severity=\"Warn" + - "ing\" InspectionType=\"CodeQualityIssues\" />\r\n \r\n" + - " \r\n \r\n \r\n \r\n true\r\n")] + "pection Name=\"SelfAssignedDeclarationInspection\" Severity=\"Suggestion\" Inspectio" + + "nType=\"CodeQualityIssues\" />\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n true\r\n")] public global::Rubberduck.CodeAnalysis.Settings.CodeInspectionSettings CodeInspectionSettings { get { return ((global::Rubberduck.CodeAnalysis.Settings.CodeInspectionSettings)(this["CodeInspectionSettings"])); diff --git a/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.settings b/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.settings index d0b41da20e..449dbd6b86 100644 --- a/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.settings +++ b/Rubberduck.CodeAnalysis/Properties/CodeInspectionDefaults.settings @@ -13,12 +13,10 @@ <CodeInspection Name="EmptyStringLiteralInspection" Severity="Warning" InspectionType="LanguageOpportunities" /> <CodeInspection Name="ImplicitByRefModifierInspection" Severity="Hint" InspectionType="CodeQualityIssues" /> <CodeInspection Name="FunctionReturnValueNotUsedInspection" Severity="Warning" InspectionType="CodeQualityIssues" /> - <CodeInspection Name="IllegalAnnotationInspection" Severity="Error" InspectionType="RubberduckOpportunities" /> <CodeInspection Name="RedundantByRefModifierInspection" Severity="DoNotShow" InspectionType="CodeQualityIssues" /> <CodeInspection Name="MissingAttributeInspection" Severity="Warning" InspectionType="RubberduckOpportunities" /> - <CodeInspection Name="AttributeValueOutOfSyncInspection" Severity="Warning" InspectionType="RubberduckOpportunities" /> + <CodeInspection Name="AttributeOutOfSyncInspection" Severity="Warning" InspectionType="RubberduckOpportunities" /> <CodeInspection Name="MissingAnnotationArgumentInspection" Severity="Error" InspectionType="CodeQualityIssues" /> - <CodeInspection Name="MissingMemberAnnotationInspection" Severity="Error" InspectionType="RubberduckOpportunities" /> <CodeInspection Name="ModuleScopeDimKeywordInspection" Severity="Suggestion" InspectionType="LanguageOpportunities" /> <CodeInspection Name="MultilineParameterInspection" Severity="Suggestion" InspectionType="MaintainabilityAndReadabilityIssues" /> <CodeInspection Name="MultipleDeclarationsInspection" Severity="Warning" InspectionType="MaintainabilityAndReadabilityIssues" /> @@ -48,9 +46,7 @@ <CodeInspection Name="HostSpecificExpressionInspection" Severity="Warning" InspectionType="LanguageOpportunities" /> <CodeInspection Name="HungarianNotationInspection" Severity="Suggestion" InspectionType="MaintainabilityAndReadabilityIssues" /> <CodeInspection Name="ImplicitActiveSheetReferenceInspection" Severity="Warning" InspectionType="LanguageOpportunities" /> - <CodeInspection Name="ImplicitContainingSheetReferenceInspection" Severity="Suggestion" InspectionType="LanguageOpportunities" /> <CodeInspection Name="ImplicitActiveWorkbookReferenceInspection" Severity="Warning" InspectionType="LanguageOpportunities" /> - <CodeInspection Name="ImplicitContainingWorkbookReferenceInspection" Severity="Suggestion" InspectionType="LanguageOpportunities" /> <CodeInspection Name="ImplicitDefaultMemberAssignmentInspection" Severity="Suggestion" InspectionType="LanguageOpportunities" /> <CodeInspection Name="ImplicitPublicMemberInspection" Severity="Hint" InspectionType="LanguageOpportunities" /> <CodeInspection Name="ImplicitVariantReturnTypeInspection" Severity="Hint" InspectionType="LanguageOpportunities" /> @@ -86,6 +82,8 @@ <CodeInspection Name="AssignmentNotUsedInspection" Severity="Suggestion" InspectionType="CodeQualityIssues" /> <CodeInspection Name="UnderscoreInPublicClassModuleMemberInspection" Severity="Warning" InspectionType="CodeQualityIssues" /> <CodeInspection Name="ExcelUdfNameIsValidCellReferenceInspection" Severity="Warning" InspectionType="CodeQualityIssues" /> + <CodeInspection Name="EmptyMethodInspection" Severity="Warning" InspectionType="CodeQualityIssues" /> + <CodeInspection Name="ImplementedInterfaceMemberInspection" Severity="Suggestion" InspectionType="CodeQualityIssues" /> </CodeInspections> <WhitelistedIdentifiers /> <RunInspectionsOnSuccessfulParse>true</RunInspectionsOnSuccessfulParse> diff --git a/Rubberduck.CodeAnalysis/QuickFixes/Concrete/Refactoring/RenameDeclarationQuickFix.cs b/Rubberduck.CodeAnalysis/QuickFixes/Concrete/Refactoring/RenameDeclarationQuickFix.cs index 5e8121cc39..8c01741b69 100644 --- a/Rubberduck.CodeAnalysis/QuickFixes/Concrete/Refactoring/RenameDeclarationQuickFix.cs +++ b/Rubberduck.CodeAnalysis/QuickFixes/Concrete/Refactoring/RenameDeclarationQuickFix.cs @@ -2,6 +2,7 @@ using Rubberduck.CodeAnalysis.Inspections; using Rubberduck.CodeAnalysis.Inspections.Concrete; using Rubberduck.CodeAnalysis.QuickFixes.Abstract; +using Rubberduck.Refactorings; using Rubberduck.Refactorings.Rename; using Rubberduck.Resources; @@ -64,9 +65,9 @@ protected override void Refactor(IInspectionResult result) public override string Description(IInspectionResult result) { - return string.Format(RubberduckUI.Rename_DeclarationType, - RubberduckUI.ResourceManager.GetString("DeclarationType_" + result.Target.DeclarationType, - CultureInfo.CurrentUICulture)); + return string.Format(RefactoringsUI.Rename_DeclarationType, + RubberduckUI.ResourceManager.GetString("DeclarationType_" + result.Target.DeclarationType, + CultureInfo.CurrentUICulture)); } } } \ No newline at end of file diff --git a/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj b/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj index 1dcd7c7375..6211d227a1 100644 --- a/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj +++ b/Rubberduck.CodeAnalysis/Rubberduck.CodeAnalysis.csproj @@ -61,12 +61,24 @@ + + True + True + CodeAnalysisUI.resx + True True CodeInspectionDefaults.settings + True + + + PublicResXFileCodeGenerator + CodeAnalysisUI.Designer.cs + + PublicSettingsSingleFileGenerator diff --git a/Rubberduck.CodeAnalysis/app.config b/Rubberduck.CodeAnalysis/app.config index 688666fbff..64d43f5b25 100644 --- a/Rubberduck.CodeAnalysis/app.config +++ b/Rubberduck.CodeAnalysis/app.config @@ -21,85 +21,161 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true diff --git a/Rubberduck.Core/AddRemoveReferences/ReferenceReconciler.cs b/Rubberduck.Core/AddRemoveReferences/ReferenceReconciler.cs index 9326b82e99..09919713ac 100644 --- a/Rubberduck.Core/AddRemoveReferences/ReferenceReconciler.cs +++ b/Rubberduck.Core/AddRemoveReferences/ReferenceReconciler.cs @@ -137,7 +137,7 @@ public ReferenceModel TryAddReference(IVBProject project, string path) } catch (COMException ex) { - _messageBox.NotifyWarn(ex.Message, RubberduckUI.References_AddFailedCaption); + _messageBox.NotifyWarn(ex.Message, AddRemoveReferencesUI.AddFailedCaption); } return null; } @@ -158,7 +158,7 @@ public ReferenceModel TryAddReference(IVBProject project, ReferenceModel referen } catch (COMException ex) { - _messageBox.NotifyWarn(ex.Message, RubberduckUI.References_AddFailedCaption); + _messageBox.NotifyWarn(ex.Message, AddRemoveReferencesUI.AddFailedCaption); } return null; } diff --git a/Rubberduck.Core/AddRemoveReferences/RegisteredLibraryInfo.cs b/Rubberduck.Core/AddRemoveReferences/RegisteredLibraryInfo.cs index 27b06df61a..7f638e4c22 100644 --- a/Rubberduck.Core/AddRemoveReferences/RegisteredLibraryInfo.cs +++ b/Rubberduck.Core/AddRemoveReferences/RegisteredLibraryInfo.cs @@ -3,6 +3,7 @@ using System.Globalization; using Path = System.IO.Path; using System.Runtime.InteropServices.ComTypes; +using Rubberduck.UI.AddRemoveReferences; namespace Rubberduck.AddRemoveReferences { @@ -24,7 +25,7 @@ public class RegisteredLibraryInfo { private static readonly Dictionary NativeLocaleNames = new Dictionary { - { 0, Resources.RubberduckUI.References_DefaultLocale } + { 0, AddRemoveReferencesUI.DefaultLocale } }; public RegisteredLibraryKey UniqueId { get; } @@ -54,8 +55,8 @@ public string LocaleName } catch { - NativeLocaleNames.Add(LocaleId, Resources.RubberduckUI.References_DefaultLocale); - return Resources.RubberduckUI.References_DefaultLocale; + NativeLocaleNames.Add(LocaleId, AddRemoveReferencesUI.DefaultLocale); + return AddRemoveReferencesUI.DefaultLocale; } } } diff --git a/Rubberduck.Core/AppMenu.cs b/Rubberduck.Core/AppMenu.cs index 3d3fb880f9..3a4eaf08d9 100644 --- a/Rubberduck.Core/AppMenu.cs +++ b/Rubberduck.Core/AppMenu.cs @@ -2,6 +2,8 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; using NLog; using Rubberduck.Parsing; using Rubberduck.Parsing.VBA; @@ -75,26 +77,26 @@ private void InitializeRubberduckMenus() _logger.Error(exception); } } - EvaluateCanExecute(_parser.State); + EvaluateCanExecuteAsync(_parser.State, CancellationToken.None).Wait(); } - public void OnSelectedDeclarationChange(object sender, DeclarationChangedEventArgs e) + public async void OnSelectedDeclarationChange(object sender, DeclarationChangedEventArgs e) { - EvaluateCanExecute(_parser.State); + await EvaluateCanExecuteAsync(_parser.State, CancellationToken.None); } - private void OnParserStateChanged(object sender, EventArgs e) + private async void OnParserStateChanged(object sender, EventArgs e) { - EvaluateCanExecute(_parser.State); + await EvaluateCanExecuteAsync(_parser.State, CancellationToken.None); } - public void EvaluateCanExecute(RubberduckParserState state) + public async Task EvaluateCanExecuteAsync(RubberduckParserState state, CancellationToken token) { foreach (var menu in _menus) { try { - menu.EvaluateCanExecute(state); + await menu.EvaluateCanExecuteAsync(state, token); } catch (Exception exception) { diff --git a/Rubberduck.Core/Common/Hotkeys/HotkeyInfo.cs b/Rubberduck.Core/Common/Hotkeys/HotkeyInfo.cs index 05d2afa764..85c6e6cccc 100644 --- a/Rubberduck.Core/Common/Hotkeys/HotkeyInfo.cs +++ b/Rubberduck.Core/Common/Hotkeys/HotkeyInfo.cs @@ -1,7 +1,7 @@ using System; using System.Text; using System.Windows.Forms; -using Rubberduck.Resources; +using Rubberduck.UI.Settings; namespace Rubberduck.Common.Hotkeys { @@ -23,17 +23,17 @@ public override string ToString() var builder = new StringBuilder(); if (Keys.HasFlag(Keys.Alt)) { - builder.Append(RubberduckUI.GeneralSettings_HotkeyAlt); + builder.Append(GeneralSettingsUI.HotkeyAlt); builder.Append('+'); } if (Keys.HasFlag(Keys.Control)) { - builder.Append(RubberduckUI.GeneralSettings_HotkeyCtrl); + builder.Append(GeneralSettingsUI.HotkeyCtrl); builder.Append('+'); } if (Keys.HasFlag(Keys.Shift)) { - builder.Append(RubberduckUI.GeneralSettings_HotkeyShift); + builder.Append(GeneralSettingsUI.HotkeyShift); builder.Append('+'); } diff --git a/Rubberduck.Core/Formatters/ToDoItemFormatter.cs b/Rubberduck.Core/Formatters/ToDoItemFormatter.cs index 567016fab2..943b627554 100644 --- a/Rubberduck.Core/Formatters/ToDoItemFormatter.cs +++ b/Rubberduck.Core/Formatters/ToDoItemFormatter.cs @@ -1,6 +1,6 @@ using Rubberduck.ToDoItems; using Rubberduck.Common; -using Rubberduck.Resources; +using Rubberduck.Resources.ToDoExplorer; namespace Rubberduck.Formatters { @@ -22,7 +22,7 @@ public object[] ToArray() public string ToClipboardString() { var module = _toDoItem.Selection.QualifiedName; - return string.Format(RubberduckUI.ToDoExplorerToDoItemFormat, + return string.Format(ToDoExplorerUI.ToDoExplorerToDoItemFormat, _toDoItem.Type, _toDoItem.Description, module.ProjectName, diff --git a/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerItemViewModelBase.cs b/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerItemViewModelBase.cs index 286e2876e6..63132e2bd1 100644 --- a/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerItemViewModelBase.cs +++ b/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerItemViewModelBase.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Windows; using NLog; +using Rubberduck.CodeAnalysis; using Rubberduck.Parsing; using Rubberduck.Parsing.Symbols; -using Rubberduck.Resources; using Rubberduck.UI; using Rubberduck.VBEditor; @@ -63,7 +63,7 @@ public virtual string PanelTitle } var nameWithDeclarationType = - $"{Declaration.IdentifierName} - ({RubberduckUI.ResourceManager.GetString("DeclarationType_" + Declaration.DeclarationType, CultureInfo.CurrentUICulture)})"; + $"{Declaration.IdentifierName} - ({CodeAnalysisUI.ResourceManager.GetString("DeclarationType_" + Declaration.DeclarationType, CultureInfo.CurrentUICulture)})"; if (string.IsNullOrEmpty(Declaration.AsTypeName)) { diff --git a/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs b/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs index 8270aa709f..39920aa685 100644 --- a/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs +++ b/Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerViewModel.cs @@ -3,6 +3,7 @@ using System.Collections.ObjectModel; using System.Diagnostics.CodeAnalysis; using System.Linq; +using System.Threading.Tasks; using NLog; using Rubberduck.Parsing.Symbols; using Rubberduck.Parsing.VBA; @@ -19,6 +20,7 @@ using Rubberduck.Templates; using Rubberduck.UI.CodeExplorer.Commands.DragAndDrop; using Rubberduck.UI.Command.ComCommands; +using Rubberduck.UI.Controls; using Rubberduck.UI.UnitTesting.ComCommands; using Rubberduck.VBEditor.SafeComWrappers.Abstract; @@ -35,8 +37,13 @@ public enum CodeExplorerSortOrder DeclarationTypeThenCodeLine = DeclarationType | CodeLine } + public interface IPeekDefinitionPopupProvider + { + void PeekDefinition(Declaration target); + } + [SuppressMessage("ReSharper", "InconsistentNaming")] - public sealed class CodeExplorerViewModel : ViewModelBase + public sealed class CodeExplorerViewModel : ViewModelBase, IPeekDefinitionPopupProvider { // ReSharper disable NotAccessedField.Local - The settings providers aren't used, but several enhancement requests will need them. #pragma warning disable IDE0052 // Remove unread private members @@ -53,6 +60,7 @@ public sealed class CodeExplorerViewModel : ViewModelBase public CodeExplorerViewModel( RubberduckParserState state, RemoveCommand removeCommand, + PeekDefinitionNavigateCommand peekNavigateCommand, IConfigurationService generalSettingsProvider, IConfigurationService windowSettingsProvider, IUiDispatcher uiDispatcher, @@ -86,6 +94,8 @@ public CodeExplorerViewModel( RemoveCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteRemoveCommand, _externalRemoveCommand.CanExecute); } + PeekDefinitionCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecutePeekDefinitionCommand, CanExecutePeekDefinitionCommand); + ClosePeekDefinitionCommand = new DelegateCommand(LogManager.GetCurrentClassLogger(), ExecuteClosePeekDefinitionCommand); OnPropertyChanged(nameof(Projects)); @@ -445,6 +455,61 @@ private void ExecuteRemoveCommand(object param) public CommandBase CollapseAllCommand { get; } public CommandBase ExpandAllCommand { get; } + public CommandBase PeekDefinitionCommand { get; } + public CommandBase ClosePeekDefinitionCommand { get; } + public PeekDefinitionFindAllReferencesCommand PeekFindReferencesCommand { get; set; } + public PeekDefinitionNavigateCommand PeekNavigateCommand { get; set; } + + private bool _showPeekDefinitionPopup; + public bool ShowPeekDefinitionPopup + { + get => _showPeekDefinitionPopup; + set + { + if (value != _showPeekDefinitionPopup) + { + _showPeekDefinitionPopup = value; + OnPropertyChanged(); + } + } + } + + private PeekDefinitionViewModel _peekDefinitionViewModel; + public PeekDefinitionViewModel PeekDefinitionViewModel + { + get => _peekDefinitionViewModel; + private set + { + if (_peekDefinitionViewModel != value) + { + _peekDefinitionViewModel = value; + OnPropertyChanged(); + } + } + } + + private void ExecutePeekDefinitionCommand(object param) + { + if (param is ICodeExplorerNode node) + { + PeekDefinitionViewModel = new PeekDefinitionViewModel(node, PeekFindReferencesCommand, PeekNavigateCommand, ClosePeekDefinitionCommand, _state); + } + else if (param is Declaration declaration) + { + PeekDefinitionViewModel = new PeekDefinitionViewModel(declaration, PeekFindReferencesCommand, PeekNavigateCommand, ClosePeekDefinitionCommand, _state); + } + else + { + PeekDefinitionViewModel = null; + } + + ShowPeekDefinitionPopup = PeekDefinitionViewModel != null; + } + + private void ExecuteClosePeekDefinitionCommand(object param) => ShowPeekDefinitionPopup = false; + + private bool CanExecutePeekDefinitionCommand(object param) => param is Declaration || SelectedItem is CodeExplorerMemberViewModel || SelectedItem is CodeExplorerComponentViewModel; + public ICodeExplorerNode FindVisibleNodeForDeclaration(Declaration declaration) { if (declaration == null) @@ -541,5 +606,8 @@ public void Dispose() _generalSettingsProvider.SettingsChanged -= GeneralSettingsChanged; } } + + // IPeekDefinitionPopupProvider.PeekDefinition + public void PeekDefinition(Declaration target) => ExecutePeekDefinitionCommand(target); } } diff --git a/Rubberduck.Core/Properties/Settings.Designer.cs b/Rubberduck.Core/Properties/Settings.Designer.cs index 6c0e8ff9c6..29a2c73a23 100644 --- a/Rubberduck.Core/Properties/Settings.Designer.cs +++ b/Rubberduck.Core/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace Rubberduck.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.7.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.8.1.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); diff --git a/Rubberduck.Core/Refactorings/ExtractMethod/ExtractedParameter.cs b/Rubberduck.Core/Refactorings/ExtractMethod/ExtractedParameter.cs index d686f162bb..fbec54947d 100644 --- a/Rubberduck.Core/Refactorings/ExtractMethod/ExtractedParameter.cs +++ b/Rubberduck.Core/Refactorings/ExtractMethod/ExtractedParameter.cs @@ -1,5 +1,6 @@ using Rubberduck.Parsing.Grammar; using Rubberduck.Resources; +using Tokens = Rubberduck.Resources.Tokens; namespace Rubberduck.Refactorings.ExtractMethod { @@ -11,37 +12,24 @@ public enum PassedBy ByVal } - public static readonly string None = RubberduckUI.ExtractMethod_OutputNone; - - private readonly string _name; - private readonly string _typeName; - private readonly PassedBy _passedBy; + public static readonly string None = RefactoringsUI.ExtractMethod_OutputNone; public ExtractedParameter(string typeName, PassedBy passedBy, string name = null) { - _name = name ?? None; - _typeName = typeName; - _passedBy = passedBy; + Name = name ?? None; + TypeName = typeName; + Passed = passedBy; } - public string Name - { - get { return _name; } - } + public string Name { get; } - public string TypeName - { - get { return _typeName; } - } + public string TypeName { get; } - public PassedBy Passed - { - get { return _passedBy; } - } + public PassedBy Passed { get; } public override string ToString() { - return _passedBy.ToString() + ' ' + Name + ' ' + Tokens.As + ' ' + TypeName; + return Passed.ToString() + ' ' + Name + ' ' + Tokens.As + ' ' + TypeName; } } } diff --git a/Rubberduck.Core/Rubberduck.Core.csproj b/Rubberduck.Core/Rubberduck.Core.csproj index 2960a7b9fb..c8fdc4f4a0 100644 --- a/Rubberduck.Core/Rubberduck.Core.csproj +++ b/Rubberduck.Core/Rubberduck.Core.csproj @@ -1,18 +1,19 @@  - + Rubberduck Rubberduck.Core Rubberduck.Core Rubberduck.Core - Copyright © 2014-2021 + Copyright © 2014-2019 {A1587EAC-7B54-407E-853F-4C7493D0323E} bin\Debug\Rubberduck.Core.xml $(DisabledWarnings);1591 Ducky.ico - true - true + + + 2.5.1 @@ -44,7 +45,6 @@ - @@ -83,7 +83,6 @@ 4.5.10 - 4.5.0 @@ -91,17 +90,100 @@ 2.0.20525 + + + + + + + + + + $([System.String]::Copy('%(Filename)').Replace('.Designer', '')).cs + + + True True Resources.resx + + Settings.settings + True + True + True + + + True + True + AddRemoveReferencesUI.resx + + + True + True + InspectionResultsUI.resx + + + AnnotateDeclarationView.xaml + + + MoveMultipleFoldersView.xaml + + + MoveMultipleToFolderView.xaml + + + RenameFolderView.xaml + + + True + True + GeneralSettingsUI.resx + + + True + True + ToDoExplorerUI.resx + + + IgnoredProjectsSettingsView.xaml + ResXFileCodeGenerator Resources.Designer.cs + + PublicResXFileCodeGenerator + AddRemoveReferencesUI.Designer.cs + + + PublicResXFileCodeGenerator + InspectionResultsUI.Designer.cs + + + PublicResXFileCodeGenerator + GeneralSettingsUI.Designer.cs + + + PublicResXFileCodeGenerator + ToDoExplorerUI.Designer.cs + + + + + Settings.Designer.cs + SettingsSingleFileGenerator + + + + + + diff --git a/Rubberduck.Core/Settings/MinimumLogLevel.cs b/Rubberduck.Core/Settings/MinimumLogLevel.cs index aec40dc896..fbea44d7b1 100644 --- a/Rubberduck.Core/Settings/MinimumLogLevel.cs +++ b/Rubberduck.Core/Settings/MinimumLogLevel.cs @@ -1,5 +1,5 @@ using System.Globalization; -using Rubberduck.Resources; +using Rubberduck.UI.Settings; namespace Rubberduck.Settings { @@ -8,7 +8,7 @@ public sealed class MinimumLogLevel public MinimumLogLevel(int ordinal, string logLevelName) { Ordinal = ordinal; - Name = RubberduckUI.ResourceManager.GetString("GeneralSettings_" + logLevelName + "LogLevel", CultureInfo.CurrentUICulture); + Name = GeneralSettingsUI.ResourceManager.GetString(logLevelName + "LogLevel", CultureInfo.CurrentUICulture); } public int Ordinal { get; } diff --git a/Rubberduck.Core/UI/About/AboutControl.xaml b/Rubberduck.Core/UI/About/AboutControl.xaml index fe61c06657..6e1793157c 100644 --- a/Rubberduck.Core/UI/About/AboutControl.xaml +++ b/Rubberduck.Core/UI/About/AboutControl.xaml @@ -215,6 +215,7 @@ Max Dörner Michal Krzych @mjolka Nelson Vides +@PhilCattivocaratere Philip Wales Radosław Kapka Rob Bovey (Smart Indenter) diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.Designer.cs b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.Designer.cs new file mode 100644 index 0000000000..fea1d9a5c1 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.Designer.cs @@ -0,0 +1,342 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Rubberduck.UI.AddRemoveReferences { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class AddRemoveReferencesUI { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal AddRemoveReferencesUI() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Rubberduck.UI.AddRemoveReferences.AddRemoveReferencesUI", typeof(AddRemoveReferencesUI).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Could not add reference. + /// + public static string AddFailedCaption { + get { + return ResourceManager.GetString("AddFailedCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add to project. + /// + public static string AddToolTip { + get { + return ResourceManager.GetString("AddToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse.... + /// + public static string BrowseButtonText { + get { + return ResourceManager.GetString("BrowseButtonText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Browse for reference. + /// + public static string BrowseCaption { + get { + return ResourceManager.GetString("BrowseCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Access Databases({0})|{0}. + /// + public static string BrowseFilterAccess { + get { + return ResourceManager.GetString("BrowseFilterAccess", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ActiveX Controls (*.ocx)|*.ocx. + /// + public static string BrowseFilterActiveX { + get { + return ResourceManager.GetString("BrowseFilterActiveX", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All files (*.*)|*.*. + /// + public static string BrowseFilterAllFiles { + get { + return ResourceManager.GetString("BrowseFilterAllFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Excel Files ({0})|{0}. + /// + public static string BrowseFilterExcel { + get { + return ResourceManager.GetString("BrowseFilterExcel", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Executable Files (*.exe;*.dll)|*.exe;*.dll. + /// + public static string BrowseFilterExecutable { + get { + return ResourceManager.GetString("BrowseFilterExecutable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Outlook VBA Files ({0})|{0}. + /// + public static string BrowseFilterOutlook { + get { + return ResourceManager.GetString("BrowseFilterOutlook", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to PowerPoint Addin Files({0})|{0}. + /// + public static string BrowseFilterPowerPoint { + get { + return ResourceManager.GetString("BrowseFilterPowerPoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publisher Files ({0}|{0}. + /// + public static string BrowseFilterPublisher { + get { + return ResourceManager.GetString("BrowseFilterPublisher", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type Libraries (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll. + /// + public static string BrowseFilterTypes { + get { + return ResourceManager.GetString("BrowseFilterTypes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to All Visio Files ({0})|{0}. + /// + public static string BrowseFilterVisio { + get { + return ResourceManager.GetString("BrowseFilterVisio", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Word Documents ({0})|{0}. + /// + public static string BrowseFilterWord { + get { + return ResourceManager.GetString("BrowseFilterWord", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add/Remove References.... + /// + public static string Caption { + get { + return ResourceManager.GetString("Caption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add/Remove References - {0}. + /// + public static string CaptionTemplate { + get { + return ResourceManager.GetString("CaptionTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Standard. + /// + public static string DefaultLocale { + get { + return ResourceManager.GetString("DefaultLocale", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Locale:. + /// + public static string Locale { + get { + return ResourceManager.GetString("Locale", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move down. + /// + public static string MoveDownToolTip { + get { + return ResourceManager.GetString("MoveDownToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Move up. + /// + public static string MoveUpToolTip { + get { + return ResourceManager.GetString("MoveUpToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pinned. + /// + public static string Pinned { + get { + return ResourceManager.GetString("Pinned", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Pin reference. + /// + public static string PinToolTip { + get { + return ResourceManager.GetString("PinToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Projects. + /// + public static string Projects { + get { + return ResourceManager.GetString("Projects", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Recent. + /// + public static string Recent { + get { + return ResourceManager.GetString("Recent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to References. + /// + public static string References { + get { + return ResourceManager.GetString("References", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove from project. + /// + public static string RemoveToolTip { + get { + return ResourceManager.GetString("RemoveToolTip", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Search for reference.... + /// + public static string SearchPlaceholder { + get { + return ResourceManager.GetString("SearchPlaceholder", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Select type libraries and VB projects to add or remove.. + /// + public static string SubCaption { + get { + return ResourceManager.GetString("SubCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type Libraries. + /// + public static string TypeLibs { + get { + return ResourceManager.GetString("TypeLibs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Version:. + /// + public static string Version { + get { + return ResourceManager.GetString("Version", resourceCulture); + } + } + } +} diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.cs.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.cs.resx new file mode 100644 index 0000000000..543b345dc9 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.cs.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Reference + + + Nepovedlo se přidat reference + + + Přidat do projektu + + + Procházet... + + + Procházet pro reference + + + Microsoft Access Databáze ({0})|{0} + + + ActiveX Controls (*.ocx)|*.ocx + + + Všechny soubory (*.*)|*.* + + + Microsoft Excel Soubory ({0})|{0} + + + Spustitelné Soubory (*.exe;*.dll)|*.exe;*.dll + + + Outlook VBA Soubory ({0})|{0} + + + PowerPoint Addin Soubory ({0})|{0} + + + Publisher Soubory ({0})|{0} + + + Knihovny (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + Všechny Visio Soubory ({0})|{0} + + + Word Dokumenty ({0})|{0} + + + Přidat/Odebrat Reference... + + + Přidat/Odebrat Reference = {0} + + + Standardní + + + Lokalizace: + + + Posunout dolů + + + Posunout nahorů + + + Připíchnuté + + + Přišpendlit referenci + + + Projekty + + + Nedávné + + + Odebrat z projektu + + + Hledat referenci... + + + Vybrat knihovny a VB projekty pro přidání nebo odebrání. + + + Knihovny + + + Verze: + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.de.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.de.resx new file mode 100644 index 0000000000..5a89580922 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.de.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Referenzen + + + Hinzufügen der Referenz fehlgeschlagen + + + Zu Projekt hinzufügen + + + Durchsuchen... + + + Verzeichnis der Referenz öffnen + + + Microsoft-Access-Datenbanken({0})|{0} + + + ActiveX-Kontrollelemente (*.ocx)|*.ocx + + + Alle Dateien(*.*)|*.* + + + Microsoft-Excel-Dateien ({0})|{0} + + + Ausführbare Dateien (*.exe;*.dll)|*.exe;*.dll + + + Outlook-VBA-Dateien ({0})|{0} + + + PowerPoint-Addin-Dateien({0})|{0} + + + Publisher-Dateien ({0}|{0} + + + Typbibliotheken (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + Alle Visio-Dateien ({0})|{0} + + + Word-Dokumente ({0})|{0} + + + Referenzen hinzufügen/entfernen... + + + Referenzen hinzufügen/entfernen - {0} + + + Standard + + + Sprache: + + + Aufwärts bewegen + + + Abwärts bewegen + + + Angeheftet + + + Referenz anheften + + + Projekte + + + Zuletzt verwendet + + + Vom Projekt enfernen + + + Nach Referenz suchen... + + + Wähle Typbibliotheken und VB-Projekte zum Hinzufügen oder Entfernen. + + + Typbibliotheken + + + Version: + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.es.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.es.resx new file mode 100644 index 0000000000..9b2ec5ab14 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.es.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Referencias + + + No se pudo agregar la referencia + + + Agregar al proyecto + + + Navegando... + + + Buscar referencias + + + Bases de datos de Microsoft Access ({0})|{0} + + + Controles ActiveX (* .ocx)|*.ocx + + + Todos los archivos (*.*)|*.* + + + Archivos de Microsoft Excel ({0})|{0} + + + Archivos ejecutables (*.exe;*.dll)|*.exe;*.dll + + + Archivos de Outlook VBA ({0})|{0} + + + Archivos de Complementos de PowerPoint ({0})|{0} + + + Archivos de Publisher ({0}|{0} + + + Bibliotecas de tipos (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + Todos los archivos de Visio ({0})|{0} + + + Documentos de Word ({0})|{0} + + + Agregar/Eliminar referencias... + + + Agregar/Eliminar referencias - {0} + + + Estándar + + + Local: + + + Mover hacia abajo + + + Mover hacia arriba + + + Fijado + + + Fijar Referencia + + + Proyectos + + + Reciente + + + Eliminar del proyecto + + + Buscar referencia ... + + + Seleccione bibliotecas de tipos y proyectos VB para agregar o eliminar. + + + Bibliotecas de tipos + + + Versión: + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.fr.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.fr.resx new file mode 100644 index 0000000000..2a8067a2c4 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.fr.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Références + + + La référence n'a pu être ajoutée + + + Ajouter au projet + + + Parcourir... + + + Parcourir... + + + Base de données Microsoft Access ({0})|{0} + + + Contrôles ActiveX (*.ocx)|*.ocx + + + Tous (*.*)|*.* + + + Fichiers Microsoft Excel ({0})|{0} + + + Exécutables (*.exe,*.dll)|*.exe;*.dll + + + Fichiers VBA Outlook ({0})|{0} + + + Fichiers complément PowerPoint ({0})|{0} + + + Fichiers Publisher ({0})|{0} + + + Bibliothêques (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + Tous les fichiers Visio ({0})|{0} + + + Documents Word ({0})|{0} + + + Ajouter/Supprimer Références... + + + Ajouter/Supprimer Références - {0} + + + Standard + + + Langue: + + + Déplacer vers le haut + + + Déplacer vers le bas + + + Épingles + + + Épingler la référence + + + Projets + + + Récents + + + Supprimer du projet + + + Rechercher une référence... + + + Sélectionner les librairies et projets à ajouter ou supprimer aux références du projet. + + + Bibliothèques + + + Version: + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.it.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.it.resx new file mode 100644 index 0000000000..5d63958833 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.it.resx @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Impossibile aggiungere riferimenti + + + Aggiugni al progetto + + + Sfoglia... + + + Sfoglia riferimenti + + + Database di Microsoft Access({0})|{0} + + + Controlli ActiveX (*.ocx)|*.ocx + + + Tutti i file (*.*)|*.* + + + File di Microsoft Excel ({0})|{0} + + + File eseguibili (*.exe;*.dll)|*.exe;*.dll + + + File VBA di Outlook ({0})|{0} + + + File Addin di PowerPoint({0})|{0} + + + File di Publisher ({0}|{0} + + + Tipi Libreria (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + Tutti i file di Visio ({0})|{0} + + + Documenti di Word ({0})|{0} + + + Aggiungi/Rimuovi Riferimento... + + + Aggiungi/Rimuovi Riferimenti - {0} + + + Standard + + + Lingua: + + + Sposta sotto + + + Sposta sopra + + + Bloccati + + + Blocca riferimento + + + Progetti + + + Recenti + + + Rimuovi dal progetto + + + Cerca riferimenti... + + + Selezionare i tipi libreria e progetti VB da aggiungere o rimuovere. + + + Tipi Libreria + + + Versione: + + + Riferimenti + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.resx b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.resx new file mode 100644 index 0000000000..33cc5e3d34 --- /dev/null +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesUI.resx @@ -0,0 +1,202 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + References + + + Could not add reference + + + Add to project + + + Browse... + + + Browse for reference + + + Microsoft Access Databases({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + ActiveX Controls (*.ocx)|*.ocx + + + All files (*.*)|*.* + + + Microsoft Excel Files ({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + Executable Files (*.exe;*.dll)|*.exe;*.dll + + + Outlook VBA Files ({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + PowerPoint Addin Files({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + Publisher Files ({0}|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + Type Libraries (*.olb;*.tlb;*.dll)|*.olb;*.tlb;*.dll + + + All Visio Files ({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + Word Documents ({0})|{0} + {0} = semi-colon delimited extension list in the format of *.ext + + + Add/Remove References... + + + Add/Remove References - {0} + {0} = Project name + + + Standard + Displayed as LCID description when locale is not specified. + + + Locale: + + + Move down + + + Move up + + + Pinned + + + Pin reference + + + Projects + + + Recent + + + Remove from project + + + Search for reference... + + + Select type libraries and VB projects to add or remove. + + + Type Libraries + + + Version: + + \ No newline at end of file diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesViewModel.cs b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesViewModel.cs index 923de4bb95..48ba14bf16 100644 --- a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesViewModel.cs +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesViewModel.cs @@ -45,21 +45,21 @@ public class AddRemoveReferencesViewModel : ViewModelBase private static readonly Dictionary HostFilters = new Dictionary { - { "EXCEL.EXE", string.Format(RubberduckUI.References_BrowseFilterExcel, string.Join(";", HostFileFilters["EXCEL.EXE"].Select(_ => $"*.{_}"))) }, - { "WINWORD.EXE", string.Format(RubberduckUI.References_BrowseFilterWord, string.Join(";", HostFileFilters["WINWORD.EXE"].Select(_ => $"*.{_}"))) }, - { "MSACCESS.EXE", string.Format(RubberduckUI.References_BrowseFilterAccess, string.Join(";", HostFileFilters["MSACCESS.EXE"].Select(_ => $"*.{_}"))) }, - { "POWERPNT.EXE", string.Format(RubberduckUI.References_BrowseFilterPowerPoint, string.Join(";", HostFileFilters["POWERPNT.EXE"].Select(_ => $"*.{_}"))) }, - { "OUTLOOK.EXE", string.Format(RubberduckUI.References_BrowseFilterOutlook, string.Join(";", HostFileFilters["OUTLOOK.EXE"].Select(_ => $"*.{_}"))) }, - { "MSPUB.EXE", string.Format(RubberduckUI.References_BrowseFilterOutlook, string.Join(";", HostFileFilters["MSPUB.EXE"].Select(_ => $"*.{_}"))) }, - { "VISIO.EXE", string.Format(RubberduckUI.References_BrowseFilterVisio, string.Join(";", HostFileFilters["VISIO.EXE"].Select(_ => $"*.{_}"))) }, + { "EXCEL.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterExcel, string.Join(";", HostFileFilters["EXCEL.EXE"].Select(_ => $"*.{_}"))) }, + { "WINWORD.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterWord, string.Join(";", HostFileFilters["WINWORD.EXE"].Select(_ => $"*.{_}"))) }, + { "MSACCESS.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterAccess, string.Join(";", HostFileFilters["MSACCESS.EXE"].Select(_ => $"*.{_}"))) }, + { "POWERPNT.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterPowerPoint, string.Join(";", HostFileFilters["POWERPNT.EXE"].Select(_ => $"*.{_}"))) }, + { "OUTLOOK.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterOutlook, string.Join(";", HostFileFilters["OUTLOOK.EXE"].Select(_ => $"*.{_}"))) }, + { "MSPUB.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterOutlook, string.Join(";", HostFileFilters["MSPUB.EXE"].Select(_ => $"*.{_}"))) }, + { "VISIO.EXE", string.Format(AddRemoveReferencesUI.BrowseFilterVisio, string.Join(";", HostFileFilters["VISIO.EXE"].Select(_ => $"*.{_}"))) }, }; private static readonly List FileFilters = new List { - RubberduckUI.References_BrowseFilterExecutable, - RubberduckUI.References_BrowseFilterTypes, - RubberduckUI.References_BrowseFilterActiveX, - RubberduckUI.References_BrowseFilterAllFiles, + AddRemoveReferencesUI.BrowseFilterExecutable, + AddRemoveReferencesUI.BrowseFilterTypes, + AddRemoveReferencesUI.BrowseFilterActiveX, + AddRemoveReferencesUI.BrowseFilterAllFiles, }; public static bool HostHasProjects { get; } @@ -127,14 +127,14 @@ public string ProjectCaption { if (string.IsNullOrEmpty(Model?.Project?.IdentifierName)) { - return RubberduckUI.References_Caption; + return AddRemoveReferencesUI.Caption; } var project = _projectsProvider.Project(Model.Project.ProjectId); if (project == null) { - return RubberduckUI.References_Caption; + return AddRemoveReferencesUI.Caption; } return project.ProjectDisplayName; @@ -277,7 +277,7 @@ private void ExecuteBrowseCommand(object parameter) using (var dialog = _browser.CreateOpenFileDialog()) { dialog.Filter = string.Join("|", FileFilters); - dialog.Title = RubberduckUI.References_BrowseCaption; + dialog.Title = AddRemoveReferencesUI.BrowseCaption; var result = dialog.ShowDialog(); if (result != DialogResult.OK || string.IsNullOrEmpty(dialog.FileName)) { diff --git a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml index 96135d1c2d..88588ffc8b 100644 --- a/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml +++ b/Rubberduck.Core/UI/AddRemoveReferences/AddRemoveReferencesWindow.xaml @@ -108,7 +108,7 @@ @@ -123,7 +123,7 @@ - + @@ -131,7 +131,7 @@ - + @@ -139,7 +139,7 @@ - + @@ -147,7 +147,7 @@ - + @@ -157,7 +157,7 @@ Command="{Binding BrowseCommand}"> - + @@ -180,7 +180,7 @@ Background="{x:Static SystemColors.WindowBrush}" Width="Auto" Text="{Binding Search, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" - Hint="{Resx ResxName=Rubberduck.Resources.RubberduckUI, Key=References_SearchPlaceholder}" /> + Hint="{Resx ResxName=Rubberduck.UI.AddRemoveReferences.AddRemoveReferencesUI, Key=SearchPlaceholder}" /> + ToolTip="{Resx ResxName=Rubberduck.UI.AddRemoveReferences.AddRemoveReferencesUI, Key=PinToolTip}" ToolTipService.InitialShowDelay="{StaticResource ToolTipDelay}"> @@ -230,12 +230,12 @@ @@ -265,7 +265,7 @@ diff --git a/Rubberduck.Core/UI/FindSymbol/FindSymbolControl.xaml.cs b/Rubberduck.Core/UI/FindSymbol/FindSymbolControl.xaml.cs index 7aee1335ac..3120b198bd 100644 --- a/Rubberduck.Core/UI/FindSymbol/FindSymbolControl.xaml.cs +++ b/Rubberduck.Core/UI/FindSymbol/FindSymbolControl.xaml.cs @@ -1,5 +1,4 @@ using System.Windows.Controls; -using System.Windows.Input; namespace Rubberduck.UI.FindSymbol { @@ -16,37 +15,9 @@ public FindSymbolControl() private FindSymbolViewModel ViewModel => (FindSymbolViewModel)DataContext; - public static ICommand GoCommand { get; } = new RoutedCommand(); - - private void CommandBinding_OnExecuted(object sender, ExecutedRoutedEventArgs e) - { - ViewModel.Execute(); - e.Handled = true; - } - - private void CommandBinding_OnCanExecute(object sender, CanExecuteRoutedEventArgs e) - { - if (ViewModel == null) - { - return; - } - - e.CanExecute = ViewModel.CanExecute(); - e.Handled = true; - } - - private void UIElement_OnPreviewKeyDown(object sender, KeyEventArgs e) - { - if (e.Key == Key.Enter && ViewModel.CanExecute()) - { - ViewModel.Execute(); - e.Handled = true; - } - } - private void FindSymbolControl_Loaded(object sender, System.Windows.RoutedEventArgs e) { - searchComboBox.Focus(); + SearchComboBox.Focus(); } } } \ No newline at end of file diff --git a/Rubberduck.Core/UI/FindSymbol/FindSymbolDialog.cs b/Rubberduck.Core/UI/FindSymbol/FindSymbolDialog.cs index 87920359da..6d26f51173 100644 --- a/Rubberduck.Core/UI/FindSymbol/FindSymbolDialog.cs +++ b/Rubberduck.Core/UI/FindSymbol/FindSymbolDialog.cs @@ -14,22 +14,18 @@ public FindSymbolDialog(FindSymbolViewModel viewModel) viewModel.Navigate += viewModel_Navigate; } - public event EventHandler Navigate; - private void viewModel_Navigate(object sender, NavigateCodeEventArgs e) + public FindSymbolDialog() { - var handler = Navigate; - if (handler != null) - { - handler(this, e); - Hide(); - } + InitializeComponent(); + Text = $"Rubberduck - {RubberduckUI.FindSymbolDialog_Caption}"; } - public FindSymbolDialog() + + public event EventHandler Navigate; + private void viewModel_Navigate(object sender, NavigateCodeEventArgs e) { - InitializeComponent(); - - Text = string.Format("Rubberduck - {0}", RubberduckUI.FindSymbolDialog_Caption); + Navigate?.Invoke(this, e); + Hide(); } protected override bool ProcessCmdKey(ref Message msg, Keys keyData) diff --git a/Rubberduck.Core/UI/FindSymbol/FindSymbolViewModel.cs b/Rubberduck.Core/UI/FindSymbol/FindSymbolViewModel.cs index 6bc514f33d..f88b469ce2 100644 --- a/Rubberduck.Core/UI/FindSymbol/FindSymbolViewModel.cs +++ b/Rubberduck.Core/UI/FindSymbol/FindSymbolViewModel.cs @@ -4,10 +4,13 @@ using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; +using System.Windows.Input; +using NLog; using Rubberduck.Common; using Rubberduck.Interaction.Navigation; using Rubberduck.Parsing.Symbols; using Rubberduck.Properties; +using Rubberduck.UI.Command; namespace Rubberduck.UI.FindSymbol { @@ -19,25 +22,23 @@ public class FindSymbolViewModel : INotifyPropertyChanged DeclarationType.Project }; - public FindSymbolViewModel(IEnumerable declarations, DeclarationIconCache cache) + private static readonly ILogger Logger = LogManager.GetCurrentClassLogger(); + + public FindSymbolViewModel(IEnumerable declarations) { - _declarations = declarations; - _cache = cache; - + _declarations = declarations.Where(declaration => !ExcludedTypes.Contains(declaration.DeclarationType)).ToList(); + GoCommand = new DelegateCommand(Logger, ExecuteGoCommand, CanExecuteGoCommand); Search(string.Empty); } public event EventHandler Navigate; - public bool CanExecute() - { - return _selectedItem != null; - } + public ICommand GoCommand { get; } + + private bool CanExecuteGoCommand(object param) => _searchString?.Equals(_selectedItem?.IdentifierName, StringComparison.InvariantCultureIgnoreCase) ?? false; + + private void ExecuteGoCommand(object param) => OnNavigate(); - public void Execute() - { - OnNavigate(); - } public void OnNavigate() { @@ -50,7 +51,6 @@ public void OnNavigate() } private readonly IEnumerable _declarations; - private readonly DeclarationIconCache _cache; private void Search(string value) { @@ -61,7 +61,6 @@ private void Search(string value) } var results = GetSearchResultCollectionOfString(value); - MatchResults = new ObservableCollection(results); } @@ -69,10 +68,10 @@ private IEnumerable GetSearchResultCollectionOfString(string value { var lower = value.ToLowerInvariant(); var results = _declarations - .Where(declaration => !ExcludedTypes.Contains(declaration.DeclarationType) - && (string.IsNullOrEmpty(value) || declaration.IdentifierName.ToLowerInvariant().Contains(lower))) - .OrderBy(declaration => declaration.IdentifierName.ToLowerInvariant()) - .Select(declaration => new SearchResult(declaration, _cache[declaration])); + .Where(declaration => string.IsNullOrEmpty(value) || declaration.IdentifierName.ToLowerInvariant().Contains(lower)) + .OrderBy(declaration => declaration.IdentifierName) + .Take(30) + .Select(declaration => new SearchResult(declaration)); return results; } @@ -83,12 +82,11 @@ public string SearchString get => _searchString; set { - SearchResult firstResult = GetSearchResultCollectionOfString(value).FirstOrDefault(); - SelectedItem = firstResult; - if (_searchString != value) { _searchString = value; + OnPropertyChanged(); + Search(value); } } @@ -103,6 +101,7 @@ public SearchResult SelectedItem if (_selectedItem != value) { _selectedItem = value; + _searchString = value?.IdentifierName; OnPropertyChanged(); } } @@ -114,24 +113,7 @@ public ObservableCollection MatchResults get => _matchResults; set { - var oldSelectedItem = SelectedItem; - _matchResults = value; - - // save the selection when the user clicks on one of the drop-down items and the search results are updated - if (oldSelectedItem != null) - { - var newSelectedItem = value.FirstOrDefault(s => s.Declaration == oldSelectedItem.Declaration); - - if (newSelectedItem != null) - { - _selectedItem = newSelectedItem; - _searchString = newSelectedItem.IdentifierName; - - OnPropertyChanged("SelectedItem"); - } - } - OnPropertyChanged(); } } diff --git a/Rubberduck.Core/UI/FindSymbol/SearchResult.cs b/Rubberduck.Core/UI/FindSymbol/SearchResult.cs index aa18db60d2..5d8545b2b4 100644 --- a/Rubberduck.Core/UI/FindSymbol/SearchResult.cs +++ b/Rubberduck.Core/UI/FindSymbol/SearchResult.cs @@ -1,14 +1,17 @@ -using System.Windows.Media.Imaging; +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; +using System.Windows.Media.Imaging; using Rubberduck.Parsing.Symbols; namespace Rubberduck.UI.FindSymbol { public class SearchResult { - public SearchResult(Declaration declaration, BitmapImage icon) + public SearchResult(Declaration declaration) { Declaration = declaration; - Icon = icon; } public Declaration Declaration { get; } @@ -16,6 +19,18 @@ public SearchResult(Declaration declaration, BitmapImage icon) public string IdentifierName => Declaration.IdentifierName; public string Location => Declaration.Scope; - public BitmapImage Icon { get; } + } + + public class SearchBoxMultiBindingConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + return values[0]; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + return value is Declaration declaration ? new[] { declaration.IdentifierName , value } : new[] { value, null }; + } } } diff --git a/Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml b/Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml index fb7b6636fe..ab7e4d7bbf 100644 --- a/Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml +++ b/Rubberduck.Core/UI/Inspections/InspectionResultsControl.xaml @@ -151,7 +151,7 @@ - - private bool _forceRefreshResults = false; + private bool _forceRefreshResults; private bool _unparsed = true; public bool Unparsed @@ -809,8 +810,8 @@ private void ExecuteCopyResultsCommand(object parameter) .ToArray(); var resource = resultArray.Length == 1 - ? Resources.RubberduckUI.CodeInspections_NumberOfIssuesFound_Singular - : Resources.RubberduckUI.CodeInspections_NumberOfIssuesFound_Plural; + ? CodeAnalysisUI.CodeInspections_NumberOfIssuesFound_Singular + : CodeAnalysisUI.CodeInspections_NumberOfIssuesFound_Plural; var title = string.Format(resource, DateTime.Now.ToString(CultureInfo.InvariantCulture), resultArray.Count()); diff --git a/Rubberduck.Core/UI/Inspections/InspectionResultsWindow.cs b/Rubberduck.Core/UI/Inspections/InspectionResultsWindow.cs index 6d1cb35479..bc91c93ada 100644 --- a/Rubberduck.Core/UI/Inspections/InspectionResultsWindow.cs +++ b/Rubberduck.Core/UI/Inspections/InspectionResultsWindow.cs @@ -1,14 +1,14 @@ using System.Windows.Forms; -using Rubberduck.Resources; +using Rubberduck.CodeAnalysis; namespace Rubberduck.UI.Inspections { public sealed partial class InspectionResultsWindow : UserControl, IDockableUserControl { private const string ClassId = "D3B2A683-9856-4246-BDC8-6B0795DC875B"; - string IDockableUserControl.ClassId { get { return ClassId; } } - string IDockableUserControl.Caption { get { return RubberduckUI.CodeInspections; } } - + string IDockableUserControl.ClassId => ClassId; + string IDockableUserControl.Caption => CodeAnalysisUI.CodeInspections; + private InspectionResultsWindow() { InitializeComponent(); @@ -16,14 +16,10 @@ private InspectionResultsWindow() public InspectionResultsWindow(InspectionResultsViewModel viewModel) : this() { - _viewModel = viewModel; - wpfInspectionResultsControl.DataContext = _viewModel; + ViewModel = viewModel; + wpfInspectionResultsControl.DataContext = ViewModel; } - private readonly InspectionResultsViewModel _viewModel; - public InspectionResultsViewModel ViewModel - { - get { return _viewModel; } - } + public InspectionResultsViewModel ViewModel { get; } } } diff --git a/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationPresenter.cs b/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationPresenter.cs index 86d125291c..7febfb71cb 100644 --- a/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationPresenter.cs +++ b/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationPresenter.cs @@ -1,11 +1,11 @@ using Rubberduck.Refactorings.AnnotateDeclaration; -using Rubberduck.Resources; +using Rubberduck.Refactorings; namespace Rubberduck.UI.Refactorings.AnnotateDeclaration { internal class AnnotateDeclarationPresenter : RefactoringPresenterBase, IAnnotateDeclarationPresenter { - private static readonly DialogData DialogData = DialogData.Create(RubberduckUI.AnnotateDeclarationDialog_Caption, 500, 400); + private static readonly DialogData DialogData = DialogData.Create(RefactoringsUI.AnnotateDeclarationDialog_Caption, 500, 400); public AnnotateDeclarationPresenter(AnnotateDeclarationModel model, IRefactoringDialogFactory dialogFactory) : base(DialogData, model, dialogFactory) diff --git a/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationView.xaml b/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationView.xaml index bcc02d4d14..18b7f4910a 100644 --- a/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationView.xaml +++ b/Rubberduck.Core/UI/Refactorings/AnnotateDeclaration/AnnotateDeclarationView.xaml @@ -47,9 +47,6 @@ - - - - -