-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathNewRefactoringFunctions.txt
More file actions
31 lines (21 loc) · 3.88 KB
/
Copy pathNewRefactoringFunctions.txt
File metadata and controls
31 lines (21 loc) · 3.88 KB
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
Suggestions for new refactoring functions:
=========================================
- After reading Frank’s post, it might be worth adding a check for channel number when using sequential I/O commands.
Marco:
- Mapi email to chilkat
- SL to Select (win to web)
- VW to Zoom (win to web)
Peter Bragg:
- Some aren't as easy as you'd hope. For example, the whole Table and Field name casing. I'm forever changing it in the code, but it always comes back again because of where the studio gets it from. And from memory, it isn't even just one place. I think the main editor looks at the fd but I think when you drag in fields from the DDO explorer it takes it from somewhere else - possibly even the database itself (it's been a while since I looked but we did try to address this once upon a time). And it's difficult to write something to 'fix' FD casing because the column name may be several words with no underscores to separate them.
- I did have one thought about creating subclasses. For example, if you create a new subclass of a dbForm, say, then it's easy enough to do a search and replace on that in your code (to make it a cMydbForm, say) but that's not quite the end of the story because you'd also want a USE statement at the top for the new class to avoid the problem resolution panel complaining.
Which then leads to another suggestion about something to add missing use statements to address this. But, if the file is an include, say, or even a .pkg and is "Use"d (or included) inside an object, sometimes adding a use statement to that file can make things break because of where the first definition of the 'thing' ends up being in the code.
- Another DFRefactor thought - but I'm not sure it really is DFRefactor territory. The 'To Do' list in the studio really isn't great. Yes, you can output it the clipboard but that's about it. What if there was a better interface that didn't just display the To Do code, but that let you add specific definable tags that it would then parse and use as part of it'd display. For example, if you're ToDo in the code contained "DATE:" or "USER:" (or whatever) then you could filter and sort on this. It would make adding a To Do in the code a lot easier to manage.
So you're writing code, and you add a ToDo. At present all you can really do with this is to see it in the Studio's own ToDo panel, but it's pretty basic to say the least. You can output its contents to the clipboard and that is it. You cannot filter, or order, or do anything meaningful.
So, whilst it isn't about refactoring - which is why it may not really be a candidate for DfRefactor - it would be good if there was a tool that could parse all the ToDo comments in the code, and present them in a better way, with filters and such. If the developer was strict about entering ToDo text, and adhered to a given format whereby any 'By' dates were always entered in a specific, consistent manner, or the user who was responsible for it was always identified in a consistent manner, then DfRefactor, say, could present a nice view of all the things that are still To Do, by when and by who, etc. Or you could filter by the class the comment is in, or the object etc. As said, not really about refactoring, but absolutely about managing your workspace.
And even perhaps allow you to update the ToDo text, or remove it.
Remove all ToDo lines
Add user to ToDo lines
Add date to ToDo lines
Filter ToDo lines - by date, user, class, method, object etc.
- Another small refactoring suggestion - but perhaps this is bespoke to Oscar's code? (not sure). Anyway, typically you might not want to remove all comments, but if there is a comment with a date, you might decide that it isn't required, especially if that date is over a given timeframe ago. I mean, look at the above. Two comments with a date of 2013 and they tell us what, exactly?
Example: "//pb 05/06/2013" and "String sclosedSO // pb 05/05/2013"