Skip to content

Commit

Permalink
[BUG] losing custom entities from include list fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
xairrick committed Feb 9, 2014
1 parent fbcdc72 commit dbe0dd4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion CrmCodeGenerator.Controls/MultiSelectComboBox.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void SelectNodes()
{
foreach (var keyValue in SelectedItems)
{
Node node = _nodeList.FirstOrDefault(i => i.Title == keyValue);
Node node = _nodeList.FirstOrDefault(i => i.Title == keyValue.Replace("_", "__"));
if (node != null)
node.IsSelected = true;
}
Expand Down
32 changes: 12 additions & 20 deletions CrmCodeGenerator.VSPackage/CrmCodeGenerator2011.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,26 +73,6 @@ private ServiceProvider SiteServiceProvider
return serviceProvider;
}
}
public CrmCodeGenerator2011()
{
//Configuration.Instance.DTE.ExecuteCommand("View.Output");
var dte = Package.GetGlobalService(typeof(SDTE)) as EnvDTE.DTE;
var win = dte.Windows.Item(EnvDTE.Constants.vsWindowKindOutput);
win.Visible = true;


//System.Windows.Forms.Application.DoEvents();

IVsOutputWindow outputWindow = Package.GetGlobalService(typeof(SVsOutputWindow)) as IVsOutputWindow;
Guid guidGeneral = Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.GeneralPane_guid;
IVsOutputWindowPane pane;
int hr = outputWindow.CreatePane(guidGeneral, "General", 1, 0);
hr = outputWindow.GetPane(guidGeneral, out pane);
pane.Activate();
pane.Clear();
pane.FlushToTaskList();
System.Windows.Forms.Application.DoEvents();
}

public void Dispose()
{
Expand Down Expand Up @@ -123,6 +103,7 @@ public int Generate(string wszInputFilePath, string bstrInputFileContents, strin
if (bstrInputFileContents == null)
throw new ArgumentException(bstrInputFileContents);

ClearStatus();

UpdateStatus("In order to generate code from this template, you need to provide login credentials for your CRM system");
UpdateStatus("The Discovery URL is the URL to your Discovery Service, you can find this URL in CRM -> Settings -> Customizations -> Developer Resources. \n eg " + @"https://dsc.yourdomain.com/XRMServices/2011/Discovery.svc");
Expand Down Expand Up @@ -217,6 +198,17 @@ private void UpdateStatus(string message)
pane.FlushToTaskList();
System.Windows.Forms.Application.DoEvents();
}
private void ClearStatus()
{
IVsOutputWindow outputWindow = Package.GetGlobalService(typeof(SVsOutputWindow)) as IVsOutputWindow;
Guid guidGeneral = Microsoft.VisualStudio.VSConstants.OutputWindowPaneGuid.GeneralPane_guid;
IVsOutputWindowPane pane;
int hr = outputWindow.CreatePane(guidGeneral, "General", 1, 0);
hr = outputWindow.GetPane(guidGeneral, out pane);
pane.Clear();
pane.FlushToTaskList();
System.Windows.Forms.Application.DoEvents();
}
#region IObjectWithSite

public void GetSite(ref Guid riid, out IntPtr ppvSite)
Expand Down

0 comments on commit dbe0dd4

Please sign in to comment.