File tree Expand file tree Collapse file tree 3 files changed +56
-46
lines changed
External/Plugins/CodeRefactor Expand file tree Collapse file tree 3 files changed +56
-46
lines changed Original file line number Diff line number Diff line change 113
113
<Compile Include =" Provider\MovingHelper.cs" />
114
114
<Compile Include =" Provider\RefactoringHelper.cs" />
115
115
<Compile Include =" Provider\UserInterfaceManager.cs" />
116
+ <Compile Include =" RefactorItem.cs" />
116
117
<Compile Include =" Settings.cs" />
117
118
</ItemGroup >
118
119
<ItemGroup >
Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
using System . ComponentModel ;
4
- using System . Drawing ;
5
4
using System . IO ;
6
5
using System . Text . RegularExpressions ;
7
6
using System . Windows . Forms ;
@@ -690,50 +689,5 @@ void OnAddRefactorOptions(List<ICompletionListItem> list)
690
689
}
691
690
692
691
#endregion
693
-
694
- }
695
-
696
- class RefactorItem : ICompletionListItem
697
- {
698
- ToolStripItem item ;
699
- string label ;
700
- Bitmap icon ;
701
-
702
- public static void AddItemToList ( ToolStripMenuItem item , List < ICompletionListItem > list )
703
- {
704
- if ( item . Enabled )
705
- list . Add ( new RefactorItem ( item ) ) ;
706
- }
707
-
708
- public RefactorItem ( ToolStripItem item )
709
- {
710
- this . item = item ;
711
- label = Regex . Replace ( item . Text , "[&.]" , string . Empty ) ;
712
- icon = new Bitmap ( item . Image ?? PluginBase . MainForm . FindImage ( "452" ) ) ; //452, 473
713
- }
714
-
715
- public string Description
716
- {
717
- get { return label ; /*TextHelper.GetString("ASCompletion.Info.GeneratorTemplate");*/ }
718
- }
719
-
720
- public Bitmap Icon
721
- {
722
- get { return icon ; }
723
- }
724
-
725
- public string Label
726
- {
727
- get { return label ; }
728
- }
729
-
730
- public string Value
731
- {
732
- get
733
- {
734
- item . PerformClick ( ) ;
735
- return null ;
736
- }
737
- }
738
692
}
739
693
}
Original file line number Diff line number Diff line change
1
+ using System . Collections . Generic ;
2
+ using System . Drawing ;
3
+ using System . Text . RegularExpressions ;
4
+ using System . Windows . Forms ;
5
+ using PluginCore ;
6
+ using PluginCore . Localization ;
7
+
8
+ namespace CodeRefactor
9
+ {
10
+ class RefactorItem : ICompletionListItem
11
+ {
12
+ Bitmap icon ;
13
+ string description ;
14
+ string label ;
15
+ ToolStripItem item ;
16
+
17
+ public static void AddItemToList ( ToolStripItem item , List < ICompletionListItem > list )
18
+ {
19
+ if ( item . Enabled )
20
+ list . Add ( new RefactorItem ( item ) ) ;
21
+ }
22
+
23
+ public RefactorItem ( ToolStripItem item )
24
+ {
25
+ this . item = item ;
26
+ label = Regex . Replace ( item . Text , "[&.]" , string . Empty ) ;
27
+ description = TextHelper . GetString ( "Label.Refactor" ) . Replace ( "&" , string . Empty ) ;
28
+ icon = new Bitmap ( item . Image ?? PluginBase . MainForm . FindImage ( "452" ) ) ; //452 or 473
29
+ }
30
+
31
+ public string Description
32
+ {
33
+ get { return description ; }
34
+ }
35
+
36
+ public Bitmap Icon
37
+ {
38
+ get { return icon ; }
39
+ }
40
+
41
+ public string Label
42
+ {
43
+ get { return label ; }
44
+ }
45
+
46
+ public string Value
47
+ {
48
+ get
49
+ {
50
+ item . PerformClick ( ) ;
51
+ return null ;
52
+ }
53
+ }
54
+ }
55
+ }
You can’t perform that action at this time.
0 commit comments