Skip to content

Commit ee2f169

Browse files
committed
Added some comments.
1 parent 90b2f60 commit ee2f169

File tree

3 files changed

+10
-19
lines changed

3 files changed

+10
-19
lines changed

Diff for: Hybrid/SamplePluginHybridExt.cpp

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ namespace SamplePluginHybrid
55
/// <summary>This method gets called when ReClass.NET loads the plugin.</summary>
66
bool SamplePluginHybridExt::Initialize(IPluginHost^ host)
77
{
8-
if (host == nullptr)
9-
{
10-
throw gcnew ArgumentNullException("host");
11-
}
12-
138
this->host = host;
149

1510
// Register a node info reader to display custom data on nodes.
16-
if (reader == nullptr)
17-
{
18-
reader = gcnew SampleNodeInfoReader;
19-
}
11+
reader = gcnew SampleNodeInfoReader;
12+
2013
host->RegisterNodeInfoReader(reader);
2114

2215
return true;

Diff for: Hybrid/SamplePluginHybridExt.h

+2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ using namespace ReClassNET::Nodes;
66
using namespace ReClassNET::Plugins;
77
using namespace ReClassNET::Util;
88

9+
// The namespace name must equal the plugin name
910
namespace SamplePluginHybrid
1011
{
12+
/// <summary>The class name must equal the namespace name + "Ext"</summary>
1113
public ref class SamplePluginHybridExt : Plugin
1214
{
1315
public:

Diff for: Managed/SamplePluginManagedExt.cs

+6-10
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
using ReClassNET.UI;
99
using ReClassNET.Util;
1010

11+
// The namespace name must equal the plugin name
1112
namespace SamplePluginManaged
1213
{
14+
15+
/// <summary>The class name must equal the namespace name + "Ext"</summary>
1316
public class SamplePluginManagedExt : Plugin
1417
{
1518
private IPluginHost host;
@@ -21,21 +24,14 @@ public class SamplePluginManagedExt : Plugin
2124
/// <summary>This method gets called when ReClass.NET loads the plugin.</summary>
2225
public override bool Initialize(IPluginHost host)
2326
{
24-
if (host == null)
25-
{
26-
throw new ArgumentNullException(nameof(host));
27-
}
28-
2927
this.host = host;
3028

3129
// Notfiy the plugin if a window is shown.
3230
GlobalWindowManager.WindowAdded += OnWindowAdded;
3331

3432
// Register a node info reader to display custom data on nodes.
35-
if (reader == null)
36-
{
37-
reader = new SampleNodeInfoReader();
38-
}
33+
reader = new SampleNodeInfoReader();
34+
3935
host.RegisterNodeInfoReader(reader);
4036

4137
return true;
@@ -55,7 +51,7 @@ public override void Terminate()
5551

5652
/// <summary>
5753
/// This method gets called when a new windows is opened.
58-
/// You can use this function to add a settings panel into the original form.
54+
/// You can use this function to add a settings panel into the settings dialog for example.
5955
/// </summary>
6056
private void OnWindowAdded(object sender, GlobalWindowManagerEventArgs e)
6157
{

0 commit comments

Comments
 (0)