aboutsummaryrefslogtreecommitdiffstats
path: root/Software
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 10:29:43 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 10:29:43 +0300
commit4628bef2839797fa16f3702c8ced6655a4af80b5 (patch)
tree1716ef0a69c0d263c1c30d3fe018ac620532fd4d /Software
parent3970e5d4d2259f31608bd000732e4f731b896bd7 (diff)
downloadTango-4628bef2839797fa16f3702c8ced6655a4af80b5.tar.gz
Tango-4628bef2839797fa16f3702c8ced6655a4af80b5.zip
Fixed test designer tooltips.
Applied xml/pdb exclude/include through build events. ITestContext docs.
Diffstat (limited to 'Software')
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ITestContext.cs202
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj3
-rw-r--r--Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestContext.cs20
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj9
-rw-r--r--Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Themes/Generic.xaml94
5 files changed, 223 insertions, 105 deletions
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ITestContext.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ITestContext.cs
index fc3344fa8..4546bd956 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ITestContext.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/ITestContext.cs
@@ -13,35 +13,225 @@ namespace Tango.FSE.Stubs
{
public interface ITestContext : IContext
{
+ /// <summary>
+ /// Gets the list of current results.
+ /// </summary>
ReadOnlyCollection<Result> Results { get; }
+
+ /// <summary>
+ /// Adds a new test result.
+ /// </summary>
+ /// <param name="type">The result type.</param>
+ /// <param name="name">The result name.</param>
+ /// <param name="value">The result value.</param>
+ /// <returns></returns>
Result AddResult(ResultType type, String name, object value);
+
+ /// <summary>
+ /// Adds a new test result.
+ /// </summary>
+ /// <param name="result">The result.</param>
+ /// <returns></returns>
Result AddResult(Result result);
+
+ /// <summary>
+ /// Removes the specified test result.
+ /// </summary>
+ /// <param name="result">The result.</param>
void RemoveResult(Result result);
+
+ /// <summary>
+ /// Clears all current test results.
+ /// </summary>
void ClearResults();
- IMessage Run(String messageName, int? timeout = null, params Object[] args);
- T Run<T>(String messageName, int? timeout = null, params Object[] args) where T : class, IMessage;
- IMessage Run(IMessage message, int? timeout = null);
- T Run<T>(IMessage message, int? timeout = null) where T : class, IMessage;
- void RunContinuous<T>(IMessage message, Action<T> callback, int? timeout) where T : class, IMessage;
- void RunContinuous<T>(String messageName, Action<T> callback, int? timeout, params Object[] args) where T : class, IMessage;
+
+ /// <summary>
+ /// Sends a request by name with optional comma separated arguments.
+ /// </summary>
+ /// <param name="messageName">Name of the message.</param>
+ /// <param name="timeout">The timeout.</param>
+ /// <param name="args">The arguments separated by commas.</param>
+ /// <returns></returns>
+ IMessage Send(String messageName, int? timeout = null, params Object[] args);
+
+ /// <summary>
+ /// Sends a request by name with optional comma separated arguments.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="messageName">Name of the message.</param>
+ /// <param name="timeout">The timeout.</param>
+ /// <param name="args">The arguments separated by commas.</param>
+ /// <returns></returns>
+ T Send<T>(String messageName, int? timeout = null, params Object[] args) where T : class, IMessage;
+
+ /// <summary>
+ /// Sends the specified message.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <param name="timeout">The timeout.</param>
+ /// <returns></returns>
+ IMessage Send(IMessage message, int? timeout = null);
+
+ /// <summary>
+ /// Sends the specified message.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="message">The message.</param>
+ /// <param name="timeout">The timeout.</param>
+ /// <returns></returns>
+ T Send<T>(IMessage message, int? timeout = null) where T : class, IMessage;
+
+ /// <summary>
+ /// Sends the specified continuous message.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="message">The message.</param>
+ /// <param name="callback">Callback for continuous responses.</param>
+ /// <param name="timeout">The timeout.</param>
+ void SendContinuous<T>(IMessage message, Action<T> callback, int? timeout) where T : class, IMessage;
+
+ /// <summary>
+ /// Sends a continuous message with optional comma separated arguments.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="messageName">Name of the message.</param>
+ /// <param name="callback">Callback for continuous responses.</param>
+ /// <param name="timeout">The timeout.</param>
+ /// <param name="args">The arguments.</param>
+ void SendContinuous<T>(String messageName, Action<T> callback, int? timeout, params Object[] args) where T : class, IMessage;
+
+ /// <summary>
+ /// Writes the specified object string representation to the output window.
+ /// </summary>
+ /// <param name="obj">The object.</param>
void WriteLine(Object obj);
+
+ /// <summary>
+ /// Writes the specified object string representation to the output window.
+ /// </summary>
+ /// <param name="obj">The object.</param>
void Write(Object obj);
+
+ /// <summary>
+ /// Writes the hexadecimal representation of the specified object to the output window.
+ /// </summary>
+ /// <param name="number">The number.</param>
+ /// <param name="digits">The digits.</param>
void WriteLineHex(Object number, int digits);
+
+ /// <summary>
+ /// Writes the hexadecimal representation of the specified object to the output window.
+ /// </summary>
+ /// <param name="number">The number.</param>
+ /// <param name="digits">The digits.</param>
void WriteHex(Object number, int digits);
+
+ /// <summary>
+ /// Writes the specified array to the output window using the specified parsing style.
+ /// </summary>
+ /// <param name="array">The array.</param>
+ /// <param name="style">The style.</param>
void WriteLineArray(IEnumerable array, ArrayParsingStyle style);
+
+ /// <summary>
+ /// Clears the output window.
+ /// </summary>
void Clear();
+
+ /// <summary>
+ /// Writes a string content to the specified file.
+ /// If the file already exists it will be overwritten.
+ /// </summary>
+ /// <param name="filePath">The file path.</param>
+ /// <param name="content">The content.</param>
void WriteToFile(String filePath, String content);
+
+ /// <summary>
+ /// Appends the string content to the specified file.
+ /// </summary>
+ /// <param name="filePath">The file path.</param>
+ /// <param name="content">The content.</param>
void AppendToFile(String filePath, String content);
+
+ /// <summary>
+ /// Get the value of a user input by key.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="key">The input key.</param>
+ /// <returns></returns>
T GetInput<T>(String key);
+
+ /// <summary>
+ /// Gets the value of a user input as an array.
+ /// User input must be a comma separated string.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="key">The input key.</param>
+ /// <returns></returns>
List<T> GetInputArray<T>(String key);
+
+ /// <summary>
+ /// Get the value of a user input by key.
+ /// </summary>
+ /// <param name="key">The input key.</param>
+ /// <returns></returns>
Object GetInput(String key);
+
+ /// <summary>
+ /// Fails the current test with the specified error message.
+ /// </summary>
+ /// <param name="message">The error message.</param>
void Fail(String message);
+
+ /// <summary>
+ /// Displays an information message to the user.
+ /// </summary>
+ /// <param name="message">The message.</param>
void ShowInfo(String message);
+
+ /// <summary>
+ /// Displays a warning message to the user.
+ /// </summary>
+ /// <param name="message">The message.</param>
void ShowWarning(String message);
+
+ /// <summary>
+ /// Displays an error message to the user.
+ /// </summary>
+ /// <param name="message">The message.</param>
void ShowError(String message);
+
+ /// <summary>
+ /// Present the user with a question an returns a value indicating the confirmation.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <returns></returns>
bool ShowQuestion(String message);
+
+ /// <summary>
+ /// Presents the user with a warning and returns a value indicating the confirmation.
+ /// </summary>
+ /// <param name="message">The message.</param>
+ /// <returns></returns>
bool ShowWarningQuestion(String message);
+
+ /// <summary>
+ /// Request a user input for the specified primitive or complex type.
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="title">The request title.</param>
+ /// <param name="message">The request message.</param>
+ /// <returns></returns>
T RequestUserInputFor<T>(String title, String message);
+
+ /// <summary>
+ /// Request a user input for the specified primitive or complex type (model).
+ /// </summary>
+ /// <typeparam name="T"></typeparam>
+ /// <param name="model">The existing model.</param>
+ /// <param name="title">The request title.</param>
+ /// <param name="message">The request message.</param>
+ /// <returns></returns>
T RequestUserInputFor<T>(T model, String title, String message);
}
}
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj
index 61dedf949..1fe35c2b1 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/Tango.FSE.Stubs.csproj
@@ -24,6 +24,8 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\..\Build\FSE\Debug\Tango.FSE.Stubs.xml</DocumentationFile>
+ <NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -32,6 +34,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
+ <DocumentationFile>..\..\..\Build\FSE\Release\Tango.FSE.Stubs.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
diff --git a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestContext.cs b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestContext.cs
index 9761a9378..7a71337bf 100644
--- a/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestContext.cs
+++ b/Software/Visual_Studio/FSE/Modules/Tango.FSE.Stubs/TestContext.cs
@@ -55,7 +55,7 @@ namespace Tango.FSE.Stubs
TangoIOC.Default.Inject(this);
}
- public IMessage Run(string messageName, int? timeout = null, params object[] args)
+ public IMessage Send(string messageName, int? timeout = null, params object[] args)
{
var stubType = MessageFactory.GetAvailableRequestStubs().SingleOrDefault(x => x.Name.ToLower() == messageName.ToLower() || x.Name.Replace("Request", "").ToLower() == messageName.ToLower());
if (stubType == null)
@@ -96,15 +96,15 @@ namespace Tango.FSE.Stubs
}
}
- return Run(request as IMessage, timeout);
+ return Send(request as IMessage, timeout);
}
- public T Run<T>(string messageName, int? timeout = null, params object[] args) where T : class, IMessage
+ public T Send<T>(string messageName, int? timeout = null, params object[] args) where T : class, IMessage
{
- return Run(messageName, timeout, args) as T;
+ return Send(messageName, timeout, args) as T;
}
- public IMessage Run(IMessage message, int? timeout = null)
+ public IMessage Send(IMessage message, int? timeout = null)
{
TimeSpan? timespan = null;
@@ -119,12 +119,12 @@ namespace Tango.FSE.Stubs
}).Result;
}
- public T Run<T>(IMessage messageName, int? timeout = null) where T : class, IMessage
+ public T Send<T>(IMessage messageName, int? timeout = null) where T : class, IMessage
{
- return Run(messageName, timeout) as T;
+ return Send(messageName, timeout) as T;
}
- public void RunContinuous<T>(IMessage messageName, Action<T> callback, int? timeout = null) where T : class, IMessage
+ public void SendContinuous<T>(IMessage messageName, Action<T> callback, int? timeout = null) where T : class, IMessage
{
TaskCompletionSource<object> completion = new TaskCompletionSource<object>();
@@ -157,7 +157,7 @@ namespace Tango.FSE.Stubs
completion.Task.GetAwaiter().GetResult();
}
- public void RunContinuous<T>(string messageName, Action<T> callback, int? timeout = null, params object[] args) where T : class, IMessage
+ public void SendContinuous<T>(string messageName, Action<T> callback, int? timeout = null, params object[] args) where T : class, IMessage
{
var stubType = MessageFactory.GetAvailableRequestStubs().SingleOrDefault(x => x.Name.ToLower() == messageName.ToLower() || x.Name.Replace("Request", "").ToLower() == messageName.ToLower());
if (stubType == null)
@@ -198,7 +198,7 @@ namespace Tango.FSE.Stubs
}
}
- RunContinuous<IMessage>(request, callback as Action<IMessage>, timeout);
+ SendContinuous<IMessage>(request, callback as Action<IMessage>, timeout);
}
public void WriteLine(object obj)
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj
index ec0629e99..429d82389 100644
--- a/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj
+++ b/Software/Visual_Studio/FSE/Tango.FSE.UI/Tango.FSE.UI.csproj
@@ -804,7 +804,16 @@ copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140d.dll" "$(TargetDir)"
copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(TargetDir)"
+attrib +r Tango*
+attrib +r Google.Protobuf.xml
if $(ConfigurationName) == Release del *.xml
+attrib -r Tango*
+attrib -r Google.Protobuf.xml
+
+attrib +r Tango*
+if $(ConfigurationName) == Release del *.pdb
+attrib -r Tango*
+
if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)ProtoCompilers\"
if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)Roslyn\"</PostBuildEvent>
</PropertyGroup>
diff --git a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Themes/Generic.xaml b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Themes/Generic.xaml
index 6455b8fcb..e8e5ffb91 100644
--- a/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Themes/Generic.xaml
+++ b/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Themes/Generic.xaml
@@ -54,6 +54,11 @@
<converters:BooleanToVisibilityInversedConverter x:Key="BooleanToVisibilityInversedConverter" />
<Style TargetType="{x:Type completion:CompletionList}">
+ <Style.Resources>
+ <Style TargetType="ToolTip">
+
+ </Style>
+ </Style.Resources>
<Setter Property="Background" Value="{StaticResource CompletionBackgroundBrush}"></Setter>
<Setter Property="BorderThickness" Value="0"></Setter>
@@ -84,95 +89,6 @@
<Setter.Value>
<DataTemplate>
<Border Background="{StaticResource CompletionToolTipBackgroundBrush}" CornerRadius="3" BorderThickness="0.5" BorderBrush="#434343" Padding="10 5" TextElement.Foreground="{StaticResource ScriptForegroundBrush}" TextElement.FontSize="12">
- <!--<ContentControl Content="{Binding}">
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <ContentPresenter Content="{Binding PopupControl}" />
- </DataTemplate>
- </Setter.Value>
- </Setter>
- <Style.Triggers>
- <DataTrigger Binding="{Binding Type}" Value="method">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding ReturnType}" Foreground="{StaticResource ScriptReferenceTypesBrush}"></TextBlock>
- <TextBlock Margin="5 0 0 0" Text="{Binding Class}" Foreground="{StaticResource ScriptReferenceTypesBrush}"></TextBlock>
- <TextBlock>.</TextBlock>
- <TextBlock Text="{Binding Text}"></TextBlock>
- <TextBlock>(</TextBlock>
- <ItemsControl ItemsSource="{Binding Parameters}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal"></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding Type.Name}" Foreground="{StaticResource ScriptReferenceTypesBrush}"></TextBlock>
- <TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock>
- <TextBlock Margin="0 0 5 0" Text="," Visibility="{Binding IsLast,Converter={StaticResource BooleanToVisibilityInversedConverter}}"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <TextBlock>)</TextBlock>
-
- <StackPanel Margin="5 0 0 0" Orientation="Horizontal" Visibility="{Binding HasOverloads,Converter={StaticResource BooleanToVisibilityConverter}}">
- <TextBlock>(+</TextBlock>
- <TextBlock Margin="2 0" Text="{Binding Overloads}"></TextBlock>
- <TextBlock>overloads)</TextBlock>
- </StackPanel>
- </StackPanel>
-
- <TextBlock Text="{Binding Description}"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
-
- <DataTrigger Binding="{Binding Type}" Value="property">
- <Setter Property="ContentTemplate">
- <Setter.Value>
- <DataTemplate>
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding ReturnType}" Foreground="{StaticResource ScriptReferenceTypesBrush}"></TextBlock>
- <TextBlock Margin="5 0 0 0" Text="{Binding Class}" Foreground="{StaticResource ScriptReferenceTypesBrush}"></TextBlock>
- <TextBlock>.</TextBlock>
- <TextBlock Text="{Binding Text}"></TextBlock>
- <TextBlock Margin="5 0 0 0">
- <Run>{</Run>
- <Run Foreground="{StaticResource ScriptKeywordBrush}">get</Run><Run>;</Run>
- <Run Foreground="{StaticResource ScriptKeywordBrush}">set</Run><Run>;</Run>
- <Run>}</Run>
- </TextBlock>
- </StackPanel>
-
- <TextBlock Text="{Binding Description}"></TextBlock>
- </StackPanel>
- </DataTemplate>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
-
- <ContentControl.ContentTemplate>
- <DataTemplate>
- <ContentPresenter Content="{Binding PopupControl}" />
- </DataTemplate>
- </ContentControl.ContentTemplate>
- </ContentControl>-->
-
<ContentPresenter DataContext="{Binding}" Content="{Binding PopupControl}" />
</Border>
</DataTemplate>