Subversion Repositories DevTools

Rev

Rev 2122 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2122 Rev 2126
Line 39... Line 39...
39
      private const string MI_ModifyDocumentOptions      = "&Modify EA_DocGen Options";
39
      private const string MI_ModifyDocumentOptions      = "&Modify EA_DocGen Options";
40
      private const string MI_GenModelLayoutForDesignDoc = "&Generate Model Layout For Design Document";
40
      private const string MI_GenModelLayoutForDesignDoc = "&Generate Model Layout For Design Document";
41
      private const string MI_GenBasicModelLayout        = "&Generate Basic Document Model Layout";
41
      private const string MI_GenBasicModelLayout        = "&Generate Basic Document Model Layout";
42
      private const string MI_GenStandardViews           = "&Generate Standard Views";
42
      private const string MI_GenStandardViews           = "&Generate Standard Views";
43
      private const string MI_About                      = "&About...";
43
      private const string MI_About                      = "&About...";
-
 
44
      private const string MI_TagHelp                    = "&Tag Help";
44
 
45
 
45
      private string[] MI_RootMenu = new string[] { MI_GenDocFromModelLayout, 
46
      private string[] MI_RootMenu = new string[] { MI_GenDocFromModelLayout, 
46
                                                    MI_Separator,
47
                                                    MI_Separator,
47
                                                    MI_CopyGUIDToClipboard,
48
                                                    MI_CopyGUIDToClipboard,
48
                                                    MI_UsingCopiedGUID, // sub-menu
49
                                                    MI_UsingCopiedGUID, // sub-menu
Line 60... Line 61...
60
                                                    MI_GenModelLayoutForDesignDoc,
61
                                                    MI_GenModelLayoutForDesignDoc,
61
                                                    MI_GenBasicModelLayout,
62
                                                    MI_GenBasicModelLayout,
62
                                                    MI_GenStandardViews,
63
                                                    MI_GenStandardViews,
63
                                                    MI_Separator,
64
                                                    MI_Separator,
64
                                                    MI_MiscUtils,       // sub-menu
65
                                                    MI_MiscUtils,       // sub-menu
-
 
66
                                                    MI_Separator,
-
 
67
                                                    MI_TagHelp,
-
 
68
                                                    MI_Separator,
65
                                                    MI_About };
69
                                                    MI_About };
66
 
70
 
67
      //////////////////////////////////////////////////////////////////////////////////
71
      //////////////////////////////////////////////////////////////////////////////////
68
      /// Using Copied GUID sub-menu
72
      /// Using Copied GUID sub-menu
69
      //////////////////////////////////////////////////////////////////////////////////
73
      //////////////////////////////////////////////////////////////////////////////////
Line 134... Line 138...
134
         EA_Repository = Repository;
138
         EA_Repository = Repository;
135
         Repository.CreateOutputTab(GUI_OUTPUT_TAB_NAME);
139
         Repository.CreateOutputTab(GUI_OUTPUT_TAB_NAME);
136
         Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
140
         Repository.EnsureOutputVisible(GUI_OUTPUT_TAB_NAME);
137
      }
141
      }
138
 
142
 
-
 
143
      /// <summary>
-
 
144
      /// Event called when user clicks on an entry in the output
-
 
145
      /// window. If an element has been associated with the message, it will
-
 
146
      /// be automatically selected in the project browser.
-
 
147
      /// </summary>
-
 
148
      /// <param name="repository"></param>
-
 
149
      /// <param name="outputTabNea"></param>
-
 
150
      /// <param name="lineText"></param>
-
 
151
      /// <param name="lineIdentifier"></param>
-
 
152
      public void EA_OnOutputItemClicked( EA.Repository repository,
-
 
153
         String outputTabName,
-
 
154
         String lineText,
-
 
155
         Int32 identifier)
-
 
156
      {
-
 
157
         if ((outputTabName == GUI_OUTPUT_TAB_NAME) && (identifier > 0))
-
 
158
         {
-
 
159
            try
-
 
160
            {
-
 
161
               EA.Package package = repository.GetPackageByID(identifier);
-
 
162
               repository.ShowInProjectView(package);
-
 
163
            }
-
 
164
            catch
-
 
165
            {
-
 
166
               try
-
 
167
               {
-
 
168
                  EA.Element element = repository.GetElementByID(identifier);
-
 
169
                  if (element.MetaType == "Package")
-
 
170
                  {
-
 
171
                     EA.Package package = repository.GetPackageByID(element.PackageID);
-
 
172
                     repository.ShowInProjectView(package);
-
 
173
                  }
-
 
174
                  else
-
 
175
                  {
-
 
176
                     repository.ShowInProjectView(element);
-
 
177
                  }
-
 
178
               }
-
 
179
               catch
-
 
180
               {
-
 
181
                  try
-
 
182
                  {
-
 
183
                     EA.Diagram diagram = repository.GetDiagramByID(identifier);
-
 
184
                     repository.ShowInProjectView(diagram);
-
 
185
                  }
-
 
186
                  catch
-
 
187
                  {
-
 
188
                  }
-
 
189
               }
-
 
190
            }
-
 
191
         }
-
 
192
      }
139
 
193
 
140
 
194
 
141
 
195
 
142
      //Called when user Click Add-Ins Menu item from within EA.
196
      //Called when user Click Add-Ins Menu item from within EA.
143
      //Populates the Menu with our desired selections.
197
      //Populates the Menu with our desired selections.
Line 315... Line 369...
315
 
369
 
316
            case MI_AddTestTraceabilityElement:
370
            case MI_AddTestTraceabilityElement:
317
               EA_Utilities.AddTestTraceabilityElement();
371
               EA_Utilities.AddTestTraceabilityElement();
318
               break;
372
               break;
319
 
373
 
-
 
374
            case MI_TagHelp:
-
 
375
               FormatTagHelp aFormatTagHelp = new FormatTagHelp();
-
 
376
               aFormatTagHelp.Show();
-
 
377
               break;
-
 
378
 
320
            case MI_About:
379
            case MI_About:
321
               AboutForm anAbout = new AboutForm();
380
               AboutForm anAbout = new AboutForm();
322
               anAbout.ShowDialog();
381
               anAbout.ShowDialog();
323
               break;
382
               break;
324
 
383