This file is indexed.

/usr/share/codeblocks/scripts/sample_plugin.script is in codeblocks-common 13.12-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 * http://www.gnu.org/licenses/gpl-3.0.html
 *
 * $Revision: 7443 $
 * $Id: sample_plugin.script 7443 2011-09-01 16:29:16Z mortenmacfly $
 * $HeadURL: http://svn.code.sf.net/p/codeblocks/code/branches/release-xx.yy/src/scripts/sample_plugin.script $
 */

// Script plugins must extend cbScriptPlugin

class TestPlugin extends cbScriptPlugin
{
    // mandatory to setup the plugin's info
	constructor()
	{
		info.name = _T("TestPlugin");
		info.title = _T("Test script");
		info.version = _T("0.1a");
		info.license = _T("GPL");
	}

    // optional to create menubar items
	function GetMenu()
	{
		local entries = ::wxArrayString();
		entries.Add(_T("Project/7:-Export Makefile"), 1);
		return entries;
	}

    // optional to create context menu entries
	function GetModuleMenu(who, data)
	{
		local entries = ::wxArrayString();

	    if (who == ::mtEditorManager)
	    {
	        local f = wxFileName();
	        f.Assign(data.GetFolder(), ::wxPATH_NATIVE);
            entries.Add(_T("Work with ") + f.GetFullName(), 1);

            entries.Add(_T("Sample entry"), 1);
	    }

		return entries;
	}
	
	// optional to support ExecutePlugin(pluginNameString)
	function Execute()
    {
        ::ShowMessage(_T("Ho-ho was here ;)"));
        return 0;
    }
    
    // optional calback for menubar items clicking
	function OnMenuClicked(index)
	{
        if (index == 0)
            ::ShowMessage(_T("Exporting Makefile..."));
	}

    // optional calback for context menu items clicking
	function OnModuleMenuClicked(index)
	{
		if (index == 0)
			::ShowMessage(_T("Working with file"));
		else if (index == 1)
			::ShowMessage(_T("Sample entry not working yet"));
		else
			::ShowMessage(_T("?!? Functionality not implemented yet"));
	}
}

// this call actually registers the script plugin with Code::Blocks
RegisterPlugin(TestPlugin());

// if you want to call this plugin's Execute() function, use this in a script:
// ExecutePlugin(_T("TestPlugin"));