Wouldn’t it be Nice?

I tried to get together with Nick Hodges to discuss some editor enhancements I would like to see in Delphi while I was in San Fran for WWDC2010.  Most of these features are based on my experience with CodeRush (yes I’m an addict).  Unfortunately, the timing didn’t work out this time, but it got me started looking for suggestions, and once you’re in the mindset, they’re endless.

For instance, have you ever added new units without adding them to a project file and got the message:

[DCC Warning] HengenOPFCore.dpk(101): W1033 Unit ‘hcFloatAttribute’ implicitly imported into package ‘HengenOPFCore’

Wouldn’t it be nice to be able to Rt. Click on the message and choose ‘Add to Project’?

I am making a list in case Nick and I can hookup sometime in the future.  What Editor enhancements would you like to see in the base product?

7 Responses to “Wouldn’t it be Nice?”

  1. Moritz Beutel Says:

    In the last years I’ve collected a list of small IDE and editor improvements I’d like to see:
    - C++Builder: Expose generated header file as a subitem of the .pas file to the project manager
    - Project Manager: DFM context menu/open as text
    - Call stack: execute until here
    - Project Manager: when I select n files and then execute “File|Save as…”, show a directory selection dialog instead of n “Save file” dialogs
    - “Search for References” pane: display the surrounding code snippet as a mouse-over hint for each listed reference
    - Editor smarts: preserve indentation when deleting a line
    - Editor smarts: when Code Completion inserts parentheses for a function call and the function doesn’t take any arguments, move cursor beyond ‘)’
    - Editor smarts: Camel Case Navigation/Selection with Alt+Left/Right
    - Editor smarts: comment continuation support (for /*\n*\n, //\n//\n etc.)
    - Refactoring: when renaming a property named ‘*’, also rename ‘Get*’, ‘Set*’, ‘Is*Stored’)
    - Editor: optionally display divider lines between entities
    - Editor: Search location bar a la NetBeans
    - Editor: Code splitting

    That’s just a small fraction.

  2. Wouter Says:

    It would be cool to have inline property editors to help speed up editing code.

    Either the same ones that show up in the object inspector, or maybe a new type of property editor is needed.


    - Enter a color using a color picker instead of typing $342285.

    - Enter ImageIndex by picking from a list instead of typing a number.

    - Edit a string in a popup texteditor (with basic stuff like load/save, search/replace, etc).

    - Have a little popup to build a format() string with parameters (it could even check types).

  3. Yogi Yang Says:

    +1 for Wouter’s suggestions.

  4. Richard Says:

    A few suggestions:

    The useability of bookmarks could be really improved by having just 4 commands — drop bookmark, move to prev bookmark, move to next bookmark and remove bookmark. (10 bookmarks is too much for my little brain to remember per open unit). I often forget which bm is which. This will also free up 20 shortcuts and replace with 4.

    Taking this further — I would love edited blocks (ie those marked yellow or green in the gutter) to also be autoamtically added to the bookmark list (ok, you could put them on different shortcut keys). Then I can quickly jump to the top and review all my changes before saving. Or simply to jump around the unit while I am making changes.

    While on the subject of shortcuts, I’d really like code folding shortcuts to be less than 4 finger presses. And code formatting to be more than 2 finger presses. Of course, it may be a lot of work, but shortcuts should be user assignable.

    Lastly, please fix auto-invocation of identifier names — I don’t want to always have to press control-space. The current option (Code completion/Auto-invoke) does not work correctly — you have to use down arrow keys to get to a property/member whereas with the auto-invoke option off the property/member lists work correctly.


  5. Bertrand Person Says:

    Some very simple ones:

    I wish the middle divider in the property grids wouldn’t always automatically try to be 50% of the width of the entire grid. Every time I reduce the width of the window, I have to readjust the position of the middle divider.

    This never happened in D7.

    It would also be great to have the form editor back in a separate window. Large forms are awkward to work on.

    And it also would be great if the IDE layouts on dual screen PCs could be fixed. As things stand now, every time I start Delphi, I must first select some other layout, then reselect the one I want.

    This problem did not exist in D5.

  6. codeelegance Says:

    1. If you type the name of an identifier that doesn’t exist have easy way to create it and return the cursor to where the shortcut was invoked.

    2. Improve refactoring support: inline method, collapse hierarchy, extract subclass, encapsulate field, push up/pull down member, reverse conditional, split variable. Delphi specific: replace “with” statement with temporary variable.

    3. Improve static code analysis: unused identifier detection, detect ambiguous references, naming/coding conventions enforcement, code structure suggestions

  7. Bertrand Person Says:

    @codeelegance: Indeed!

    1. Could be solved with being able to declare local variables. It would mean changing the language specification, and more work for the compiler, but this is the 21st century.

    2. The old Borland wishlist attracted many serious suggestions for an improved implementation of the WITH statement. Even Visual Basic had a better WITH than Delphi. Correctly implemented, the WITH statement makes code more readable and more easily maintained and debugged. Unfortunately most people only know the Delphi WITH statement.

    3. All good. Yes.

Leave a Reply