-
Notifications
You must be signed in to change notification settings - Fork 0
/
Plugin.cs
50 lines (43 loc) · 1.7 KB
/
Plugin.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace pluginVivado
{
public class Plugin : codeEditorPlugin.IPlugin
{
public bool Register()
{
// checklibrary dependency
if (!codeEditor.Global.Plugins.ContainsKey("Verilog")) return false;
// register filetype
// {
// FileTypes.VerilogFile fileType = new FileTypes.VerilogFile();
// codeEditor.Global.FileTypes.Add(fileType.ID, fileType);
// }
// {
// FileTypes.VerilogHeaderFile fileType = new FileTypes.VerilogHeaderFile();
// codeEditor.Global.FileTypes.Add(fileType.ID, fileType);
// }
System.Windows.Forms.ContextMenuStrip menu = codeEditor.Controller.NavigatePanel.GetContextMenuStrip();
menu.Items.Insert(0,Global.SetupForm.XilinxTsmi);
pluginVerilog.NavigatePanel.VerilogFileNode.NodeCreated += new Action<pluginVerilog.NavigatePanel.VerilogFileNode>(
node => {
node.NodeSelected += new Action(
() => {
codeEditor.Controller.NavigatePanel.GetContextMenuStrip().Items["XilinxTsmi"].Visible = true;
}
);
}
);
return true;
}
public bool Initialize()
{
return true;
}
public string Id { get { return StaticID; } }
public static string StaticID = "Vivado";
}
}