Fix plugin listeners.

cusax-fix
Yana Stamcheva 18 years ago
parent 4b884386ed
commit 5cfe944d37

@ -87,6 +87,8 @@ public void start(BundleContext bundleContext) throws Exception {
finally {
logger.logExit();
}
bundleContext.addServiceListener(uiService);
}
/**

@ -12,8 +12,6 @@
import javax.swing.*;
import org.osgi.framework.*;
import net.java.sip.communicator.impl.gui.event.*;
import net.java.sip.communicator.impl.gui.lookandfeel.*;
import net.java.sip.communicator.impl.gui.main.*;
@ -27,10 +25,11 @@
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
import org.osgi.framework.*;
/**
* An implementation of the <tt>UIService</tt> that gives access to other
* bundles to this particular swing ui implementation.
@ -360,7 +359,7 @@ private void firePluginEvent( PluginComponent pluginComponent,
= new PluginComponentEvent( pluginComponent,
eventID);
logger.trace("Will dispatch the following plugin component event: "
logger.debug("Will dispatch the following plugin component event: "
+ evt);
synchronized (pluginComponentListeners)
@ -856,7 +855,7 @@ public void serviceChanged(ServiceEvent event)
if (event.getType() == ServiceEvent.REGISTERED)
{
logger
.debug("Handling registration of a new Plugin Component.");
.info("Handling registration of a new Plugin Component.");
if(!(pluginComponent.getComponent() instanceof Component))
{

@ -1298,9 +1298,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent c = (PluginComponent) GuiActivator
@ -1317,7 +1316,7 @@ private void initPluginComponents()
this.getContentPane().add( (Component) c.getComponent(),
constraints);
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -76,7 +76,7 @@ public MainTabbedPane(MainFrame parent) {
this.addChangeListener(this);
GuiActivator.getUIService().addPluginComponentListener(this);
this.initPluginComponents();
}
/**
@ -175,9 +175,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -186,6 +185,7 @@ private void initPluginComponents()
this.addTab(component.getName(),
(Component) component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -138,9 +138,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -148,6 +147,7 @@ private void initPluginComponents()
this.pluginPanel.add((Component)component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -13,23 +13,21 @@
import javax.swing.*;
import org.osgi.framework.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.customcontrols.events.*;
import net.java.sip.communicator.impl.gui.event.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.MainFrame.*;
import net.java.sip.communicator.impl.gui.main.chat.menus.*;
import net.java.sip.communicator.impl.gui.main.chat.toolBars.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.impl.gui.utils.Constants;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.util.*;
import org.osgi.framework.*;
/**
* The chat window is the place, where users can write and send messages, view
* received messages. The ChatWindow supports two modes of use: "Group all
@ -676,8 +674,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin component reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
@ -689,6 +687,7 @@ private void initPluginComponents()
this.add((Component)c.getComponent(), borderLayoutConstraint);
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -92,9 +92,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -102,6 +101,7 @@ private void initPluginComponents()
this.add((Component)component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -400,9 +400,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -413,6 +412,7 @@ private void initPluginComponents()
this.revalidate();
this.repaint();
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -403,9 +403,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -416,6 +415,7 @@ private void initPluginComponents()
this.revalidate();
this.repaint();
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -384,9 +384,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -396,6 +395,7 @@ private void initPluginComponents()
this.add((Component)component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -166,9 +166,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -180,6 +179,7 @@ private void initPluginComponents()
this.repaint();
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -212,9 +212,8 @@ else if(selectedValue instanceof MetaContactGroup)
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -233,11 +232,11 @@ else if(selectedValue instanceof MetaContactGroup)
.setCurrentContactGroup((MetaContactGroup)selectedValue);
}
this.add((Component)component.getComponent());
this.repaint();
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -91,8 +91,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
@ -101,6 +101,7 @@ private void initPluginComponents()
this.add((Component)component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -208,9 +208,8 @@ else if(selectedValue instanceof MetaContactGroup)
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -229,11 +228,11 @@ else if(selectedValue instanceof MetaContactGroup)
.setCurrentContactGroup((MetaContactGroup)selectedValue);
}
this.add((Component)component.getComponent());
this.repaint();
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

@ -109,9 +109,8 @@ private void initPluginComponents()
logger.error("Could not obtain plugin reference.", exc);
}
if (serRefs == null)
return;
if (serRefs != null)
{
for (int i = 0; i < serRefs.length; i ++)
{
PluginComponent component = (PluginComponent) GuiActivator
@ -119,6 +118,7 @@ private void initPluginComponents()
this.add((Component)component.getComponent());
}
}
GuiActivator.getUIService().addPluginComponentListener(this);
}

Loading…
Cancel
Save