forked from gphilippot/purebasic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Issues.pb
537 lines (421 loc) · 19.7 KB
/
Issues.pb
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
;--------------------------------------------------------------------------------------------
; Copyright (c) Fantaisie Software. All rights reserved.
; Dual licensed under the GPL and Fantaisie Software licenses.
; See LICENSE and LICENSE-FANTAISIE in the project root for license information.
;--------------------------------------------------------------------------------------------
; Note: the issues stuff has its own prefs panel, so the data is stored in
; global variables/lists as well for better management
Structure DisplayIssue
Name$
Text$
File$ ; full file name
Line.l
Priority.l
EndStructure
Global NewList DisplayedIssues.DisplayIssue()
Global LastIssueExport$
Procedure InitIssueList()
Style = #STYLE_FirstIssue
Marker = #MARKER_FirstIssue
ForEach Issues()
; Create the RegEx
; Note: when in the preferences, the regex is checked for validity, so we do not expect any
; errors at this point. It could only be an error if somebody manually edited the prefs,
; so just ignore this then (a 0 regex is correctly handled later)
Issues()\Regex = CreateRegularExpression(#PB_Any, Issues()\Expression$)
; Assign styles and markers
Issues()\Marker = -1
Issues()\Style = -1
If Issues()\CodeMode = 1
Issues()\Style = Style
Style + 1
ElseIf Issues()\CodeMode = 2
; there is a limit on the available markers
If Marker <= #MARKER_LastIssue
Issues()\Marker = Marker
Marker + 1
EndIf
EndIf
Next Issues()
EndProcedure
Procedure ClearIssueList()
ForEach Issues()
If Issues()\Regex <> 0
FreeRegularExpression(Issues()\Regex)
EndIf
Next Issues()
EndProcedure
; Scan for issues in a comment (minus the ; character)
; If IsHighlight is #true, returns issues in position order and without any overlap (and only Issues with Style<>-1)
; If IsHighlight is #false, returns issues in any order and with possible overlap
Procedure ScanCommentIssues(Comment$, List Found.FoundIssue(), IsHighlight)
ClearList(Found())
ForEach Issues()
Regex = Issues()\Regex
If Regex And (IsHighlight = 0 Or Issues()\Style <> -1) And ExamineRegularExpression(Regex, Comment$)
While NextRegularExpressionMatch(Regex)
AddElement(Found())
Found()\Text$ = RegularExpressionNamedGroup(Regex, "display") ; first look for a named group with display text
If Found()\Text$ = ""
Found()\Text$ = RegularExpressionMatchString(Regex) ; if no such group exists, display all text
EndIf
Found()\Text$ = Trim(ReplaceString(Found()\Text$, Chr(9), " "))
Found()\Position = RegularExpressionMatchPosition(Regex)
GroupPosition = RegularExpressionNamedGroupPosition(Regex, "mark") ; look for a group to define the marked string
If GroupPosition > 0
Found()\Position + GroupPosition - 1
Found()\Length = RegularExpressionNamedGroupLength(Regex, "mark")
Else
Found()\Length = RegularExpressionMatchLength(Regex)
EndIf
Found()\Priority = Issues()\Priority
Found()\Issue = ListIndex(Issues())
Found()\Style = Issues()\Style
Wend
EndIf
Next Issues()
If ListSize(Found()) <= 1 Or IsHighlight = #False
ProcedureReturn ; nothing more to do
EndIf
; sort by priority (low value means high priority)
SortStructuredList(Found(), #PB_Sort_Ascending, OffsetOf(FoundIssue\Priority), #PB_Long)
; look for overlap and eliminate the lower priority if any
ForEach Found()
*Current.FoundIssue = @Found()
PushListPosition(Found())
; look further ahead
While NextElement(Found())
If Not (Found()\Position >= *Current\Position + *Current\Length Or
Found()\Position + Found()\Length <= *Current\Position)
DeleteElement(Found()) ; conflict
EndIf
Wend
PopListPosition(Found())
Next Found()
; now order by position
SortStructuredList(Found(), #PB_Sort_Ascending, OffsetOf(FoundIssue\Position), #PB_Long)
EndProcedure
Procedure AddIssuesFromParser(File$, *Parser.ParserData, *Source.SourceFile)
; find out what to filter by
If SelectedIssue <= 1 Or SelectedIssue = 7
PriorityFilter = -1
IssueFilter = -1
ElseIf SelectedIssue <= 6
; a priority is selected, so display all items with the same or higher (=lower value) priorit PriorityLimit = SelectedIssue-1
PriorityFilter = SelectedIssue-2
IssueFilter = -1
Else
; a specific issue is selected
PriorityFilter = -1
IssueFilter = SelectedIssue-8
EndIf
; ensure it is sorted (does nothing if already sorted)
SortParserData(*Parser, *Source)
; walk the sorted issue list for fast access
*Item.SourceItem = *Parser\SortedIssues
While *Item
If (IssueFilter = -1 Or IssueFilter = *Item\Issue) And SelectElement(Issues(), *Item\Issue)
If (PriorityFilter = -1 Or Issues()\Priority = PriorityFilter) And Issues()\InTool
; add to the list
AddElement(DisplayedIssues())
DisplayedIssues()\Name$ = Issues()\Name$
DisplayedIssues()\Text$ = *Item\Name$
DisplayedIssues()\File$ = File$
DisplayedIssues()\Line = *Item\SortedLine + 1 ; the parser data has 0-based lines
DisplayedIssues()\Priority = Issues()\Priority
EndIf
EndIf
*Item = *Item\NextSorted
Wend
EndProcedure
Procedure UpdateIssueList()
If IssueToolOpen And *ActiveSource
; remember old selection
OldIndex = GetGadgetState(#GADGET_Issues_List)
If OldIndex <> -1 And SelectElement(DisplayedIssues(), OldIndex)
OldIssue.DisplayIssue = DisplayedIssues()
EndIf
ClearList(DisplayedIssues())
If IssueMultiFile = 0 And *ActiveSource <> *ProjectInfo And *ActiveSource\IsCode
; scan only the current file
AddIssuesFromParser(*ActiveSource\FileName$, @*ActiveSource\Parser, *ActiveSource)
IsProjectDisplay = 0
ElseIf IssueMultiFile And (*ActiveSource = *ProjectInfo Or *ActiveSource\ProjectFile)
; scan all project files (open and closed)
ForEach ProjectFiles()
If ProjectFiles()\Source
AddIssuesFromParser(ProjectFiles()\FileName$, @ProjectFiles()\Source\Parser, ProjectFiles()\Source)
Else
AddIssuesFromParser(ProjectFiles()\FileName$, @ProjectFiles()\Parser, 0)
EndIf
Next ProjectFiles()
IsProjectDisplay = 1
ElseIf IssueMultiFile
; scan all non-project files that are currently open
ForEach FileList()
If @FileList() <> *ProjectInfo And FileList()\ProjectFile = 0 And FileList()\IsCode
AddIssuesFromParser(FileList()\FileName$, @FileList()\Parser, @FileList())
EndIf
Next FileList()
ChangeCurrentElement(FileList(), *ActiveSource) ; important!
IsProjectDisplay = 0
EndIf
; check if there is anything to do
If ListSize(DisplayedIssues()) = 0
ClearGadgetItems(#GADGET_Issues_List)
DisableGadget(#GADGET_Issues_Export, 1)
ProcedureReturn
EndIf
; do some sorting
; Note: list sorting is stable, so we can repeat the sort to sort by multiple categories
; (start with the least important sort category first)
If IssueMultiFile
SortStructuredList(DisplayedIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\Line), #PB_Long)
SortStructuredList(DisplayedIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\File$), #PB_String)
SortStructuredList(DisplayedIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\Priority), #PB_Long)
Else
SortStructuredList(DisplayedIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\Line), #PB_Long)
SortStructuredList(DisplayedIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\Priority), #PB_Long)
EndIf
; update the list
NewIndex = -1
; Lock the list update, as on GTK2 it's really slow
; Note: we may not call SetGadgetState() after this!
CompilerIf #CompileLinux
*tree_model = gtk_tree_view_get_model_(GadgetID(#GADGET_Issues_List))
g_object_ref_(*tree_model) ; must be ref'ed or it is destroyed
gtk_tree_view_set_model_(GadgetID(#GADGET_Issues_List), #Null) ; disconnect the model for a faster update
CompilerEndIf
ClearGadgetItems(#GADGET_Issues_List)
ForEach DisplayedIssues()
; get the file name to display
If IsProjectDisplay
File$ = CreateRelativePath(GetPathPart(ProjectFile$), DisplayedIssues()\File$)
ElseIf DisplayedIssues()\File$ = ""
File$ = Language("FileStuff", "NewSource")
Else
File$ = GetFilePart(DisplayedIssues()\File$) ; just use the name as it is in the open file list
EndIf
; add the item
Text$ = DisplayedIssues()\Name$ + Chr(10) +
DisplayedIssues()\Text$ + Chr(10) +
Str(DisplayedIssues()\Line) + Chr(10) +
File$ + Chr(10) +
Language("ToolsPanel", "Prio" + DisplayedIssues()\Priority)
AddGadgetItem(#GADGET_Issues_List, -1, Text$, OptionalImageID(#IMAGE_Priority0 + DisplayedIssues()\Priority))
; check if this was our last selection
If NewIndex = -1 And OldIndex <> -1 And
DisplayedIssues()\Name$ = OldIssue\Name$ And
DisplayedIssues()\Text$ = OldIssue\Text$ And
DisplayedIssues()\File$ = OldIssue\File$ And
DisplayedIssues()\Line = OldIssue\Line
NewIndex = ListIndex(DisplayedIssues())
EndIf
Next DisplayedIssues()
CompilerIf #CompileLinux
gtk_tree_view_set_model_(GadgetID(#GADGET_Issues_List), *tree_model) ; reconnect the model
g_object_unref_(*tree_model) ; release reference
CompilerEndIf
; restore selection
If NewIndex <> -1
SetGadgetState(#GADGET_Issues_List, NewIndex)
EndIf
DisableGadget(#GADGET_Issues_Export, 0)
EndIf
EndProcedure
Procedure.s CsvEncode(String$)
If FindString(String$, ",") Or FindString(String$, Chr(34))
ProcedureReturn Chr(34) + ReplaceString(String$, Chr(34), Chr(34)+Chr(34)) + Chr(34)
Else
ProcedureReturn String$
EndIf
EndProcedure
Procedure ExportIssueList()
If LastIssueExport$ <> ""
Path$ = LastIssueExport$
ElseIf *ActiveSource = *ProjectInfo Or *ActiveSource\ProjectFile
Path$ = GetPathPart(ProjectFile$)
Else
Path$ = SourcePath$
EndIf
FileName$ = SaveFileRequester(Language("FileStuff","ExportIssueTitle"), Path$, Language("FileStuff","ExportIssuePattern"), 0)
If FileName$ <> ""
If GetExtensionPart(GetFilePart(FileName$)) = "" And SelectedFilePattern() = 0
FileName$ + ".csv"
EndIf
If FileSize(FileName$) > -1 ; file exist check
If MessageRequester(#ProductName$, Language("FileStuff","FileExists")+#NewLine+Language("FileStuff","OverWrite"), #PB_MessageRequester_YesNo|#FLAG_Warning) = #PB_MessageRequester_No
ProcedureReturn ; abort
EndIf
EndIf
LastIssueExport$ = FileName$ ; remember for next time
; create a local copy of the list to sort it for export
Protected NewList ExportIssues.DisplayIssue()
CopyList(DisplayedIssues(), ExportIssues())
; sort by file and line
SortStructuredList(ExportIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\Line), #PB_Long)
SortStructuredList(ExportIssues(), #PB_Sort_Ascending, OffsetOf(DisplayIssue\File$), #PB_String)
If CreateFile(#FILE_ExportIssues, FileName$)
; write header
WriteStringN(#FILE_ExportIssues,
CsvEncode(Language("Misc", "File")) + "," +
CsvEncode(Language("Misc", "Line")) + "," +
CsvEncode(Language("ToolsPanel", "IssueName")) + "," +
CsvEncode(Language("ToolsPanel", "IssueText")) + "," +
CsvEncode(Language("ToolsPanel", "Priority")))
; write content
ForEach ExportIssues()
WriteStringN(#FILE_ExportIssues,
CsvEncode(ExportIssues()\File$) + "," +
CsvEncode(Str(ExportIssues()\Line)) + "," +
CsvEncode(ExportIssues()\Name$) + "," +
CsvEncode(ExportIssues()\Text$) + "," +
CsvEncode(Language("ToolsPanel", "Prio" + ExportIssues()\Priority)))
Next ExportIssues()
CloseFile(#FILE_ExportIssues)
Else
MessageRequester(#ProductName$, Language("FileStuff","CreateError"), #FLAG_Error)
EndIf
EndIf
EndProcedure
Procedure Issues_CreateFunction(*Entry.ToolsPanelEntry, PanelItemID)
ComboBoxGadget(#GADGET_Issues_Filter, 0, 0, 0, 0, #PB_ComboBox_Image)
AddGadgetItem(#GADGET_Issues_Filter, -1, Language("ToolsPanel", "AllIssues"), OptionalImageID(#IMAGE_AllIssues))
AddGadgetItem(#GADGET_Issues_Filter, -1, "")
For i = 0 To 4
AddGadgetItem(#GADGET_Issues_Filter, -1, Language("ToolsPanel", "Priority") + ": " + Language("ToolsPanel", "Prio" + i), OptionalImageID(#IMAGE_Priority0 + i))
Next i
AddGadgetItem(#GADGET_Issues_Filter, -1, "")
ForEach Issues()
AddGadgetItem(#GADGET_Issues_Filter, -1, Issues()\Name$, OptionalImageID(#IMAGE_Priority0 + Issues()\Priority))
Next Issues()
; sanitize the selection value
; (some values in the combobox are just empty for better look)
If SelectedIssue < 0 Or SelectedIssue = 1 Or SelectedIssue = 7 Or SelectedIssue >= CountGadgetItems(#GADGET_Issues_Filter)
SelectedIssue = 0
EndIf
SetGadgetState(#GADGET_Issues_Filter, SelectedIssue)
ListIconGadget(#GADGET_Issues_List, 0, 0, 0, 0, Language("ToolsPanel", "IssueName"), IssuesCol1, #PB_ListIcon_FullRowSelect|#PB_ListIcon_AlwaysShowSelection)
AddGadgetColumn(#GADGET_Issues_List, 1, Language("ToolsPanel", "IssueText"), IssuesCol2)
AddGadgetColumn(#GADGET_Issues_List, 2, Language("Misc", "Line"), IssuesCol3)
AddGadgetColumn(#GADGET_Issues_List, 3, Language("Misc", "File"), IssuesCol4)
AddGadgetColumn(#GADGET_Issues_List, 4, Language("ToolsPanel", "Priority"), IssuesCol5)
ButtonImageGadget(#GADGET_Issues_SingleFile, 0, 0, 0, 0, ImageID(#IMAGE_IssueSingleFile), #PB_Button_Toggle)
ButtonImageGadget(#GADGET_Issues_MultiFile, 0, 0, 0, 0, ImageID(#IMAGE_IssueMultiFile), #PB_Button_Toggle)
ButtonImageGadget(#GADGET_Issues_Export, 0, 0, 0, 0, ImageID(#IMAGE_IssueExport))
GadgetToolTip(#GADGET_Issues_SingleFile, Language("ToolsPanel", "SingleFile"))
GadgetToolTip(#GADGET_Issues_MultiFile, Language("ToolsPanel", "MultiFile"))
GadgetToolTip(#GADGET_Issues_Export, Language("ToolsPanel", "Export"))
If IssueMultiFile
SetGadgetState(#GADGET_Issues_MultiFile, 1)
Else
SetGadgetState(#GADGET_Issues_SingleFile, 1)
EndIf
If *Entry\IsSeparateWindow = 0 Or NoIndependentToolsColors = 0
ToolsPanel_ApplyColors(#GADGET_Issues_List)
EndIf
IssueToolOpen = 1
UpdateIssueList()
EndProcedure
Procedure Issues_DestroyFunction(*Entry.ToolsPanelEntry)
; store column sizes for preferences
IssuesCol1 = GetGadgetItemAttribute(#GADGET_Issues_List, -1, #PB_ListIcon_ColumnWidth, 0)
IssuesCol2 = GetGadgetItemAttribute(#GADGET_Issues_List, -1, #PB_ListIcon_ColumnWidth, 1)
IssuesCol3 = GetGadgetItemAttribute(#GADGET_Issues_List, -1, #PB_ListIcon_ColumnWidth, 2)
IssuesCol4 = GetGadgetItemAttribute(#GADGET_Issues_List, -1, #PB_ListIcon_ColumnWidth, 3)
IssuesCol5 = GetGadgetItemAttribute(#GADGET_Issues_List, -1, #PB_ListIcon_ColumnWidth, 4)
IssueToolOpen = 0
EndProcedure
Procedure Issues_ResizeHandler(*Entry.ToolsPanelEntry, PanelWidth, PanelHeight)
GetRequiredSize(#GADGET_Issues_SingleFile, @Width.l, @Height.l)
FilterHeight = GetRequiredHeight(#GADGET_Issues_Filter)
CompilerIf #CompileWindows
Space = 3
CompilerElse
Space = 6 ; looks better on Linux/OSX with some more space
CompilerEndIf
If *Entry\IsSeparateWindow
; Small hack: If there is enough space, place the buttons next to the 'StayOnTop' checkbox
If #DEFAULT_CanWindowStayOnTop
GetRequiredSize(*Entry\ToolStayOnTop, @StayOnTopWidth.l, @StayOnTopHeight.l)
If StayOnTopWidth < PanelWidth-10-3*Width-2*Space
PanelHeight = WindowHeight(*Entry\ToolWindowID)
ResizeGadget(*Entry\ToolStayOnTop, #PB_Ignore, PanelHeight-5-Height+(Height-StayOnTopHeight)/2, StayOnTopWidth, #PB_Ignore)
EndIf
EndIf
ResizeGadget(#GADGET_Issues_Filter, 5, 5, PanelWidth-10, FilterHeight)
ResizeGadget(#GADGET_Issues_List, 5, 10+FilterHeight, PanelWidth-10, PanelHeight-20-FilterHeight-Height)
ResizeGadget(#GADGET_Issues_SingleFile, PanelWidth-5-3*Width-2*Space, PanelHeight-Height-5, Width, Height)
ResizeGadget(#GADGET_Issues_MultiFile, PanelWidth-5-2*Width-Space, PanelHeight-Height-5, Width, Height)
ResizeGadget(#GADGET_Issues_Export, PanelWidth-5-Width, PanelHeight-Height-5, Width, Height)
Else
ResizeGadget(#GADGET_Issues_Filter, 0, 0, PanelWidth, FilterHeight)
ResizeGadget(#GADGET_Issues_List, 0, FilterHeight+1, PanelWidth, PanelHeight-FilterHeight-7-Height)
ResizeGadget(#GADGET_Issues_SingleFile, PanelWidth-3*Width-2*Space, PanelHeight-Height-2, Width, Height)
ResizeGadget(#GADGET_Issues_MultiFile, PanelWidth-2*Width-Space, PanelHeight-Height-2, Width, Height)
ResizeGadget(#GADGET_Issues_Export, PanelWidth-Width, PanelHeight-Height-2, Width, Height)
EndIf
EndProcedure
Procedure Issues_EventHandler(*Entry.ToolsPanelEntry, EventGadgetID)
Select EventGadgetID
Case #GADGET_Issues_Filter
NewIssue = GetGadgetState(#GADGET_Issues_Filter)
If NewIssue < 0 Or NewIssue = 1 Or NewIssue = 7
; empty slots for better display
NewIssue = 0
SetGadgetState(#GADGET_Issues_Filter, 0)
EndIf
If NewIssue <> SelectedIssue
SelectedIssue = NewIssue
UpdateIssueList()
EndIf
Case #GADGET_Issues_List
If EventType() = #PB_EventType_LeftDoubleClick
Index = GetGadgetState(#GADGET_Issues_List)
If Index <> -1 And SelectElement(DisplayedIssues(), Index)
; Note: switching the source may cause a re-filling of the issue list, so get the values first
File$ = DisplayedIssues()\File$
Line = DisplayedIssues()\Line
If LoadSourceFile(File$, 1) ; will switch if already loaded
ChangeActiveLine(Line, -5)
EndIf
EndIf
EndIf
Case #GADGET_Issues_SingleFile
If IssueMultiFile
SetGadgetState(#GADGET_Issues_MultiFile, 0)
SetGadgetState(#GADGET_Issues_SingleFile, 1)
IssueMultiFile = #False
UpdateIssueList()
Else
; we want to act the two buttons to act like an option group, so override this change
SetGadgetState(#GADGET_Issues_SingleFile, 1)
EndIf
Case #GADGET_Issues_MultiFile
If IssueMultiFile = 0
SetGadgetState(#GADGET_Issues_MultiFile, 1)
SetGadgetState(#GADGET_Issues_SingleFile, 0)
IssueMultiFile = #True
UpdateIssueList()
Else
; we want to act the two buttons to act like an option group, so override this change
SetGadgetState(#GADGET_Issues_MultiFile, 1)
EndIf
Case #GADGET_Issues_Export
ExportIssueList()
EndSelect
EndProcedure
;- Initialisation code
; This will make this Tool available to the editor
;
Issues_VT.ToolsPanelFunctions
Issues_VT\CreateFunction = @Issues_CreateFunction()
Issues_VT\DestroyFunction = @Issues_DestroyFunction()
Issues_VT\ResizeHandler = @Issues_ResizeHandler()
Issues_VT\EventHandler = @Issues_EventHandler()
AddElement(AvailablePanelTools())
AvailablePanelTools()\FunctionsVT = Issues_VT
AvailablePanelTools()\NeedDestroyFunction = 1
AvailablePanelTools()\ToolID$ = "Issues"
AvailablePanelTools()\PanelTitle$ = "IssuesShort"
AvailablePanelTools()\ToolName$ = "IssuesLong"