And I'm going to just give you a quick overview of how you can use GUI plug-ins to streamline your process. So right away, you'll notice that I have a separate menu up here, I call it webinar plug-in. This is basically just a set of options that I've added to demonstrate to you in this webinar. I've done through the XML file, and I'll show you the file here in a few minutes. The first thing I'll do is I'll show you how you can add your items to a contacts menu. I'll go to user options and plug-ins. You can see that the plug-in that I've dropped in my folder has been successfully loaded. You go to your file list menu and you can see these new options that were added by your plug-in. So, what I'm going to do is I'm going to grab a separator in my three options, and I'm just going to add them right to my contacts menu.
Great. So now you can see that these are the three extra options that I've added. One example is my C++ Compiler, so I can quickly say “Build C++ file”. I get a message back, this is just a simple message, yours can be as elaborate or as simple as you want. You've got complete control, because it's just running a separate binary in the background. So, in this case, that compile it failed. Try another one, and it compiled successfully. That's another great example. In the UI validator, again, you’ll notice that the Build C++ is now disabled, and UI validator is enabled and that's basically just a matching on the file extension. UI validator is enabled for .UI files. Build "C++" is enabled for .C++ files. So I can see that my UI validator has successfully passed.
Another good application that I really like to use is Visual Studio or it can be whatever your IEE is. It's very simple to add something like this. Just click “Open”, fire right up with my Visual Studio project that I selected from the working directory. And again, this is a name match on the extension. This is enabled for solution files and for project files. Everything else, it is disabled. So, I'm going to go ahead and open up the XML file, that’s behind this plug-in, and kind of show you what it looks like.
So, the first thing you'll notice is at the top, which is where I'm creating my two menus. I've got a menu for the webinar plug-in, and it has no path which puts it by default on the menu bar. The second menu is for a webinar plug-in extras. And that's in a submenu under the tools. I'll show you that real quick, it's just right here.
Now each of these are menu items. The menu item is basically the option that you see. The next thing you'll do is specify the location where you want to put that menu item. You can put that on your custom menu, you can put it on the contacts menus. For example, it doesn't have to be on the contacts file. It can be on the contacts repository or the contacts branch menu. It really just depends upon whatever your application is.
So in this case, you can see that this is a main menu item, and it's on my webinar plug-in menu, and this is a contacts menu item. I've got some enabling set like I was mentioning earlier, C++ matching files and only one file is selected. That's my stipulation. And you'll fire off this program here which is located in the plug-ins directory scripts folder, and it's just my compile. And it passes the file that I've selected as an environment variable. There's a range of environment variables. I believe there's about 10 of them. I've got them at the bottom. I'll show them in a few minutes just to, kind of, help you know what the user's doing and what they've selected.
Same thing goes with UI validator. I've provided you a simple icon for that. A .png and .jpeg will work. Again, the location, enabling, and the path, and the same thing for Visual Studio. And you can see from Visual Studio, I've just passed this environment variable to the local file, right to Visual Studio so it opens up right away. This is a complete list of the environment variables that will be populated once you've clicked a menu item and spawn off this script or this process. You can see what user selected it, the name of the user's machine, a main line, the branch, the branch type, the repository, the file, the file version, the file link, which is in the SCM link format, so maybe that would be useful in sending an email if you wanted to select a couple of files and have it send an email with a link. Number of files selected, the file list, and the local file list. The local file list is a list of paths to where they can be found on your machine or on the current machine.
So, I'm going to really quickly change this to visibility. I'm going to restart my client. And you can see that it's now visible here, and when I select an item that doesn't match it, it's no longer visible. So this just gives you an extra way to configure how you want to use your menu. Some are enabled and some are completely just invisible when something is not matching. So this basically concludes my demonstration for the GUI plug-in.