ANN: SyncEdit Plugin Version 1.0.0

Available via the plugin manager.

Changes
-


1.0.0 - Initial Version.

About
-


Similar to 'SyncEdit' functionality already in Borland Delphi, and soon
to be in Eclipse... This plugin allows you to do an inplace synchronized
edit of all instances of a string within a defined range.

A "SyncEdit Mode" menu item is added to the Search and Editor Popup
menus. Simply select a range to be edited, enter "SyncEdit Mode" and all
words in the marked range become 'live' - any changes to an instance of
a word changes all matching strings in real-time.

The decision about the word to SyncEdit is determined by a 'Select Word'
operation at the current cursor location (respecting any CamelHump
settings) when a modification is made. However, you can SyncEdit a
custom region of text by first selecting it and then invoking the
SyncEdit action again, or even just start typing to replace the
substring completely.

There is also a "Paste with SyncEdit" action added to the Edit Menu -
this will execute a paste and automatically enter SyncEdit Mode for the
range of the pasted text, great for tweaking pasted code fragments for
the context they are used in.

The mode can be exited by pressing either escape or enter - once to exit
SyncEdit on a word, and once again to stop SyncEditing a range.

At the moment SyncEdit works purely on a textual basis, but maybe later
versions will optionally use code members/identifiers if there is
interest for this.

Any feedback, suggestions for improvements or details of problems found
will be much appreciated!

Cheers,
N.

30 comments

Hi Nathan,

Great plugin - this is really good job!

There is only one small suggestion - it could be even more useful if
during entering into sync mode, the plugin will highlight groups of
similar words that could be changed - as it currently highlights them
after first change. Also, ability to navigate between groups could be
great addition to plugin functionality too - say, via the Tab key.
Several years ago similar functionality was introduced in Productivity!
for JBuilder and I miss it now since SyncEdit is really convenient and
timesaving feature.

Regards,
Andrew Sazonov

0

Hi Andrew,

Thanks for the suggestions! I'll look into including them in the next
version. Glad to be keeping the old Productivity! ideas alive... I
forget, is there anything other features you used to provide that IDEA
doesn't?

Cheers,
N.

Andrew Sazonov wrote:

Hi Nathan,

Great plugin - this is really good job!

There is only one small suggestion - it could be even more useful if
during entering into sync mode, the plugin will highlight groups of
similar words that could be changed - as it currently highlights them
after first change. Also, ability to navigate between groups could be
great addition to plugin functionality too - say, via the Tab key.
Several years ago similar functionality was introduced in Productivity!
for JBuilder and I miss it now since SyncEdit is really convenient and
timesaving feature.

Regards,
Andrew Sazonov

0

Nathan!

May I suggest you to write a post about you plugin for IDEA blog?
http://blogs.jetbrains.com/idea

Alex


Nathan Brown wrote:

Available via the plugin manager.

Changes
-------
1.0.0 - Initial Version.

About
-----
Similar to 'SyncEdit' functionality already in Borland Delphi, and soon
to be in Eclipse... This plugin allows you to do an inplace synchronized
edit of all instances of a string within a defined range.

A "SyncEdit Mode" menu item is added to the Search and Editor Popup
menus. Simply select a range to be edited, enter "SyncEdit Mode" and all
words in the marked range become 'live' - any changes to an instance of
a word changes all matching strings in real-time.

The decision about the word to SyncEdit is determined by a 'Select Word'
operation at the current cursor location (respecting any CamelHump
settings) when a modification is made. However, you can SyncEdit a
custom region of text by first selecting it and then invoking the
SyncEdit action again, or even just start typing to replace the
substring completely.

There is also a "Paste with SyncEdit" action added to the Edit Menu -
this will execute a paste and automatically enter SyncEdit Mode for the
range of the pasted text, great for tweaking pasted code fragments for
the context they are used in.

The mode can be exited by pressing either escape or enter - once to exit
SyncEdit on a word, and once again to stop SyncEditing a range.

At the moment SyncEdit works purely on a textual basis, but maybe later
versions will optionally use code members/identifiers if there is
interest for this.

Any feedback, suggestions for improvements or details of problems found
will be much appreciated!

Cheers,
N.

0

I guess this is for you to decide Alexey as you were the original
poster! Does this do everything you wanted?

N.

Alexey Efimov wrote:

Waw :)
http://www.jetbrains.net/jira/browse/IDEA-2426
It seems to be this issue closed?

0

Hi Nathan

Thanks for the suggestions! I'll look into including them in the next
version. Glad to be keeping the old Productivity! ideas alive... I
forget, is there anything other features you used to provide that IDEA
doesn't?


Oh, it seems you remember Productivity! - I hope you liked it.

Well, there are several ones that are not present in IDEA yet but were
in Productivity! (just ones I can remember):

1) Task list (merged with to-do's and errors) and with ability to fix
errors from there ;
2) WISIWYG JavaDoc editor.
3) Quick Implementing Interface/extend class - fist by selecting
class/interface and them generation extends/implements and method that
should be overridden/implemented;
4) Smart navigator - Word-like navigation control in the right bottom
corner of the screen that allow to
control navigation mode;
5) Advanced TO-DO that support author, priority etc;
6) Reminders on task list;
4) Implementing/overriding methods via the same dialog (however, to
cover the last two tools, I've created a small plugin with similar
functionality - it is named DeclarationTools and is available via plugin
central);
5) Automatic generation of JavaDoc for method - there is similar plugin
for IDEA, as far as I know;
I hope they will be added somehow unfortunately, right now I don't have
enough free time to implement them for IDEA, but if anyone will be
interested - I think I could try to find more one to support them.
Just in case, I've attached couple of images that illustrate tools I"ve
mentioned.

Actually for 2002 we had pretty good set of features there and I'm glad
that most of them are now available in IDEA.


Regards,
Andrew Sazonov
SoftAMIS
http://www.soft-amis.com



Attachment(s):
tl1.gif
jdoc_missing_parameter_erro.gif
navigator_menu.gif
reminder_dialog.gif
smart_javadoc1.gif
0

Hi Alex,

I'd love to! What's the best way to post something, just use the form
on the webpage? Or should I email it to someone?

Cheers,
N.

AlexTkachman(JetBrains) wrote:

Nathan!

May I suggest you to write a post about you plugin for IDEA blog?
http://blogs.jetbrains.com/idea

Alex


Nathan Brown wrote:

>> Available via the plugin manager.
>>
>> Changes
>> -


>> 1.0.0 - Initial Version.
>>
>> About
>> -


>> Similar to 'SyncEdit' functionality already in Borland Delphi, and
>> soon to be in Eclipse... This plugin allows you to do an inplace
>> synchronized
>> edit of all instances of a string within a defined range.
>>
>> A "SyncEdit Mode" menu item is added to the Search and Editor Popup
>> menus. Simply select a range to be edited, enter "SyncEdit Mode" and all
>> words in the marked range become 'live' - any changes to an instance of
>> a word changes all matching strings in real-time.
>>
>> The decision about the word to SyncEdit is determined by a 'Select Word'
>> operation at the current cursor location (respecting any CamelHump
>> settings) when a modification is made. However, you can SyncEdit a
>> custom region of text by first selecting it and then invoking the
>> SyncEdit action again, or even just start typing to replace the
>> substring completely.
>>
>> There is also a "Paste with SyncEdit" action added to the Edit Menu -
>> this will execute a paste and automatically enter SyncEdit Mode for the
>> range of the pasted text, great for tweaking pasted code fragments for
>> the context they are used in.
>>
>> The mode can be exited by pressing either escape or enter - once to exit
>> SyncEdit on a word, and once again to stop SyncEditing a range.
>>
>> At the moment SyncEdit works purely on a textual basis, but maybe later
>> versions will optionally use code members/identifiers if there is
>> interest for this.
>>
>> Any feedback, suggestions for improvements or details of problems
>> found will be much appreciated!
>>
>> Cheers,
>> N.

0

Of course I remember it - it was the first time I experienced the
'developing with pleasure' that we've all come to get used to!

Looks like there are a few good ideas for plugins here...

Cheers,
N.

Andrew Sazonov wrote:

Hi Nathan

>> Thanks for the suggestions! I'll look into including them in the next
>> version. Glad to be keeping the old Productivity! ideas alive... I
>> forget, is there anything other features you used to provide that IDEA
>> doesn't?


Oh, it seems you remember Productivity! - I hope you liked it.

Well, there are several ones that are not present in IDEA yet but were
in Productivity! (just ones I can remember):

1) Task list (merged with to-do's and errors) and with ability to fix
errors from there ;
2) WISIWYG JavaDoc editor.
3) Quick Implementing Interface/extend class - fist by selecting
class/interface and them generation extends/implements and method that
should be overridden/implemented;
4) Smart navigator - Word-like navigation control in the right bottom
corner of the screen that allow to
control navigation mode;
5) Advanced TO-DO that support author, priority etc;
6) Reminders on task list;
4) Implementing/overriding methods via the same dialog (however, to
cover the last two tools, I've created a small plugin with similar
functionality - it is named DeclarationTools and is available via plugin
central);
5) Automatic generation of JavaDoc for method - there is similar plugin
for IDEA, as far as I know;

0

Great!
You can send it to tips@intellij.net

Nathan Brown wrote:

Hi Alex,

I'd love to! What's the best way to post something, just use the form
on the webpage? Or should I email it to someone?

Cheers,
N.

AlexTkachman(JetBrains) wrote:

>> Nathan!
>>
>> May I suggest you to write a post about you plugin for IDEA blog?
>> http://blogs.jetbrains.com/idea
>>
>> Alex
>>
>>
>> Nathan Brown wrote:
>>
>>> Available via the plugin manager.
>>>
>>> Changes
>>> -


>>> 1.0.0 - Initial Version.
>>>
>>> About
>>> -


>>> Similar to 'SyncEdit' functionality already in Borland Delphi, and
>>> soon to be in Eclipse... This plugin allows you to do an inplace
>>> synchronized
>>> edit of all instances of a string within a defined range.
>>>
>>> A "SyncEdit Mode" menu item is added to the Search and Editor Popup
>>> menus. Simply select a range to be edited, enter "SyncEdit Mode" and all
>>> words in the marked range become 'live' - any changes to an instance of
>>> a word changes all matching strings in real-time.
>>>
>>> The decision about the word to SyncEdit is determined by a 'Select Word'
>>> operation at the current cursor location (respecting any CamelHump
>>> settings) when a modification is made. However, you can SyncEdit a
>>> custom region of text by first selecting it and then invoking the
>>> SyncEdit action again, or even just start typing to replace the
>>> substring completely.
>>>
>>> There is also a "Paste with SyncEdit" action added to the Edit Menu -
>>> this will execute a paste and automatically enter SyncEdit Mode for the
>>> range of the pasted text, great for tweaking pasted code fragments for
>>> the context they are used in.
>>>
>>> The mode can be exited by pressing either escape or enter - once to exit
>>> SyncEdit on a word, and once again to stop SyncEditing a range.
>>>
>>> At the moment SyncEdit works purely on a textual basis, but maybe later
>>> versions will optionally use code members/identifiers if there is
>>> interest for this.
>>>
>>> Any feedback, suggestions for improvements or details of problems
>>> found will be much appreciated!
>>>
>>> Cheers,
>>> N.

0

No exactly, but look like very relative :)

0

If there's anything in particular that you'd also like it to do, please
let me know.

Cheers,
N.

Alexey Efimov wrote:

No exactly, but look like very relative :)

0

Is this plugin only available for Demetra?

"Nathan Brown" <nedski@yNaOhSoPo.cAoMm> wrote in message
news:e1apr4$9jj$1@is.intellij.net...

Available via the plugin manager.

>

Changes
-------
1.0.0 - Initial Version.

>

About
-----
Similar to 'SyncEdit' functionality already in Borland Delphi, and soon to
be in Eclipse... This plugin allows you to do an inplace synchronized
edit of all instances of a string within a defined range.

>

A "SyncEdit Mode" menu item is added to the Search and Editor Popup
menus. Simply select a range to be edited, enter "SyncEdit Mode" and all
words in the marked range become 'live' - any changes to an instance of
a word changes all matching strings in real-time.

>

The decision about the word to SyncEdit is determined by a 'Select Word'
operation at the current cursor location (respecting any CamelHump
settings) when a modification is made. However, you can SyncEdit a
custom region of text by first selecting it and then invoking the
SyncEdit action again, or even just start typing to replace the
substring completely.

>

There is also a "Paste with SyncEdit" action added to the Edit Menu -
this will execute a paste and automatically enter SyncEdit Mode for the
range of the pasted text, great for tweaking pasted code fragments for
the context they are used in.

>

The mode can be exited by pressing either escape or enter - once to exit
SyncEdit on a word, and once again to stop SyncEditing a range.

>

At the moment SyncEdit works purely on a textual basis, but maybe later
versions will optionally use code members/identifiers if there is
interest for this.

>

Any feedback, suggestions for improvements or details of problems found
will be much appreciated!

>

Cheers,
N.



0

Well it was, as that's what it was developed against, but I compiled it
against my last installed Irida build (4153) and it was fine, so I've
uploaded a version that will work with both.

Let me know of any problems.

Cheers,
N.

Brad L wrote:

Is this plugin only available for Demetra?

0

Nathan,

This is a very nice plugin. It shows there is still room for improvement in IntelliJ in basic editing tasks. I would very much like to see this feature aded to the IntelliJ product itself. This would be a nice feature for Jetbrains to list for Demetra, better than alot of stuff on Demetra roadmap right now.

I did have a couple wierd problems when trying this out. Hopefully you can fix these:

Try the following code:


Scenario: I was creating a new JComboBox timeFilterCB and I grabbed some other
code in a another file that had a combo box "monitortimeoutCombo". Perfect use for SyncEdit! I selected this code, and then went into Sync Edit mode.

1) First I tried to select word monitortimeoutCombo and then I typed timeFilterCB. This replaced the monitortimeoutCombo that was selected, but it didn't replace the other ones. In fact, my code got garbled in strange ways. (See attached.)

2) I started over, and put the cursor at the end of the word monitortimeoutCombo and then did CTRL+BACKSPACE to delete th word until it was empty, and then I started to type timeFilterCB. During this, when I deleted the word Combo, the word Combo was removed from JComboBox created JBox but this is incorrect. (See attached).

-Alex



Attachment(s):
sync-edit-plugin-enter-mode.png
sync-edit-plugin-after-replace-text.png
sync-edit-plugin-delete-Combo.png
sync-edit-plugin-finished-JComboBox-became-JBox.png
0

I've been using the SyncEdit plugin heavily today, and it is working great.
The item #2 I posted might not be a bug, now that I understand how this works better. (I never used it in JBuilder). When I deleted the word Combo, it was going to delete it everywhere it occurred, even though I only wanted it to delete from the end of monitortimeoutCombo and not JComboBox. That makes sense.

But my item #1 still seems like a bug.
If I highlight the entire word monitortimeoutCombo and then typeover it, shouldn't that replace all instance of monitortimeoutCombo in the synedit area?

0

So, i try it, but i can't understud how use it. Select Word, CtrlAltR, and ?

0

One other comment. The yellow line used to delineate the SyncEdit active area is very faint on my LCD. I would rather have a darker colored line.

0

Hi Alex,

Thanks a lot for the encouraging comments and examples.

Alex wrote:

I've been using the SyncEdit plugin heavily today, and it is working great.
The item #2 I posted might not be a bug, now that I understand how this works better. (I never used it in JBuilder). When I deleted the word Combo, it was going to delete it everywhere it occurred, even though I only wanted it to delete from the end of monitortimeoutCombo and not JComboBox. That makes sense.

Yeah it is supposed to work this way. If you just wanted to get rid of
'Combo' off of the end of all instances of 'monitortimeoutCombo' then
you should select 'monitortimeoutCombo', and invoke SyncEdit again -
this will mark the selection as a custom synced range, and you'll be
able to delete 'Combo' of the end with the desired effect.

But my item #1 still seems like a bug.
If I highlight the entire word monitortimeoutCombo and then typeover it, shouldn't that replace all instance of monitortimeoutCombo in the synedit area?

Yes it sounds like #1 is definitely a bug; what you suggest should be
the behaviour, and there should definitely be no code garbling. I'll
look into this asap, once again thanks for reporting.

Cheers,
N.

0

I currently use the selection background colour as the box border. My
plan is ultimately to make everything configurable, but maybe there is a
better choice for the box colour for the time being... maybe the usage
search result background colour?

Cheers,
N.

Alex wrote:

One other comment. The yellow line used to delineate the SyncEdit active area is very faint on my LCD. I would rather have a darker colored line.

0

Thanks for this plugin, although I did not need it immediately I'm gonna have a good use for it some time.

0

Very nice, very slick!

I have one small feature request. Currently ctrl-alt-R does nothing when
there is no selection. How about having it enable SyncEdit mode for the entire
file? I've found myself hitting ctrl-A, ctrl-alt-R a few times already.

Available via the plugin manager.

Changes
-------
1.0.0 - Initial Version.
About
-----
Similar to 'SyncEdit' functionality already in Borland Delphi, and
soon
to be in Eclipse... This plugin allows you to do an inplace
synchronized
edit of all instances of a string within a defined range.
A "SyncEdit Mode" menu item is added to the Search and Editor Popup
menus. Simply select a range to be edited, enter "SyncEdit Mode" and
all words in the marked range become 'live' - any changes to an
instance of a word changes all matching strings in real-time.

The decision about the word to SyncEdit is determined by a 'Select
Word' operation at the current cursor location (respecting any
CamelHump settings) when a modification is made. However, you can
SyncEdit a custom region of text by first selecting it and then
invoking the SyncEdit action again, or even just start typing to
replace the substring completely.

There is also a "Paste with SyncEdit" action added to the Edit Menu -
this will execute a paste and automatically enter SyncEdit Mode for
the range of the pasted text, great for tweaking pasted code fragments
for the context they are used in.

The mode can be exited by pressing either escape or enter - once to
exit SyncEdit on a word, and once again to stop SyncEditing a range.

At the moment SyncEdit works purely on a textual basis, but maybe
later versions will optionally use code members/identifiers if there
is interest for this.

Any feedback, suggestions for improvements or details of problems
found will be much appreciated!

Cheers,
N.



0

Good idea, I'll put it in the next version. Thanks for the suggestion!

Cheers,
N.

Chris Miller wrote:

Very nice, very slick!

I have one small feature request. Currently ctrl-alt-R does nothing when
there is no selection. How about having it enable SyncEdit mode for the
entire file? I've found myself hitting ctrl-A, ctrl-alt-R a few times
already.

>> Available via the plugin manager.
>>
>> Changes
>> -


>> 1.0.0 - Initial Version.
>> About
>> -


>> Similar to 'SyncEdit' functionality already in Borland Delphi, and
>> soon
>> to be in Eclipse... This plugin allows you to do an inplace
>> synchronized
>> edit of all instances of a string within a defined range.
>> A "SyncEdit Mode" menu item is added to the Search and Editor Popup
>> menus. Simply select a range to be edited, enter "SyncEdit Mode" and
>> all words in the marked range become 'live' - any changes to an
>> instance of a word changes all matching strings in real-time.
>>
>> The decision about the word to SyncEdit is determined by a 'Select
>> Word' operation at the current cursor location (respecting any
>> CamelHump settings) when a modification is made. However, you can
>> SyncEdit a custom region of text by first selecting it and then
>> invoking the SyncEdit action again, or even just start typing to
>> replace the substring completely.
>>
>> There is also a "Paste with SyncEdit" action added to the Edit Menu -
>> this will execute a paste and automatically enter SyncEdit Mode for
>> the range of the pasted text, great for tweaking pasted code fragments
>> for the context they are used in.
>>
>> The mode can be exited by pressing either escape or enter - once to
>> exit SyncEdit on a word, and once again to stop SyncEditing a range.
>>
>> At the moment SyncEdit works purely on a textual basis, but maybe
>> later versions will optionally use code members/identifiers if there
>> is interest for this.
>>
>> Any feedback, suggestions for improvements or details of problems
>> found will be much appreciated!
>>
>> Cheers,
>> N.


0

Great plugin, tremendous time saviour!

Keep it text based please, as this way changing code like these is a breeze:

String something = request.getParameter("something");
request.setAttribute("something", something);

Couple of suggestions though:

- When entering sync-edit mode cursor could be positioned at the beginning of the first word that appears at least twice in the sync-edit region. Also that word could be automaticaly selected for sync-editing (highlighted).

- When in sync-edit mode, and when cursor is positioned inside the word that appears at least twice, make that word automaticaly enter sync-editing. When cursor leaves the sync-editing word, make that word not highlighted any more.

- Change the background of the sync-edit region, instead of making the border more intense, as suggested above

0

Actually, I would prefer that this default to method scope. I think it should only default to file scope if the cursor is outside of a method. Or at least make this configurable somehow. It's just that it's trivially easy for me to select everything in a file with Ctrl-A and there's no equivalent for quick method selection (at least that I'm aware of).

0

Hi Marc,

MS> Ctrl-A and there's no equivalent for quick method selection (at
MS> least that I'm aware of).

Not exactly a single stroke (and you might be aware of it already), but Ctrl
+ W gradually expands the selection (with Ctrl + Shift + W having the opposite
efect).

HTH,
Andrei


0

- When entering sync-edit mode cursor could be positioned at the
beginning of the first word that appears at least twice in the
sync-edit region. Also that word could be automaticaly selected for
sync-editing (highlighted).


I don't like this - sounds like a breach of the principle of least surprise
since it's not obvious where that word will be, and is quite probably not
the word you want anyway. The cursor shouldn't move.

- When in sync-edit mode, and when cursor is positioned inside the
word that appears at least twice, make that word automaticaly enter
sync-editing. When cursor leaves the sync-editing word, make that word
not highlighted any more.


Perhaps - I'd need to try this in action to decide whether I liked it or not.

- Change the background of the sync-edit region, instead of making the
border more intense, as suggested above


For consistency, it should probably be highlighted in the same way as inline-rename
(shift-f6).


0

Hello,

I have some trouble this this plugin. I need simple replace the same substring anywhere within the file. I'm select substring and try to press CtrlAltR, but this not work.

I know, that i need select entire file and then replace substrings after CtrlAltR, but this is not usefull. Can you look again on Issue, i'm posted here above? It explains such replace mode.

Thanks!

0

Hi Andrew,

This functionality is now in SyncEdit 1.1.0 - please try it out and let
me know what you think!

Regards,
N.

Andrew Sazonov wrote:

Hi Nathan,

Great plugin - this is really good job!

There is only one small suggestion - it could be even more useful if
during entering into sync mode, the plugin will highlight groups of
similar words that could be changed - as it currently highlights them
after first change. Also, ability to navigate between groups could be
great addition to plugin functionality too - say, via the Tab key.
Several years ago similar functionality was introduced in Productivity!
for JBuilder and I miss it now since SyncEdit is really convenient and
timesaving feature.

Regards,
Andrew Sazonov

0

Hi Alex,

This should be fixed in 1.1.0 just released. Please let me know if you
still have problems.

Regards,
N.

Alex wrote:

I've been using the SyncEdit plugin heavily today, and it is working great.
The item #2 I posted might not be a bug, now that I understand how this works better. (I never used it in JBuilder). When I deleted the word Combo, it was going to delete it everywhere it occurred, even though I only wanted it to delete from the end of monitortimeoutCombo and not JComboBox. That makes sense.

But my item #1 still seems like a bug.
If I highlight the entire word monitortimeoutCombo and then typeover it, shouldn't that replace all instance of monitortimeoutCombo in the synedit area?

0

Hi Mileta,

The setting is now user editable in version 1.1.0 just released. Hope
this improves things.

Regards,
N.

Mileta Cekovic wrote:

- Change the background of the sync-edit region, instead of making the border more intense, as suggested above

0

Please sign in to leave a comment.