[jitsi-users] Jitsi search field and enter key pressed


#1

Hi,

I personally need to customize Jitsi so that a call can be made by simply pressing the Enter key when a user types a number in the search field (as if the user had clicked on the call button within the search field). I need this because some of my users are more comfortable typing than clicking.

I don't think Jitsi offers this feature by default.

I'm not too familiar with the OSGI framework Jitsi uses so I'd really appreciate it if someone could tell me how I can do the following:

- I customized jitsi\src\net\java\sip\communicator\plugin\desktoputil\plaf\SearchFieldUI.java by adding a keyPressed event handler which calls a customized CallManager.createCall(searchText, c) when KeyEvent.VK_ENTER is found.
- I find no errors when compiling/building the code
- However, at run-time when the KeyPressed event is triggered I'm getting this error:

14:40:49.235 SEVERE: [28] util.UtilActivator.uncaughtException().108 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: net/java/sip/communicator/impl/gui/main/call/CallManager
java.lang.NoClassDefFoundError: net/java/sip/communicator/impl/gui/main/call/CallManager
at net.java.sip.communicator.plugin.desktoputil.plaf.SearchFieldUI.keyPressed(SearchFieldUI.java:616)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:249)
at java.awt.Component.processKeyEvent(Component.java:6463)
at javax.swing.JComponent.processKeyEvent(JComponent.java:2829)
at java.awt.Component.processEvent(Component.java:6282)
at java.awt.Container.processEvent(Container.java:2229)
at java.awt.Component.dispatchEventImpl(Component.java:4861)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1895)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727)
at java.awt.Component.dispatchEventImpl(Component.java:4731)
at java.awt.Container.dispatchEventImpl(Container.java:2287)
at java.awt.Window.dispatchEventImpl(Window.java:2719)
at java.awt.Component.dispatchEvent(Component.java:4687)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:729)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:688)
at java.awt.EventQueue$3.run(EventQueue.java:686)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:702)
at java.awt.EventQueue$4.run(EventQueue.java:700)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:699)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.ClassNotFoundException: net.java.sip.communicator.impl.gui.main.call.CallManager not found by net.java.sip.communicator.plugin.desktoputil [140]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1550)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:77)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1988)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 37 more

What's the correct way of making net.java.sip.communicator.plugin.desktoputil find net.java.sip.communicator.impl.gui.main.call.CallManager?
I tried fiddling with the manifest files but didn't succeed.

Thanks,

Vieri


#2

I personally need to customize Jitsi so that a call can be made by simply
pressing the Enter key when a user types a number in the search field (as if
the user had clicked on the call button within the search field). I need this
because some of my users are more comfortable typing than clicking.

I don't think Jitsi offers this feature by default.

I'm not too familiar with the OSGI framework Jitsi uses so I'd really
appreciate it if someone could tell me how I can do the following:

- I customized
jitsi\src\net\java\sip\communicator\plugin\desktoputil\plaf\SearchFieldUI
.jav a by adding a keyPressed event handler which calls a customized
CallManager.createCall(searchText, c) when KeyEvent.VK_ENTER is found. -
I find no errors when compiling/building the code - However, at run-time
when the KeyPressed event is triggered I'm getting this error:

14:40:49.235 SEVERE: [28] util.UtilActivator.uncaughtException().108 An
uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main]
and message was:
net/java/sip/communicator/impl/gui/main/call/CallManager
java.lang.NoClassDefFoundError:
[...]

What's the correct way of making net.java.sip.communicator.plugin.desktoputil
find net.java.sip.communicator.impl.gui.main.call.CallManager?

There is none as all impl packages are not intended to be accessed from anywhere outside.

I tried fiddling with the manifest files but didn't succeed.

Attach a listener to the keyevents somewhere in the UI package and call createCall from there.

Thanks,
Vieri

Ingo


#3

Attach a listener to the keyevents somewhere in the UI package and call createCall from there.

Thanks Ingo,

I added KeyPressed in

jitsi\src\net\java\sip\communicator\impl\gui\main\contactlist\ContactSearchFieldUI.java

and I can call CallManager.createCall() from there.

Thanks again,

Vieri

ยทยทยท

----- Original Message -----
From: Ingo Bauersachs <ingo@jitsi.org>
To: 'Jitsi Users' <users@jitsi.org>
Cc:
Sent: Tuesday, February 3, 2015 3:00 PM
Subject: Re: [jitsi-users] Jitsi search field and enter key pressed