SyncEdit How UseFul is It?

Today I ran across yet another limitation of SyncEdit.  Incredible you say?  Check out the following sample code:

procedure CreatePackage(anInvoiceItem :ThcInvoiceItem; aClient :ThcClient);
  if anInvoiceItem.AssociatedProduct.StockType.AsString = 'PACK' then

Rather than use a Search/Replace as I would normally, I chose to invoke SyncEdit after highlighting the method.  Then I discovered I could not replace anInvoiceItem.AssociatedProduct with aProduct.  SyncEdit will not allow you to remove an identifier, so the closest I could get was a.aProduct.  Likewise, SyncEdit cannot be invoked when you use Ctrl+A to select the entire unit.  While it may be flashy, it’s not as flexible or as fast to use as Search/Replace IMHO.

8 Responses to “SyncEdit How UseFul is It?”

  1. Chris Says:

    SyncEdit works fine for me as it stands. What are you proposing exactly - that it drops the ability to tab through identifiers, or that there’s some sort of extended selection mode that will cross ‘.’ barriers, or…?

  2. Larry Hengen Says:

    I am just saying SyncEdit overlaps with other existing technologies such as refactoring, and Search/Replace. It is flashier than other techniques, but it is more limited, and IMO wasn’t very well thought out. I personally think it should either be removed or be enhanced to work better. Having to select the scope in which Sync Edit works is a major pain. The default should be the current method. Not being able to work unit wide is another annoyance (cannot use Ctrl+A to select All). I don’t know that SyncEdit could not be enhanced to cross the ‘.’ barrier. That would certainly make it more useful….

  3. Chris Says:

    For sure it overlaps. I really don’t understand why you’re picking on it, or why you assert it to be ‘flashier’ - I just use the thing myself, mainly for renaming local variables (for that it’s quicker than search/replace, and allows for more easily seeing what alternative names will look like).

  4. Sebastian Jänicke Says:

    I use it often, so I definitely not want to have it removed…
    If it does not fit your needs, just don’t use it…

  5. Fabricio Says:

    Mr. Hengen,
    Wouldn’t be a case for Refactor/Introduce Variable?

  6. Kevin G. McCoy Says:

    I think the value of SyncEdit is that it keeps you out of trouble.

    Renaming variables with a global search-and-replace can take you from zero to train-wreck in 60 milliseconds.

    SyncEdit parses your code and at least tries to keep you out of trouble - plus you can see if there is a naming collision in the Errors dialog in the IDE and back out of your change surgically.

    All code editing tools should be evaluated like so:

    Can I use this feature successfully at 3 AM (with no sleep), with an 8 AM delivery date on a large project? SyncEdit = Yes, Global search and replace = probably not.

  7. Larry Hengen Says:


    You may be correct, but I really cannot say. I have attempted to look up the Introduce Variable refactoring to see how it works to no avail, and I haven’t the time right now to setup a test case. My experience if that the refactoring tools don’t always work, and you have to know what to select before invoking them etc. Essentially you have to know ho they work and the help doesn’t have any real information on them.

  8. Fabricio Says:

    Mr Hengen,
    Ok. But SyncEdit certainly is not the tool. It’s a hammer, even if you use it on screws… It’s a shame the screwdriver doesn’t work as it must be…

Leave a Reply