Skip to content

Commit 2be3d39

Browse files
author
anquetil
committed
comment: class comment MiBulkEditor
1 parent 64a82f3 commit 2be3d39

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/MooseIDE-BulkEditor/MiBulkEditor.class.st

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
"
2-
Bulk editor on a Java file: comment out a collection of methods
2+
Bulk editor on Java files: comment out or remove a collection of methods
33
Can be applied for example on dead methods:
44
- compute all dead methods in a file -> `deadMethodCollection`
55
- call: `MiBulkEditor new runOn: deadMethodCollection.`
6-
- Output the resulting lines in a file
6+
7+
The following will comment out or remove a list of methods from their respective source files
78
```
89
bulkEditor := MiBulkEditor new.
9-
bulkEditor runOn: deadMethods.
10-
file := 'SomeFile.java' asFileReference.
11-
file ifExists: [ file delete ].
12-
file writeStreamDo: [ :st | bulkEditor lines do: [ :line | st << line ; cr ] ].
10+
bulkEditor runOn: <deadMethodCollection>.
1311
```
12+
13+
The default is to comment out the methods: `bulkEditor commentLines`
14+
The editor can be instructed to remove the methods from their files: `bulkEditor removeLines`
1415
"
1516
Class {
1617
#name : 'MiBulkEditor',

0 commit comments

Comments
 (0)