aboutsummaryrefslogtreecommitdiffstatsci
path: root/CrowIDE
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-21 09:45:46 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-03-21 09:45:46 +0100
commit62a425a9b16a44ff627501cad0a49704729eed7f (patch)
treed415f459ad00f6a21cdca1e343d40948556be33d /CrowIDE
parent57010b29ccf36f59c9471f030f9d3572b264385e (diff)
DbgEvents baseMeasureWhenDiscarded
Diffstat (limited to 'CrowIDE')
-rw-r--r--CrowIDE/CrowIDE.csproj1
-rw-r--r--CrowIDE/src/CrowIDE.cs4
-rw-r--r--CrowIDE/src/DesignInterface.cs23
-rw-r--r--CrowIDE/src/ProjectTree/ImlProjectItem.cs4
-rw-r--r--CrowIDE/ui/CrowIDE.crow1
-rw-r--r--CrowIDE/ui/DockWindows/winDbgEvts.crow122
-rw-r--r--CrowIDE/ui/IDE.style6
7 files changed, 152 insertions, 9 deletions
diff --git a/CrowIDE/CrowIDE.csproj b/CrowIDE/CrowIDE.csproj
index c1c92cde..1a5ccda5 100644
--- a/CrowIDE/CrowIDE.csproj
+++ b/CrowIDE/CrowIDE.csproj
@@ -298,6 +298,7 @@
<EmbeddedResource Include="ui\DockWindows\winStyleView.crow" />
<EmbeddedResource Include="ui\CategoryExp.template" />
<EmbeddedResource Include="ui\DockWindows\winDesign.crow" />
+ <EmbeddedResource Include="ui\DockWindows\winDbgEvts.crow" />
</ItemGroup>
<ItemGroup>
<None Include="ui\test.crow">
diff --git a/CrowIDE/src/CrowIDE.cs b/CrowIDE/src/CrowIDE.cs
index 0332592d..e371379b 100644
--- a/CrowIDE/src/CrowIDE.cs
+++ b/CrowIDE/src/CrowIDE.cs
@@ -42,7 +42,7 @@ namespace Crow.Coding
CMDUndo, CMDRedo, CMDCut, CMDCopy, CMDPaste, CMDHelp,
CMDAbout, CMDOptions,
CMDViewGTExp, CMDViewProps, CMDViewProj, CMDViewProjProps, CMDViewErrors, CMDViewSolution, CMDViewEditor, CMDViewProperties,
- CMDViewToolbox, CMDViewSchema, CMDViewStyling,CMDViewDesign,
+ CMDViewToolbox, CMDViewSchema, CMDViewStyling,CMDViewDesign,CMDViewDbgEvts,
CMDCompile;
void initCommands () {
@@ -78,6 +78,8 @@ namespace Crow.Coding
{ Caption = "IML Shematic View", CanExecute = true};
CMDViewStyling = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winStyleView.crow",this)))
{ Caption = "Styling Explorer", CanExecute = true};
+ CMDViewDbgEvts = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winDbgEvts.crow",this)))
+ { Caption = "Debug Events Explorer", CanExecute = true};
CMDViewGTExp = new Command(new Action(() => loadWindow ("#Crow.Coding.ui.DockWindows.winGTExplorer.crow")))
{ Caption = "Graphic Tree Explorer", CanExecute = false};
diff --git a/CrowIDE/src/DesignInterface.cs b/CrowIDE/src/DesignInterface.cs
index 9ac9e9a5..532d7f3d 100644
--- a/CrowIDE/src/DesignInterface.cs
+++ b/CrowIDE/src/DesignInterface.cs
@@ -158,13 +158,16 @@ namespace Crow.Coding
protected override void processLayouting ()
{
- #if DBG_EVENTS
- DbgStartSubEvt(DbgEvtType.IFaceLayouting);
- #endif
-
if (Monitor.TryEnter (LayoutMutex)) {
DiscardQueue = new Queue<LayoutingQueueItem> ();
LayoutingQueueItem lqi;
+ #if DBG_EVENTS
+ bool logLayouting = false;
+ if (LayoutingQueue.Count > 0){
+ DbgStartSubEvt(DbgEvtType.IFaceLayouting);
+ logLayouting = true;
+ }
+ #endif
while (LayoutingQueue.Count > 0) {
lqi = LayoutingQueue.Dequeue ();
#if DBG_EVENTS
@@ -175,14 +178,18 @@ namespace Crow.Coding
DbgEndSubEvt();
#endif
}
+ #if DBG_EVENTS
+ if (logLayouting)
+ DbgEndSubEvt();
+ #endif
LayoutingQueue = DiscardQueue;
Monitor.Exit (LayoutMutex);
DiscardQueue = null;
}
-
- #if DBG_EVENTS
- DbgEndSubEvt();
- #endif
+ }
+ public override string ToString ()
+ {
+ return string.Format ("DI");
}
}
}
diff --git a/CrowIDE/src/ProjectTree/ImlProjectItem.cs b/CrowIDE/src/ProjectTree/ImlProjectItem.cs
index 0575d177..c8d9aade 100644
--- a/CrowIDE/src/ProjectTree/ImlProjectItem.cs
+++ b/CrowIDE/src/ProjectTree/ImlProjectItem.cs
@@ -81,6 +81,10 @@ namespace Crow.Coding
get { return new List<GraphicObject> (new GraphicObject[] {instance}); }
}
+ public List<DebugEvent> DebugEvents {
+ get { return instance?.IFace.PerThreadCurDbgEvt.ToList(); }
+ }
+
void GTView_SelectedItemChanged (object sender, SelectionChangeEventArgs e){
SelectedItem = e.NewValue;
}
diff --git a/CrowIDE/ui/CrowIDE.crow b/CrowIDE/ui/CrowIDE.crow
index d721ac36..85f90656 100644
--- a/CrowIDE/ui/CrowIDE.crow
+++ b/CrowIDE/ui/CrowIDE.crow
@@ -28,6 +28,7 @@
<MenuItem Command="{CMDViewErrors}"/>
<MenuItem Command="{CMDViewGTExp}"/>
<MenuItem Command="{CMDViewSchema}"/>
+ <MenuItem Command="{CMDViewDbgEvts}"/>
</MenuItem>
<MenuItem Caption="Project" Fit="true" PopWidth="120">
<MenuItem Command="{CMDCompile}"/>
diff --git a/CrowIDE/ui/DockWindows/winDbgEvts.crow b/CrowIDE/ui/DockWindows/winDbgEvts.crow
new file mode 100644
index 00000000..3e8aed2f
--- /dev/null
+++ b/CrowIDE/ui/DockWindows/winDbgEvts.crow
@@ -0,0 +1,122 @@
+<?xml version="1.0"?>
+<DockWindow Name="winLQIs" Caption="Layouting Queue Items Explorer" Width="90%" Height="80%">
+ <VerticalStack DataSource="{CurrentSolution}">
+ <TreeView DataSource="{SelectedItem}" Name="treeView" Data="{DebugEvents}">
+ <ItemTemplate DataType="Crow.DebugEvent" Data="ChildEvents">
+ <Expandable >
+ <Template>
+ <VerticalStack Spacing="1">
+ <HorizontalStack Spacing="1" MouseDoubleClick="./onClickForExpand">
+ <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+ Path="{./Image}"
+ Visible="{./IsExpandable}"
+ SvgSub="{./IsExpanded}"
+ MouseEnter="{Background=LightGray}"
+ MouseLeave="{Background=Transparent}"/>
+ <Label Style="DbgGridCell" Text="{ThreadId}" Width="18" />
+ <Label Style="DbgGridCell" Text="{EventType}" Width="90" />
+ <Label Style="DbgGridCell" Text="{Ticks}" Width="60" TextAlignment="Right"/>
+ <Label Text="{Message}" Width="Stretched" Background="White" Foreground="Black"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"/>
+ </VerticalStack>
+ </Template>
+ <HorizontalStack Height="Fit">
+ <GraphicObject Width="8" Height="10"/>
+ <VerticalStack Height="Fit" Name="ItemsContainer"/>
+ </HorizontalStack>
+ </Expandable>
+ </ItemTemplate>
+ <ItemTemplate DataType="Crow.LayoutingDebugEvent">
+ <Expandable >
+ <Template>
+ <VerticalStack Spacing="1">
+ <HorizontalStack Spacing="1" MouseDoubleClick="./onClickForExpand">
+ <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+ Path="{./Image}"
+ Visible="{./IsExpandable}"
+ SvgSub="{./IsExpanded}"
+ MouseEnter="{Background=LightGray}"
+ MouseLeave="{Background=Transparent}"/>
+ <Label Style="DbgGridCell" Text="{LayoutingType}" Width="60"/>
+ <Label Style="DbgGridCell" Text="{EndResult}" Width="60"/>
+ <Label Style="DbgGridCell" Text="{Ticks}" Width="60" TextAlignment="Right"/>
+ <Label Style="DbgGridCell" Text="{Target}" Width="30%" Tooltip="{Target}"/>
+ <Label Style="DbgGridCell" Text="{PreviousSlot}" Width="100"/>
+ <Label Style="DbgGridCell" Text="{Slot}" Width="100"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"/>
+ </VerticalStack>
+ </Template>
+ <HorizontalStack Height="Fit">
+ <GraphicObject Width="8" Height="10"/>
+ <VerticalStack Height="Fit" Name="ItemsContainer"/>
+ </HorizontalStack>
+ </Expandable>
+ </ItemTemplate>
+ </TreeView>
+ </VerticalStack>
+</DockWindow>
+
+<!-- <ItemTemplate DataType="Crow.LayoutingQueueItem" Data="triggeredLQIs">
+ <Expandable>
+ <Template>
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <VerticalStack Fit="true" Margin="3" Background="DimGray"
+ HorizontalAlignment="Left"
+ MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
+ MouseLeave="{Background=DimGray}">
+ <Label Text="{FullName}" Font="droid, 8" Background="LightGray" Foreground="Black"/>
+ <HorizontalStack Fit="true" Spacing="10">
+ <Label Text="{LayoutingTries}" Foreground="SkyBlue"/>
+ <Label Text="{DiscardCount}" Foreground="Red"/>
+ <Label Text="{Name}" Font="droid bold"/>
+ <Label Text="{LayoutType}" Foreground="Maize"/>
+ <Label Text="{Width}"/>
+ <Label Text="{Height}"/>
+ </HorizontalStack>
+
+ <HorizontalStack Fit="true">
+ <Label Text="{Slot}"/>
+ <Label Text=" => "/>
+ <Label Text="{NewSlot}"/>
+ </HorizontalStack>
+ <GraphicObject Background="SeaGreen" Height="3" Visible="{HasTriggeredLQIs}"/>
+ </VerticalStack>
+ <Container Name="Content" Visible="false" HorizontalAlignment="Left"
+ Fit="true"/>
+ </VerticalStack>
+ </Template>
+ <HorizontalStack Height="Fit" Width="Fit">
+ <GraphicObject Width="20" Height="10"/>
+ <TreeView Name="List" Height="Fit" Width="Fit"
+ Template="#Crow.Templates.treeList.crow" />
+ </HorizontalStack>
+ </Expandable>
+ </ItemTemplate>
+ <ItemTemplate DataType="Crow.LQIList" Data="GetRootLQIs">
+ <Expandable Caption="{}" >
+ <Template>
+ <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}">
+ <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}"
+ MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
+ MouseLeave="{Background=Transparent}">
+ <Image Margin="2" Width="12" Height="12"
+
+ Path="{./Image}"
+ SvgSub="{./IsExpanded}"/>
+ <Label Text="{./Caption}" Width="{./WidthPolicy}"/>
+ </HorizontalStack>
+ <Container Name="Content" Visible="false"
+ Height="{./HeightPolicy}" Width="{./WidthPolicy}"/>
+ </VerticalStack>
+ </Template>
+ <HorizontalStack Height="Fit" Width="{./WidthPolicy}">
+ <GraphicObject Width="12" Height="10"/>
+ <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}"
+ Template="#Crow.Templates.treeList.crow" />
+ </HorizontalStack>
+ </Expandable>
+ </ItemTemplate>
+ </TreeView>
+</Window>-->
diff --git a/CrowIDE/ui/IDE.style b/CrowIDE/ui/IDE.style
index 22387808..71ba57fe 100644
--- a/CrowIDE/ui/IDE.style
+++ b/CrowIDE/ui/IDE.style
@@ -50,3 +50,9 @@ TreeIcon {
Width="14";
Height="14";
}
+
+DbgGridCell {
+ Background="White";
+ Foreground="Black";
+ Font="mono, 10";
+} \ No newline at end of file