Faild to add a button to a chat room

Hi all

I tried to add a button to a chat room which the example codes do.

Finally it is still not working.

Here are my codes:


package com.jivesoftware.ssm;

import com.jivesoftware.spark.*;

import com.jivesoftware.spark.ui.*;

import com.jivesoftware.spark.plugin.Plugin;

import java.awt.event.*;

import javax.swing.*;

class Ssm implements Plugin{

private void addChatRoomEditorButton() {

ChatManager chatManager = SparkManager.getChatManager();

final ChatRoomButton button = new ChatRoomButton(“Push Me!”);

button.setToolTipText(“Share an editor”);

chatManager.addChatRoomListener(new ChatRoomListenerAdapter() {

public void chatRoomOpened(final ChatRoom room) {

room.getToolBar().addChatRoomButton(button);

button.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {

}});

}

public void chatRoomLeft(ChatRoom room) {

room.getToolBar().removeChatRoomButton(button);

}

});

}

public void initialize(){

addChatRoomEditorButton();

}

public boolean canShutDown(){

return true;

}

public void shutdown(){

}

public void uninstall(){

}

}

My plugin.xml is:



I put the java source file into the src directory which is in sparkplug_kit_home/builder/src

Then type ant jar to make the myplugin.jar file

and cut this jar file into the Spark_home/plugins directory

My Spark version is 2.0.7

After restarting the Spark,

there is nothing appearing in the toolbar of the chat room

I feel so depressed and do not know where the problem is.

Please someone help me.

Message was edited by: eori

Hi,

Are you debugging to verify that your plugin is actually being loaded?

Cheers,

Derek