diff options
author | Eike Stepper | 2012-07-19 08:22:04 +0000 |
---|---|---|
committer | Eike Stepper | 2012-07-19 08:22:04 +0000 |
commit | 1460904fd3c193ffaf809913b2983a400fce9d94 (patch) | |
tree | 72f3a17b75fedba3ae1060df1d32c9c7889be954 /plugins/org.eclipse.net4j.buddies.chat | |
parent | 5f360965ae87478e0681899bf310a210cafc2c44 (diff) | |
download | cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.gz cdo-1460904fd3c193ffaf809913b2983a400fce9d94.tar.xz cdo-1460904fd3c193ffaf809913b2983a400fce9d94.zip |
Fix line endings in master (dos2unix)
Diffstat (limited to 'plugins/org.eclipse.net4j.buddies.chat')
18 files changed, 526 insertions, 526 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.chat/.settings/org.eclipse.core.resources.prefs b/plugins/org.eclipse.net4j.buddies.chat/.settings/org.eclipse.core.resources.prefs index 919eb82b99..2e8471f207 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/.settings/org.eclipse.core.resources.prefs +++ b/plugins/org.eclipse.net4j.buddies.chat/.settings/org.eclipse.core.resources.prefs @@ -1,3 +1,3 @@ -#Mon Jul 04 12:54:17 CEST 2011
-eclipse.preferences.version=1
-encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8
+#Mon Jul 04 12:54:17 CEST 2011 +eclipse.preferences.version=1 +encoding//model/org.eclipse.emf.cdo.defs.ecorediag=UTF-8 diff --git a/plugins/org.eclipse.net4j.buddies.chat/about.mappings b/plugins/org.eclipse.net4j.buddies.chat/about.mappings index 720ca870fa..bddaab4310 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/about.mappings +++ b/plugins/org.eclipse.net4j.buddies.chat/about.mappings @@ -1,6 +1,6 @@ -# about.mappings
-# contains fill-ins for about.properties
-# java.io.Properties file (ISO 8859-1 with "\" escapes)
-# This file does not need to be translated.
-
+# about.mappings +# contains fill-ins for about.properties +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file does not need to be translated. + 0=@build@
\ No newline at end of file diff --git a/plugins/org.eclipse.net4j.buddies.chat/about.properties b/plugins/org.eclipse.net4j.buddies.chat/about.properties index 9dd2e1fb11..f116ab5dbf 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/about.properties +++ b/plugins/org.eclipse.net4j.buddies.chat/about.properties @@ -1,31 +1,31 @@ -# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
-# Eike Stepper - initial API and implementation
-
-# NLS_MESSAGEFORMAT_VAR
-
-# ==============================================================================
-# Do not change the properties between this line and the last line containing:
-# %%% END OF TRANSLATED PROPERTIES %%%
-# Instead, either redefine an existing property, or create a new property,
-# append it to the end of the file, and change the code to use the new name.
-# ==============================================================================
-
-featureName = Net4j Buddies Chat
-featureText = Net4j Buddies Chat\n\
-Version: {featureVersion}\n\
-Build id: {0}\n\
-\n\
-Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\
-\n\
-Visit http://wiki.eclipse.org/Net4j
-
-# ==============================================================================
-# %%% END OF TRANSLATED PROPERTIES %%%
-# The above properties have been shipped for translation.
-# ==============================================================================
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: +# Eike Stepper - initial API and implementation + +# NLS_MESSAGEFORMAT_VAR + +# ============================================================================== +# Do not change the properties between this line and the last line containing: +# %%% END OF TRANSLATED PROPERTIES %%% +# Instead, either redefine an existing property, or create a new property, +# append it to the end of the file, and change the code to use the new name. +# ============================================================================== + +featureName = Net4j Buddies Chat +featureText = Net4j Buddies Chat\n\ +Version: {featureVersion}\n\ +Build id: {0}\n\ +\n\ +Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others. All rights reserved.\n\ +\n\ +Visit http://wiki.eclipse.org/Net4j + +# ============================================================================== +# %%% END OF TRANSLATED PROPERTIES %%% +# The above properties have been shipped for translation. +# ============================================================================== diff --git a/plugins/org.eclipse.net4j.buddies.chat/copyright.txt b/plugins/org.eclipse.net4j.buddies.chat/copyright.txt index 8f6328980e..0a0f67e6d7 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/copyright.txt +++ b/plugins/org.eclipse.net4j.buddies.chat/copyright.txt @@ -1,8 +1,8 @@ -Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
+Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: Eike Stepper - initial API and implementation
\ No newline at end of file diff --git a/plugins/org.eclipse.net4j.buddies.chat/plugin.properties b/plugins/org.eclipse.net4j.buddies.chat/plugin.properties index 2a7eabf865..88a1f16582 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/plugin.properties +++ b/plugins/org.eclipse.net4j.buddies.chat/plugin.properties @@ -1,11 +1,11 @@ -# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
-# Eike Stepper - initial API and implementation
-
-pluginName = Net4j Buddies Chat
-providerName = Eclipse Modeling Project
+# Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: +# Eike Stepper - initial API and implementation + +pluginName = Net4j Buddies Chat +providerName = Eclipse Modeling Project diff --git a/plugins/org.eclipse.net4j.buddies.chat/plugin.xml b/plugins/org.eclipse.net4j.buddies.chat/plugin.xml index 72219ea2ea..06cc6db4dc 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/plugin.xml +++ b/plugins/org.eclipse.net4j.buddies.chat/plugin.xml @@ -1,28 +1,28 @@ -<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<!--
- Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- Eike Stepper - initial API and implementation
--->
-
-<plugin>
-
- <extension
- point="org.eclipse.net4j.util.factories">
- <factory
- class="org.eclipse.net4j.buddies.internal.chat.ChatFactory"
- productGroup="org.eclipse.net4j.buddies.clientFacilities"
- type="chat"/>
- <factory
- class="org.eclipse.net4j.buddies.internal.chat.ChatRoomFactory"
- productGroup="org.eclipse.net4j.buddies.serverFacilities"
- type="chat"/>
- </extension>
-
-</plugin>
+<?xml version="1.0" encoding="UTF-8"?> +<?eclipse version="3.4"?> +<!-- + Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + Eike Stepper - initial API and implementation +--> + +<plugin> + + <extension + point="org.eclipse.net4j.util.factories"> + <factory + class="org.eclipse.net4j.buddies.internal.chat.ChatFactory" + productGroup="org.eclipse.net4j.buddies.clientFacilities" + type="chat"/> + <factory + class="org.eclipse.net4j.buddies.internal.chat.ChatRoomFactory" + productGroup="org.eclipse.net4j.buddies.serverFacilities" + type="chat"/> + </extension> + +</plugin> diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java index 2d320ce5e1..258db7ca21 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChat.java @@ -1,25 +1,25 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.chat;
-
-import org.eclipse.net4j.buddies.common.IFacility;
-
-/**
- * @author Eike Stepper
- */
-public interface IChat extends IFacility
-{
- public static final String TYPE = "chat"; //$NON-NLS-1$
-
- public IComment[] getComments();
-
- public void sendComment(String text);
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.chat; + +import org.eclipse.net4j.buddies.common.IFacility; + +/** + * @author Eike Stepper + */ +public interface IChat extends IFacility +{ + public static final String TYPE = "chat"; //$NON-NLS-1$ + + public IComment[] getComments(); + + public void sendComment(String text); +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChatRoom.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChatRoom.java index 76080b2e76..e0c239caa4 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChatRoom.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IChatRoom.java @@ -1,18 +1,18 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.chat;
-
-/**
- * @author Eike Stepper
- */
-public interface IChatRoom extends IChat
-{
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.chat; + +/** + * @author Eike Stepper + */ +public interface IChatRoom extends IChat +{ +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IComment.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IComment.java index 90e5b7404e..08144701dd 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IComment.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/IComment.java @@ -1,23 +1,23 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.chat;
-
-/**
- * @author Eike Stepper
- */
-public interface IComment
-{
- public long getReceiveTime();
-
- public String getSenderID();
-
- public String getText();
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.chat; + +/** + * @author Eike Stepper + */ +public interface IComment +{ + public long getReceiveTime(); + + public String getSenderID(); + + public String getText(); +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/ICommentEvent.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/ICommentEvent.java index 82507bbea2..5c5943bc01 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/ICommentEvent.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/chat/ICommentEvent.java @@ -1,26 +1,26 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.chat;
-
-import org.eclipse.net4j.util.event.IEvent;
-
-/**
- * @author Eike Stepper
- */
-public interface ICommentEvent extends IEvent
-{
- /**
- * @since 3.0
- */
- public IChat getSource();
-
- public IComment getComment();
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.chat; + +import org.eclipse.net4j.util.event.IEvent; + +/** + * @author Eike Stepper + */ +public interface ICommentEvent extends IEvent +{ + /** + * @since 3.0 + */ + public IChat getSource(); + + public IComment getComment(); +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java index a1d741a12a..6f75253a0c 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Chat.java @@ -1,72 +1,72 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.chat.IChat;
-import org.eclipse.net4j.buddies.chat.IComment;
-import org.eclipse.net4j.buddies.common.IMessage;
-import org.eclipse.net4j.buddies.spi.common.Facility;
-import org.eclipse.net4j.util.event.IListener;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Eike Stepper
- */
-public class Chat extends Facility implements IChat
-{
- private List<IComment> comments = new ArrayList<IComment>();
-
- public Chat()
- {
- super(TYPE);
- }
-
- public IComment[] getComments()
- {
- synchronized (comments)
- {
- return comments.toArray(new IComment[comments.size()]);
- }
- }
-
- public void sendComment(String text)
- {
- TextMessage message = new TextMessage(text);
- sendMessage(message);
- addComment(message.getSenderID(), text);
- }
-
- @Override
- public void handleMessage(IMessage message)
- {
- if (message instanceof TextMessage)
- {
- addComment(message.getSenderID(), ((TextMessage)message).getText());
- }
- }
-
- protected void addComment(String senderID, String text)
- {
- Comment comment = new Comment(System.currentTimeMillis(), senderID, text);
- synchronized (comments)
- {
- comments.add(comment);
- }
-
- IListener[] listeners = getListeners();
- if (listeners != null)
- {
- fireEvent(new CommentEvent(this, comment), listeners);
- }
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.chat.IChat; +import org.eclipse.net4j.buddies.chat.IComment; +import org.eclipse.net4j.buddies.common.IMessage; +import org.eclipse.net4j.buddies.spi.common.Facility; +import org.eclipse.net4j.util.event.IListener; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Eike Stepper + */ +public class Chat extends Facility implements IChat +{ + private List<IComment> comments = new ArrayList<IComment>(); + + public Chat() + { + super(TYPE); + } + + public IComment[] getComments() + { + synchronized (comments) + { + return comments.toArray(new IComment[comments.size()]); + } + } + + public void sendComment(String text) + { + TextMessage message = new TextMessage(text); + sendMessage(message); + addComment(message.getSenderID(), text); + } + + @Override + public void handleMessage(IMessage message) + { + if (message instanceof TextMessage) + { + addComment(message.getSenderID(), ((TextMessage)message).getText()); + } + } + + protected void addComment(String senderID, String text) + { + Comment comment = new Comment(System.currentTimeMillis(), senderID, text); + synchronized (comments) + { + comments.add(comment); + } + + IListener[] listeners = getListeners(); + if (listeners != null) + { + fireEvent(new CommentEvent(this, comment), listeners); + } + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatFactory.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatFactory.java index 2890502b10..f22be39d81 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatFactory.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatFactory.java @@ -1,31 +1,31 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.chat.IChat;
-import org.eclipse.net4j.buddies.spi.common.ClientFacilityFactory;
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-/**
- * @author Eike Stepper
- */
-public class ChatFactory extends ClientFacilityFactory
-{
- public ChatFactory()
- {
- super(IChat.TYPE);
- }
-
- public Chat create(String description) throws ProductCreationException
- {
- return new Chat();
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.chat.IChat; +import org.eclipse.net4j.buddies.spi.common.ClientFacilityFactory; +import org.eclipse.net4j.util.factory.ProductCreationException; + +/** + * @author Eike Stepper + */ +public class ChatFactory extends ClientFacilityFactory +{ + public ChatFactory() + { + super(IChat.TYPE); + } + + public Chat create(String description) throws ProductCreationException + { + return new Chat(); + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoom.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoom.java index cab1ff3986..d1325ccdaa 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoom.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoom.java @@ -1,36 +1,36 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.chat.IChatRoom;
-import org.eclipse.net4j.buddies.common.IMessage;
-
-/**
- * @author Eike Stepper
- */
-public class ChatRoom extends Chat implements IChatRoom
-{
- public ChatRoom()
- {
- }
-
- @Override
- public void sendComment(String text)
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void handleMessage(IMessage message)
- {
- sendMessage(message);
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.chat.IChatRoom; +import org.eclipse.net4j.buddies.common.IMessage; + +/** + * @author Eike Stepper + */ +public class ChatRoom extends Chat implements IChatRoom +{ + public ChatRoom() + { + } + + @Override + public void sendComment(String text) + { + throw new UnsupportedOperationException(); + } + + @Override + public void handleMessage(IMessage message) + { + sendMessage(message); + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java index 9d3f7f749a..4676e76799 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/ChatRoomFactory.java @@ -1,32 +1,32 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.spi.common.ServerFacilityFactory;
-import org.eclipse.net4j.util.factory.ProductCreationException;
-
-/**
- * @author Eike Stepper
- */
-public class ChatRoomFactory extends ServerFacilityFactory
-{
- public static final String TYPE = "chat"; //$NON-NLS-1$
-
- public ChatRoomFactory()
- {
- super(TYPE);
- }
-
- public ChatRoom create(String description) throws ProductCreationException
- {
- return new ChatRoom();
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.spi.common.ServerFacilityFactory; +import org.eclipse.net4j.util.factory.ProductCreationException; + +/** + * @author Eike Stepper + */ +public class ChatRoomFactory extends ServerFacilityFactory +{ + public static final String TYPE = "chat"; //$NON-NLS-1$ + + public ChatRoomFactory() + { + super(TYPE); + } + + public ChatRoom create(String description) throws ProductCreationException + { + return new ChatRoom(); + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Comment.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Comment.java index 7208ba190b..a56fa81eb3 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Comment.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/Comment.java @@ -1,51 +1,51 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.chat.IComment;
-
-import java.io.Serializable;
-
-/**
- * @author Eike Stepper
- */
-public class Comment implements IComment, Serializable
-{
- private static final long serialVersionUID = 1L;
-
- private long receiveTime;
-
- private String senderID;
-
- private String text;
-
- public Comment(long receiveTime, String senderID, String text)
- {
- this.receiveTime = receiveTime;
- this.senderID = senderID;
- this.text = text;
- }
-
- public long getReceiveTime()
- {
- return receiveTime;
- }
-
- public String getSenderID()
- {
- return senderID;
- }
-
- public String getText()
- {
- return text;
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.chat.IComment; + +import java.io.Serializable; + +/** + * @author Eike Stepper + */ +public class Comment implements IComment, Serializable +{ + private static final long serialVersionUID = 1L; + + private long receiveTime; + + private String senderID; + + private String text; + + public Comment(long receiveTime, String senderID, String text) + { + this.receiveTime = receiveTime; + this.senderID = senderID; + this.text = text; + } + + public long getReceiveTime() + { + return receiveTime; + } + + public String getSenderID() + { + return senderID; + } + + public String getText() + { + return text; + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/CommentEvent.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/CommentEvent.java index 4f5a90b8b2..6045ff4204 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/CommentEvent.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/CommentEvent.java @@ -1,46 +1,46 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.chat.IChat;
-import org.eclipse.net4j.buddies.chat.IComment;
-import org.eclipse.net4j.buddies.chat.ICommentEvent;
-import org.eclipse.net4j.util.event.Event;
-
-/**
- * @author Eike Stepper
- */
-public class CommentEvent extends Event implements ICommentEvent
-{
- private static final long serialVersionUID = 1L;
-
- private IComment comment;
-
- public CommentEvent(IChat chat, IComment comment)
- {
- super(chat);
- this.comment = comment;
- }
-
- /**
- * @since 3.0
- */
- @Override
- public IChat getSource()
- {
- return (IChat)super.getSource();
- }
-
- public IComment getComment()
- {
- return comment;
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.chat.IChat; +import org.eclipse.net4j.buddies.chat.IComment; +import org.eclipse.net4j.buddies.chat.ICommentEvent; +import org.eclipse.net4j.util.event.Event; + +/** + * @author Eike Stepper + */ +public class CommentEvent extends Event implements ICommentEvent +{ + private static final long serialVersionUID = 1L; + + private IComment comment; + + public CommentEvent(IChat chat, IComment comment) + { + super(chat); + this.comment = comment; + } + + /** + * @since 3.0 + */ + @Override + public IChat getSource() + { + return (IChat)super.getSource(); + } + + public IComment getComment() + { + return comment; + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/TextMessage.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/TextMessage.java index 5640493e22..8f74e4624e 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/TextMessage.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/TextMessage.java @@ -1,37 +1,37 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat;
-
-import org.eclipse.net4j.buddies.spi.common.Message;
-
-/**
- * @author Eike Stepper
- */
-public class TextMessage extends Message
-{
- private static final long serialVersionUID = 1L;
-
- private String text;
-
- public TextMessage(String text)
- {
- this.text = encode(text);
- }
-
- protected TextMessage()
- {
- }
-
- public String getText()
- {
- return decode(text);
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat; + +import org.eclipse.net4j.buddies.spi.common.Message; + +/** + * @author Eike Stepper + */ +public class TextMessage extends Message +{ + private static final long serialVersionUID = 1L; + + private String text; + + public TextMessage(String text) + { + this.text = encode(text); + } + + protected TextMessage() + { + } + + public String getText() + { + return decode(text); + } +} diff --git a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/bundle/OM.java b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/bundle/OM.java index f2ed94ce50..7a19b9a749 100644 --- a/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/bundle/OM.java +++ b/plugins/org.eclipse.net4j.buddies.chat/src/org/eclipse/net4j/buddies/internal/chat/bundle/OM.java @@ -1,44 +1,44 @@ -/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.buddies.internal.chat.bundle;
-
-import org.eclipse.net4j.util.om.OMBundle;
-import org.eclipse.net4j.util.om.OMPlatform;
-import org.eclipse.net4j.util.om.OSGiActivator;
-import org.eclipse.net4j.util.om.log.OMLogger;
-import org.eclipse.net4j.util.om.trace.OMTracer;
-
-/**
- * The <em>Operations & Maintenance</em> class of this bundle.
- *
- * @author Eike Stepper
- */
-public abstract class OM
-{
- public static final String BUNDLE_ID = "org.eclipse.net4j.buddies.chat"; //$NON-NLS-1$
-
- public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class);
-
- public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$
-
- public static final OMLogger LOG = BUNDLE.logger();
-
- /**
- * @author Eike Stepper
- */
- public static final class Activator extends OSGiActivator
- {
- public Activator()
- {
- super(BUNDLE);
- }
- }
-}
+/* + * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) 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: + * Eike Stepper - initial API and implementation + */ +package org.eclipse.net4j.buddies.internal.chat.bundle; + +import org.eclipse.net4j.util.om.OMBundle; +import org.eclipse.net4j.util.om.OMPlatform; +import org.eclipse.net4j.util.om.OSGiActivator; +import org.eclipse.net4j.util.om.log.OMLogger; +import org.eclipse.net4j.util.om.trace.OMTracer; + +/** + * The <em>Operations & Maintenance</em> class of this bundle. + * + * @author Eike Stepper + */ +public abstract class OM +{ + public static final String BUNDLE_ID = "org.eclipse.net4j.buddies.chat"; //$NON-NLS-1$ + + public static final OMBundle BUNDLE = OMPlatform.INSTANCE.bundle(BUNDLE_ID, OM.class); + + public static final OMTracer DEBUG = BUNDLE.tracer("debug"); //$NON-NLS-1$ + + public static final OMLogger LOG = BUNDLE.logger(); + + /** + * @author Eike Stepper + */ + public static final class Activator extends OSGiActivator + { + public Activator() + { + super(BUNDLE); + } + } +} |