@@ -3,18 +3,14 @@ import Toolbar from 'mo/components/toolbar';
3
3
import { prefixClaName } from 'mo/common/className' ;
4
4
import { Header , Content } from 'mo/workbench/sidebar' ;
5
5
import {
6
- activityBarService ,
7
6
colorThemeService ,
8
7
explorerService ,
9
- editorService ,
10
8
} from 'mo' ;
11
- import { Button } from 'mo/components/button' ;
12
9
import { Select , Option } from 'mo/components/select' ;
13
10
import { IColorTheme } from 'mo/model/colorTheme' ;
14
11
import SearchTree from './searchTree' ;
15
- import { IEditorTab } from 'mo/model' ;
16
12
17
- interface ISearchPaneToolBar { }
13
+ interface ISearchPaneToolBar { }
18
14
19
15
const initialState = {
20
16
input : '' ,
@@ -46,7 +42,7 @@ type State = typeof initialState;
46
42
export default class SearchPane extends React . Component <
47
43
ISearchPaneToolBar ,
48
44
State
49
- > {
45
+ > {
50
46
state : State ;
51
47
52
48
constructor ( props ) {
@@ -106,34 +102,6 @@ export default class SearchPane extends React.Component<
106
102
107
103
render ( ) {
108
104
const { toolbar } = this . state ;
109
-
110
- const addABar = function ( ) {
111
- const id = Math . random ( ) * 10 + 1 ;
112
- activityBarService . addBar ( {
113
- id : id + '' ,
114
- name : 'folder' + id ,
115
- iconName : 'codicon-edit' ,
116
- } ) ;
117
- } ;
118
-
119
- const newEditor = function ( ) {
120
- const key = Math . random ( ) * 10 + 1 ;
121
- const tabData : IEditorTab = {
122
- id : `${ key } ` ,
123
- name : `editor.js` ,
124
- modified : false ,
125
- data : {
126
- value : `hello javascript ${ key } ` ,
127
- path : 'desktop/molecule/editor1' ,
128
- language : 'javascript' ,
129
- } ,
130
- breadcrumb : [ { id : `${ key } ` , name : 'editor.js' } ] ,
131
- } ;
132
- console . log ( 'open editor:' , tabData ) ;
133
- editorService . open ( tabData ) ;
134
- } ;
135
-
136
- const openCommand = function ( ) { } ;
137
105
const { input } = this . state ;
138
106
return (
139
107
< div className = { prefixClaName ( 'search-pane' , 'sidebar' ) } >
@@ -151,16 +119,6 @@ export default class SearchPane extends React.Component<
151
119
searchValue = { input }
152
120
/>
153
121
) }
154
- < hr > </ hr >
155
- < div >
156
- < Button onClick = { addABar } > Add Bar</ Button >
157
- < Button onClick = { newEditor } > New Editor</ Button >
158
- < Button onClick = { openCommand } > Command Palette</ Button >
159
- </ div >
160
- < div style = { { margin : '50px 20px' } } >
161
- ColorThemes:
162
- { this . renderColorThemes ( ) }
163
- </ div >
164
122
</ Content >
165
123
</ div >
166
124
) ;
0 commit comments