Updated Chat Plugin: V1.1

http://www.intellij.org/twiki/bin/view/Main/ChatPlugin

This plugin provides a simple multi-user chat window, allowing you to chat
with other developers on your local LAN. It takes advantage of IP Multicast,
which means it doesn't require a standalone chat server, but it also means
that it requires support for multicast and can't leave the LAN.

Currently it uses multicast group 239.1.2.3, port 1234 with a TTL of 1.
These values are configurable through the IDE options panel, but require
a restart to take effect.

This plugin requires IDEA 3.0, and was tested on build 629.

To install, simply copy the jar file into your $IDEA_HOME/plugins folder.
You can configure chat window options through the Chat configuration screen
in the IDE Options panel.

Known Issues/Questions:
- would a split pane or textarea be more appropriate for the entry line,
or is the 1 line entry ok?
- how can I make the chat icon flash to indicate new content is in the
chat window when auto-popup is off?
- does multicast work for most people?
- I'd like to make this an application component, but how do you
get an instance of ToolBarManager without a project?
- Don't try to enter non numeric values in the numeric fields

CHANGELOG

Version 1.0 - 6/15/01
- baseline

Version 1.1 - 6/20/01
- enhancement: chat window wordwraps and autoscrolls
- enhancement: multicast group, port, and ttl values are configurable
- enhancement: autopopup configurable for events (like people leaving)
- enhancement: renaming your self in session now triggers an event
- tweak: IRC style formatting for names and events
- tweak: added icon to config screen
- fix: plugin dies on project close
- fix: sending over 64K breaks the network (truncating)

--
Duane Fields
duane@deepmagic.com



0
15 comments
Avatar
Permanently deleted user

- how can I make the chat icon flash to indicate new content is in the
chat window when auto-popup is off?


I was going to answer with a small example, but ended doing it all myself :)

Attached is a button flasher class.
It's tested with text only buttons and should work with text+icon buttons.

Buttons without text (toolbar buttons mainly) should probably play around
with icon/pressedIcon instead of colors - don't have the time now to test
this.

Some possible extensions:

-> ColorFasher: flash different colors to instead of changing
bacgground/foreground.

-> IconFlasher: Receives another icon and substitutes icons instead of
inverting the foreground/background.

-> ImportantFlasher: also beeps at each n flashes.

-> UrgentFlasher: Beeps, intensifies colors, ...

-> CriticalFlasher: UrgentFlasher + reduces time between flashes + grabs
focus:) + ....

Carlos

--
Carlos Costa e Silva <carlos@keysoft.pt>





0
Avatar
Permanently deleted user

Thanks, but I'm not sure how this would work in this case. The problem is
that the icon is passed into the Plugin API, so I don't have access to the
button/icon, right?

--
Duane Fields
duane@deepmagic.com

"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:aetbas$qe4$1@is.intellij.net...

- how can I make the chat icon flash to indicate new content is in

the

chat window when auto-popup is off?

>

I was going to answer with a small example, but ended doing it all myself

:)
>

Attached is a button flasher class.
It's tested with text only buttons and should work with text+icon buttons.

>

Buttons without text (toolbar buttons mainly) should probably play around
with icon/pressedIcon instead of colors - don't have the time now to test
this.

>

Some possible extensions:

>

-> ColorFasher: flash different colors to instead of changing
bacgground/foreground.

>

-> IconFlasher: Receives another icon and substitutes icons instead of
inverting the foreground/background.

>

-> ImportantFlasher: also beeps at each n flashes.

>

-> UrgentFlasher: Beeps, intensifies colors, ...

>

-> CriticalFlasher: UrgentFlasher + reduces time between flashes + grabs
focus:) + ....

>

Carlos

>

--
Carlos Costa e Silva <carlos@keysoft.pt>

>
>
>
>


0
Avatar
Permanently deleted user

Hello Duane,

Known Issues/Questions:
- would a split pane or textarea be more appropriate for the entry

line,

or is the 1 line entry ok?


It's ok for me :o)

- does multicast work for most people?


I did not notice any problem.

What about adding (optionnaly) a timestamp indicating at what time the msg
was sent ?
Something like :

]]> Hello world !

And another idea would be to have a personal color (blue) and another color
for the other persons connected.
It's much easier to find the message you have written yourself.
And maybe a third color for the events (*** Myself entered the channel).

Guillaume


0
Avatar
Permanently deleted user

I get this exception switching projects:

ERROR - com.intellij.ide.p - Error during dispatching of
java.awt.event.InvocationEvent[INVOCATION_DEFAULT,runnable=com.deepmagic.plugin.
mcastchat.MulticastChat$4@5b5fac,notifier=null,catchExceptions=false] on sun.awt
.windows.WToolkit@66258a
ERROR - com.intellij.ide.p - IntelliJ IDEA (Ariadna) 3.0
Build #629
ERROR - com.intellij.ide.p - JDK: 1.3.1_02
ERROR - com.intellij.ide.p - VM: Java HotSpot(TM) Client
VM
ERROR - com.intellij.ide.p - Vendor: Sun Microsystems Inc
.
ERROR - com.intellij.ide.p - OS: Windows 2000
ERROR - com.intellij.ide.p -
java.lang.NullPointerException
at com.deepmagic.plugin.mcastchat.MulticastChat$4.run(MulticastChat.java
:134)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:154)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:337)
at com.intellij.ide.p.a(p.java:43)
at com.intellij.ide.p.dispatchEvent(p.java:54)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)

Duane Fields wrote:

http://www.intellij.org/twiki/bin/view/Main/ChatPlugin

This plugin provides a simple multi-user chat window, allowing you to chat
with other developers on your local LAN. It takes advantage of IP Multicast,
which means it doesn't require a standalone chat server, but it also means
that it requires support for multicast and can't leave the LAN.

Currently it uses multicast group 239.1.2.3, port 1234 with a TTL of 1.
These values are configurable through the IDE options panel, but require
a restart to take effect.

This plugin requires IDEA 3.0, and was tested on build 629.

To install, simply copy the jar file into your $IDEA_HOME/plugins folder.
You can configure chat window options through the Chat configuration screen
in the IDE Options panel.

Known Issues/Questions:
- would a split pane or textarea be more appropriate for the entry line,
or is the 1 line entry ok?
- how can I make the chat icon flash to indicate new content is in the
chat window when auto-popup is off?
- does multicast work for most people?
- I'd like to make this an application component, but how do you
get an instance of ToolBarManager without a project?
- Don't try to enter non numeric values in the numeric fields

CHANGELOG

Version 1.0 - 6/15/01
- baseline

Version 1.1 - 6/20/01
- enhancement: chat window wordwraps and autoscrolls
- enhancement: multicast group, port, and ttl values are configurable
- enhancement: autopopup configurable for events (like people leaving)
- enhancement: renaming your self in session now triggers an event
- tweak: IRC style formatting for names and events
- tweak: added icon to config screen
- fix: plugin dies on project close
- fix: sending over 64K breaks the network (truncating)

--
Duane Fields
duane@deepmagic.com



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================


0
Avatar
Permanently deleted user

ToolWindowManager.getInstance(project).getToolWindow(toolWindowID).setIcon(icon)

Duane Fields wrote:

Thanks, but I'm not sure how this would work in this case. The problem is
that the icon is passed into the Plugin API, so I don't have access to the
button/icon, right?

--
Duane Fields
duane@deepmagic.com

"Carlos Costa e Silva" <carlos@keysoft.pt> wrote in message
news:aetbas$qe4$1@is.intellij.net...

>>> - how can I make the chat icon flash to indicate new content is in
>>

the

>>> chat window when auto-popup is off?
>>
>>I was going to answer with a small example, but ended doing it all myself


:)

>>Attached is a button flasher class.
>>It's tested with text only buttons and should work with text+icon buttons.
>>
>>Buttons without text (toolbar buttons mainly) should probably play around
>>with icon/pressedIcon instead of colors - don't have the time now to test
>>this.
>>
>>Some possible extensions:
>>
>>-> ColorFasher: flash different colors to instead of changing
>>bacgground/foreground.
>>
>>-> IconFlasher: Receives another icon and substitutes icons instead of
>>inverting the foreground/background.
>>
>>-> ImportantFlasher: also beeps at each n flashes.
>>
>>-> UrgentFlasher: Beeps, intensifies colors, ...
>>
>>-> CriticalFlasher: UrgentFlasher + reduces time between flashes + grabs
>>focus:) + ....
>>
>>Carlos
>>
>>--
>>Carlos Costa e Silva <carlos@keysoft.pt>
>>
>>
>>
>>



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Avatar
Permanently deleted user

It also seems chat disconnects and reconnects with each project change.
I think it should just be associated with an Application, not a Project.
Especially since the config is per IDE, not per project.
--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Avatar
Permanently deleted user

I agree but can't figure out how to get a toolwindow without passing in a
project...

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

It also seems chat disconnects and reconnects with each project change.
I think it should just be associated with an Application, not a Project.
Especially since the config is per IDE, not per project.
--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>


0
Avatar
Permanently deleted user

"Erb" <IDEA@erb.8m.com> wrote in message
news:aevec6$2n1$2@is.intellij.net...
>
ToolWindowManager.getInstance(project).getToolWindow(toolWindowID).setIcon(i
con)

With this method it seems easier. Just use a swing timer and change the
icons inside the actionPerformed method. With maybe a listener for stopping
the flash if the user presses the button.

Duane Fields wrote:

Thanks, but I'm not sure how this would work in this case. The problem

is

that the icon is passed into the Plugin API, so I don't have access to

the

button/icon, right?


Haven't looked at the plugin api yet.

Carlos



0
Avatar
Permanently deleted user

Good point, but maybe the (dis)connection can be separated from the window management then.
(part in Application, part in Project). I do this in my plugins.

Duane Fields wrote:

I agree but can't figure out how to get a toolwindow without passing in a
project...

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

>>It also seems chat disconnects and reconnects with each project change.
>>I think it should just be associated with an Application, not a Project.
>>Especially since the config is per IDE, not per project.
>>--
>>
>>Erb
>>
>>==============================================================
>>"Most of you are familiar with the virtues of a programmer.
>>There are three, of course: laziness, impatience, and hubris."
>> - Larry Wall
>>==============================================================
>>



--

Erb

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

0
Avatar
Permanently deleted user

Hi,

is it intention that when I press Alt-9 and chat plugin window popups, focus
is not set to input text field and I have to grab my mouse to do do?
Thanks.

Ales

"Duane Fields" <duane@deepmagic.com> wrote in message
news:aerioh$6nq$1@is.intellij.net...

http://www.intellij.org/twiki/bin/view/Main/ChatPlugin

>

This plugin provides a simple multi-user chat window, allowing you to chat
with other developers on your local LAN. It takes advantage of IP

Multicast,

which means it doesn't require a standalone chat server, but it also means
that it requires support for multicast and can't leave the LAN.

>

Currently it uses multicast group 239.1.2.3, port 1234 with a TTL of 1.
These values are configurable through the IDE options panel, but require
a restart to take effect.

>

This plugin requires IDEA 3.0, and was tested on build 629.

>

To install, simply copy the jar file into your $IDEA_HOME/plugins folder.
You can configure chat window options through the Chat configuration

screen

in the IDE Options panel.

>

Known Issues/Questions:
- would a split pane or textarea be more appropriate for the entry

line,

or is the 1 line entry ok?
- how can I make the chat icon flash to indicate new content is in the
chat window when auto-popup is off?
- does multicast work for most people?
- I'd like to make this an application component, but how do you
get an instance of ToolBarManager without a project?
- Don't try to enter non numeric values in the numeric fields

>

CHANGELOG

>

Version 1.0 - 6/15/01
- baseline

>

Version 1.1 - 6/20/01
- enhancement: chat window wordwraps and autoscrolls
- enhancement: multicast group, port, and ttl values are configurable
- enhancement: autopopup configurable for events (like people leaving)
- enhancement: renaming your self in session now triggers an event
- tweak: IRC style formatting for names and events
- tweak: added icon to config screen
- fix: plugin dies on project close
- fix: sending over 64K breaks the network (truncating)

>

--
Duane Fields
duane@deepmagic.com

>
>
>


0
Avatar
Permanently deleted user

Is it possible that you don't use a tool window for the chat plugin at all?
I would make it a separate small frame with its own toolbar, menu etc.
The reason the windowmanager is a project-level component is to have
separate sets of windows for each open project. Very soon, we will support
multiple open projects, so you will have a separate frame with all tool
windows for every project. I assume you would not want to have a chat
window in every frame?

Regards,
Eugene Belyaev
JetBrains


"Erb" <IDEA@erb.8m.com> wrote in message
news:af7a77$aae$1@is.intellij.net...

Good point, but maybe the (dis)connection can be separated from the window

management then.

(part in Application, part in Project). I do this in my plugins.

>

Duane Fields wrote:

I agree but can't figure out how to get a toolwindow without passing in

a

project...

>

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

>
>>It also seems chat disconnects and reconnects with each project change.
>>I think it should just be associated with an Application, not a Project.
>>Especially since the config is per IDE, not per project.
>>--
>>
>>Erb
>>
>>==============================================================
>>"Most of you are familiar with the virtues of a programmer.
>>There are three, of course: laziness, impatience, and hubris."
>> - Larry Wall
>>==============================================================
>>
>
>
>

>

--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>


0
Avatar
Permanently deleted user

Well, you can detach the window of course, and make it floating, giving you
that option if you like. I didn't know about the multiple-open-projects
scenario, though I think that is a good idea. I do however, like the current
"dockable" sort of feel though. It stays out of the way then pops up when
someone has a question. I agree however, that you don't really want project
specific chat... In fact the current implementation maintains a single
instance of the actual chat client, and just exposes it though the tool
window. I suppose I could simply unmimize a separate frame just as easily.

--
Duane Fields
duane@deepmagic.com

"Eugene Belyaev" <beg@intellij.com> wrote in message
news:afr1kc$9r7$1@is.intellij.net...

Is it possible that you don't use a tool window for the chat plugin at

all?

I would make it a separate small frame with its own toolbar, menu etc.
The reason the windowmanager is a project-level component is to have
separate sets of windows for each open project. Very soon, we will

support

multiple open projects, so you will have a separate frame with all tool
windows for every project. I assume you would not want to have a chat
window in every frame?

>

Regards,
Eugene Belyaev
JetBrains

>
>

"Erb" <IDEA@erb.8m.com> wrote in message
news:af7a77$aae$1@is.intellij.net...

Good point, but maybe the (dis)connection can be separated from the

window

management then.

(part in Application, part in Project). I do this in my plugins.

>

Duane Fields wrote:

I agree but can't figure out how to get a toolwindow without passing

in

a

project...

>

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

>
>>It also seems chat disconnects and reconnects with each project

change.

>>I think it should just be associated with an Application, not a

Project.

>>Especially since the config is per IDE, not per project.
>>--
>>
>>Erb
>>
>>==============================================================
>>"Most of you are familiar with the virtues of a programmer.
>>There are three, of course: laziness, impatience, and hubris."
>> - Larry Wall
>>==============================================================
>>
>
>
>

>

--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>

>
>


0
Avatar
Permanently deleted user

....

windows for every project. I assume you would not want to have a chat
window in every frame?

...

specific chat... In fact the current implementation maintains a single
instance of the actual chat client, and just exposes it though the tool
window. I suppose I could simply unmimize a separate frame just as easily.

...

You could also simply expose the single chat via multiple toolwindows, one
per project. Then you just pop up the one toolwindow on the active project
for incoming chat. If you keep all but one of the toolwindows minimized
across all project instances, you maintain both the dockability and the
illusion of having only one instance of the window. (I personally find a
toolwindow popping open from one side to be somewhat less disruptive than to
have a seperate frame popping up right over the middle of my code.)

-Walter Mundt




0
Avatar
Permanently deleted user

Interesting effect happens when you run a few instances of IDEA
simultaniously - I join the channel as many times as there are instances.

Eugene


"Duane Fields" <duane@deepmagic.com> wrote in message
news:afr7en$csk$1@is.intellij.net...

Well, you can detach the window of course, and make it floating, giving

you

that option if you like. I didn't know about the multiple-open-projects
scenario, though I think that is a good idea. I do however, like the

current

"dockable" sort of feel though. It stays out of the way then pops up when
someone has a question. I agree however, that you don't really want

project

specific chat... In fact the current implementation maintains a single
instance of the actual chat client, and just exposes it though the tool
window. I suppose I could simply unmimize a separate frame just as easily.

>

--
Duane Fields
duane@deepmagic.com

>

"Eugene Belyaev" <beg@intellij.com> wrote in message
news:afr1kc$9r7$1@is.intellij.net...

Is it possible that you don't use a tool window for the chat plugin at

all?

I would make it a separate small frame with its own toolbar, menu etc.
The reason the windowmanager is a project-level component is to have
separate sets of windows for each open project. Very soon, we will

support

multiple open projects, so you will have a separate frame with all tool
windows for every project. I assume you would not want to have a chat
window in every frame?

>

Regards,
Eugene Belyaev
JetBrains

>
>

"Erb" <IDEA@erb.8m.com> wrote in message
news:af7a77$aae$1@is.intellij.net...

Good point, but maybe the (dis)connection can be separated from the

window

management then.

(part in Application, part in Project). I do this in my plugins.

>

Duane Fields wrote:

I agree but can't figure out how to get a toolwindow without passing

in

a

project...

>

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

>
>>It also seems chat disconnects and reconnects with each project

change.

>>I think it should just be associated with an Application, not a

Project.

>>Especially since the config is per IDE, not per project.
>>--
>>
>>Erb
>>
>>==============================================================
>>"Most of you are familiar with the virtues of a programmer.
>>There are three, of course: laziness, impatience, and hubris."
>> - Larry Wall
>>==============================================================
>>
>
>
>

>

--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>

>
>

>
>


0
Avatar
Permanently deleted user

And another bug: on reopening projects the number of chat tool windows
increases.

Eugene


"Eugene Belyaev" <beg@intellij.com> wrote in message
news:aftd9c$phk$1@is.intellij.net...

Interesting effect happens when you run a few instances of IDEA
simultaniously - I join the channel as many times as there are instances.

>

Eugene

>
>

"Duane Fields" <duane@deepmagic.com> wrote in message
news:afr7en$csk$1@is.intellij.net...

Well, you can detach the window of course, and make it floating, giving

you

that option if you like. I didn't know about the multiple-open-projects
scenario, though I think that is a good idea. I do however, like the

current

"dockable" sort of feel though. It stays out of the way then pops up

when

someone has a question. I agree however, that you don't really want

project

specific chat... In fact the current implementation maintains a single
instance of the actual chat client, and just exposes it though the tool
window. I suppose I could simply unmimize a separate frame just as

easily.

>

--
Duane Fields
duane@deepmagic.com

>

"Eugene Belyaev" <beg@intellij.com> wrote in message
news:afr1kc$9r7$1@is.intellij.net...

Is it possible that you don't use a tool window for the chat plugin at

all?

I would make it a separate small frame with its own toolbar, menu etc.
The reason the windowmanager is a project-level component is to have
separate sets of windows for each open project. Very soon, we will

support

multiple open projects, so you will have a separate frame with all

tool

windows for every project. I assume you would not want to have a chat
window in every frame?

>

Regards,
Eugene Belyaev
JetBrains

>
>

"Erb" <IDEA@erb.8m.com> wrote in message
news:af7a77$aae$1@is.intellij.net...

Good point, but maybe the (dis)connection can be separated from the

window

management then.

(part in Application, part in Project). I do this in my plugins.

>

Duane Fields wrote:

I agree but can't figure out how to get a toolwindow without

passing

in

a

project...

>

--
Duane Fields
duane@deepmagic.com
"Erb" <IDEA@erb.8m.com> wrote in message
news:aeveir$2n1$3@is.intellij.net...

>
>>It also seems chat disconnects and reconnects with each project

change.

>>I think it should just be associated with an Application, not a

Project.

>>Especially since the config is per IDE, not per project.
>>--
>>
>>Erb
>>
>>==============================================================
>>"Most of you are familiar with the virtues of a programmer.
>>There are three, of course: laziness, impatience, and hubris."
>> - Larry Wall
>>==============================================================
>>
>
>
>

>

--

>

Erb

>

==============================================================
"Most of you are familiar with the virtues of a programmer.
There are three, of course: laziness, impatience, and hubris."
- Larry Wall
==============================================================

>

>
>

>
>

>
>


0

Please sign in to leave a comment.