[sip-comm-dev] Implementing a SpellChecker


#1

Hello Folks,

I have been working on a Spell Checker implementation for the new
build now. As things have changed and SIP Communicator has evolved, I
figured out some more basic stuff, learned few things and the Quest
continues. :slight_smile:

Porting of Damian's code was also what I was working on.. I did manage
to seperate the GUI specific code and the Core Spell Checker classes.
Made a build out of it,still getting some exceptions. Will tinker
around more for a while.

Other Approach was getting a fresh implementation out of the JOrtho
API, which even Damian had considered but ditched for JMySpell API.

As Emcho wanted me to post some "Quick" code which code be then worked
and helped by more experienced developers, I had this second task in
mind.

I was following some of the same design which Damian had worked on.

A new interface "NewChatListener" in
"net.java.sip.communicator.service.gui.event" containing a method
"void chatCreated(Chat newChat);"

The SpellChecker plugin class implements the NewChatListener.

With the Observer Pattern at my disposal, the chatCreated(Chat
newChat) method gets call every time a new ChatWindow and ChatPanel is
created.

The Approach seems to have a flaw, from what I could comprehend. When
a "createChat(args)" method in the
"net.java.sip.communicator.impl.gui.main.chat.ChatWindowManager" is
called, all the listeners attached are notified.
This is useles as we just want a new SpellChecker instance to get
attached, rather than all listeners to be notified.
Wonder if a typical Observer pattern is what we need here. :expressionless:

For Now following this approach, to register my SpellChecker Service
with the new JEditorPane in the ChatWritePanel. I need a refrence of
it. All I have is a Chat service refrence.

What could be the best way out? :slight_smile:

An insight by some of the experienced developer's would be helpful.

Regards
Nitish

路路路

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net


#2

Hi Nitish,

-- sent from my mobile

Hello Folks,

I have been working on a Spell Checker implementation for the new
build now. As things have changed and SIP Communicator has evolved, I
figured out some more basic stuff, learned few things and the Quest
continues. :slight_smile:

Porting of Damian's code was also what I was working on.. I did manage
to seperate the GUI specific code and the Core Spell Checker classes.
Made a build out of it,still getting some exceptions. Will tinker
around more for a while.

Sounds promissing!

Other Approach was getting a fresh implementation out of the JOrtho
API, which even Damian had considered but ditched for JMySpell API.

As Emcho wanted me to post some "Quick" code which code be then worked
and helped by more experienced developers, I had this second task in
mind.

I was following some of the same design which Damian had worked on.

So, you've started a new implementation using JOrtho, right?

A new interface "NewChatListener" in
"net.java.sip.communicator.service.gui.event" containing a method
"void chatCreated(Chat newChat);"

The SpellChecker plugin class implements the NewChatListener.

With the Observer Pattern at my disposal, the chatCreated(Chat
newChat) method gets call every time a new ChatWindow and ChatPanel is
created.

The Approach seems to have a flaw, from what I could comprehend. When
a "createChat(args)" method in the
"net.java.sip.communicator.impl.gui.main.chat.ChatWindowManager" is
called, all the listeners attached are notified.
This is useles as we just want a new SpellChecker instance to get
attached, rather than all listeners to be notified.
Wonder if a typical Observer pattern is what we need here. :expressionless:

I understand what's bothering you, however I think the chatCreated event could be very useful in other modules than the spellchecker. So it's rather a general approach that could be used also for the spellchecker than an overly complicated manner to address the specific spellchecker issue.

For Now following this approach, to register my SpellChecker Service
with the new JEditorPane in the ChatWritePanel. I need a refrence of
it. All I have is a Chat service refrence.

What you need more other than the Chat reference? Could it be added to the existing Chat interface?

Cheers,
Yana

路路路

On 23 ao没t 2010, at 17:26, Nitish Upreti <nitishupreti@gmail.com> wrote:

What could be the best way out? :slight_smile:

An insight by some of the experienced developer's would be helpful.

Regards
Nitish

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@sip-communicator.dev.java.net
For additional commands, e-mail: dev-help@sip-communicator.dev.java.net