-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blank window after solution analysis #2
Comments
@aschekatihin That's expected. You can place the cursor on a function and press Alt+F, that will show the function in viewport. |
Hi. I got the same behavior with the blank screen and no error message. But even if I use ALT+F nothing happens. Also the "search" or "symbol" are complete empty. Is that also as expected? |
@brannigan32 That isn't expected... You can check if there is any file in "[solution folder] / CodeGraphData/Result_solution/xml" folder. If the answer is yes, that means the analysis process succeed. Otherwise, some errors occured when CodeGraph try to scan the projects. You can select some of them and use "Analyse Selected Projects" to isolate the problematic ones. If it's appropriate, you can also send your whole VS solution to me. |
Hi. Yes there are a bunch of files (mainly xml files) the folder xml. So it seems, that the analysis processed. But if I go to the souce code, mark a function and press ALT+f nothing happens. Any ideas? Thank you. |
@brannigan32 Open index.xml in that folder to see if the function you tried is in the list. |
Hi. Sorry for the late response. Actually I found out, that for some functions the graph is generated. However it seems to bo, that this is not the case for all functions. Is there any filter selecting the functions? |
Hi. I got the same probs as @brannigan32 . It seems the solution has been scanned, but pressing Alt-F or clicking the corresponding toolbar button leads to no reaction. |
@brannigan32 Maybe some functions are in disabled macros. Try to define those macros in code graph. |
@ms22941 You can try to search those functions' name in xmls. If you find them, something wrong happened inside CodeGraph. |
Hi Yiubun,
I tried again:
* opend the Code Graph Window
* switched to ‚C#‘
* selected ‚Analyse Solution‘ in the menu
* selected ‚Open Analysis Result‘ in the menu
* got a message box: ‚Result opened, select show to display…
- selected ‚SelectCarViewModel‘ from ‚public class SelectCarViewModel : BaseViewModel‘ (see attached file)
- selected ‚show in Graph‘ in the Code Graph‘ menu
- Viewport stays plain black/ nothing happens. Except the Text SelectCarViewModel appears in Code Graph Window / search tab/Name field, file(name) is correct, line number is correct
You find attached
* The source file from my solution
* The corresponding XML created by Code Graph
When trying to open the XML in FireFox I got an error (XML not well formed).
Hope this information helps to find the problem.
Best Regards, Martin.
Von: Yiubun Auyeung <[email protected]>
Gesendet: Freitag, 14. September 2018 18:49
An: league1991/CodeAtlasVsix <[email protected]>
Cc: ms22941 <[email protected]>; Mention <[email protected]>
Betreff: Re: [league1991/CodeAtlasVsix] Blank window after solution analysis (#2)
@ms22941 <https://github.com/ms22941> You can try to search those functions' name in xmls. If you find them, something wrong happened inside CodeGraph.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#2 (comment)> , or mute the thread <https://github.com/notifications/unsubscribe-auth/ADeJ_zngter3eEAZvSeqpjM4ICM0rTtiks5ua939gaJpZM4UeBO5> . <https://github.com/notifications/beacon/ADeJ_8NBLKduMGboLLHriSPHWmQgmgWTks5ua939gaJpZM4UeBO5.gif>
using LCCDatabase;
using System.Collections.Generic;
using System.Diagnostics;
namespace LCCApplication
{
// --------------------------------------------------------------------------
// ViewModel for the Car selection dialog
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
public enum CarSelectionMode
{
Single = 1, // ViewModel is DriverViewModel, car will be directly assigned to driver in database
SingleIndexed, // ViewModel istRacingSeriesSetupViewModel, CarUid will be written to selected index of SelectedCarUids[]
MultiLimited // ViewModel istRacingSeriesSetupViewModel, CarUids will be written to SelectedCarUids[]
}
// --------------------------------------------------------------------------
public class SelectCarViewModel : BaseViewModel
{
// --------------------------------------------------------------------------
public const int cInvalidUid = ApplicationCore.cInvalidUid;
// --------------------------------------------------------------------------
private EMContainer DBContext { get; set; }
// --------------------------------------------------------------------------
// Alle Fahrzeuge, die ausgewählt werden können (observable collection)
private CarViewModels selectableCarViewModels = null;
public CarViewModels SelectableCarViewModels
{
get
{
return selectableCarViewModels;
}
set
{
if (selectableCarViewModels != value)
{
selectableCarViewModels = value;
foreach (CarViewModel cvm in selectableCarViewModels)
{
cvm.Selected = SelectedCarUids.Contains(cvm.Uid);
cvm.Touched = (cvm.Uid == LastCarTouched);
}
OnPropertyChanged("SelectableCarViewModels");
}
}
}
// --------------------------------------------------------------------------
private int lastCarTouched = -1;
public int LastCarTouched
{
get { return lastCarTouched; }
set
{
if (lastCarTouched != value)
{
lastCarTouched = value;
if (SelectableCarViewModels != null)
{
foreach (CarViewModel dvm in SelectableCarViewModels)
{
dvm.Touched = (dvm.Uid == LastCarTouched);
}
}
OnPropertyChanged("LastCarTouched");
}
}
}
// --------------------------------------------------------------------------
public CarSelectionMode SelectionMode { get { return SelectionParameter.SelectionMode; } }
public SelectCarParameter SelectionParameter { get; private set; }
// --------------------------------------------------------------------------
public bool SelectionConfirmed { get; private set; }
// --------------------------------------------------------------------------
// ***** Ctor *****
// --------------------------------------------------------------------------
public SelectCarViewModel()
{
DBContext = null;
SelectionConfirmed = false;
LastCarTouched = cInvalidUid;
if (IsNotInDesginMode)
{
RefreshDBContext();
}
}
// --------------------------------------------------------------------------
public void Initialize(SelectCarParameter scp)
{
SelectionParameter = scp;
switch (SelectionMode)
{
case CarSelectionMode.Single:
InitSingleCarSelection();
break;
case CarSelectionMode.SingleIndexed:
InitSingleIndexedCarSelection();
break;
case CarSelectionMode.MultiLimited:
InitMultipleCarsSelection();
break;
}
}
// --------------------------------------------------------------------------
private void InitSingleCarSelection()
{
ISingleCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as ISingleCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
Title = "Fahrzeugauswahl für " + targetViewModel.FullName;
List<int> currentSelection = new List<int>();
if (targetViewModel != null &&
targetViewModel.CurrentCarUid > 0)
{
currentSelection.Add(targetViewModel.CurrentCarUid);
}
SelectedCarUids = currentSelection;
if (SelectedCarUids.Count == 1)
{
CarTouched(SelectedCarUids[0]);
}
}
// --------------------------------------------------------------------------
private void InitSingleIndexedCarSelection()
{
IMultiCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as IMultiCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
Title = "Fahrzeugauswahl für Regler " + (SelectionParameter.SelectedIndex+1).ToString();
List<int> currentSelection = new List<int>();
if (targetViewModel.SelectedCarUids[SelectionParameter.SelectedIndex] >= 0)
{
currentSelection.Add(targetViewModel.SelectedCarUids[SelectionParameter.SelectedIndex]);
}
SelectedCarUids = currentSelection;
if (SelectedCarUids.Count == 1)
{
CarTouched(SelectedCarUids[0]);
}
}
// --------------------------------------------------------------------------
private void InitMultipleCarsSelection()
{
IMultiCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as IMultiCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
Title = "Fahrzeugauswahl für " + targetViewModel.MultiSelectionLimit.ToString() + " Teilnehmer pro Rennen";
List<int> currentSelection = new List<int>();
// set up the existing selection for the dialog
foreach (var uid in targetViewModel.SelectedCarUids)
{
if (uid >= 0 && currentSelection.Count < targetViewModel.MultiSelectionLimit)
{
currentSelection.Add(uid);
}
}
SelectedCarUids = currentSelection;
if (SelectedCarUids.Count >= 1)
{
CarTouched(SelectedCarUids[0]);
}
}
// --------------------------------------------------------------------------
public void CarSelected(int uid)
{
LastSelectedCarUid = uid;
switch (SelectionMode)
{
case CarSelectionMode.Single:
{
// clear all other selected Cars
foreach (CarViewModel cvm in SelectableCarViewModels)
{
cvm.Selected = (cvm.Uid == uid);
}
UpdateSelectedCarUids();
ConfirmSelection();
break;
}
case CarSelectionMode.SingleIndexed:
{
// clear all other selected Cars
foreach (CarViewModel cvm in SelectableCarViewModels)
{
cvm.Selected = (cvm.Uid == uid);
}
ConfirmSelection();
break;
}
case CarSelectionMode.MultiLimited:
{
IMultiCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as IMultiCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
UpdateSelectedCarUids();
if (SelectedCarUids.Count == targetViewModel.MultiSelectionLimit)
{
ConfirmSelection();
}
break;
}
}
}
// --------------------------------------------------------------------------
public void CarTouched(int uid)
{
LastCarTouched = uid;
}
// --------------------------------------------------------------------------
public void UpdateSelectedCarUids()
{
SelectedCarUids.Clear();
foreach (CarViewModel cvm in SelectableCarViewModels)
{
if (cvm.Selected)
{
SelectedCarUids.Add(cvm.Uid);
}
}
}
// --------------------------------------------------------------------------
public void ConfirmSelection()
{
SelectionConfirmed = true;
switch (SelectionMode)
{
case CarSelectionMode.Single:
{
ISingleCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as ISingleCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
targetViewModel.AssignCar(LastSelectedCarUid);
break;
}
case CarSelectionMode.SingleIndexed:
{
IMultiCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as IMultiCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
// clear uid on all other controllers
for (int i = 0; i < targetViewModel.SelectedCarUids.Length; i++)
{
if (targetViewModel.SelectedCarUids[i] == LastSelectedCarUid)
{
targetViewModel.SelectedCarUids[i] = -1;
}
}
targetViewModel.SelectedCarUids[SelectionParameter.SelectedIndex] = LastSelectedCarUid;
break;
}
case CarSelectionMode.MultiLimited:
{
IMultiCarSelectionViewModel targetViewModel = SelectionParameter.TargetViewModel as IMultiCarSelectionViewModel;
Debug.Assert(targetViewModel != null);
SelectedCarUids.CopyTo(targetViewModel.SelectedCarUids);
break;
}
}
}
// --------------------------------------------------------------------------
public void RefreshDBContext()
{
DBContext = EntityModel.CreateDatabaseContext();
SelectableCarViewModels = new FilteredCarViewModels(DBContext);
}
// --------------------------------------------------------------------------
private void SortSelectableCarViewModels()
{
// SelectableCarViewModels.
}
//public static void Sort<T>(this ObservableCollection<T> collection, Comparison<T> comparison)
//{
// var sortableList = new List<T>(collection);
// sortableList.Sort(comparison);
// for (int i = 0; i < sortableList.Count; i++)
// {
// collection.Move(collection.IndexOf(sortableList[i]), i);
// }
//}
// --------------------------------------------------------------------------
private string title = string.Empty;
public string Title
{
get { return title; }
set
{
if (title != value)
{
title = value;
OnPropertyChanged("Title");
}
}
}
// --------------------------------------------------------------------------
public bool OKButtonActive
{
get
{
return SelectionMode != CarSelectionMode.Single;
}
}
// --------------------------------------------------------------------------
public bool NoCarButtonActive
{
get
{
return SelectionMode == CarSelectionMode.Single;
}
}
// --------------------------------------------------------------------------
private List<int> selectedCarUids = new List<int>();
public List<int> SelectedCarUids
{
get
{ return selectedCarUids; }
set
{
if (selectedCarUids != value)
{
selectedCarUids = value;
// mark all selected dvm
if (SelectableCarViewModels != null)
{
foreach (CarViewModel cvm in SelectableCarViewModels)
{
cvm.Selected = SelectedCarUids.Contains(cvm.Uid);
}
}
OnPropertyChanged("SelectedCarUids");
}
}
}
// --------------------------------------------------------------------------
private int lastSelectedCarUid = cInvalidUid; // used to determine the Car for a car selection
public int LastSelectedCarUid
{
get
{
return lastSelectedCarUid;
}
private set
{
if (lastSelectedCarUid != value)
{
lastSelectedCarUid = value;
OnPropertyChanged("LastSelectedCarUid");
}
}
}
// --------------------------------------------------------------------------
}
}
|
@ms22941 Is it possible for you to send the whole project to my e-mail, [email protected]? It will also be very helpful to send all the analysis result files under "CodeGraphData" folder to me. Then I can open your results and see what happened. |
Got it working finally! It looks like the reason why it did not work was an '&' in the name of the solution directory which lead to an error when parsing the xml... After removing the '&', recompiling (don't know wether thats really required) and re-analysing the solution Code Graph seems to work fine. |
@ms22941 Thanks for your reply. Recompiling is unnecessary. It seems to be doxygen's bug... |
Experiencing the same thing in vs2019 |
@captmomo Can you use Alt+F to add functions? |
Hi To get it to work.
Only following this sequence made it work. |
You are right. You have to do it manually but I guess step 2 is unnecessary. Thanks for your feedback, maybe I should update the UI message. |
You can make a very simple console project from VS and check if CodeGraph
can analyse your project.
If it can, something wrong happened in your original project, try to shrink
the search scope by excluding some projects.
umarmlone <[email protected]> 于2020年11月16日周一 下午1:41写道:
… Doesn't work in Visual Studio 2019 16.7.7. The Code Graph window is empty.
Using Alt+F adds the symbol to the Code Graph by does not show the
relationship.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLOW3TPNHLM5V5MNONZ4HLSQC3RHANCNFSM4FDYCO4Q>
.
|
Tried to install extension on VS 2017 community edition. After solution analysis graph window remains blank. No errors reported.
The text was updated successfully, but these errors were encountered: