public static void Draw(MaintainerWindow parentWindow) { if (issues == null) { LoadLastIssues(); } window = parentWindow; GUILayout.BeginHorizontal(); DrawSettingsSection(); DrawSearchSection(); GUILayout.EndHorizontal(); if (gotoIssue != null) { ShowIssue(gotoIssue); gotoIssue = null; } if (startSearch) { startSearch = false; window.RemoveNotification(); IssuesFinder.StartSearch(); window.Focus(); } }
public static void BuildSource() { var dic = GetCommandArgs(); string mode = dic["mode"]; string platform = dic["platform"]; if (mode.ToLower() == "debug") { if (dic.ContainsKey("maintainer_filePath")) { var records = IssuesFinder.StartSearch(false); using (StreamWriter sr = File.CreateText(dic["maintainer_filePath"])) { sr.Write(ReportsBuilder.GenerateReport(IssuesFinder.MODULE_NAME, records)); } } } if (dic.ContainsKey("currentLevel") && !string.IsNullOrEmpty(dic["currentLevel"])) { QualitySettings.SetQualityLevel(System.Convert.ToInt32(dic["currentLevel"])); } lhFramework.Tools.Bundle.BundleBuildManager bundleManager = new lhFramework.Tools.Bundle.BundleBuildManager(); bundleManager.buildTarget = System.Convert.ToInt32(platform); if (dic.ContainsKey("rootName")) { bundleManager.rootName = dic["rootName"]; } bundleManager.Initialize(); bundleManager.BuildPackage(); bundleManager = null; }
private static bool OnPrefabGameObjectTraverse(ObjectTraverseInfo objectInfo) { #if !UNITY_2020_1_OR_NEWER if (currentObjectIndex % ObjectTraverseUpdateStep == 0) #endif { if (IssuesFinder.ShowProgressBar(2, 3, itemIndex, totalItems, string.Format("Processing prefab: {0}", currentAssetName))) { return(false); } } currentObjectIndex++; bool skipTree; if (IssuesDetector.StartGameObject(objectInfo.current, objectInfo.inPrefabInstance, out skipTree)) { CSTraverseTools.TraverseGameObjectComponents(objectInfo, OnComponentTraverse); IssuesDetector.EndGameObject(objectInfo.current); } objectInfo.skipCurrentTree = skipTree; return(true); }
public JiraAgileService(AssistantSettings configuration, ApplicationCache applicationCache, IJiraServerApi metadataRetriever, IssuesFinder issuesFinder) : base(configuration) { _applicationCache = applicationCache; _metadataRetriever = metadataRetriever; _issuesFinder = issuesFinder; }
private static void ProcessAssetTargets(List <AssetInfo> targetAssets, ProcessAssetCallback callback, Phase phase, string progressAssetLabel) { var targetsCount = targetAssets.Count; var updateStep = Math.Max(targetsCount / MaintainerSettings.UpdateProgressStep, 1); for (var i = 0; i < targetsCount; i++) { var targetAsset = targetAssets[i]; var path = targetAsset.Path; var assetName = Path.GetFileNameWithoutExtension(path); if (string.IsNullOrEmpty(path) || !File.Exists(path)) { continue; } if (i % updateStep == 0 || phase == Phase.Scenes) { if (IssuesFinder.ShowProgressBar((int)phase, TotalPhases, i, targetsCount, progressAssetLabel + ": " + assetName)) { IssuesFinder.operationCanceled = true; break; } } callback.Invoke(targetAsset, assetName, i, targetsCount); if (IssuesFinder.operationCanceled) { break; } } }
public JiraApi(AssistantSettings configuration, ApplicationCache applicationCache) { _resourceDownloader = new ResourceDownloader(configuration); Session = new JiraSessionService(configuration); Server = new MetadataRetriever(configuration); _issuesFinder = new IssuesFinder(configuration, Server); Agile = new JiraAgileService(configuration, applicationCache, Server, _issuesFinder); Worklog = new WorklogManager(configuration); }
protected override void ProcessUserActions() { if (!startSearch) { return; } startSearch = false; window.RemoveNotification(); IssuesFinder.StartSearch(true); window.Focus(); }
protected override bool OnStepStart() { FixedIssues = IssuesFinder.StartFix(Issues, false, false); if (SaveReport) { var report = ReportsBuilder.GenerateReport("Fixed Issues Report (executed through RockTomate)", FixedIssues); File.WriteAllText(ReportFilePath, report); } if (PrintFixedIssues) { FixedIssues.ForEach(Debug.Log); } return(!FailOnIssues || FixedIssues.Length >= Issues.Length); }
/// <inheritdoc /> protected override bool OnStepStart() { var allIssues = IssuesFinder.StartSearch(false); Issues = GetFilteredIssues(allIssues); IssuesPrinted = Issues.Select(x => x.ToString(true)).ToArray(); if (SaveReport) { var report = ReportsBuilder.GenerateReport("Found Issues Report (executed through RockTomate)", Issues); File.WriteAllText(ReportFilePath, report); } if (PrintIssues) { Issues.ForEach(Debug.Log); } return(!FailOnIssues || Issues.Length <= 0); }
private static bool OnGameObjectTraverse(ObjectTraverseInfo objectInfo) { if (currentObjectIndex % ObjectTraverseUpdateStep == 0) { if (IssuesFinder.ShowProgressBar(1, 3, itemIndex, totalItems, string.Format("Processing scene: {0} root {1}/{2}", currentAssetName, objectInfo.rootIndex + 1, objectInfo.TotalRoots))) { return(false); } } currentObjectIndex++; bool skipTree; if (IssuesDetector.StartGameObject(objectInfo.current, objectInfo.inPrefabInstance, out skipTree)) { CSTraverseTools.TraverseGameObjectComponents(objectInfo, OnComponentTraverse); IssuesDetector.EndGameObject(objectInfo.current); } objectInfo.skipCurrentTree = skipTree; return(true); }
private static void FindAllIssues() { IssuesFinder.StartSearch(true); }
private static void DrawSearchSection() { GUILayout.BeginVertical(UIHelpers.panelWithBackground, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true)); GUILayout.Space(10); if (GUILayout.Button("Find issues!")) { startSearch = true; } GUILayout.Space(10); if (issues == null || issues.Length == 0) { GUILayout.Label("No issues"); } else { int fromIssue = issuesCurrentPage * ISSUES_PER_PAGE; int toIssue = fromIssue + Math.Min(ISSUES_PER_PAGE, issues.Length - fromIssue); GUILayout.Label("Issues " + fromIssue + " - " + toIssue + " from " + issues.Length); searchSectionScrollPosition = GUILayout.BeginScrollView(searchSectionScrollPosition); for (int i = fromIssue; i < toIssue; i++) { IssueRecord issue = issues[i]; UIHelpers.Separator(); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); DrawIssueIcon(issue); if (issue.source == IssueSource.Prefab) { DrawPrefabIcon(); } GUILayout.Label(issue.GetHeader(), UIHelpers.richLabel, GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.Label(issue.GetBody(), UIHelpers.richLabel); GUILayout.BeginHorizontal(UIHelpers.panelWithBackground); if (GUILayout.Button(new GUIContent("Show", "Selects Game Object with issue in the scene or Project Browser. Opens scene with needed Game Object if necessary and highlights this scene in the Project Browser."), GUILayout.Width(50))) { gotoIssue = issues[i]; } if (GUILayout.Button(new GUIContent("Copy", "Copies record text to the clipboard."), GUILayout.Width(50))) { textEditorForClipboard.content = new GUIContent(issue.ToString(true)); textEditorForClipboard.SelectAll(); textEditorForClipboard.Copy(); window.ShowNotification(new GUIContent("Issue record copied to clipboard!")); } GUILayout.EndHorizontal(); GUILayout.EndVertical(); } GUILayout.EndScrollView(); if (issuesTotalPages > 1) { GUILayout.Space(5); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUI.enabled = (issuesCurrentPage > 0); if (GUILayout.Button("<<", GUILayout.Width(50))) { window.RemoveNotification(); issuesCurrentPage = 0; searchSectionScrollPosition = Vector2.zero; } if (GUILayout.Button("<", GUILayout.Width(50))) { window.RemoveNotification(); issuesCurrentPage--; searchSectionScrollPosition = Vector2.zero; } GUI.enabled = true; GUILayout.Label((issuesCurrentPage + 1) + " of " + issuesTotalPages, UIHelpers.centeredLabel, GUILayout.Width(100)); GUI.enabled = (issuesCurrentPage < issuesTotalPages - 1); if (GUILayout.Button(">", GUILayout.Width(50))) { window.RemoveNotification(); issuesCurrentPage++; searchSectionScrollPosition = Vector2.zero; } if (GUILayout.Button(">>", GUILayout.Width(50))) { window.RemoveNotification(); issuesCurrentPage = issuesTotalPages - 1; searchSectionScrollPosition = Vector2.zero; } GUI.enabled = true; GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); } GUILayout.Space(5); GUILayout.BeginVertical(); GUILayout.BeginHorizontal(); if (GUILayout.Button("Copy report to clipboard")) { textEditorForClipboard.content = new GUIContent(IssuesFinder.GenerateReport(issues)); textEditorForClipboard.SelectAll(); textEditorForClipboard.Copy(); window.ShowNotification(new GUIContent("Report copied to clipboard!")); } if (GUILayout.Button("Export report...")) { string filePath = EditorUtility.SaveFilePanel("Save Issues Finder report", "", "MaintainerIssuesReport.txt", "txt"); if (!String.IsNullOrEmpty(filePath)) { StreamWriter sr = File.CreateText(filePath); sr.Write(IssuesFinder.GenerateReport(issues)); sr.Close(); window.ShowNotification(new GUIContent("Report saved!")); } } GUILayout.EndHorizontal(); GUILayout.EndVertical(); } GUILayout.EndVertical(); }
private void StartFix() { window.RemoveNotification(); IssuesFinder.StartFix(); window.Focus(); }
private void StartSearch() { window.RemoveNotification(); IssuesFinder.StartSearch(true); window.Focus(); }