Skip to content

Commit

Permalink
Big merge from master plus a few fixes after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Jun 30, 2022
2 parents 2a7000c + 4362fe6 commit cf47894
Show file tree
Hide file tree
Showing 39 changed files with 93 additions and 118 deletions.
4 changes: 2 additions & 2 deletions FXBEditorUtils/FindTextHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Windows.Forms;
using ScintillaNET;
using ScintillaNET;
using System.Windows.Forms;

namespace Rappen.XTB.XmlEditorUtils
{
Expand Down
5 changes: 1 addition & 4 deletions FXBTests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("FXBTests")]
Expand All @@ -10,11 +9,9 @@
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: ComVisible(false)]

[assembly: Guid("8f32ef58-ac53-49de-957b-102d78368377")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
9 changes: 2 additions & 7 deletions FetchXmlBuilder/AppCode/ScintillaHelper.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using Rappen.XTB.FetchXmlBuilder.Settings;
using ScintillaNET;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
using Rappen.XTB.FetchXmlBuilder.Settings;
using ScintillaNET;

namespace Rappen.XTB.FetchXmlBuilder.AppCode
{
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/AppCode/WebAPIMetadataProvider.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using MarkMpn.FetchXmlToWebAPI;
using MarkMpn.FetchXmlToWebAPI;
using Microsoft.Xrm.Sdk.Metadata;
using System;

namespace Rappen.XTB.FetchXmlBuilder.AppCode
{
Expand Down
4 changes: 1 addition & 3 deletions FetchXmlBuilder/Builder/FetchNodeCapabilities.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using Rappen.XTB.XmlEditorUtils;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Collections.Generic;

namespace Rappen.XTB.FetchXmlBuilder.Builder
{
Expand Down
8 changes: 4 additions & 4 deletions FetchXmlBuilder/Builder/TreeNodeExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Rappen.XTB.FetchXmlBuilder.Builder
{
internal static class TreeNodeExtensions
public static class TreeNodeExtensions
{
internal static TreeNode LocalEntityNode(this TreeNode node)
{
Expand All @@ -21,17 +21,17 @@ internal static TreeNode LocalEntityNode(this TreeNode node)
return null;
}
}
return (node.Name.Equals("entity") || node.Name.Equals("link-entity")) ? node : null;
return node.Name.Equals("entity") || node.Name.Equals("link-entity") ? node : null;
}

internal static bool LocalEntityIsRoot(this TreeNode node)
{
return LocalEntityNode(node)?.Name == "entity";
return node.LocalEntityNode()?.Name == "entity";
}

internal static string LocalEntityName(this TreeNode node)
{
return LocalEntityNode(node).Value("name");
return node.LocalEntityNode().Value("name");
}

internal static string Value(this TreeNode node, string key)
Expand Down
5 changes: 1 addition & 4 deletions FetchXmlBuilder/Builder/TreeNodeHelper.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Controls;
using Rappen.XTB.FetchXmlBuilder.Controls;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Rappen.XTB.FetchXmlBuilder.Settings;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Xml;
using System.Xml.Linq;

namespace Rappen.XTB.FetchXmlBuilder.Builder
{
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/Builder/Validations.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.Controls;
using Microsoft.Xrm.Sdk.Metadata;
using System.Linq;
using System.Windows.Forms;

Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/Controls/FetchXmlElementControlBase.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Collections.Generic;
using System.ComponentModel;
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/Controls/attributeControl.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Rappen.XTB.FetchXmlBuilder.Views;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Linq;
using System.Windows.Forms;
Expand Down
8 changes: 4 additions & 4 deletions FetchXmlBuilder/Controls/conditionControl.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Rappen.XTB.FetchXmlBuilder.Builder;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/Controls/entityControl.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Microsoft.Xrm.Sdk.Metadata;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
Expand Down
5 changes: 2 additions & 3 deletions FetchXmlBuilder/Controls/linkEntityControl.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/Controls/orderControl.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Microsoft.Xrm.Sdk.Metadata;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/Controls/valueControl.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Rappen.XTB.FetchXmlBuilder.Builder;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.ControlsClasses;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Linq;
using System.Windows.Forms;
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/ControlsClasses/AttributeItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.XmlEditorUtils;
using System.Windows.Forms;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/ControlsClasses/EntityItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.XmlEditorUtils;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
{
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/ControlsClasses/EntityNameItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.XmlEditorUtils;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
{
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/ControlsClasses/EntityNode.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.Builder;
using System.Windows.Forms;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
Expand Down
1 change: 0 additions & 1 deletion FetchXmlBuilder/ControlsClasses/EntityRelationship.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Linq;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
{
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/ControlsClasses/OperatorItem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using Rappen.XTB.XmlEditorUtils;
using System.Collections.Generic;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
Expand Down
4 changes: 2 additions & 2 deletions FetchXmlBuilder/ControlsClasses/OptionsetItem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.XmlEditorUtils;

namespace Rappen.XTB.FetchXmlBuilder.ControlsClasses
{
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/Converters/CSharpCodeGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Text;
Expand Down
3 changes: 1 addition & 2 deletions FetchXmlBuilder/Converters/JavascriptCodeGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
using System;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using System.Xml;
using Newtonsoft.Json;

namespace Rappen.XTB.FetchXmlBuilder.Converters
{
Expand Down
9 changes: 4 additions & 5 deletions FetchXmlBuilder/Converters/QueryExpressionCodeGenerator.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using Microsoft.Xrm.Sdk;
using Microsoft.CSharp;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using System;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using System.Text;
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using System.Text.RegularExpressions;
using Microsoft.Crm.Sdk.Messages;
using Rappen.XTB.FetchXmlBuilder.Extensions;

namespace Rappen.XTB.FetchXmlBuilder.Converters
{
Expand Down
5 changes: 2 additions & 3 deletions FetchXmlBuilder/DockControls/ResultGrid.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Xrm.Sdk;
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Microsoft.Xrm.Sdk;
using System;
using System.Diagnostics;
using System.Windows.Forms;

namespace Rappen.XTB.FetchXmlBuilder.DockControls
Expand Down
8 changes: 4 additions & 4 deletions FetchXmlBuilder/DockControls/TreeBuilderControl.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Builder;
using Rappen.XTB.FetchXmlBuilder.Controls;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Rappen.XTB.FetchXmlBuilder.Forms;
using Rappen.XTB.FetchXmlBuilder.Views;
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Metadata;
using Microsoft.Xrm.Sdk.Query;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down
15 changes: 7 additions & 8 deletions FetchXmlBuilder/DockControls/XmlContentControl.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using MarkMpn.XmlSchemaAutocomplete.Scintilla;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XRM.Helpers.Extensions;
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Rappen.XTB.FetchXmlBuilder.Settings;
using Rappen.XTB.XmlEditorUtils;
using MarkMpn.XmlSchemaAutocomplete.Scintilla;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XRM.Helpers.Extensions;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -39,7 +39,7 @@ internal XmlContentControl(ContentType contentType, SaveFormat saveFormat, Fetch
SetContentType(contentType);
SetFormat(saveFormat);
UpdateButtons();
if (contentType == ContentType.FetchXML || contentType == ContentType.LayoutXML)
if (contentType == ContentType.FetchXML)
{
InitIntellisense();
}
Expand Down Expand Up @@ -78,7 +78,6 @@ internal void SetContentType(ContentType contentType)
switch (contentType)
{
case ContentType.FetchXML:
case ContentType.LayoutXML:
case ContentType.FetchXML_Result:
case ContentType.Serialized_Result_XML:
txtXML.ConfigureForXml(fxb.settings);
Expand Down Expand Up @@ -782,14 +781,14 @@ private void txtXML_KeyUp(object sender, KeyEventArgs e)
public enum ContentType
{
FetchXML,
LayoutXML,
FetchXML_Result,
Serialized_Result_XML,
Serialized_Result_JSON,
QueryExpression,
SQL_Query,
JavaScript_Query,
CSharp_Query,
LayoutXML
CSharp_Query
}

internal enum SaveFormat
Expand Down
9 changes: 4 additions & 5 deletions FetchXmlBuilder/FXBGui.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Converters;
using Rappen.XTB.FetchXmlBuilder.DockControls;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using Rappen.XTB.FetchXmlBuilder.Forms;
using Rappen.XTB.FetchXmlBuilder.Settings;
using Rappen.XTB.FetchXmlBuilder.Views;
using Rappen.XTB.XmlEditorUtils;
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Metadata;
using System;
using System.Collections.Generic;
using System.IO;
Expand Down Expand Up @@ -47,7 +47,6 @@ public partial class FetchXmlBuilder : PluginControlBase
private bool bduexists;

internal void EnableControls()

{
EnableControls(buttonsEnabled);
}
Expand Down
Loading

0 comments on commit cf47894

Please sign in to comment.