Skip to content

Commit 7c9faf4

Browse files
committed
refs #5
refs #6 Mise en place du projet
1 parent 8fab63c commit 7c9faf4

16 files changed

Lines changed: 908 additions & 0 deletions

‎cppCheckVisualStudioAddIn.sln‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 9.00
3+
# Visual Studio 2005
4+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cppCheckVisualStudioAddIn", "cppCheckVisualStudioAddIn\cppCheckVisualStudioAddIn.csproj", "{A7364EA8-DE8F-4181-909E-A739377BDF71}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Any CPU = Debug|Any CPU
9+
Release|Any CPU = Release|Any CPU
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{A7364EA8-DE8F-4181-909E-A739377BDF71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13+
{A7364EA8-DE8F-4181-909E-A739377BDF71}.Debug|Any CPU.Build.0 = Debug|Any CPU
14+
{A7364EA8-DE8F-4181-909E-A739377BDF71}.Release|Any CPU.ActiveCfg = Release|Any CPU
15+
{A7364EA8-DE8F-4181-909E-A739377BDF71}.Release|Any CPU.Build.0 = Release|Any CPU
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// CommandIds.h
2+
// Command IDs used in defining command bars
3+
//
4+
5+
// do not use #pragma once - used by ctc compiler
6+
#ifndef __COMMANDIDS_H_
7+
#define __COMMANDIDS_H_
8+
9+
///////////////////////////////////////////////////////////////////////////////
10+
// Menu IDs
11+
#define cppCheckToolBar 0x101
12+
13+
14+
15+
///////////////////////////////////////////////////////////////////////////////
16+
// Menu Group IDs
17+
18+
#define cppCheckMenuGroup 0x1010
19+
#define cppCheckToolBarGroup 0x1011
20+
21+
///////////////////////////////////////////////////////////////////////////////
22+
// Command IDs
23+
24+
#define cmdidcppCheckConfig 0x2001
25+
#define cmdidcppCheckParseFile 0x2002
26+
#define cmdidcppCheckParseProject 0x2003
27+
#define cmdidcppCheckParseSolution 0x2004
28+
#define cmdidMyZoom 0x2005
29+
30+
31+
32+
///////////////////////////////////////////////////////////////////////////////
33+
// Bitmap IDs
34+
#define bmpPic1 1
35+
#define bmpPic2 2
36+
#define bmpPicSmile 3
37+
#define bmpPicX 4
38+
#define bmpPicArrows 5
39+
40+
41+
#endif // __COMMANDIDS_H_
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// guids.h: definitions of GUIDs/IIDs/CLSIDs used in this VsPackage
2+
3+
/*
4+
Do not use #pragma once, as this file needs to be included twice. Once to declare the externs
5+
for the GUIDs, and again right after including initguid.h to actually define the GUIDs.
6+
*/
7+
8+
9+
10+
// package guid
11+
// { 2d61439f-3473-46f4-b514-fcfa058992be }
12+
#define guidcppCheckVisualStudioAddInPkg { 0x2D61439F, 0x3473, 0x46F4, { 0xB5, 0x14, 0xFC, 0xFA, 0x5, 0x89, 0x92, 0xBE } }
13+
#ifdef DEFINE_GUID
14+
DEFINE_GUID(CLSID_cppCheckVisualStudioAddIn,
15+
0x2D61439F, 0x3473, 0x46F4, 0xB5, 0x14, 0xFC, 0xFA, 0x5, 0x89, 0x92, 0xBE );
16+
#endif
17+
18+
// Command set guid for our commands (used with IOleCommandTarget)
19+
// { 835d0309-b686-4942-98d9-0e57fd96fd1a }
20+
#define guidcppCheckVisualStudioAddInCmdSet { 0x835D0309, 0xB686, 0x4942, { 0x98, 0xD9, 0xE, 0x57, 0xFD, 0x96, 0xFD, 0x1A } }
21+
#ifdef DEFINE_GUID
22+
DEFINE_GUID(CLSID_cppCheckVisualStudioAddInCmdSet,
23+
0x835D0309, 0xB686, 0x4942, 0x98, 0xD9, 0xE, 0x57, 0xFD, 0x96, 0xFD, 0x1A );
24+
#endif
25+
26+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//{{NO_DEPENDENCIES}}
2+
// Microsoft Developer Studio generated include file.
3+
// Used by cppCheckVisualStudioAddInUI.rc
4+
//
5+
6+
#define IDB_MENU_IMAGES 300
7+
#define IDB_FRAME_IMAGES 301
8+
#define IDI_PACKAGE_ICON 400
9+
10+
11+
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
//
2+
// This is the file that defines the actual layout and type of the commands.
3+
// It is divided in different sections (e.g. command definition, command
4+
// placement, ...), with each defining a specific set of properties.
5+
// See the comment before each section for more details about how to
6+
// use it.
7+
//
8+
9+
// The CTC compiler (the tool that translates this file into the binary
10+
// format that VisualStudio will consume) has the ability to run a preprocessor
11+
// on the ctc file; this preprocessor is (usually) the C++ preprocessor, so
12+
// it is possible to define includes and macros with the same syntax used
13+
// in C++ files. Using this ability of the compiler here, we include some files
14+
// defining some of the constants that we will use inside the file.
15+
16+
#include "stdidcmd.h" // This is the file that defines the IDs for all the
17+
// commands exposed by VisualStudio.
18+
19+
#include "vsshlids.h" // This header contains the command ids for the menus
20+
// provided by the shell.
21+
22+
#include "msobtnid.h" // Definition of some CTC specific constants. In this sample
23+
// we use it for the IDs inside the guidOfficeIcon group.
24+
25+
26+
#include "CommandIds.h" // Definition of the IDs of the commands and CTC elements
27+
// specific for this sample.
28+
29+
#include "Resource.h" // Definition of the IDs of the resources used by this package;
30+
// Here it is used to include the bitmap with the images used for
31+
// the commands.
32+
33+
#include "Guids.h" // This is the file with the definition of the Guid
34+
// specific for this sample.
35+
36+
// shorthand macros for a more compact and manageable table
37+
#define OI_NOID guidOfficeIcon:msotcidNoIcon
38+
#define DIS_DEF DEFAULTDISABLED | DEFAULTINVISIBLE | DYNAMICVISIBILITY
39+
#define VIS_DEF COMMANDWELLONLY
40+
41+
42+
// The CMDS_SECTION section is where we the commands, menus and menu groups are defined.
43+
// This section uses a Guid to identify the package that provides the command defined
44+
// inside it.
45+
CMDS_SECTION guidcppCheckVisualStudioAddInPkg
46+
47+
// Inside this section we have different sub-sections: one for the menus, another
48+
// for the menu groups, one for the buttons (the actual commands), one for the combos
49+
// and the last one for the bitmaps used. Each element is identified by a command id that
50+
// is a unique pair of guid and numeric identifier; the guid part of the identifier is usually
51+
// called "command set" and is used to group different command inside a logically related
52+
// group; your package should define its own command set in order to avoid collisions
53+
// with command ids defined by other packages.
54+
55+
// This is the sub-section that defines the menus and toolbars.
56+
MENUS_BEGIN
57+
// To define an element in this group you need an ID, a parent group, a display priority,
58+
// a menu type, a name and a default text.
59+
60+
// NewMenu Relative to Group Priority Type Name Text
61+
guidcppCheckVisualStudioAddInCmdSet:cppCheckToolBar, guidcppCheckVisualStudioAddInCmdSet:cppCheckToolBar, 0x100, TOOLBAR, "cppCheckToolBar", "cppCheck Toolbar";
62+
63+
MENUS_END
64+
65+
// In this section you can define new menu groups. A menu group is a container for
66+
// other menus or buttons (commands); from a visual point of view you can see the
67+
// group as the part of a menu contained between two lines. The parent of a group
68+
// must be a menu.
69+
NEWGROUPS_BEGIN
70+
// NewGroup Parent Group Priority
71+
guidcppCheckVisualStudioAddInCmdSet:cppCheckMenuGroup, guidSHLMainMenu:IDM_VS_MENU_TOOLS, 0x0600;
72+
73+
guidcppCheckVisualStudioAddInCmdSet:cppCheckToolBarGroup, guidcppCheckVisualStudioAddInCmdSet:cppCheckToolBar, 0x100;
74+
75+
76+
NEWGROUPS_END
77+
78+
// Button section.
79+
// This section defines the elements the user can interact with, like a menu command or a button
80+
// or combo box in a toolbar.
81+
BUTTONS_BEGIN
82+
// To define a menu group you have to specify its ID, the parent menu and its display priority.
83+
// Some commands are not defined as shared, so they use our package CLSID
84+
// as the command set GUID. Also, by specifying blank for the FLAGS, the command is
85+
// default visible and enabled. Other valid values for FLAGS are the following:
86+
// DEFAULTDISABLED, DEFAULTINVISIBLE, DYNAMICVISIBILITY, TEXTCHANGES
87+
// These values for FLAGS can be or'ed together, e.g. "DEFAULTINVISIBLE | DYNAMICVISIBILITY"
88+
// If you do not want an image next to your command, set the image to "guidOfficeIcon:msotcidNoIcon"
89+
90+
// Command Parent Group Priority Image Type Visibility
91+
guidcppCheckVisualStudioAddInCmdSet:cmdidcppCheckConfig, guidcppCheckVisualStudioAddInCmdSet:cppCheckMenuGroup, 0x0100, guidcppCheckVisualStudioAddInCmdSet:bmpPic1, BUTTON, , "cppCheck Config";
92+
guidcppCheckVisualStudioAddInCmdSet:cmdidcppCheckParseFile, guidcppCheckVisualStudioAddInCmdSet:cppCheckMenuGroup, 0x0200, guidcppCheckVisualStudioAddInCmdSet:bmpPic2, BUTTON, , "cppCheck Parse File";
93+
guidcppCheckVisualStudioAddInCmdSet:cmdidcppCheckParseProject, guidcppCheckVisualStudioAddInCmdSet:cppCheckMenuGroup, 0x0300, guidcppCheckVisualStudioAddInCmdSet:bmpPic2, BUTTON, , "cppCheck Parse Project";
94+
guidcppCheckVisualStudioAddInCmdSet:cmdidcppCheckParseSolution, guidcppCheckVisualStudioAddInCmdSet:cppCheckMenuGroup, 0x0400, guidcppCheckVisualStudioAddInCmdSet:bmpPic2, BUTTON, , "cppCheck Parse Solution";
95+
96+
97+
guidcppCheckVisualStudioAddInCmdSet:cmdidMyZoom, guidcppCheckVisualStudioAddInCmdSet:cppCheckToolBarGroup, 0x100, guidOfficeIcon:msotcidZoom, BUTTON, , "cppCheck Config";
98+
99+
BUTTONS_END
100+
101+
// The bitmaps section is used to define the bitmaps that are used for the commands.
102+
BITMAPS_BEGIN
103+
// The bitmap id is defined in a way that is a little bit different from the others:
104+
// the declaration starts with a guid for the bitmap strip, then there is the resource id of the
105+
// bitmap strip containing the bitmaps and then there are the numeric ids of the elements used
106+
// inside a button definition. An important aspect of this declaration is that the element id
107+
// must be the actual index (1-based) of the bitmap inside the bitmap strip.
108+
109+
// Bitmap Bitmap Index, Bitmap Index, ...
110+
guidcppCheckVisualStudioAddInCmdSet:IDB_MENU_IMAGES, bmpPic1, bmpPic2, bmpPicSmile, bmpPicX, bmpPicArrows;
111+
BITMAPS_END
112+
113+
CMDS_END
114+
115+
// Within this section you can specify the set of commands defined somewhere else that your
116+
// packages uses; for instance if your package uses the standard ‘Copy’ command, you don’t
117+
// need to define it, because it is defined by the shell, but you have to use this section
118+
// of the CTC file to notify the shell that your package uses it using this section.
119+
120+
CMDUSED_SECTION
121+
122+
CMDUSED_END
123+
124+
// Inside this section, we have the ability to place menu groups inside some other menu or
125+
// menu / commands inside other groups.
126+
// For instance, it is possible to place one of VisualStudio's menus or commands inside one of our
127+
// groups or one of our groups inside a menu defined somewhere else.
128+
CMDPLACEMENT_SECTION
129+
// Command Group Priority
130+
131+
CMDPLACEMENT_END
132+
133+
134+
VISIBILITY_SECTION
135+
// Command GUID when visible
136+
137+
138+
139+
VISIBILITY_END
140+
141+
// This section is where you can associate a command with a keyboard shortcut; this association is
142+
// valid within a specific UI context, that is when the shell is inside a specific mode, e.g. during
143+
// debugging, editing a file or when the user is using a specific designer.
144+
KEYBINDINGS_SECTION
145+
// To define a binding, you have to specify the sequence of keys to press to activate the command
146+
// (keystate); the syntax to use is <key>[:<special keys>] where the special keys section can be
147+
// empty. The accepted special keys and their representation are:
148+
// Alt - A
149+
// Control - C
150+
// Shift - S
151+
// Windows Key - W
152+
// For example, if you want to define a binding for <Control>C the definition will be 'C':C; if the
153+
// binding is <Control><Alt>C, then the keybinding is 'C':AC.
154+
//
155+
// Notice that Visual Studio has a lot of components and commands, so it can be difficult to find a
156+
// key binding not used by somebody else; if the key bindings are conflicting only one will be used
157+
// and one problem is that the shell will not inform the user that a conflict was found. The only
158+
// way to detect the problem is to start Visual Studio under debugger, try to execute any command
159+
// and look if there is a message in the output window about a duplicated accelerator found.
160+
161+
// Command when available emulation keystate
162+
163+
KEYBINDINGS_END

‎cppCheckVisualStudioAddIn/Guids.cs‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Guids.cs
2+
// MUST match guids.h
3+
using System;
4+
5+
namespace Ambre.cppCheckVisualStudioAddIn
6+
{
7+
static class GuidList
8+
{
9+
public const string guidcppCheckVisualStudioAddInPkgString = "2d61439f-3473-46f4-b514-fcfa058992be";
10+
public const string guidcppCheckVisualStudioAddInCmdSetString = "835d0309-b686-4942-98d9-0e57fd96fd1a";
11+
12+
public static readonly Guid guidcppCheckVisualStudioAddInPkg = new Guid(guidcppCheckVisualStudioAddInPkgString);
13+
public static readonly Guid guidcppCheckVisualStudioAddInCmdSet = new Guid(guidcppCheckVisualStudioAddInCmdSetString);
14+
};
15+
}

‎cppCheckVisualStudioAddIn/Key.snk‎

596 Bytes
Binary file not shown.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// PkgCmdID.cs
2+
// MUST match PkgCmdID.h
3+
using System;
4+
5+
namespace Ambre.cppCheckVisualStudioAddIn
6+
{
7+
static class PkgCmdIDList
8+
{
9+
public const int cmdidcppCheckConfig = 0x2001;
10+
public const int cmdidcppCheckParseFile = 0x2002;
11+
public const int cmdidcppCheckParseProject = 0x2003;
12+
public const int cmdidcppCheckParseSolution = 0x2004;
13+
public const int cmdidMyZoom = 0x2005;
14+
15+
16+
};
17+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using System.Runtime.InteropServices;
4+
5+
// General Information about an assembly is controlled through the following
6+
// set of attributes. Change these attribute values to modify the information
7+
// associated with an assembly.
8+
[assembly: AssemblyTitle("cppCheckVisualStudioAddIn")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("Ambre")]
12+
[assembly: AssemblyProduct("cppCheckVisualStudioAddIn")]
13+
[assembly: AssemblyCopyright("")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
[assembly: ComVisible(true)]
17+
18+
// Version information for an assembly consists of the following four values:
19+
//
20+
// Major Version
21+
// Minor Version
22+
// Build Number
23+
// Revision
24+
//
25+
// You can specify all the values or you can default the Revision and Build Numbers
26+
// by using the '*' as shown below:
27+
28+
[assembly: AssemblyVersion("1.0.*")]
29+
[assembly: AssemblyFileVersion("1.0.0.0")]

‎cppCheckVisualStudioAddIn/Resources.Designer.cs‎

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)