@@ -5,14 +5,16 @@ import { connect } from 'react-redux';
5
5
6
6
import {
7
7
changeAssemblyFlavor ,
8
+ changeDemangleAssembly ,
8
9
changeEditor ,
10
+ changeHideAssemblerDirectives ,
9
11
changeKeybinding ,
10
12
changeOrientation ,
11
13
changeTheme ,
12
14
toggleConfiguration ,
13
15
} from './actions' ;
14
16
import State from './state' ;
15
- import { AssemblyFlavor , Editor , Orientation } from './types' ;
17
+ import { AssemblyFlavor , DemangleAssembly , Editor , HideAssemblerDirectives , Orientation } from './types' ;
16
18
17
19
const keybindingOptions = ACE_KEYBINDINGS . map ( t => < option value = { t } key = { t } > { t } </ option > ) ;
18
20
const themeOptions = ACE_THEMES . map ( t => < option value = { t } key = { t } > { t } </ option > ) ;
@@ -49,6 +51,8 @@ class Configuration extends React.PureComponent<ConfigurationProps> {
49
51
private onChangeTheme = e => this . props . changeTheme ( e . target . value ) ;
50
52
private onChangeOrientation = e => this . props . changeOrientation ( e . target . value ) ;
51
53
private onChangeAssemblyFlavor = e => this . props . changeAssemblyFlavor ( e . target . value ) ;
54
+ private onChangeDemangleAssembly = e => this . props . changeDemangleAssembly ( e . target . value ) ;
55
+ private onChangeHideAssemblerDirectives = e => this . props . changeHideAssemblerDirectives ( e . target . value ) ;
52
56
private onKeyup = e => {
53
57
if ( e . keyCode === ESCAPE_KEYCODE && ! e . defaultPrevented ) {
54
58
e . preventDefault ( ) ;
@@ -65,7 +69,15 @@ class Configuration extends React.PureComponent<ConfigurationProps> {
65
69
}
66
70
67
71
public render ( ) {
68
- const { editor, keybinding, theme, orientation, assemblyFlavor, toggleConfiguration } = this . props ;
72
+ const { editor,
73
+ keybinding,
74
+ theme,
75
+ orientation,
76
+ assemblyFlavor,
77
+ demangleAssembly,
78
+ hideAssemblerDirectives,
79
+ toggleConfiguration,
80
+ } = this . props ;
69
81
70
82
const advancedEditor = editor === Editor . Advanced ;
71
83
@@ -118,6 +130,22 @@ class Configuration extends React.PureComponent<ConfigurationProps> {
118
130
< option value = { AssemblyFlavor . Intel } > Intel</ option >
119
131
</ ConfigurationSelect >
120
132
133
+ < ConfigurationSelect what = "demangleAssembly"
134
+ label = "Demangle Symbols"
135
+ defaultValue = { demangleAssembly }
136
+ onChange = { this . onChangeDemangleAssembly } >
137
+ < option value = { DemangleAssembly . Demangle } > Demangled</ option >
138
+ < option value = { DemangleAssembly . Mangle } > Mangled</ option >
139
+ </ ConfigurationSelect >
140
+
141
+ < ConfigurationSelect what = "hideAssemblerDirectives"
142
+ label = "Assembler Directives"
143
+ defaultValue = { hideAssemblerDirectives }
144
+ onChange = { this . onChangeHideAssemblerDirectives } >
145
+ < option value = { HideAssemblerDirectives . Hide } > Remove</ option >
146
+ < option value = { HideAssemblerDirectives . Show } > Display</ option >
147
+ </ ConfigurationSelect >
148
+
121
149
< div className = "configuration-actions" >
122
150
< button onClick = { toggleConfiguration } > Done</ button >
123
151
</ div >
@@ -132,16 +160,36 @@ interface ConfigurationProps {
132
160
changeTheme : ( _ : string ) => any ;
133
161
changeOrientation : ( Orientation ) => any ;
134
162
changeAssemblyFlavor : ( AssemblyFlavor ) => any ;
163
+ changeDemangleAssembly : ( DemangleAssembly ) => any ;
164
+ changeHideAssemblerDirectives : ( HideAssemblerDirectives ) => any ;
135
165
editor : Editor ;
136
166
keybinding : string ;
137
167
theme : string ;
138
168
orientation : Orientation ;
139
169
assemblyFlavor : AssemblyFlavor ;
170
+ demangleAssembly : DemangleAssembly ;
171
+ hideAssemblerDirectives : HideAssemblerDirectives ;
140
172
toggleConfiguration : ( ) => any ;
141
173
}
142
174
143
- const mapStateToProps = ( { configuration : { editor, keybinding, theme, orientation, assemblyFlavor } } : State ) => (
144
- { editor, keybinding, theme, orientation, assemblyFlavor }
175
+ const mapStateToProps = ( { configuration : {
176
+ editor,
177
+ keybinding,
178
+ theme,
179
+ orientation,
180
+ assemblyFlavor,
181
+ demangleAssembly,
182
+ hideAssemblerDirectives} ,
183
+ } : State ) => (
184
+ {
185
+ editor,
186
+ keybinding,
187
+ theme,
188
+ orientation,
189
+ assemblyFlavor,
190
+ demangleAssembly,
191
+ hideAssemblerDirectives,
192
+ }
145
193
) ;
146
194
147
195
const mapDispatchToProps = ( {
@@ -150,6 +198,8 @@ const mapDispatchToProps = ({
150
198
changeTheme,
151
199
changeOrientation,
152
200
changeAssemblyFlavor,
201
+ changeDemangleAssembly,
202
+ changeHideAssemblerDirectives,
153
203
toggleConfiguration,
154
204
} ) ;
155
205
0 commit comments