Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 74372 Details for
Bug 192762
[IRC] Support common operations on usernames like op,voice,etc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
org.eclipse.ef.patch
clipboard.txt (text/plain), 7.12 KB, created by
Chris Aniszczyk
on 2007-07-23 12:45:48 EDT
(
hide
)
Description:
org.eclipse.ef.patch
Filename:
MIME Type:
Creator:
Chris Aniszczyk
Created:
2007-07-23 12:45:48 EDT
Size:
7.12 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ecf.provider.irc.ui >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.provider.irc.ui/plugin.xml,v >retrieving revision 1.5 >diff -u -r1.5 plugin.xml >--- plugin.xml 26 Apr 2007 19:53:23 -0000 1.5 >+++ plugin.xml 23 Jul 2007 16:44:50 -0000 >@@ -20,5 +20,23 @@ > targetId="org.eclipse.ui.DefaultTextEditor"> > </hyperlinkDetector> > </extension> >+ <extension >+ point="org.eclipse.ui.popupMenus"> >+ <objectContribution >+ id="org.eclipse.ecf.provider.irc.ui.objectContribution1" >+ objectClass="org.eclipse.ecf.core.user.IUser"> >+ <action >+ class="org.eclipse.ecf.internal.irc.ui.actions.Kick" >+ id="org.eclipse.ecf.provider.irc.ui.action2" >+ label="Kick" >+ menubarPath="additions"/> >+ <visibility> >+ <objectState >+ name="scheme" >+ value="irc"> >+ </objectState> >+ </visibility> >+ </objectContribution> >+ </extension> > > </plugin> >Index: src/org/eclipse/ecf/internal/irc/ui/actions/Kick.java >=================================================================== >RCS file: src/org/eclipse/ecf/internal/irc/ui/actions/Kick.java >diff -N src/org/eclipse/ecf/internal/irc/ui/actions/Kick.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/ecf/internal/irc/ui/actions/Kick.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,52 @@ >+/******************************************************************************* >+ * Copyright (c) 2007 Composent, Inc. 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 >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 192762 >+ ******************************************************************************/ >+ >+package org.eclipse.ecf.internal.irc.ui.actions; >+ >+import org.eclipse.ecf.core.IContainer; >+import org.eclipse.ecf.core.user.IUser; >+import org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView; >+import org.eclipse.jface.action.IAction; >+import org.eclipse.jface.viewers.ISelection; >+import org.eclipse.jface.viewers.IStructuredSelection; >+import org.eclipse.ui.IViewActionDelegate; >+import org.eclipse.ui.IViewPart; >+ >+public class Kick implements IViewActionDelegate { >+ >+ IUser user; >+ ChatRoomManagerView view; >+ >+ public void run(IAction action) { >+ if ((view == null) || (user == null)) { >+ return; >+ } >+ >+ view.sendMessageLine("/kick "+user.getName()); >+ >+ } >+ >+ public void selectionChanged(IAction action, ISelection selection) { >+ if (! (selection instanceof IStructuredSelection)) { >+ return; >+ } >+ >+ user = (IUser) ((IStructuredSelection) selection).getFirstElement(); >+ } >+ >+ public void init(IViewPart view) { >+ this.view = (ChatRoomManagerView) view; >+ IContainer container = (IContainer) view.getAdapter(IContainer.class); >+ if(container != null) >+ container.toString(); >+ } >+ >+} >#P org.eclipse.ecf.presence.ui >Index: src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ecf/plugins/org.eclipse.ecf.presence.ui/src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java,v >retrieving revision 1.13 >diff -u -r1.13 ChatRoomManagerView.java >--- src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java 21 Jul 2007 22:43:55 -0000 1.13 >+++ src/org/eclipse/ecf/presence/ui/chatroom/ChatRoomManagerView.java 23 Jul 2007 16:44:51 -0000 >@@ -7,6 +7,7 @@ > * > * Contributors: > * Composent, Inc. - initial API and implementation >+ * Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 192762 > ******************************************************************************/ > package org.eclipse.ecf.presence.ui.chatroom; > >@@ -84,9 +85,11 @@ > import org.eclipse.swt.layout.GridData; > import org.eclipse.swt.widgets.Composite; > import org.eclipse.swt.widgets.Display; >+import org.eclipse.swt.widgets.List; > import org.eclipse.swt.widgets.Menu; > import org.eclipse.swt.widgets.ScrollBar; > import org.eclipse.swt.widgets.Text; >+import org.eclipse.ui.IActionFilter; > import org.eclipse.ui.ISharedImages; > import org.eclipse.ui.IWorkbenchActionConstants; > import org.eclipse.ui.IWorkbenchPreferenceConstants; >@@ -106,6 +109,8 @@ > > public static final String VIEW_ID = "org.eclipse.ecf.presence.ui.chatroom.ChatRoomManagerView"; //$NON-NLS-1$ > >+ public static final String PARTICIPANTS_MENU_ID = "org.eclipse.ecf.presence.ui.chatroom.participantsView"; //$NON-NLS-1$ >+ > private static final int RATIO_WRITE_PANE = 1; > > private static final int RATIO_READ_PANE = 9; >@@ -167,6 +172,8 @@ > private Hashtable chatRooms = new Hashtable(); > > private IChatRoomCommandListener commandListener = null; >+ >+ private IChatRoomContainer container = null; > > private String localUserName = Messages.ChatRoomManagerView_DEFAULT_USER; > >@@ -236,6 +243,9 @@ > > makeActions(); > hookContextMenu(); >+ if (withParticipants) { >+ hookParticipantsContextMenu(); >+ } > } > > private StyledText createStyledTextWidget(Composite parent) { >@@ -331,7 +341,16 @@ > }; > getSite().registerContextMenu(menuMgr, selectionProvider); > } >- >+ >+ private void hookParticipantsContextMenu() { >+ MenuManager menuMgr = new MenuManager(); >+ menuMgr.setRemoveAllWhenShown(true); >+ List list = (List) listViewer.getControl(); >+ Menu menu = menuMgr.createContextMenu(list); >+ list.setMenu(menu); >+ getSite().registerContextMenu(PARTICIPANTS_MENU_ID, menuMgr, listViewer); >+ } >+ > private void makeActions() { > tabSelectAll = new Action() { > public void run() { >@@ -508,6 +527,7 @@ > .setTitleToolTip(Messages.ChatRoomManagerView_VIEW_TITLE_HOST_PREFIX > + ChatRoomManagerView.this.hostName); > if (rootChatRoomContainer != null) { >+ ChatRoomManagerView.this.container = rootChatRoomContainer; > ChatRoomManagerView.this.rootMessageSender = rootChatRoomContainer > .getChatRoomMessageSender(); > rootChannelTab = new ChatRoomTab(false, rootTabFolder, >@@ -1215,7 +1235,7 @@ > } > } > >- class ChatRoomParticipant implements IUser { >+ class ChatRoomParticipant implements IUser, IActionFilter { > private static final long serialVersionUID = 2008114088656711572L; > > ID id; >@@ -1265,6 +1285,15 @@ > public String getNickname() { > return getName(); > } >+ >+ public boolean testAttribute(Object target, String name, String value) { >+ if(name.equals("scheme")) { //$NON-NLS-1$ >+ IChatRoomContainer container = ChatRoomManagerView.this.container; >+ String scheme = container.getConnectedID().getNamespace().getScheme(); >+ return scheme.equalsIgnoreCase(value); >+ } >+ return false; >+ } > } > > protected String getCurrentDate(String format) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 192762
:
74316
|
74340
|
74366
|
74367
| 74372 |
74373
|
74432
|
74474
|
74514
|
74669