diff options
Diffstat (limited to 'applications')
3 files changed, 19 insertions, 3 deletions
diff --git a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java index fd677ae98..54605af67 100644 --- a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java +++ b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/ChatRoomMessageHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 Remy Suen and others. + * Copyright (c) 2007, 2008 Remy Suen and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9,6 +9,7 @@ * Remy Suen <remy.suen@gmail.com> - initial API and implementation * Markus Kuppe <mkuppe@versant.com> - bug 184036 * Nick Boldt <codeslave@ca.ibm.com> - bug 206528, 209410 + * Dominik Goepel <dominik.goepel@gmx.de> - bug 216644 ******************************************************************************/ package org.eclipse.ecf.internal.presence.bot.kosmos; @@ -405,6 +406,12 @@ public class ChatRoomMessageHandler implements IChatRoomMessageHandler { private void sendMessageList(ID roomID, String target) { sendMessage(roomID, (target != null ? target + ": " : "") + CustomMessages.getString(CustomMessages.MessageList)); } + + private void sendSearchPlugins(ID roomID, String target, String searchString) { + searchString = searchString.replace(' ', '+'); + sendMessage(roomID, (target != null ? target + ": " : "") + NLS.bind(CustomMessages + .getString(CustomMessages.SearchPlugins), searchString)); + } private void writeToHTML(File file, String title, Properties properties) throws IOException { FileWriter out = new FileWriter(file); @@ -648,6 +655,8 @@ public class ChatRoomMessageHandler implements IChatRoomMessageHandler { sendEclipseHelp(roomID, target, cmdMatcher.group(2)); } else if (cmdMatcher.group(1).equals("list")) { //$NON-NLS-1$ sendMessageList(roomID, target); + } else if (cmdMatcher.group(1).equals("searchplugins ")) { //$NON-NLS-1$ + sendSearchPlugins(roomID, target, cmdMatcher.group(2)); } } } diff --git a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/CustomMessages.java b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/CustomMessages.java index 68030a803..8167ad0bf 100644 --- a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/CustomMessages.java +++ b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/CustomMessages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007 IBM Corporation and others. + * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation * Nick Boldt <codeslave@ca.ibm.com> - bug 206528 + * Dominik Goepel <dominik.goepel@gmx.de> - bug 216644 *******************************************************************************/ package org.eclipse.ecf.internal.presence.bot.kosmos; @@ -38,6 +39,7 @@ public class CustomMessages { static final String Wiki = "Wiki"; //$NON-NLS-1$ static final String EclipseHelp = "EclipseHelp"; //$NON-NLS-1$ static final String MessageList = "MessageList"; //$NON-NLS-1$ + static final String SearchPlugins = "SearchPlugins"; //$NON-NLS-1$ private static final String RESOURCE_BUNDLE = "org.eclipse.ecf.internal.presence.bot.kosmos.custom"; //$NON-NLS-1$ diff --git a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/custom.properties b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/custom.properties index bcf22e47c..90f04cc30 100644 --- a/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/custom.properties +++ b/applications/kosmos/bundles/org.eclipse.ecf.presence.bot.kosmos/src/org/eclipse/ecf/internal/presence/bot/kosmos/custom.properties @@ -1,5 +1,5 @@ ################################################################################ -# Copyright (c) 2007 Remy Suen and others. +# Copyright (c) 2007, 2008 Remy Suen and others. # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ # Contributors: # Remy Suen <remy.suen@gmail.com> - initial API and implementation # Nick Boldt <codeslave@ca.ibm.com> - bug 206528, 209410 +# Dominik Goepel <dominik.goepel@gmx.de> - bug 216644 ################################################################################ No_Operation_Privileges = {0}: Your name is not in my database of trusted users. You cannot tell me what to do. @@ -48,3 +49,7 @@ EclipseHelp = Check out the fine manual - http://help.eclipse.org/stable/advance MessageList_Regex = (list) MessageList = Check out the list of available messages and commands I provide - http://ecf.eclipse.org/~rcjsuen/messages.html - http://ecf.eclipse.org/~rcjsuen/commands.html + +SearchPlugins_Regex = (searchplugins )(.+) +SearchPlugins = Try searching for plug-ins: http://www.eclipseplugincentral.com/modules.php?name=search&action=search&q={0} - http://www.eclipse-plugins.info/eclipse/search.jsp?query={0} + |