You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(36) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(14) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <le...@us...> - 2008-06-05 06:36:39
|
Revision: 54
http://rochat.svn.sourceforge.net/rochat/?rev=54&view=rev
Author: levia
Date: 2008-06-04 23:36:28 -0700 (Wed, 04 Jun 2008)
Log Message:
-----------
Modified Paths:
--------------
jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java
jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
Added Paths:
-----------
jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/
jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/IRCConnection.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/MessageHandler.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/iConnection.java
Removed Paths:
-------------
jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java 2008-05-31 15:50:38 UTC (rev 53)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -20,11 +20,12 @@
package net.megakiwi.jirclib.exception;
/**
- * A base exception, which all custom exceptions implement.
+ * A base exception, which all custom exceptions implement, but can also
+ * be used as a 'basic' exception.
*
* @author Lars 'Levia' Wesselius
*/
-public class BaseException extends Exception
+public class BaseException extends RuntimeException
{
private String m_Message;
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java 2008-05-31 15:50:38 UTC (rev 53)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -19,7 +19,7 @@
*/
package net.megakiwi.jirclib.exception;
-import net.megakiwi.jirclib.net.Connection;
+import net.megakiwi.jirclib.net.connection.iConnection;
/**
* A exception when a socket is still connected.
@@ -28,14 +28,14 @@
*/
public class StillConnectedException extends BaseException
{
- private Connection m_Connection;
+ private iConnection m_Connection;
/**
* The constructor.
*
* @param con The connection involved.
*/
- public StillConnectedException(Connection con, String message)
+ public StillConnectedException(iConnection con, String message)
{
super(message);
m_Connection = con;
@@ -46,7 +46,7 @@
*
* @return The connection that is apparently still connected.
*/
- public Connection getConnection()
+ public iConnection getConnection()
{
return m_Connection;
}
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java 2008-05-31 15:50:38 UTC (rev 53)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -19,6 +19,9 @@
*/
package net.megakiwi.jirclib;
+import net.megakiwi.jirclib.net.*;
+import net.megakiwi.jirclib.exception.*;
+
/**
* The initialization class for jIRClib. This is where you start your journey.
*
@@ -26,6 +29,9 @@
*/
public class jIRClib
{
+ private boolean m_Initialized = false;
+ private ConnectionManager m_ConnectionManager;
+
public jIRClib()
{
}
@@ -33,8 +39,13 @@
/**
* Initializes the library.
*/
- public void initialize()
+ public void initialize() throws BaseException
{
-
+ if (m_Initialized)
+ {
+ throw new BaseException("jIRCLib is already initialized.");
+ }
+ m_Initialized = true;
+ m_ConnectionManager = new ConnectionManager();
}
}
\ No newline at end of file
Deleted: jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java 2008-05-31 15:50:38 UTC (rev 53)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -1,75 +0,0 @@
-/*
- jIRClib
- Copyright (C) 2008 Lars Wesselius
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- ----------------------------------------------------------------------------
-*/
-package net.megakiwi.jirclib.net;
-
-/**
- * Represents a connection. Interface.
- *
- * @author Lars 'Levia' Wesselius
-*/
-public abstract class Connection
-{
- protected String m_Host;
- protected int m_Port = 6667;
-
- /**
- * Connects to something.
- *
- * @param host The host to connect to.
- * @param port The port to connect through.
- * @return True if such was succesful, false if not.
- */
- public abstract boolean connect(final String host, final int port);
-
- /**
- * Disconnects this instance.
- *
- * @return True if such was succesful, false if not.
- */
- public abstract boolean disconnect();
-
- /**
- * Returns whether this instance is connected or not.
- *
- * @return True if so, false if not.
- */
- public abstract boolean isConnected();
-
- /**
- * Returns the connected host.
- *
- * @return The host it is connected to.
- */
- public String getHost()
- {
- return m_Host;
- }
-
- /**
- * Returns the port it connected through.
- *
- * @return The port it connected to.
- */
- public int getPort()
- {
- return m_Port;
- }
-
-}
\ No newline at end of file
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java 2008-05-31 15:50:38 UTC (rev 53)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -19,6 +19,7 @@
*/
package net.megakiwi.jirclib.net;
+import net.megakiwi.jirclib.net.connection.iConnection;
import java.util.*;
/**
@@ -29,7 +30,7 @@
*/
public class ConnectionManager
{
- private Vector<Connection> m_Connections = new Vector<Connection>();
+ private Vector<iConnection> m_Connections = new Vector<iConnection>();
/**
* Add a connection to this manager.
@@ -37,7 +38,7 @@
* @param con The connection to add to the manager.
* @return True if it was added succesfully.
*/
- public boolean addConnection(Connection con)
+ public boolean addConnection(iConnection con)
{
if (m_Connections.contains(con))
{
@@ -53,7 +54,7 @@
* @param con The connection to remove.
* @return True if such was succesful, false if not.
*/
- public boolean removeConnection(Connection con)
+ public boolean removeConnection(iConnection con)
{
return m_Connections.removeElement(con);
}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/IRCConnection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/IRCConnection.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/IRCConnection.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -0,0 +1,128 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net.connection;
+
+import net.megakiwi.jirclib.exception.ConnectionException;
+import java.net.*;
+import java.io.*;
+
+/**
+ * Represents a IRC connection.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class IRCConnection implements iConnection
+{
+ protected String m_Host;
+ protected int m_Port = 6667;
+
+ protected Socket m_Connection = null;
+ protected BufferedReader m_In = null;
+ protected PrintWriter m_Out = null;
+
+ /**
+ * Connects to something.
+ *
+ * @param host The host to connect to.
+ * @param port The port to connect through.
+ * @return True if such was succesful, false if not.
+ */
+ public boolean connect(final String host, final int port) throws ConnectionException
+ {
+ try
+ {
+ m_Host = host;
+ m_Port = port;
+ m_Connection = new Socket(host, port);
+ m_Connection.setKeepAlive(true);
+ if (!m_Connection.isConnected())
+ {
+ return false;
+ }
+
+ m_Out = new PrintWriter(m_Connection.getOutputStream(), true);
+ m_In = new BufferedReader(new InputStreamReader(m_Connection.getInputStream()));
+ }
+ catch (Exception ex)
+ {
+ throw new ConnectionException(this, "Couldn't connect: " + ex.getMessage());
+ }
+ return true;
+ }
+
+ /**
+ * Disconnects this instance.
+ *
+ * @return True if such was succesful, false if not.
+ */
+ public boolean disconnect() throws ConnectionException
+ {
+ try
+ {
+ m_Connection.close();
+ }
+ catch (IOException ex)
+ {
+ throw new ConnectionException(this, "Couldn't disconnect: " + ex.getMessage());
+ }
+ return true;
+ }
+
+ /**
+ * Send a raw command to the server.
+ *
+ * @param cmd The command.
+ */
+ public void send(String cmd)
+ {
+ m_Out.write(cmd);
+ m_Out.flush();
+ }
+
+ /**
+ * Returns whether this instance is connected or not.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isConnected()
+ {
+ return m_Connection.isConnected();
+ }
+
+ /**
+ * Returns the connected host.
+ *
+ * @return The host it is connected to.
+ */
+ public String getHost()
+ {
+ return m_Host;
+ }
+
+ /**
+ * Returns the port it connected through.
+ *
+ * @return The port it connected to.
+ */
+ public int getPort()
+ {
+ return m_Port;
+ }
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/MessageHandler.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/MessageHandler.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/MessageHandler.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -0,0 +1,147 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net.connection;
+
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+public class MessageHandler extends Thread
+{
+ private boolean m_ShouldRun = true;
+ private BufferedReader m_In;
+ private IRCConnection m_Con;
+
+ //private List<MessageListener> m_Listeners = new ArrayList<MessageListener>();
+
+ public MessageHandler(IRCConnection con, BufferedReader in)
+ {
+ m_Con = con;
+ m_In = in;
+ }
+
+ public void run()
+ {
+ m_ShouldRun = true;
+ try
+ {
+ String line;
+ while (((line = m_In.readLine()) != null) && m_ShouldRun)
+ {
+ //Logger.logInformation(line);
+ parseLine(line);
+ }
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ private void parseLine(String str)
+ {
+ String command, nickname, host, rest;
+ command = nickname = host = rest = "";
+ System.out.println("raw: " + str);
+ if (str.startsWith("PING"))
+ {
+ str = str.trim();
+ String[] parts = str.split(":");
+ m_Con.send("PONG " + parts[1]);
+ //fireMessageReceived(str, null, null, null);
+ }
+ else if (str.startsWith(":"))
+ {
+ Pattern pattern = Pattern.compile(":([a-zA-Z.\\-\\S]\\S*) ([0-9]*) (\\[*\\]*[a-zA-Z0-9._\\-\\S]\\S*) :(.*)");
+ Matcher matcher = pattern.matcher(str.subSequence(0, str.length()));
+
+ if (matcher.find())
+ {
+ command = matcher.group(2);
+ nickname = matcher.group(3);
+ host = matcher.group(1);
+ rest = matcher.group(4);
+ //fireMessageReceived(command, nickname, host, rest);
+ return;
+ }
+
+ pattern = Pattern.compile(":([a-zA-Z0-9!@/\\-\\S]*) ([A-Z]*) (\\[*\\]*[a-zA-Z0-9#._\\\\-]*) : *([^ ].*)");
+ matcher = pattern.matcher(str.subSequence(0, str.length()));
+ if (matcher.find())
+ {
+ command = matcher.group(2);
+ nickname = matcher.group(3);
+ host = matcher.group(1);
+ rest = matcher.group(4);
+ //fireMessageReceived(command, nickname, host, rest);
+ return;
+ }
+ }
+ else
+ {
+ Pattern pattern = Pattern.compile("([A-Z]* [A-Z]*) : *([^ ].*)");
+ Matcher matcher = pattern.matcher(str.subSequence(0, str.length()));
+
+ if (matcher.find())
+ {
+ command = matcher.group(1);
+ rest = matcher.group(2);
+ //fireMessageReceived(command, nickname, host, rest);
+ return;
+ }
+
+ pattern = Pattern.compile("([A-Z]*) (\\[*\\]*[a-zA-Z0-9._\\\\-]*) :*([^ ].*)");
+ matcher = pattern.matcher(str.subSequence(0, str.length()));
+
+ if (matcher.find())
+ {
+ command = matcher.group(1);
+ nickname = matcher.group(2);
+ rest = matcher.group(3);
+ //fireMessageReceived(command, nickname, host, rest);
+ return;
+ }
+
+ }
+ }
+
+ public void stopHandler()
+ {
+ m_ShouldRun = false;
+ }
+
+ /*public void addListener(MessageListener listener)
+ {
+ m_Listeners.add(listener);
+ }
+
+ public void removeListener(MessageListener listener)
+ {
+ m_Listeners.remove(listener);
+ }
+
+ private void fireMessageReceived(String command, String nickname, String host, String rest)
+ {
+ for (Iterator it = m_Listeners.iterator(); it.hasNext();)
+ {
+ ((MessageListener)it.next()).messageReceived(command, nickname, host, rest);
+ }
+ }*/
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/iConnection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/iConnection.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/connection/iConnection.java 2008-06-05 06:36:28 UTC (rev 54)
@@ -0,0 +1,53 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net.connection;
+
+/**
+ * Represents a connection. Interface.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface iConnection
+{
+ /**
+ * Connects to something.
+ *
+ * @param host The host to connect to.
+ * @param port The port to connect through.
+ * @return True if such was succesful, false if not.
+ */
+ public boolean connect(final String host, final int port);
+
+ /**
+ * Disconnects this instance.
+ *
+ * @return True if such was succesful, false if not.
+ */
+ public boolean disconnect();
+
+ /**
+ * Returns whether this instance is connected or not.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isConnected();
+
+
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-31 15:50:44
|
Revision: 53
http://rochat.svn.sourceforge.net/rochat/?rev=53&view=rev
Author: levia
Date: 2008-05-31 08:50:38 -0700 (Sat, 31 May 2008)
Log Message:
-----------
- Removed iConnection, it is an abstract class now, so added Connection.
Modified Paths:
--------------
jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
Added Paths:
-----------
jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java
Removed Paths:
-------------
jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java 2008-05-31 15:43:14 UTC (rev 52)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java 2008-05-31 15:50:38 UTC (rev 53)
@@ -19,7 +19,7 @@
*/
package net.megakiwi.jirclib.exception;
-import net.megakiwi.jirclib.net.iConnection;
+import net.megakiwi.jirclib.net.Connection;
/**
* A exception when a socket is still connected.
@@ -28,14 +28,14 @@
*/
public class StillConnectedException extends BaseException
{
- private iConnection m_Connection;
+ private Connection m_Connection;
/**
* The constructor.
*
* @param con The connection involved.
*/
- public StillConnectedException(iConnection con, String message)
+ public StillConnectedException(Connection con, String message)
{
super(message);
m_Connection = con;
@@ -46,7 +46,7 @@
*
* @return The connection that is apparently still connected.
*/
- public iConnection getConnection()
+ public Connection getConnection()
{
return m_Connection;
}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/Connection.java 2008-05-31 15:50:38 UTC (rev 53)
@@ -0,0 +1,75 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net;
+
+/**
+ * Represents a connection. Interface.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public abstract class Connection
+{
+ protected String m_Host;
+ protected int m_Port = 6667;
+
+ /**
+ * Connects to something.
+ *
+ * @param host The host to connect to.
+ * @param port The port to connect through.
+ * @return True if such was succesful, false if not.
+ */
+ public abstract boolean connect(final String host, final int port);
+
+ /**
+ * Disconnects this instance.
+ *
+ * @return True if such was succesful, false if not.
+ */
+ public abstract boolean disconnect();
+
+ /**
+ * Returns whether this instance is connected or not.
+ *
+ * @return True if so, false if not.
+ */
+ public abstract boolean isConnected();
+
+ /**
+ * Returns the connected host.
+ *
+ * @return The host it is connected to.
+ */
+ public String getHost()
+ {
+ return m_Host;
+ }
+
+ /**
+ * Returns the port it connected through.
+ *
+ * @return The port it connected to.
+ */
+ public int getPort()
+ {
+ return m_Port;
+ }
+
+}
\ No newline at end of file
Modified: jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java 2008-05-31 15:43:14 UTC (rev 52)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java 2008-05-31 15:50:38 UTC (rev 53)
@@ -29,7 +29,7 @@
*/
public class ConnectionManager
{
- private Vector<iConnection> m_Connections = new Vector<iConnection>();
+ private Vector<Connection> m_Connections = new Vector<Connection>();
/**
* Add a connection to this manager.
@@ -37,7 +37,7 @@
* @param con The connection to add to the manager.
* @return True if it was added succesfully.
*/
- public boolean addConnection(iConnection con)
+ public boolean addConnection(Connection con)
{
if (m_Connections.contains(con))
{
@@ -53,7 +53,7 @@
* @param con The connection to remove.
* @return True if such was succesful, false if not.
*/
- public boolean removeConnection(iConnection con)
+ public boolean removeConnection(Connection con)
{
return m_Connections.removeElement(con);
}
@@ -65,4 +65,8 @@
{
m_Connections.removeAllElements();
}
+
+ /**
+ *
+ */
}
\ No newline at end of file
Deleted: jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java 2008-05-31 15:43:14 UTC (rev 52)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java 2008-05-31 15:50:38 UTC (rev 53)
@@ -1,51 +0,0 @@
-/*
- jIRClib
- Copyright (C) 2008 Lars Wesselius
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License
- as published by the Free Software Foundation; either version 2
- of the License, or (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- ----------------------------------------------------------------------------
-*/
-package net.megakiwi.jirclib.net;
-
-/**
- * Represents a connection. Interface.
- *
- * @author Lars 'Levia' Wesselius
-*/
-public interface iConnection
-{
- /**
- * Connects to something.
- *
- * @param host The host to connect to.
- * @param port The port to connect through.
- * @return True if such was succesful, false if not.
- */
- public boolean connect(final String host, final int port);
-
- /**
- * Disconnects this instance.
- *
- * @return True if such was succesful, false if not.
- */
- public boolean disconnect();
-
- /**
- * Returns whether this instance is connected or not.
- *
- * @return True if so, false if not.
- */
- public boolean isConnected();
-}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-31 15:43:16
|
Revision: 52
http://rochat.svn.sourceforge.net/rochat/?rev=52&view=rev
Author: levia
Date: 2008-05-31 08:43:14 -0700 (Sat, 31 May 2008)
Log Message:
-----------
Modified Paths:
--------------
jIRClib/trunk/AUTHORS
Modified: jIRClib/trunk/AUTHORS
===================================================================
--- jIRClib/trunk/AUTHORS 2008-05-31 15:42:26 UTC (rev 51)
+++ jIRClib/trunk/AUTHORS 2008-05-31 15:43:14 UTC (rev 52)
@@ -1,5 +1,4 @@
AUTHORS
-------
-Lars 'Levia' Wesselius le...@op... lar...@li...
-Joshua 'Spike1506' Luckers spi...@gm...
\ No newline at end of file
+Lars 'Levia' Wesselius le...@op... lar...@li...
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-31 15:42:33
|
Revision: 51
http://rochat.svn.sourceforge.net/rochat/?rev=51&view=rev
Author: levia
Date: 2008-05-31 08:42:26 -0700 (Sat, 31 May 2008)
Log Message:
-----------
- Readded all files.
Added Paths:
-----------
jIRClib/trunk/src/net/
jIRClib/trunk/src/net/megakiwi/
jIRClib/trunk/src/net/megakiwi/jirclib/
jIRClib/trunk/src/net/megakiwi/jirclib/config/
jIRClib/trunk/src/net/megakiwi/jirclib/config/ConfigurationManager.java
jIRClib/trunk/src/net/megakiwi/jirclib/config/SettingChangedListener.java
jIRClib/trunk/src/net/megakiwi/jirclib/config/ShutdownListener.java
jIRClib/trunk/src/net/megakiwi/jirclib/exception/
jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java
jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java
jIRClib/trunk/src/net/megakiwi/jirclib/logging/
jIRClib/trunk/src/net/megakiwi/jirclib/logging/FileLogger.java
jIRClib/trunk/src/net/megakiwi/jirclib/logging/LogListener.java
jIRClib/trunk/src/net/megakiwi/jirclib/logging/Logger.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/
jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java
jIRClib/trunk/src/net/megakiwi/jirclib/util/
jIRClib/trunk/src/net/megakiwi/jirclib/util/Constants.java
Added: jIRClib/trunk/src/net/megakiwi/jirclib/config/ConfigurationManager.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/config/ConfigurationManager.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/config/ConfigurationManager.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,357 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.config;
+
+import net.megakiwi.jirclib.logging.*;
+import java.util.*;
+import java.io.*;
+import org.w3c.dom.*;
+import javax.xml.parsers.*;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.stream.*;
+
+
+/**
+ * The class that handles the configuration of an application.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class ConfigurationManager
+{
+
+ private Map<String, String> m_KeyMap = Collections.synchronizedMap(new HashMap<String, String>());
+ private static ConfigurationManager m_Instance = new ConfigurationManager();
+
+ private List<ShutdownListener> m_Listeners = new ArrayList<ShutdownListener>();
+ private List<SettingChangedListener> m_SettingChangedListeners = new ArrayList<SettingChangedListener>();
+
+ private File m_File = null;
+
+ /**
+ * The ConfigurationManager constructor.
+ */
+ public ConfigurationManager()
+ {
+ Runtime.getRuntime().addShutdownHook(new Thread()
+ {
+ public void run()
+ {
+ Logger.getInstance().info("Application shutting down, executing listeners..");
+ for (Iterator<ShutdownListener> it = m_Listeners.iterator(); it.hasNext();)
+ {
+ ShutdownListener entry = it.next();
+ entry.onShutdown();
+ }
+ Logger.getInstance().info("Listeners execution completed.");
+ saveToFile();
+ }
+ });
+ }
+
+ /**
+ * Add a shutdown listener.
+ *
+ * @param listener The listener to add.
+ */
+ public void addShutdownListener(ShutdownListener listener)
+ {
+ m_Listeners.add(listener);
+ }
+
+ /**
+ * Remove a shutdown listener.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeShutdownListener(ShutdownListener listener)
+ {
+ m_Listeners.remove(listener);
+ }
+
+ /**
+ * Adds a setting changed listener.
+ *
+ * @param listener The listener to add.
+ */
+ public void addSettingChangedListener(SettingChangedListener listener)
+ {
+ m_SettingChangedListeners.add(listener);
+ }
+
+ /**
+ * Removes a setting changed listener.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeSettingChangedListener(SettingChangedListener listener)
+ {
+ m_SettingChangedListeners.remove(listener);
+ }
+
+ /**
+ * Load a properties file.
+ *
+ * @param file The file to load.
+ * @return True if successful, false if not.
+ */
+ public boolean loadFile(String file)
+ {
+ Logger logger = Logger.getInstance();
+ try
+ {
+ if (!m_KeyMap.isEmpty())
+ {
+ m_KeyMap.clear();
+ }
+
+ m_File = new File(file);
+ if (!m_File.exists())
+ {
+ m_File.createNewFile();
+ return false;
+ }
+
+ logger.info("Settings file parsing started: " + file);
+
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document doc = builder.parse(file);
+ NodeList nodes = doc.getElementsByTagName("Setting");
+
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Element element = (Element)nodes.item(i);
+
+ String key = element.getAttribute("key");
+ if (key.length() <= 0)
+ {
+ logger.warning("Found a setting entry, but couldn't find a key. Skipping.");
+ continue;
+ }
+
+ String value = element.getTextContent();
+ value = value.trim();
+
+ m_KeyMap.put(key, value);
+ }
+ logger.info("Successfully parsed settings file.");
+ }
+ catch (Exception ioe)
+ {
+ logger.error("Parsing of settings file failed.");
+ logger.error(ioe.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks whether a file has been loaded.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isLoaded()
+ {
+ if (m_File == null)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Clear configuration manager, deleting all keys and values.
+ */
+ public void clear()
+ {
+ m_KeyMap.clear();
+ }
+
+ /**
+ * Get a value.
+ *
+ * @param key The key to get the value from.
+ * @return A string with the value, or null if not found.
+ */
+ public String getValue(String key)
+ {
+ return m_KeyMap.get(key);
+ }
+
+ /**
+ * Set a value
+ *
+ * @param key The key where to set the value.
+ * @param value The value to set the key to.
+ */
+ public synchronized void setValue(String key, String value)
+ {
+ String oldValue = getValue(key);
+ m_KeyMap.put(key, value);
+ fireSettingChanged(key, oldValue, value);
+ }
+
+ /**
+ * Remove a key and value.
+ *
+ * @param key The key to remove.
+ */
+ public void removeKey(String key)
+ {
+ m_KeyMap.remove(key);
+ }
+
+ /**
+ * Get all the keys.
+ *
+ * @return A <i>Set</i>.
+ */
+ public Set<String> getKeys()
+ {
+ return m_KeyMap.keySet();
+ }
+
+ /**
+ * Get all the values.
+ *
+ * @return A <i>Collection</i>.
+ */
+ public Collection<String> getValues()
+ {
+ return m_KeyMap.values();
+ }
+
+ /**
+ * Get a the key/value combinations.
+ *
+ * @return A <i>Map.Entry set</i>.
+ */
+ public Set<Map.Entry<String, String>> getEntrys()
+ {
+ return m_KeyMap.entrySet();
+ }
+
+ /**
+ * Saves the current properties to given file.
+ *
+ * @param file The file to write to.
+ * @return True when successful, false when not.
+ */
+ public boolean saveToFile(String file)
+ {
+ Logger logger = Logger.getInstance();
+ try
+ {
+ File propertyFile = new File(file);
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ DOMImplementation impl = builder.getDOMImplementation();
+ Document doc = impl.createDocument(null, null, null);
+
+ logger.info("Saving settings file: " + file);
+
+ Element root = doc.createElement("Settings");
+ doc.appendChild(root);
+
+ for (Iterator<Map.Entry<String, String>> it = m_KeyMap.entrySet().iterator(); it.hasNext();)
+ {
+ Map.Entry entry = it.next();
+ String key = (String)entry.getKey();
+ String value = (String)entry.getValue();
+
+ Element settingNode = doc.createElement("Setting");
+ root.appendChild(settingNode);
+ settingNode.setAttribute("key", key);
+
+ settingNode.setTextContent(value);
+ }
+
+ FileOutputStream fos;
+ Transformer transformer;
+ fos = new FileOutputStream(file);
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ transformer = transformerFactory.newTransformer();
+
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+
+ DOMSource source = new DOMSource(doc);
+ StreamResult result = new StreamResult(fos);
+ transformer.transform(source, result);
+ logger.info("Saving settings file completed successfully.");
+ return true;
+ }
+ catch (Exception ioe)
+ {
+ logger.error("Saving of settings file failed.");
+ logger.error(ioe.getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * Saves the current properties to same file that was loaded. (overwrites)
+ *
+ * @return True when successful, false when not.
+ */
+ public boolean saveToFile()
+ {
+ try
+ {
+ String path = "configuration.properties";
+ if (m_File != null)
+ {
+ path = m_File.getCanonicalPath();
+ m_File.delete();
+ }
+ return saveToFile(path);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return false;
+ }
+
+ /**
+ * Get the instance (singleton)
+ *
+ * @return This class.
+ */
+ public static ConfigurationManager getInstance()
+ {
+ return m_Instance;
+ }
+
+ /**
+ * Fire the setting changed.
+ */
+ private void fireSettingChanged(String key, String oldSetting, String newSetting)
+ {
+ for (Iterator<SettingChangedListener> it = m_SettingChangedListeners.iterator(); it.hasNext();)
+ {
+ SettingChangedListener entry = it.next();
+ entry.settingChanged(key, oldSetting, newSetting);
+ }
+ }
+}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/config/SettingChangedListener.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/config/SettingChangedListener.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/config/SettingChangedListener.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,40 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.config;
+
+
+/**
+ * A interface that has a function that is fired when a setting has been
+ * changed.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface SettingChangedListener
+{
+ /**
+ * Fired when a setting has been changed.
+ *
+ * @param key The key to where this change applies.
+ * @param oldSetting The old setting.
+ * @param newSetting The new setting.
+ */
+ public void settingChanged(String key, String oldSetting, String newSetting);
+}
+
Added: jIRClib/trunk/src/net/megakiwi/jirclib/config/ShutdownListener.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/config/ShutdownListener.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/config/ShutdownListener.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,35 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.config;
+
+
+/**
+ * A interface that is used by listeners that want to execute something on
+ * close of the program.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface ShutdownListener
+{
+ /**
+ * Does some cleaning up/saving when the application stops.
+ */
+ public void onShutdown();
+}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/exception/BaseException.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,50 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.exception;
+
+/**
+ * A base exception, which all custom exceptions implement.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class BaseException extends Exception
+{
+ private String m_Message;
+
+ /**
+ * BaseException constructor.
+ *
+ * @param message The exception message.
+ */
+ public BaseException(String message)
+ {
+ m_Message = message;
+ }
+
+ /**
+ * Get the message involved.
+ *
+ * @return The message.
+ */
+ public String getMessage()
+ {
+ return m_Message;
+ }
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/exception/StillConnectedException.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,54 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.exception;
+
+import net.megakiwi.jirclib.net.iConnection;
+
+/**
+ * A exception when a socket is still connected.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class StillConnectedException extends BaseException
+{
+ private iConnection m_Connection;
+
+ /**
+ * The constructor.
+ *
+ * @param con The connection involved.
+ */
+ public StillConnectedException(iConnection con, String message)
+ {
+ super(message);
+ m_Connection = con;
+ }
+
+ /**
+ * Get the connection involved.
+ *
+ * @return The connection that is apparently still connected.
+ */
+ public iConnection getConnection()
+ {
+ return m_Connection;
+ }
+
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/jIRClib.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,40 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib;
+
+/**
+ * The initialization class for jIRClib. This is where you start your journey.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class jIRClib
+{
+ public jIRClib()
+ {
+ }
+
+ /**
+ * Initializes the library.
+ */
+ public void initialize()
+ {
+
+ }
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/logging/FileLogger.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/logging/FileLogger.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/logging/FileLogger.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,98 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.logging;
+
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.io.*;
+
+/**
+ * The FileLogger class logs events to given file.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class FileLogger implements LogListener
+{
+ private BufferedWriter m_Log;
+
+ /**
+ * FileLogger constructor
+ *
+ * @param log The logfile to use. It is replaced if already there,
+ * created when not.
+ */
+ public FileLogger(String log)
+ {
+ try
+ {
+ m_Log = new BufferedWriter(new FileWriter(log));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ /**
+ * The FileLogger constructor.
+ *
+ * @param log The log file to use.
+ */
+ public FileLogger(File log)
+ {
+ try
+ {
+ m_Log = new BufferedWriter(new FileWriter(log));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ public void logEvent(String severity, String message, Date timeStamp)
+ {
+ SimpleDateFormat formatter = new SimpleDateFormat("[H:mm:ss]");
+ String datenewformat = formatter.format(timeStamp);
+ String fullMessage = datenewformat;
+ fullMessage = fullMessage.concat(" " + severity + " : " + message);
+ logToFile(fullMessage);
+
+ }
+
+ /**
+ * Logs a message to the opened file. Executes flush afterwards since
+ * we don't know when this listener is unregistered or destroyed.
+ *
+ * @param log The string to log to the opened file.
+ */
+ private void logToFile(String log)
+ {
+ try
+ {
+ m_Log.write(log + "\r\n");
+ m_Log.flush();
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/logging/LogListener.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/logging/LogListener.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/logging/LogListener.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,39 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.logging;
+
+import java.util.Date;
+
+/**
+ * The listener interface.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface LogListener
+{
+ /**
+ * The logEvent function handles the logged events.
+ *
+ * @param severity The severity of this message.
+ * @param message The actual message.
+ * @param timeStamp The timestamp of the event.
+ */
+ public void logEvent(String severity, String message, Date timeStamp);
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/logging/Logger.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/logging/Logger.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/logging/Logger.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,137 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.logging;
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * The Logger class, here you can listen for log messages, and log them
+ * yourself, or you can let the standard logger take over.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class Logger
+{
+ /** Severity used for information - nothings wrong, just info. */
+ public static final String LOG_INFORMATION = "INFORMATION";
+
+ /** Severity used for warnings - there was something wrong, but we can
+ continue without hassle. */
+ public static final String LOG_WARNING = "WARNING";
+
+ /** Severity used for error - there was an error, and we needed to stop our
+ current execution. */
+ public static final String LOG_ERROR = "ERROR";
+
+ private List<LogListener> m_LogListeners = new ArrayList<LogListener>();
+ private static Logger m_Instance = new Logger();
+
+ /**
+ * Logs a information message.
+ *
+ * @param message The message to log.
+ * \return void.
+ */
+ public void info(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_INFORMATION, message, timeStamp);
+ }
+ }
+
+ /**
+ * Logs a warning message.
+ *
+ * @param message The warning message to log.
+ * \return void.
+ */
+ public void warning(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_WARNING, message, timeStamp);
+ }
+ }
+
+ /**
+ * Logs a error message.
+ *
+ * @param message The error message to log.
+ * \return void.
+ */
+ public void error(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_ERROR, message, timeStamp);
+ }
+ }
+
+ /**
+ * Method to register a listener for the log.
+ *
+ * @param listener The listener.
+ */
+ public void addListener(LogListener listener)
+ {
+ m_LogListeners.add(listener);
+ }
+
+ /**
+ * Method to unregister a listener for the log.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeListener(LogListener listener)
+ {
+ m_LogListeners.remove(listener);
+ }
+
+ /**
+ * Get the instance (singleton)
+ *
+ * @return This class.
+ */
+ public static Logger getInstance()
+ {
+ return m_Instance;
+ }
+
+}
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/ConnectionManager.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,68 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net;
+
+import java.util.*;
+
+/**
+ * The ConnectionManager. Manages connections for you, keeps track of them,
+ * etcetera.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class ConnectionManager
+{
+ private Vector<iConnection> m_Connections = new Vector<iConnection>();
+
+ /**
+ * Add a connection to this manager.
+ *
+ * @param con The connection to add to the manager.
+ * @return True if it was added succesfully.
+ */
+ public boolean addConnection(iConnection con)
+ {
+ if (m_Connections.contains(con))
+ {
+ return false;
+ }
+ m_Connections.addElement(con);
+ return true;
+ }
+
+ /**
+ * Remove a connection from this manager.
+ *
+ * @param con The connection to remove.
+ * @return True if such was succesful, false if not.
+ */
+ public boolean removeConnection(iConnection con)
+ {
+ return m_Connections.removeElement(con);
+ }
+
+ /**
+ * Remove all connections from this manager.
+ */
+ public void removeAllConnections()
+ {
+ m_Connections.removeAllElements();
+ }
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/net/iConnection.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,51 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.net;
+
+/**
+ * Represents a connection. Interface.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface iConnection
+{
+ /**
+ * Connects to something.
+ *
+ * @param host The host to connect to.
+ * @param port The port to connect through.
+ * @return True if such was succesful, false if not.
+ */
+ public boolean connect(final String host, final int port);
+
+ /**
+ * Disconnects this instance.
+ *
+ * @return True if such was succesful, false if not.
+ */
+ public boolean disconnect();
+
+ /**
+ * Returns whether this instance is connected or not.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isConnected();
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/megakiwi/jirclib/util/Constants.java
===================================================================
--- jIRClib/trunk/src/net/megakiwi/jirclib/util/Constants.java (rev 0)
+++ jIRClib/trunk/src/net/megakiwi/jirclib/util/Constants.java 2008-05-31 15:42:26 UTC (rev 51)
@@ -0,0 +1,51 @@
+/*
+ jIRClib
+ Copyright (C) 2008 Lars Wesselius
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.megakiwi.jirclib.util;
+
+/**
+ * The constants class. Holds version information and all that.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class Constants
+{
+ public static final String SF_WEB_SITE = "http://sourceforge.net/projects/rochat";
+ public static final String WEB_SITE = "http://rochat.sensiva.net";
+ public static final String AUTHORS = "Lars 'Levia' Wesselius," +
+ "Joshua 'Spike1506' Lückers";
+ public static final String THANKS_TO = "";
+
+ public static final String JIRCLIB_VERSION = "0.1.0";
+
+ public static final String OS_NAME = System.getProperty("os.name");
+ public static final boolean isOSX = OS_NAME.toLowerCase().startsWith("mac os");
+ public static final boolean isLinux = OS_NAME.equalsIgnoreCase("Linux");
+ public static final boolean isSolaris = OS_NAME.equalsIgnoreCase("SunOS");
+ public static final boolean isFreeBSD = OS_NAME.equalsIgnoreCase("FreeBSD");
+ public static final boolean isWindowsXP = OS_NAME.equalsIgnoreCase("Windows XP");
+ public static final boolean isWindows95 = OS_NAME.equalsIgnoreCase("Windows 95");
+ public static final boolean isWindows98 = OS_NAME.equalsIgnoreCase("Windows 98");
+ public static final boolean isWindowsME = OS_NAME.equalsIgnoreCase("Windows ME");
+ public static final boolean isWindows = OS_NAME.toLowerCase().startsWith("windows");
+ public static final boolean isUnix = !isWindows && !isOSX;
+
+}
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-31 15:41:20
|
Revision: 50
http://rochat.svn.sourceforge.net/rochat/?rev=50&view=rev
Author: levia
Date: 2008-05-31 08:41:17 -0700 (Sat, 31 May 2008)
Log Message:
-----------
Removed Paths:
-------------
jIRClib/trunk/src/net/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 13:52:29
|
Revision: 49
http://rochat.svn.sourceforge.net/rochat/?rev=49&view=rev
Author: levia
Date: 2008-05-17 06:52:26 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Added the main initialization file for the library.
- Removed a useless constructor.
- Added ConnectionManager, and iConnection. Still working on it.
Modified Paths:
--------------
jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
Added Paths:
-----------
jIRClib/trunk/src/net/sensiva/jirclib/jIRClib.java
jIRClib/trunk/src/net/sensiva/jirclib/net/
jIRClib/trunk/src/net/sensiva/jirclib/net/ConnectionManager.java
jIRClib/trunk/src/net/sensiva/jirclib/net/iConnection.java
Added: jIRClib/trunk/src/net/sensiva/jirclib/jIRClib.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/jIRClib.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/jIRClib.java 2008-05-17 13:52:26 UTC (rev 49)
@@ -0,0 +1,40 @@
+/*
+ jIRClib
+ Copyright (C) 2008 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.jirclib;
+
+/**
+ * The initialization class for jIRClib. This is where you start your journey.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class jIRClib
+{
+ public jIRClib()
+ {
+ }
+
+ /**
+ * Initializes the library.
+ */
+ public void initialize()
+ {
+
+ }
+}
\ No newline at end of file
Modified: jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java 2008-05-17 12:23:29 UTC (rev 48)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java 2008-05-17 13:52:26 UTC (rev 49)
@@ -45,14 +45,6 @@
private static Logger m_Instance = new Logger();
/**
- * The Logger constructor.
- */
- public Logger()
- {
- addListener(new FileLogger("log.txt"));
- }
-
- /**
* Logs a information message.
*
* @param message The message to log.
Added: jIRClib/trunk/src/net/sensiva/jirclib/net/ConnectionManager.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/net/ConnectionManager.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/net/ConnectionManager.java 2008-05-17 13:52:26 UTC (rev 49)
@@ -0,0 +1,35 @@
+/*
+ jIRClib
+ Copyright (C) 2008 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.jirclib.net;
+
+import java.util.*;
+
+/**
+ * The ConnectionManager. Manages connections for you, keeps track of them,
+ * etcetera.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public class ConnectionManager
+{
+ private Vector<iConnection> m_Connections = new Vector<iConnection>();
+
+
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/sensiva/jirclib/net/iConnection.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/net/iConnection.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/net/iConnection.java 2008-05-17 13:52:26 UTC (rev 49)
@@ -0,0 +1,51 @@
+/*
+ jIRClib
+ Copyright (C) 2008 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.jirclib.net;
+
+/**
+ * Represents a connection. Interface.
+ *
+ * @author Lars 'Levia' Wesselius
+*/
+public interface iConnection
+{
+ /**
+ * Connects to something.
+ *
+ * @param host The host to connect to.
+ * @param port The port to connect through.
+ * @return True if such was succesful, false if not.
+ */
+ public boolean connect(final String host, final int port);
+
+ /**
+ * Disconnects this instance.
+ *
+ * @return True if such was succesful, false if not.
+ */
+ public boolean disconnect();
+
+ /**
+ * Returns whether this instance is connected or not.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isConnected();
+}
\ No newline at end of file
Modified: jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java 2008-05-17 12:23:29 UTC (rev 48)
+++ jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java 2008-05-17 13:52:26 UTC (rev 49)
@@ -29,7 +29,7 @@
public static final String SF_WEB_SITE = "http://sourceforge.net/projects/rochat";
public static final String WEB_SITE = "http://rochat.sensiva.net";
public static final String AUTHORS = "Lars 'Levia' Wesselius," +
- "Joshua 'Spike1506' Luckers";
+ "Joshua 'Spike1506' Lückers";
public static final String THANKS_TO = "";
public static final String JIRCLIB_VERSION = "0.1.0";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 12:23:33
|
Revision: 48
http://rochat.svn.sourceforge.net/rochat/?rev=48&view=rev
Author: levia
Date: 2008-05-17 05:23:29 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Fixed a mistake which made the file not compatible with Java 1.5
Modified Paths:
--------------
jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
Modified: jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java 2008-05-17 12:20:36 UTC (rev 47)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java 2008-05-17 12:23:29 UTC (rev 48)
@@ -140,7 +140,7 @@
Element element = (Element)nodes.item(i);
String key = element.getAttribute("key");
- if (key.isEmpty())
+ if (key.length() <= 0)
{
logger.warning("Found a setting entry, but couldn't find a key. Skipping.");
continue;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 12:20:38
|
Revision: 47
http://rochat.svn.sourceforge.net/rochat/?rev=47&view=rev
Author: levia
Date: 2008-05-17 05:20:36 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Updated copyright information.
Modified Paths:
--------------
jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java
jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
Modified: jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,12 +17,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.config;
+package net.sensiva.jirclib.config;
-import net.sensiva.rochat.core.logging.*;
+import net.sensiva.jirclib.logging.*;
import java.util.*;
import java.io.*;
-import java.util.Enumeration;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
@@ -32,6 +31,8 @@
/**
* The class that handles the configuration of an application.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public class ConfigurationManager
{
@@ -53,7 +54,7 @@
{
public void run()
{
- Logger.getInstance().info("ROChat shutting down, executing listeners..");
+ Logger.getInstance().info("Application shutting down, executing listeners..");
for (Iterator<ShutdownListener> it = m_Listeners.iterator(); it.hasNext();)
{
ShutdownListener entry = it.next();
Modified: jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,12 +17,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.config;
+package net.sensiva.jirclib.config;
/**
* A interface that has a function that is fired when a setting has been
* changed.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public interface SettingChangedListener
{
Modified: jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,12 +17,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.config;
+package net.sensiva.jirclib.config;
/**
* A interface that is used by listeners that want to execute something on
* close of the program.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public interface ShutdownListener
{
Modified: jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.logging;
+package net.sensiva.jirclib.logging;
import java.util.Date;
import java.text.SimpleDateFormat;
@@ -25,6 +25,8 @@
/**
* The FileLogger class logs events to given file.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public class FileLogger implements LogListener
{
Modified: jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,12 +17,14 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.logging;
+package net.sensiva.jirclib.logging;
import java.util.Date;
/**
* The listener interface.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public interface LogListener
{
Modified: jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,7 +17,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.logging;
+package net.sensiva.jirclib.logging;
import java.util.*;
import java.io.*;
@@ -25,6 +25,8 @@
/**
* The Logger class, here you can listen for log messages, and log them
* yourself, or you can let the standard logger take over.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public class Logger
{
Modified: jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java 2008-05-17 12:11:56 UTC (rev 46)
+++ jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java 2008-05-17 12:20:36 UTC (rev 47)
@@ -1,6 +1,6 @@
/*
- ROChat
- Copyright (C) 2007 The ROChat team
+ jIRClib
+ Copyright (C) 2008 The ROChat team
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
@@ -17,10 +17,12 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
----------------------------------------------------------------------------
*/
-package net.sensiva.rochat.core.util;
+package net.sensiva.jirclib.util;
/**
* The constants class. Holds version information and all that.
+ *
+ * @author Lars 'Levia' Wesselius
*/
public class Constants
{
@@ -28,9 +30,9 @@
public static final String WEB_SITE = "http://rochat.sensiva.net";
public static final String AUTHORS = "Lars 'Levia' Wesselius," +
"Joshua 'Spike1506' Luckers";
- public static final String THANKS_TO = "Christoph Schwering";
+ public static final String THANKS_TO = "";
- public static final String ROCHAT_VERSION = "0.1.0";
+ public static final String JIRCLIB_VERSION = "0.1.0";
public static final String OS_NAME = System.getProperty("os.name");
public static final boolean isOSX = OS_NAME.toLowerCase().startsWith("mac os");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 12:12:01
|
Revision: 46
http://rochat.svn.sourceforge.net/rochat/?rev=46&view=rev
Author: levia
Date: 2008-05-17 05:11:56 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Readded jIRClib.
Added Paths:
-----------
jIRClib/
jIRClib/branches/
jIRClib/tags/
jIRClib/trunk/
jIRClib/trunk/AUTHORS
jIRClib/trunk/LICENSE
jIRClib/trunk/src/
jIRClib/trunk/src/net/
jIRClib/trunk/src/net/sensiva/
jIRClib/trunk/src/net/sensiva/jirclib/
jIRClib/trunk/src/net/sensiva/jirclib/config/
jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java
jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/
jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java
jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
jIRClib/trunk/src/net/sensiva/jirclib/util/
jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
Added: jIRClib/trunk/AUTHORS
===================================================================
--- jIRClib/trunk/AUTHORS (rev 0)
+++ jIRClib/trunk/AUTHORS 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,5 @@
+AUTHORS
+-------
+
+Lars 'Levia' Wesselius le...@op... lar...@li...
+Joshua 'Spike1506' Luckers spi...@gm...
\ No newline at end of file
Added: jIRClib/trunk/LICENSE
===================================================================
--- jIRClib/trunk/LICENSE (rev 0)
+++ jIRClib/trunk/LICENSE 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Added: jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/ConfigurationManager.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,356 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.config;
+
+import net.sensiva.rochat.core.logging.*;
+import java.util.*;
+import java.io.*;
+import java.util.Enumeration;
+import org.w3c.dom.*;
+import javax.xml.parsers.*;
+import javax.xml.transform.*;
+import javax.xml.transform.dom.*;
+import javax.xml.transform.stream.*;
+
+
+/**
+ * The class that handles the configuration of an application.
+*/
+public class ConfigurationManager
+{
+
+ private Map<String, String> m_KeyMap = Collections.synchronizedMap(new HashMap<String, String>());
+ private static ConfigurationManager m_Instance = new ConfigurationManager();
+
+ private List<ShutdownListener> m_Listeners = new ArrayList<ShutdownListener>();
+ private List<SettingChangedListener> m_SettingChangedListeners = new ArrayList<SettingChangedListener>();
+
+ private File m_File = null;
+
+ /**
+ * The ConfigurationManager constructor.
+ */
+ public ConfigurationManager()
+ {
+ Runtime.getRuntime().addShutdownHook(new Thread()
+ {
+ public void run()
+ {
+ Logger.getInstance().info("ROChat shutting down, executing listeners..");
+ for (Iterator<ShutdownListener> it = m_Listeners.iterator(); it.hasNext();)
+ {
+ ShutdownListener entry = it.next();
+ entry.onShutdown();
+ }
+ Logger.getInstance().info("Listeners execution completed.");
+ saveToFile();
+ }
+ });
+ }
+
+ /**
+ * Add a shutdown listener.
+ *
+ * @param listener The listener to add.
+ */
+ public void addShutdownListener(ShutdownListener listener)
+ {
+ m_Listeners.add(listener);
+ }
+
+ /**
+ * Remove a shutdown listener.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeShutdownListener(ShutdownListener listener)
+ {
+ m_Listeners.remove(listener);
+ }
+
+ /**
+ * Adds a setting changed listener.
+ *
+ * @param listener The listener to add.
+ */
+ public void addSettingChangedListener(SettingChangedListener listener)
+ {
+ m_SettingChangedListeners.add(listener);
+ }
+
+ /**
+ * Removes a setting changed listener.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeSettingChangedListener(SettingChangedListener listener)
+ {
+ m_SettingChangedListeners.remove(listener);
+ }
+
+ /**
+ * Load a properties file.
+ *
+ * @param file The file to load.
+ * @return True if successful, false if not.
+ */
+ public boolean loadFile(String file)
+ {
+ Logger logger = Logger.getInstance();
+ try
+ {
+ if (!m_KeyMap.isEmpty())
+ {
+ m_KeyMap.clear();
+ }
+
+ m_File = new File(file);
+ if (!m_File.exists())
+ {
+ m_File.createNewFile();
+ return false;
+ }
+
+ logger.info("Settings file parsing started: " + file);
+
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ Document doc = builder.parse(file);
+ NodeList nodes = doc.getElementsByTagName("Setting");
+
+ for (int i = 0; i < nodes.getLength(); i++)
+ {
+ Element element = (Element)nodes.item(i);
+
+ String key = element.getAttribute("key");
+ if (key.isEmpty())
+ {
+ logger.warning("Found a setting entry, but couldn't find a key. Skipping.");
+ continue;
+ }
+
+ String value = element.getTextContent();
+ value = value.trim();
+
+ m_KeyMap.put(key, value);
+ }
+ logger.info("Successfully parsed settings file.");
+ }
+ catch (Exception ioe)
+ {
+ logger.error("Parsing of settings file failed.");
+ logger.error(ioe.getMessage());
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Checks whether a file has been loaded.
+ *
+ * @return True if so, false if not.
+ */
+ public boolean isLoaded()
+ {
+ if (m_File == null)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Clear configuration manager, deleting all keys and values.
+ */
+ public void clear()
+ {
+ m_KeyMap.clear();
+ }
+
+ /**
+ * Get a value.
+ *
+ * @param key The key to get the value from.
+ * @return A string with the value, or null if not found.
+ */
+ public String getValue(String key)
+ {
+ return m_KeyMap.get(key);
+ }
+
+ /**
+ * Set a value
+ *
+ * @param key The key where to set the value.
+ * @param value The value to set the key to.
+ */
+ public synchronized void setValue(String key, String value)
+ {
+ String oldValue = getValue(key);
+ m_KeyMap.put(key, value);
+ fireSettingChanged(key, oldValue, value);
+ }
+
+ /**
+ * Remove a key and value.
+ *
+ * @param key The key to remove.
+ */
+ public void removeKey(String key)
+ {
+ m_KeyMap.remove(key);
+ }
+
+ /**
+ * Get all the keys.
+ *
+ * @return A <i>Set</i>.
+ */
+ public Set<String> getKeys()
+ {
+ return m_KeyMap.keySet();
+ }
+
+ /**
+ * Get all the values.
+ *
+ * @return A <i>Collection</i>.
+ */
+ public Collection<String> getValues()
+ {
+ return m_KeyMap.values();
+ }
+
+ /**
+ * Get a the key/value combinations.
+ *
+ * @return A <i>Map.Entry set</i>.
+ */
+ public Set<Map.Entry<String, String>> getEntrys()
+ {
+ return m_KeyMap.entrySet();
+ }
+
+ /**
+ * Saves the current properties to given file.
+ *
+ * @param file The file to write to.
+ * @return True when successful, false when not.
+ */
+ public boolean saveToFile(String file)
+ {
+ Logger logger = Logger.getInstance();
+ try
+ {
+ File propertyFile = new File(file);
+ DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ DOMImplementation impl = builder.getDOMImplementation();
+ Document doc = impl.createDocument(null, null, null);
+
+ logger.info("Saving settings file: " + file);
+
+ Element root = doc.createElement("Settings");
+ doc.appendChild(root);
+
+ for (Iterator<Map.Entry<String, String>> it = m_KeyMap.entrySet().iterator(); it.hasNext();)
+ {
+ Map.Entry entry = it.next();
+ String key = (String)entry.getKey();
+ String value = (String)entry.getValue();
+
+ Element settingNode = doc.createElement("Setting");
+ root.appendChild(settingNode);
+ settingNode.setAttribute("key", key);
+
+ settingNode.setTextContent(value);
+ }
+
+ FileOutputStream fos;
+ Transformer transformer;
+ fos = new FileOutputStream(file);
+
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ transformer = transformerFactory.newTransformer();
+
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml");
+ transformer.setOutputProperty(OutputKeys.ENCODING,"ISO-8859-1");
+ transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+
+ DOMSource source = new DOMSource(doc);
+ StreamResult result = new StreamResult(fos);
+ transformer.transform(source, result);
+ logger.info("Saving settings file completed successfully.");
+ return true;
+ }
+ catch (Exception ioe)
+ {
+ logger.error("Saving of settings file failed.");
+ logger.error(ioe.getMessage());
+ return false;
+ }
+ }
+
+ /**
+ * Saves the current properties to same file that was loaded. (overwrites)
+ *
+ * @return True when successful, false when not.
+ */
+ public boolean saveToFile()
+ {
+ try
+ {
+ String path = "configuration.properties";
+ if (m_File != null)
+ {
+ path = m_File.getCanonicalPath();
+ m_File.delete();
+ }
+ return saveToFile(path);
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return false;
+ }
+
+ /**
+ * Get the instance (singleton)
+ *
+ * @return This class.
+ */
+ public static ConfigurationManager getInstance()
+ {
+ return m_Instance;
+ }
+
+ /**
+ * Fire the setting changed.
+ */
+ private void fireSettingChanged(String key, String oldSetting, String newSetting)
+ {
+ for (Iterator<SettingChangedListener> it = m_SettingChangedListeners.iterator(); it.hasNext();)
+ {
+ SettingChangedListener entry = it.next();
+ entry.settingChanged(key, oldSetting, newSetting);
+ }
+ }
+}
Added: jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/SettingChangedListener.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,38 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.config;
+
+
+/**
+ * A interface that has a function that is fired when a setting has been
+ * changed.
+*/
+public interface SettingChangedListener
+{
+ /**
+ * Fired when a setting has been changed.
+ *
+ * @param key The key to where this change applies.
+ * @param oldSetting The old setting.
+ * @param newSetting The new setting.
+ */
+ public void settingChanged(String key, String oldSetting, String newSetting);
+}
+
Added: jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/config/ShutdownListener.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,33 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.config;
+
+
+/**
+ * A interface that is used by listeners that want to execute something on
+ * close of the program.
+*/
+public interface ShutdownListener
+{
+ /**
+ * Does some cleaning up/saving when the application stops.
+ */
+ public void onShutdown();
+}
Added: jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/FileLogger.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,96 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.logging;
+
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.io.*;
+
+/**
+ * The FileLogger class logs events to given file.
+*/
+public class FileLogger implements LogListener
+{
+ private BufferedWriter m_Log;
+
+ /**
+ * FileLogger constructor
+ *
+ * @param log The logfile to use. It is replaced if already there,
+ * created when not.
+ */
+ public FileLogger(String log)
+ {
+ try
+ {
+ m_Log = new BufferedWriter(new FileWriter(log));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ /**
+ * The FileLogger constructor.
+ *
+ * @param log The log file to use.
+ */
+ public FileLogger(File log)
+ {
+ try
+ {
+ m_Log = new BufferedWriter(new FileWriter(log));
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+
+ public void logEvent(String severity, String message, Date timeStamp)
+ {
+ SimpleDateFormat formatter = new SimpleDateFormat("[H:mm:ss]");
+ String datenewformat = formatter.format(timeStamp);
+ String fullMessage = datenewformat;
+ fullMessage = fullMessage.concat(" " + severity + " : " + message);
+ logToFile(fullMessage);
+
+ }
+
+ /**
+ * Logs a message to the opened file. Executes flush afterwards since
+ * we don't know when this listener is unregistered or destroyed.
+ *
+ * @param log The string to log to the opened file.
+ */
+ private void logToFile(String log)
+ {
+ try
+ {
+ m_Log.write(log + "\r\n");
+ m_Log.flush();
+ }
+ catch (IOException ioe)
+ {
+ ioe.printStackTrace();
+ }
+ }
+}
Added: jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/LogListener.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,37 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.logging;
+
+import java.util.Date;
+
+/**
+ * The listener interface.
+*/
+public interface LogListener
+{
+ /**
+ * The logEvent function handles the logged events.
+ *
+ * @param severity The severity of this message.
+ * @param message The actual message.
+ * @param timeStamp The timestamp of the event.
+ */
+ public void logEvent(String severity, String message, Date timeStamp);
+}
\ No newline at end of file
Added: jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/logging/Logger.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,143 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.logging;
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * The Logger class, here you can listen for log messages, and log them
+ * yourself, or you can let the standard logger take over.
+*/
+public class Logger
+{
+ /** Severity used for information - nothings wrong, just info. */
+ public static final String LOG_INFORMATION = "INFORMATION";
+
+ /** Severity used for warnings - there was something wrong, but we can
+ continue without hassle. */
+ public static final String LOG_WARNING = "WARNING";
+
+ /** Severity used for error - there was an error, and we needed to stop our
+ current execution. */
+ public static final String LOG_ERROR = "ERROR";
+
+ private List<LogListener> m_LogListeners = new ArrayList<LogListener>();
+ private static Logger m_Instance = new Logger();
+
+ /**
+ * The Logger constructor.
+ */
+ public Logger()
+ {
+ addListener(new FileLogger("log.txt"));
+ }
+
+ /**
+ * Logs a information message.
+ *
+ * @param message The message to log.
+ * \return void.
+ */
+ public void info(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_INFORMATION, message, timeStamp);
+ }
+ }
+
+ /**
+ * Logs a warning message.
+ *
+ * @param message The warning message to log.
+ * \return void.
+ */
+ public void warning(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_WARNING, message, timeStamp);
+ }
+ }
+
+ /**
+ * Logs a error message.
+ *
+ * @param message The error message to log.
+ * \return void.
+ */
+ public void error(String message)
+ {
+ if (m_LogListeners.isEmpty())
+ {
+ return;
+ }
+ Date timeStamp = new Date();
+ for (int i = 0; i < m_LogListeners.size(); i++)
+ {
+ LogListener listener = (LogListener)m_LogListeners.get(i);
+ listener.logEvent(LOG_ERROR, message, timeStamp);
+ }
+ }
+
+ /**
+ * Method to register a listener for the log.
+ *
+ * @param listener The listener.
+ */
+ public void addListener(LogListener listener)
+ {
+ m_LogListeners.add(listener);
+ }
+
+ /**
+ * Method to unregister a listener for the log.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeListener(LogListener listener)
+ {
+ m_LogListeners.remove(listener);
+ }
+
+ /**
+ * Get the instance (singleton)
+ *
+ * @return This class.
+ */
+ public static Logger getInstance()
+ {
+ return m_Instance;
+ }
+
+}
Added: jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java
===================================================================
--- jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java (rev 0)
+++ jIRClib/trunk/src/net/sensiva/jirclib/util/Constants.java 2008-05-17 12:11:56 UTC (rev 46)
@@ -0,0 +1,49 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.util;
+
+/**
+ * The constants class. Holds version information and all that.
+*/
+public class Constants
+{
+ public static final String SF_WEB_SITE = "http://sourceforge.net/projects/rochat";
+ public static final String WEB_SITE = "http://rochat.sensiva.net";
+ public static final String AUTHORS = "Lars 'Levia' Wesselius," +
+ "Joshua 'Spike1506' Luckers";
+ public static final String THANKS_TO = "Christoph Schwering";
+
+ public static final String ROCHAT_VERSION = "0.1.0";
+
+ public static final String OS_NAME = System.getProperty("os.name");
+ public static final boolean isOSX = OS_NAME.toLowerCase().startsWith("mac os");
+ public static final boolean isLinux = OS_NAME.equalsIgnoreCase("Linux");
+ public static final boolean isSolaris = OS_NAME.equalsIgnoreCase("SunOS");
+ public static final boolean isFreeBSD = OS_NAME.equalsIgnoreCase("FreeBSD");
+ public static final boolean isWindowsXP = OS_NAME.equalsIgnoreCase("Windows XP");
+ public static final boolean isWindows95 = OS_NAME.equalsIgnoreCase("Windows 95");
+ public static final boolean isWindows98 = OS_NAME.equalsIgnoreCase("Windows 98");
+ public static final boolean isWindowsME = OS_NAME.equalsIgnoreCase("Windows ME");
+ public static final boolean isWindows = OS_NAME.toLowerCase().startsWith("windows");
+ public static final boolean isUnix = !isWindows && !isOSX;
+
+}
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 12:09:19
|
Revision: 45
http://rochat.svn.sourceforge.net/rochat/?rev=45&view=rev
Author: levia
Date: 2008-05-17 05:09:13 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Woeps.
Removed Paths:
-------------
jirclib/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 12:05:33
|
Revision: 44
http://rochat.svn.sourceforge.net/rochat/?rev=44&view=rev
Author: levia
Date: 2008-05-17 05:05:31 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Added AUTHORS and LICENSE and the src dir to jirclib.
Added Paths:
-----------
jirclib/trunk/AUTHORS
jirclib/trunk/LICENSE
jirclib/trunk/src/
Added: jirclib/trunk/AUTHORS
===================================================================
--- jirclib/trunk/AUTHORS (rev 0)
+++ jirclib/trunk/AUTHORS 2008-05-17 12:05:31 UTC (rev 44)
@@ -0,0 +1,5 @@
+AUTHORS
+-------
+
+Lars 'Levia' Wesselius le...@op... lar...@li...
+Joshua 'Spike1506' Luckers spi...@gm...
\ No newline at end of file
Added: jirclib/trunk/LICENSE
===================================================================
--- jirclib/trunk/LICENSE (rev 0)
+++ jirclib/trunk/LICENSE 2008-05-17 12:05:31 UTC (rev 44)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 11:56:46
|
Revision: 43
http://rochat.svn.sourceforge.net/rochat/?rev=43&view=rev
Author: levia
Date: 2008-05-17 04:56:44 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Removed nbproject. Will readd ant build files later.
Removed Paths:
-------------
ROChat/trunk/nbproject/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 11:54:32
|
Revision: 42
http://rochat.svn.sourceforge.net/rochat/?rev=42&view=rev
Author: levia
Date: 2008-05-17 04:54:25 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Updated AUTHORS.
- Removed build.xml, will be readded somewhere along the way
Modified Paths:
--------------
ROChat/trunk/AUTHORS
Removed Paths:
-------------
ROChat/trunk/build.xml
Modified: ROChat/trunk/AUTHORS
===================================================================
--- ROChat/trunk/AUTHORS 2008-05-17 11:49:27 UTC (rev 41)
+++ ROChat/trunk/AUTHORS 2008-05-17 11:54:25 UTC (rev 42)
@@ -1,5 +1,5 @@
AUTHORS
-------
-Lars 'Levia' Wesselius la...@le... le...@op...
+Lars 'Levia' Wesselius le...@op... lar...@li...
Joshua 'Spike1506' Luckers spi...@gm...
\ No newline at end of file
Deleted: ROChat/trunk/build.xml
===================================================================
--- ROChat/trunk/build.xml 2008-05-17 11:49:27 UTC (rev 41)
+++ ROChat/trunk/build.xml 2008-05-17 11:54:25 UTC (rev 42)
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<project name="ROChat" default="default" basedir=".">
- <description>Builds, tests, and runs the project ROChat.</description>
- <import file="nbproject/build-impl.xml"/>
- <!--
-
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
-
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
- -pre-compile-single: called before javac compilation of single file
- -post-compile-single: called after javac compilation of single file
- -pre-compile-test: called before javac compilation of JUnit tests
- -post-compile-test: called after javac compilation of JUnit tests
- -pre-compile-test-single: called before javac compilation of single JUnit test
- -post-compile-test-single: called after javac compilation of single JUunit test
- -pre-jar: called before JAR building
- -post-jar: called after JAR building
- -post-clean: called after cleaning build products
-
- (Targets beginning with '-' are not intended to be called on their own.)
-
- Example of inserting an obfuscator after compilation could look like this:
-
- <target name="-post-compile">
- <obfuscate>
- <fileset dir="${build.classes.dir}"/>
- </obfuscate>
- </target>
-
- For list of available properties check the imported
- nbproject/build-impl.xml file.
-
-
- Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
-
- -init-macrodef-javac: defines macro for javac compilation
- -init-macrodef-junit: defines macro for junit execution
- -init-macrodef-debug: defines macro for class debugging
- -init-macrodef-java: defines macro for class execution
- -do-jar-with-manifest: JAR building (if you are using a manifest)
- -do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
- -javadoc-build: Javadoc generation
- test-report: JUnit report generation
-
- An example of overriding the target for project execution could look like this:
-
- <target name="run" depends="ROChat-impl.jar">
- <exec dir="bin" executable="launcher.exe">
- <arg file="${dist.jar}"/>
- </exec>
- </target>
-
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
- properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
-
- -->
-</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 11:49:28
|
Revision: 41
http://rochat.svn.sourceforge.net/rochat/?rev=41&view=rev
Author: levia
Date: 2008-05-17 04:49:27 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Added jirclib directories.
- Moved everything from ROChat to it's own directory.
Added Paths:
-----------
ROChat/
ROChat/branches/
ROChat/tags/
ROChat/trunk/
ROChat/trunk/AUTHORS
ROChat/trunk/LICENSE
ROChat/trunk/build.xml
ROChat/trunk/nbproject/
ROChat/trunk/nbproject/build-impl.xml
ROChat/trunk/nbproject/genfiles.properties
ROChat/trunk/nbproject/project.properties
ROChat/trunk/nbproject/project.xml
ROChat/trunk/src/
ROChat/trunk/src/net/
ROChat/trunk/src/net/sensiva/
ROChat/trunk/src/net/sensiva/rochat/
jirclib/
jirclib/branches/
jirclib/tags/
jirclib/trunk/
Added: ROChat/trunk/AUTHORS
===================================================================
--- ROChat/trunk/AUTHORS (rev 0)
+++ ROChat/trunk/AUTHORS 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,5 @@
+AUTHORS
+-------
+
+Lars 'Levia' Wesselius la...@le... le...@op...
+Joshua 'Spike1506' Luckers spi...@gm...
\ No newline at end of file
Added: ROChat/trunk/LICENSE
===================================================================
--- ROChat/trunk/LICENSE (rev 0)
+++ ROChat/trunk/LICENSE 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
Added: ROChat/trunk/build.xml
===================================================================
--- ROChat/trunk/build.xml (rev 0)
+++ ROChat/trunk/build.xml 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="ROChat" default="default" basedir=".">
+ <description>Builds, tests, and runs the project ROChat.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="ROChat-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
Added: ROChat/trunk/nbproject/build-impl.xml
===================================================================
--- ROChat/trunk/nbproject/build-impl.xml (rev 0)
+++ ROChat/trunk/nbproject/build-impl.xml 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,616 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+ -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="ROChat-impl">
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private" name="-init-user">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or/>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <and>
+ <isset property="javadoc.preview"/>
+ <isfalse value="${javadoc.preview}"/>
+ </and>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ <property name="application.args" value=""/>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="do.depend" value="false"/>
+ <condition property="do.depend.true">
+ <istrue value="${do.depend}"/>
+ </condition>
+ <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
+ <and>
+ <isset property="jaxws.endorsed.dir"/>
+ <available file="nbproject/jaxws-build.xml"/>
+ </and>
+ </condition>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="" name="sourcepath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="," property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <delete>
+ <files includes="${javac.includes.binary}"/>
+ </delete>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
+ <sequential>
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
+ <batchtest todir="${build.test.results.dir}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <attribute default="" name="stopclassname"/>
+ <sequential>
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${build.classes.dir}" name="dir"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${debug-args-line}"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute default="${main.class}" name="classname"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar compress="${jar.compress}" jarfile="${dist.jar}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target depends="init" name="deps-jar" unless="no.deps"/>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-depend">
+ <j2seproject3:depend/>
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile/>
+ <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target depends="init" name="-pre-pre-jar">
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert pathsep=" " property="jar.classpath">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target depends="init,compile" description="Run a main class." name="run">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="-do-not-recompile">
+ <property name="javac.includes.binary" value=""/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-single" name="run-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target depends="init,compile" name="-debug-start-debuggee">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init" name="-pre-debug-fix">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target depends="init" name="-javadoc-build">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
+ </javadoc>
+ </target>
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target if="do.depend.true" name="-compile-test-depend">
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <j2seproject3:junit testincludes="**/*Test.java"/>
+ </target>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
+ </target>
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <mkdir dir="${build.test.results.dir}"/>
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
+ <customize>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg value="${test.class}"/>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" name="run-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target depends="init" name="deps-clean" unless="no.deps"/>
+ <target depends="init" name="-do-clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
+</project>
Added: ROChat/trunk/nbproject/genfiles.properties
===================================================================
--- ROChat/trunk/nbproject/genfiles.properties (rev 0)
+++ ROChat/trunk/nbproject/genfiles.properties 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,8 @@
+build.xml.data.CRC32=45f2cdb8
+build.xml.script.CRC32=11fe3129
+build.xml.stylesheet.CRC32=be360661
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=45f2cdb8
+nbproject/build-impl.xml.script.CRC32=a6d6172c
+nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
Added: ROChat/trunk/nbproject/project.properties
===================================================================
--- ROChat/trunk/nbproject/project.properties (rev 0)
+++ ROChat/trunk/nbproject/project.properties 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,58 @@
+application.args=
+build.classes.dir=${build.dir}/classes
+build.classes.excludes=**/*.java,**/*.form
+# This directory is removed when the project is cleaned:
+build.dir=build
+build.generated.dir=${build.dir}/generated
+# Only compile against the classpath explicitly listed here:
+build.sysclasspath=ignore
+build.test.classes.dir=${build.dir}/test/classes
+build.test.results.dir=${build.dir}/test/results
+debug.classpath=\
+ ${run.classpath}
+debug.test.classpath=\
+ ${run.test.classpath}
+# This directory is removed when the project is cleaned:
+dist.dir=dist
+dist.jar=${dist.dir}/ROChat.jar
+dist.javadoc.dir=${dist.dir}/javadoc
+excludes=
+file.reference.trunk-src=src
+includes=**
+jar.compress=false
+javac.classpath=
+# Space-separated list of extra javac options
+javac.compilerargs=
+javac.deprecation=false
+javac.source=1.6
+javac.target=1.6
+javac.test.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}:\
+ ${libs.junit.classpath}
+javadoc.additionalparam=
+javadoc.author=false
+javadoc.encoding=
+javadoc.noindex=false
+javadoc.nonavbar=false
+javadoc.notree=false
+javadoc.private=false
+javadoc.splitindex=true
+javadoc.use=true
+javadoc.version=false
+javadoc.windowtitle=
+main.class=net.sensiva.rochat.ui.init.Initializer
+manifest.file=manifest.mf
+meta.inf.dir=${src.dir}/META-INF
+platform.active=default_platform
+run.classpath=\
+ ${javac.classpath}:\
+ ${build.classes.dir}
+# Space-separated list of JVM arguments used when running the project
+# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
+# or test-sys-prop.name=value to set system properties for unit tests):
+run.jvmargs=
+run.test.classpath=\
+ ${javac.test.classpath}:\
+ ${build.test.classes.dir}
+src.dir=${file.reference.trunk-src}
Added: ROChat/trunk/nbproject/project.xml
===================================================================
--- ROChat/trunk/nbproject/project.xml (rev 0)
+++ ROChat/trunk/nbproject/project.xml 2008-05-17 11:49:27 UTC (rev 41)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>ROChat</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots/>
+ </data>
+ </configuration>
+</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-05-17 11:41:01
|
Revision: 40
http://rochat.svn.sourceforge.net/rochat/?rev=40&view=rev
Author: levia
Date: 2008-05-17 04:40:59 -0700 (Sat, 17 May 2008)
Log Message:
-----------
- Removed everything :D
Removed Paths:
-------------
tags/
trunk/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2008-04-22 08:27:53
|
Revision: 39
http://rochat.svn.sourceforge.net/rochat/?rev=39&view=rev
Author: levia
Date: 2008-04-22 01:27:51 -0700 (Tue, 22 Apr 2008)
Log Message:
-----------
- Rewrite starting.
Modified Paths:
--------------
trunk/build.xml
trunk/nbproject/build-impl.xml
trunk/nbproject/genfiles.properties
trunk/nbproject/project.properties
Removed Paths:
-------------
trunk/src/net/sensiva/rochat/core/
trunk/src/net/sensiva/rochat/ui/
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-11-07 07:37:23 UTC (rev 38)
+++ trunk/build.xml 2008-04-22 08:27:51 UTC (rev 39)
@@ -1,69 +1,69 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<project name="ROChat" default="default" basedir=".">
- <description>Builds, tests, and runs the project ROChat.</description>
- <import file="nbproject/build-impl.xml"/>
- <!--
-
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
-
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
- -pre-compile-single: called before javac compilation of single file
- -post-compile-single: called after javac compilation of single file
- -pre-compile-test: called before javac compilation of JUnit tests
- -post-compile-test: called after javac compilation of JUnit tests
- -pre-compile-test-single: called before javac compilation of single JUnit test
- -post-compile-test-single: called after javac compilation of single JUunit test
- -pre-jar: called before JAR building
- -post-jar: called after JAR building
- -post-clean: called after cleaning build products
-
- (Targets beginning with '-' are not intended to be called on their own.)
-
- Example of inserting an obfuscator after compilation could look like this:
-
- <target name="-post-compile">
- <obfuscate>
- <fileset dir="${build.classes.dir}"/>
- </obfuscate>
- </target>
-
- For list of available properties check the imported
- nbproject/build-impl.xml file.
-
-
- Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
-
- -init-macrodef-javac: defines macro for javac compilation
- -init-macrodef-junit: defines macro for junit execution
- -init-macrodef-debug: defines macro for class debugging
- -init-macrodef-java: defines macro for class execution
- -do-jar-with-manifest: JAR building (if you are using a manifest)
- -do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
- -javadoc-build: Javadoc generation
- test-report: JUnit report generation
-
- An example of overriding the target for project execution could look like this:
-
- <target name="run" depends="ROChat-impl.jar">
- <exec dir="bin" executable="launcher.exe">
- <arg file="${dist.jar}"/>
- </exec>
- </target>
-
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
- properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
-
- -->
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="ROChat" default="default" basedir=".">
+ <description>Builds, tests, and runs the project ROChat.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="ROChat-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
Modified: trunk/nbproject/build-impl.xml
===================================================================
--- trunk/nbproject/build-impl.xml 2007-11-07 07:37:23 UTC (rev 38)
+++ trunk/nbproject/build-impl.xml 2008-04-22 08:27:51 UTC (rev 39)
@@ -18,32 +18,35 @@
- applet
- cleanup
--->
-<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
- <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+ -->
+<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="ROChat-impl">
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
<!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
<target name="-pre-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-init-private" depends="-pre-init">
+ <target depends="-pre-init" name="-init-private">
+ <property file="nbproject/private/config.properties"/>
+ <property file="nbproject/private/configs/${config}.properties"/>
<property file="nbproject/private/private.properties"/>
</target>
- <target name="-init-user" depends="-pre-init,-init-private">
+ <target depends="-pre-init,-init-private" name="-init-user">
<property file="${user.properties.file}"/>
<!-- The two properties below are usually overridden -->
<!-- by the active platform. Just a fallback. -->
<property name="default.javac.source" value="1.4"/>
<property name="default.javac.target" value="1.4"/>
</target>
- <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
+ <property file="nbproject/configs/${config}.properties"/>
<property file="nbproject/project.properties"/>
</target>
- <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
<available file="${manifest.file}" property="manifest.available"/>
<condition property="manifest.available+main.class">
<and>
@@ -75,7 +78,10 @@
</and>
</condition>
<condition property="no.javadoc.preview">
- <isfalse value="${javadoc.preview}"/>
+ <and>
+ <isset property="javadoc.preview"/>
+ <isfalse value="${javadoc.preview}"/>
+ </and>
</condition>
<property name="run.jvmargs" value=""/>
<property name="javac.compilerargs" value=""/>
@@ -87,12 +93,35 @@
</condition>
<property name="javac.debug" value="true"/>
<property name="javadoc.preview" value="true"/>
+ <property name="application.args" value=""/>
+ <property name="source.encoding" value="${file.encoding}"/>
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
+ <and>
+ <isset property="javadoc.encoding"/>
+ <not>
+ <equals arg1="${javadoc.encoding}" arg2=""/>
+ </not>
+ </and>
+ </condition>
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
+ <property name="includes" value="**"/>
+ <property name="excludes" value=""/>
+ <property name="do.depend" value="false"/>
+ <condition property="do.depend.true">
+ <istrue value="${do.depend}"/>
+ </condition>
+ <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
+ <and>
+ <isset property="jaxws.endorsed.dir"/>
+ <available file="nbproject/jaxws-build.xml"/>
+ </and>
+ </condition>
</target>
<target name="-post-init">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
<fail unless="src.dir">Must set src.dir</fail>
<fail unless="build.dir">Must set build.dir</fail>
<fail unless="dist.dir">Must set dist.dir</fail>
@@ -114,34 +143,66 @@
</target>
<target name="-init-macrodef-javac">
<macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="srcdir" default="${src.dir}"/>
- <attribute name="destdir" default="${build.classes.dir}"/>
- <attribute name="classpath" default="${javac.classpath}"/>
- <attribute name="debug" default="${javac.debug}"/>
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="${javac.debug}" name="debug"/>
+ <attribute default="" name="sourcepath"/>
<element name="customize" optional="true"/>
<sequential>
- <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <javac debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
<classpath>
<path path="@{classpath}"/>
</classpath>
- <compilerarg line="${javac.compilerargs}"/>
+ <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
<customize/>
</javac>
</sequential>
</macrodef>
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${src.dir}" name="srcdir"/>
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <attribute default="${javac.classpath}" name="classpath"/>
+ <sequential>
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </depend>
+ </sequential>
+ </macrodef>
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute default="${build.classes.dir}" name="destdir"/>
+ <sequential>
+ <fail unless="javac.includes">Must set javac.includes</fail>
+ <pathconvert pathsep="," property="javac.includes.binary">
+ <path>
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
+ </path>
+ <globmapper from="*.java" to="*.class"/>
+ </pathconvert>
+ <delete>
+ <files includes="${javac.includes.binary}"/>
+ </delete>
+ </sequential>
+ </macrodef>
</target>
<target name="-init-macrodef-junit">
<macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="includes" default="**/*Test.java"/>
+ <attribute default="${includes}" name="includes"/>
+ <attribute default="${excludes}" name="excludes"/>
+ <attribute default="**" name="testincludes"/>
<sequential>
- <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
<batchtest todir="${build.test.results.dir}"/>
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="test-sys-prop."/>
- <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
@@ -152,11 +213,11 @@
</target>
<target name="-init-macrodef-nbjpda">
<macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <attribute name="stopclassname" default=""/>
+ <attribute default="${main.class}" name="name"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
+ <attribute default="" name="stopclassname"/>
<sequential>
- <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
<classpath>
<path path="@{classpath}"/>
</classpath>
@@ -164,24 +225,36 @@
</sequential>
</macrodef>
<macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="dir" default="${build.classes.dir}"/>
+ <attribute default="${build.classes.dir}" name="dir"/>
<sequential>
<nbjpdareload>
- <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
</nbjpdareload>
</sequential>
</macrodef>
</target>
- <target name="-init-macrodef-debug">
+ <target name="-init-debug-args">
+ <property name="version-output" value="java version "${ant.java.version}"/>
+ <condition property="have-jdk-older-than-1.4">
+ <or>
+ <contains string="${version-output}" substring="java version "1.0"/>
+ <contains string="${version-output}" substring="java version "1.1"/>
+ <contains string="${version-output}" substring="java version "1.2"/>
+ <contains string="${version-output}" substring="java version "1.3"/>
+ </or>
+ </condition>
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
+ <istrue value="${have-jdk-older-than-1.4}"/>
+ </condition>
+ </target>
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
<macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="classname" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute default="${main.class}" name="classname"/>
+ <attribute default="${debug.classpath}" name="classpath"/>
<element name="customize" optional="true"/>
<sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=none"/>
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
+ <jvmarg line="${debug-args-line}"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
<jvmarg line="${run.jvmargs}"/>
<classpath>
@@ -189,7 +262,7 @@
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
@@ -198,17 +271,17 @@
</target>
<target name="-init-macrodef-java">
<macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="classname" default="${main.class}"/>
+ <attribute default="${main.class}" name="classname"/>
<element name="customize" optional="true"/>
<sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
<jvmarg line="${run.jvmargs}"/>
<classpath>
<path path="${run.classpath}"/>
</classpath>
<syspropertyset>
<propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
</syspropertyset>
<customize/>
</java>
@@ -217,102 +290,102 @@
</target>
<target name="-init-presetdef-jar">
<presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
- <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <jar compress="${jar.compress}" jarfile="${dist.jar}">
<j2seproject1:fileset dir="${build.classes.dir}"/>
</jar>
</presetdef>
</target>
- <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar" name="init"/>
<!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target name="deps-jar" depends="init" unless="no.deps"/>
- <target name="-pre-pre-compile" depends="init,deps-jar">
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target depends="init" name="deps-jar" unless="no.deps"/>
+ <target depends="init,deps-jar" name="-pre-pre-compile">
<mkdir dir="${build.classes.dir}"/>
</target>
<target name="-pre-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <target if="do.depend.true" name="-compile-depend">
+ <j2seproject3:depend/>
+ </target>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
<j2seproject3:javac/>
<copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
</copy>
</target>
<target name="-post-compile">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
<target name="-pre-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac>
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
+ <j2seproject3:force-recompile/>
+ <j2seproject3:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
</target>
<target name="-post-compile-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
<!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target name="-pre-pre-jar" depends="init">
- <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target depends="init" name="-pre-pre-jar">
+ <dirname file="${dist.jar}" property="dist.jar.dir"/>
<mkdir dir="${dist.jar.dir}"/>
</target>
<target name="-pre-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-do-jar-without-manifest" unless="manifest.available">
<j2seproject1:jar/>
</target>
- <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" name="-do-jar-with-manifest" unless="manifest.available+main.class">
<j2seproject1:jar manifest="${manifest.file}"/>
</target>
- <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" name="-do-jar-with-mainclass" unless="manifest.available+main.class+mkdist.available">
<j2seproject1:jar manifest="${manifest.file}">
<j2seproject1:manifest>
<j2seproject1:attribute name="Main-Class" value="${main.class}"/>
</j2seproject1:manifest>
</j2seproject1:jar>
<echo>To run this application from the command line without Ant, try:</echo>
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
<pathconvert property="run.classpath.with.dist.jar">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
</pathconvert>
<echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
</target>
- <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available" name="-do-jar-with-libraries">
+ <property location="${build.classes.dir}" name="build.classes.dir.resolved"/>
<pathconvert property="run.classpath.without.build.classes.dir">
<path path="${run.classpath}"/>
<map from="${build.classes.dir.resolved}" to=""/>
</pathconvert>
- <pathconvert property="jar.classpath" pathsep=" ">
+ <pathconvert pathsep=" " property="jar.classpath">
<path path="${run.classpath.without.build.classes.dir}"/>
<chainedmapper>
<flattenmapper/>
<globmapper from="*" to="lib/*"/>
</chainedmapper>
</pathconvert>
- <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
- <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" classpath="${libs.CopyLibs.classpath}" name="copylibs"/>
+ <copylibs compress="${jar.compress}" jarfile="${dist.jar}" manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}">
<fileset dir="${build.classes.dir}"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
@@ -320,179 +393,190 @@
</manifest>
</copylibs>
<echo>To run this application from the command line without Ant, try:</echo>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <property location="${dist.jar}" name="dist.jar.resolved"/>
<echo>java -jar "${dist.jar.resolved}"</echo>
</target>
<target name="-post-jar">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/>
<!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target name="run" depends="init,compile" description="Run a main class.">
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target depends="init,compile" description="Run a main class." name="run">
<j2seproject1:java>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject1:java>
</target>
- <target name="run-single" depends="init,compile-single">
+ <target name="-do-not-recompile">
+ <property name="javac.includes.binary" value=""/>
+ </target>
+ <target depends="init,-do-not-recompile,compile-single" name="run-single">
<fail unless="run.class">Must select one file in the IDE or set run.class</fail>
<j2seproject1:java classname="${run.class}"/>
</target>
<!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger">
<j2seproject1:nbjpdastart name="${debug.class}"/>
</target>
- <target name="-debug-start-debuggee" depends="init,compile">
+ <target depends="init,compile" name="-debug-start-debuggee">
<j2seproject3:debug>
<customize>
<arg line="${application.args}"/>
</customize>
</j2seproject3:debug>
</target>
- <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
- <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <target depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE." if="netbeans.home" name="debug"/>
+ <target depends="init" if="netbeans.home" name="-debug-start-debugger-stepinto">
<j2seproject1:nbjpdastart stopclassname="${main.class}"/>
</target>
- <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
- <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <target depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee" if="netbeans.home" name="debug-stepinto"/>
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-single">
<fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
<j2seproject3:debug classname="${debug.class}"/>
</target>
- <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
- <target name="-pre-debug-fix" depends="init">
+ <target depends="init,-do-not-recompile,compile-single,-debug-start-debugger,-debug-start-debuggee-single" if="netbeans.home" name="debug-single"/>
+ <target depends="init" name="-pre-debug-fix">
<fail unless="fix.includes">Must set fix.includes</fail>
<property name="javac.includes" value="${fix.includes}.java"/>
</target>
- <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <target depends="init,-pre-debug-fix,compile-single" if="netbeans.home" name="-do-debug-fix">
<j2seproject1:nbjpdareload/>
</target>
- <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <target depends="init,-pre-debug-fix,-do-debug-fix" if="netbeans.home" name="debug-fix"/>
<!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target name="-javadoc-build" depends="init">
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target depends="init" name="-javadoc-build">
<mkdir dir="${dist.javadoc.dir}"/>
- <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
<classpath>
<path path="${javac.classpath}"/>
</classpath>
- <sourcepath>
- <pathelement location="${src.dir}"/>
- </sourcepath>
- <packageset dir="${src.dir}" includes="*/**"/>
- <fileset dir="${src.dir}" includes="*.java"/>
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
+ <filename name="**/*.java"/>
+ </fileset>
</javadoc>
</target>
- <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
<nbbrowse file="${dist.javadoc.dir}/index.html"/>
</target>
- <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
<!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
<mkdir dir="${build.test.classes.dir}"/>
</target>
<target name="-pre-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <target if="do.depend.true" name="-compile-test-depend">
+ <j2seproject3:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir=""/>
+ </target>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir=""/>
<copy todir="${build.test.classes.dir}"/>
</target>
<target name="-post-compile-test">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
<target name="-pre-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
<fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
+ <j2seproject3:force-recompile destdir="${build.test.classes.dir}"/>
+ <j2seproject3:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="" srcdir=""/>
<copy todir="${build.test.classes.dir}"/>
</target>
<target name="-post-compile-test-single">
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
<!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target name="-pre-test-run" if="have.tests" depends="init">
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target depends="init" if="have.tests" name="-pre-test-run">
<mkdir dir="${build.test.results.dir}"/>
</target>
- <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
- <j2seproject3:junit/>
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
+ <j2seproject3:junit testincludes="**/*Test.java"/>
</target>
- <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
- <target name="test-report" if="have.tests" depends="init"/>
- <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
- <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
- <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <target depends="init" if="have.tests" name="test-report"/>
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
<mkdir dir="${build.test.results.dir}"/>
</target>
- <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
<fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <j2seproject3:junit includes="${test.includes}"/>
+ <j2seproject3:junit excludes="" includes="${test.includes}"/>
</target>
- <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
<fail if="tests.failed">Some tests failed; see details above.</fail>
</target>
- <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
<!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
<fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
+ <delete file="${test.report.file}"/>
+ <mkdir dir="${build.test.results.dir}"/>
+ <j2seproject3:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
<customize>
- <arg line="${test.class}"/>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
+ </syspropertyset>
+ <arg value="${test.class}"/>
+ <arg value="showoutput=true"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
</customize>
</j2seproject3:debug>
</target>
- <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
- <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
+ <j2seproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
</target>
- <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
- <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
+ <target depends="init,-pre-debug-fix,compile-test-single" if="netbeans.home" name="-do-debug-fix-test">
<j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
</target>
- <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <target depends="init,-pre-debug-fix,-do-debug-fix-test" if="netbeans.home" name="debug-fix-test"/>
<!--
- =========================
- APPLET EXECUTION SECTION
- =========================
- -->
- <target name="run-applet" depends="init,compile-single">
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" name="run-applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject1:java classname="sun.applet.AppletViewer">
<customize>
@@ -501,11 +585,11 @@
</j2seproject1:java>
</target>
<!--
- =========================
- APPLET DEBUGGING SECTION
- =========================
- -->
- <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target depends="init,compile-single" if="netbeans.home" name="-debug-start-debuggee-applet">
<fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
<j2seproject3:debug classname="sun.applet.AppletViewer">
<customize>
@@ -513,14 +597,14 @@
</customize>
</j2seproject3:debug>
</target>
- <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <target depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet" if="netbeans.home" name="debug-applet"/>
<!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target name="deps-clean" depends="init" unless="no.deps"/>
- <target name="-do-clean" depends="init">
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target depends="init" name="deps-clean" unless="no.deps"/>
+ <target depends="init" name="-do-clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
</target>
@@ -528,5 +612,5 @@
<!-- Empty placeholder for easier customization. -->
<!-- You can override this target in the ../build.xml file. -->
</target>
- <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
</project>
Modified: trunk/nbproject/genfiles.properties
===================================================================
--- trunk/nbproject/genfiles.properties 2007-11-07 07:37:23 UTC (rev 38)
+++ trunk/nbproject/genfiles.properties 2008-04-22 08:27:51 UTC (rev 39)
@@ -1,8 +1,8 @@
build.xml.data.CRC32=45f2cdb8
build.xml.script.CRC32=11fe3129
-build.xml.stylesheet.CRC32=240b97a2
+build.xml.stylesheet.CRC32=be360661
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=45f2cdb8
-nbproject/build-impl.xml.script.CRC32=51a2fb9b
-nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
+nbproject/build-impl.xml.script.CRC32=a6d6172c
+nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
Modified: trunk/nbproject/project.properties
===================================================================
--- trunk/nbproject/project.properties 2007-11-07 07:37:23 UTC (rev 38)
+++ trunk/nbproject/project.properties 2008-04-22 08:27:51 UTC (rev 39)
@@ -16,7 +16,9 @@
dist.dir=dist
dist.jar=${dist.dir}/ROChat.jar
dist.javadoc.dir=${dist.dir}/javadoc
+excludes=
file.reference.trunk-src=src
+includes=**
jar.compress=false
javac.classpath=
# Space-separated list of extra javac options
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <spi...@us...> - 2007-11-07 07:37:28
|
Revision: 38
http://rochat.svn.sourceforge.net/rochat/?rev=38&view=rev
Author: spike1506
Date: 2007-11-06 23:37:23 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
- Typo fixed which caused a compile error.
Modified Paths:
--------------
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-29 10:56:04 UTC (rev 37)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-11-07 07:37:23 UTC (rev 38)
@@ -125,7 +125,7 @@
{
if (!m_Socket.isClosed())
{
- send("QUIT :slet");.
+ send("QUIT :slet");
m_Socket.close();
fireDisconnected();
fireMessageReceived("Disconnected from server.");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-29 10:56:08
|
Revision: 37
http://rochat.svn.sourceforge.net/rochat/?rev=37&view=rev
Author: levia
Date: 2007-10-29 03:56:04 -0700 (Mon, 29 Oct 2007)
Log Message:
-----------
- Fixed stuff.
- Added ChannelListener.
Modified Paths:
--------------
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
Added Paths:
-----------
trunk/src/net/sensiva/rochat/core/connection/ChannelListener.java
Added: trunk/src/net/sensiva/rochat/core/connection/ChannelListener.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/ChannelListener.java (rev 0)
+++ trunk/src/net/sensiva/rochat/core/connection/ChannelListener.java 2007-10-29 10:56:04 UTC (rev 37)
@@ -0,0 +1,8 @@
+
+package net.sensiva.rochat.core.connection;
+
+public interface ChannelListener
+{
+ public void messageReceived(String message, String userName, String host, String nickName);
+ public void topicReceived(String topic);
+}
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-23 08:10:35 UTC (rev 36)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-29 10:56:04 UTC (rev 37)
@@ -125,6 +125,7 @@
{
if (!m_Socket.isClosed())
{
+ send("QUIT :slet");.
m_Socket.close();
fireDisconnected();
fireMessageReceived("Disconnected from server.");
Modified: trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java 2007-10-23 08:10:35 UTC (rev 36)
+++ trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java 2007-10-29 10:56:04 UTC (rev 37)
@@ -144,4 +144,9 @@
addMessage(nickName + " | " + message);
}
+ public void topicReceived(String topic)
+ {
+ addMessage(topic);
+ }
+
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-23 08:10:43
|
Revision: 36
http://rochat.svn.sourceforge.net/rochat/?rev=36&view=rev
Author: levia
Date: 2007-10-23 01:10:35 -0700 (Tue, 23 Oct 2007)
Log Message:
-----------
- Added more code to Channel.
- Added more code for other commands coming from server.
Modified Paths:
--------------
trunk/nbproject/build-impl.xml
trunk/nbproject/genfiles.properties
trunk/src/net/sensiva/rochat/core/connection/Channel.java
trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/core/connection/ServerMessageParser.java
trunk/src/net/sensiva/rochat/core/util/Constants.java
trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
Modified: trunk/nbproject/build-impl.xml
===================================================================
--- trunk/nbproject/build-impl.xml 2007-10-22 17:49:36 UTC (rev 35)
+++ trunk/nbproject/build-impl.xml 2007-10-23 08:10:35 UTC (rev 36)
@@ -1,532 +1,532 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
-
-For the purpose of easier reading the script
-is divided into following sections:
-
- - initialization
- - compilation
- - jar
- - execution
- - debugging
- - javadoc
- - junit compilation
- - junit execution
- - junit debugging
- - applet
- - cleanup
-
--->
-<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
- <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
- <target name="-pre-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-private" depends="-pre-init">
- <property file="nbproject/private/private.properties"/>
- </target>
- <target name="-init-user" depends="-pre-init,-init-private">
- <property file="${user.properties.file}"/>
- <!-- The two properties below are usually overridden -->
- <!-- by the active platform. Just a fallback. -->
- <property name="default.javac.source" value="1.4"/>
- <property name="default.javac.target" value="1.4"/>
- </target>
- <target name="-init-project" depends="-pre-init,-init-private,-init-user">
- <property file="nbproject/project.properties"/>
- </target>
- <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
- <available file="${manifest.file}" property="manifest.available"/>
- <condition property="manifest.available+main.class">
- <and>
- <isset property="manifest.available"/>
- <isset property="main.class"/>
- <not>
- <equals arg1="${main.class}" arg2="" trim="true"/>
- </not>
- </and>
- </condition>
- <condition property="manifest.available+main.class+mkdist.available">
- <and>
- <istrue value="${manifest.available+main.class}"/>
- <isset property="libs.CopyLibs.classpath"/>
- </and>
- </condition>
- <condition property="have.tests">
- <or/>
- </condition>
- <condition property="have.sources">
- <or>
- <available file="${src.dir}"/>
- </or>
- </condition>
- <condition property="netbeans.home+have.tests">
- <and>
- <isset property="netbeans.home"/>
- <isset property="have.tests"/>
- </and>
- </condition>
- <condition property="no.javadoc.preview">
- <isfalse value="${javadoc.preview}"/>
- </condition>
- <property name="run.jvmargs" value=""/>
- <property name="javac.compilerargs" value=""/>
- <property name="work.dir" value="${basedir}"/>
- <condition property="no.deps">
- <and>
- <istrue value="${no.dependencies}"/>
- </and>
- </condition>
- <property name="javac.debug" value="true"/>
- <property name="javadoc.preview" value="true"/>
- </target>
- <target name="-post-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
- <fail unless="src.dir">Must set src.dir</fail>
- <fail unless="build.dir">Must set build.dir</fail>
- <fail unless="dist.dir">Must set dist.dir</fail>
- <fail unless="build.classes.dir">Must set build.classes.dir</fail>
- <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
- <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
- <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
- <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
- <fail unless="dist.jar">Must set dist.jar</fail>
- </target>
- <target name="-init-macrodef-property">
- <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-javac">
- <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="srcdir" default="${src.dir}"/>
- <attribute name="destdir" default="${build.classes.dir}"/>
- <attribute name="classpath" default="${javac.classpath}"/>
- <attribute name="debug" default="${javac.debug}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${javac.compilerargs}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-junit">
- <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="includes" default="**/*Test.java"/>
- <sequential>
- <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
- <batchtest todir="${build.test.results.dir}"/>
- <classpath>
- <path path="${run.test.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper type="glob" from="test-sys-prop.*" to="*"/>
- </syspropertyset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <jvmarg line="${run.jvmargs}"/>
- </junit>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-nbjpda">
- <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <attribute name="stopclassname" default=""/>
- <sequential>
- <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </nbjpdastart>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="dir" default="${build.classes.dir}"/>
- <sequential>
- <nbjpdareload>
- <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
- </nbjpdareload>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-debug">
- <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="classname" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=none"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-java">
- <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="classname" default="${main.class}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="${run.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-presetdef-jar">
- <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
- <jar jarfile="${dist.jar}" compress="${jar.compress}">
- <j2seproject1:fileset dir="${build.classes.dir}"/>
- </jar>
- </presetdef>
- </target>
- <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
- <!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target name="deps-jar" depends="init" unless="no.deps"/>
- <target name="-pre-pre-compile" depends="init,deps-jar">
- <mkdir dir="${build.classes.dir}"/>
- </target>
- <target name="-pre-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
- <j2seproject3:javac/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
- </copy>
- </target>
- <target name="-post-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
- <target name="-pre-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac>
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- </target>
- <target name="-post-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
- <!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target name="-pre-pre-jar" depends="init">
- <dirname property="dist.jar.dir" file="${dist.jar}"/>
- <mkdir dir="${dist.jar.dir}"/>
- </target>
- <target name="-pre-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
- <j2seproject1:jar/>
- </target>
- <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
- <j2seproject1:jar manifest="${manifest.file}"/>
- </target>
- <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
- <j2seproject1:jar manifest="${manifest.file}">
- <j2seproject1:manifest>
- <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
- </j2seproject1:manifest>
- </j2seproject1:jar>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <pathconvert property="run.classpath.with.dist.jar">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
- </pathconvert>
- <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
- </target>
- <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <pathconvert property="run.classpath.without.build.classes.dir">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to=""/>
- </pathconvert>
- <pathconvert property="jar.classpath" pathsep=" ">
- <path path="${run.classpath.without.build.classes.dir}"/>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*" to="lib/*"/>
- </chainedmapper>
- </pathconvert>
- <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
- <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
- <fileset dir="${build.classes.dir}"/>
- <manifest>
- <attribute name="Main-Class" value="${main.class}"/>
- <attribute name="Class-Path" value="${jar.classpath}"/>
- </manifest>
- </copylibs>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <echo>java -jar "${dist.jar.resolved}"</echo>
- </target>
- <target name="-post-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
- <!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target name="run" depends="init,compile" description="Run a main class.">
- <j2seproject1:java>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <target name="run-single" depends="init,compile-single">
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
- <j2seproject1:java classname="${run.class}"/>
- </target>
- <!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target name="-debug-start-debugger" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart name="${debug.class}"/>
- </target>
- <target name="-debug-start-debuggee" depends="init,compile">
- <j2seproject3:debug>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
- <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
- </target>
- <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
- <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
- <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
- <j2seproject3:debug classname="${debug.class}"/>
- </target>
- <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
- <target name="-pre-debug-fix" depends="init">
- <fail unless="fix.includes">Must set fix.includes</fail>
- <property name="javac.includes" value="${fix.includes}.java"/>
- </target>
- <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
- <j2seproject1:nbjpdareload/>
- </target>
- <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
- <!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target name="-javadoc-build" depends="init">
- <mkdir dir="${dist.javadoc.dir}"/>
- <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
- <classpath>
- <path path="${javac.classpath}"/>
- </classpath>
- <sourcepath>
- <pathelement location="${src.dir}"/>
- </sourcepath>
- <packageset dir="${src.dir}" includes="*/**"/>
- <fileset dir="${src.dir}" includes="*.java"/>
- </javadoc>
- </target>
- <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
- <nbbrowse file="${dist.javadoc.dir}/index.html"/>
- </target>
- <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
- <!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
- <mkdir dir="${build.test.classes.dir}"/>
- </target>
- <target name="-pre-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
- <target name="-pre-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
- <!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target name="-pre-test-run" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
- <j2seproject3:junit/>
- </target>
- <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-report" if="have.tests" depends="init"/>
- <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
- <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
- <target name="-pre-test-run-single" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
- <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <j2seproject3:junit includes="${test.includes}"/>
- </target>
- <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
- <!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
- <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
- <customize>
- <arg line="${test.class}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
- <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
- </target>
- <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
- <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
- <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
- </target>
- <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
- <!--
- =========================
- APPLET EXECUTION SECTION
- =========================
- -->
- <target name="run-applet" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject1:java classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <!--
- =========================
- APPLET DEBUGGING SECTION
- =========================
- -->
- <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject3:debug classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
- <!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target name="deps-clean" depends="init" unless="no.deps"/>
- <target name="-do-clean" depends="init">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
- <target name="-post-clean">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
+ <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or/>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
Modified: trunk/nbproject/genfiles.properties
===================================================================
--- trunk/nbproject/genfiles.properties 2007-10-22 17:49:36 UTC (rev 35)
+++ trunk/nbproject/genfiles.properties 2007-10-23 08:10:35 UTC (rev 36)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=45f2cdb8
-build.xml.script.CRC32=11fe3129
-build.xml.stylesheet.CRC32=240b97a2
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=45f2cdb8
-nbproject/build-impl.xml.script.CRC32=51a2fb9b
-nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
+build.xml.data.CRC32=45f2cdb8
+build.xml.script.CRC32=11fe3129
+build.xml.stylesheet.CRC32=240b97a2
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=45f2cdb8
+nbproject/build-impl.xml.script.CRC32=51a2fb9b
+nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
Modified: trunk/src/net/sensiva/rochat/core/connection/Channel.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/Channel.java 2007-10-22 17:49:36 UTC (rev 35)
+++ trunk/src/net/sensiva/rochat/core/connection/Channel.java 2007-10-23 08:10:35 UTC (rev 36)
@@ -28,11 +28,13 @@
/**
* The class that is able to handle channels.
*/
-public class Channel extends Thread
+public class Channel
{
private String m_Channel;
private IRCConnection m_Server;
+ protected List<ChannelListener> m_ChannelListeners = new ArrayList<ChannelListener>();
+
/**
* Channels constructor.
*
@@ -46,6 +48,26 @@
}
/**
+ * Add a listener.
+ *
+ * @param listener The listener to add.
+ */
+ public void addChannelListener(ChannelListener listener)
+ {
+ m_ChannelListeners.add(listener);
+ }
+
+ /**
+ * Remove a listener.
+ *
+ * @param listener The listener to remove.
+ */
+ public void removeChannelListener(ChannelListener listener)
+ {
+ m_ChannelListeners.remove(listener);
+ }
+
+ /**
* Get the channels name.
*
* \return The name of the channel.
@@ -64,5 +86,44 @@
{
return m_Server;
}
+
+ /**
+ * Say something in the channel.
+ *
+ * @param message The message.
+ */
+ public void say(String message)
+ {
+ m_Server.send("PRIVMSG " + m_Channel + " :" + message);
+ }
+
+ /**
+ * Called when a message for the channel has been received.
+ *
+ * @param message The full message.
+ */
+ public void onChatCommand(String message, String userName, String host, String nickName)
+ {
+ for (Iterator it = m_ChannelListeners.iterator(); it.hasNext();)
+ {
+ ChannelListener listener = (ChannelListener)it.next();
+ listener.messageReceived(message, userName, host, nickName);
+ }
+ }
+
+ /**
+ * Called when a topic has been received.
+ *
+ * @param topic The topic.
+ */
+ public void onTopic(String topic)
+ {
+ for (Iterator it = m_ChannelListeners.iterator(); it.hasNext();)
+ {
+ ChannelListener listener = (ChannelListener)it.next();
+ listener.topicReceived(topic);
+ }
+ }
+
}
Modified: trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/CommandParser.java 2007-10-22 17:49:36 UTC (rev 35)
+++ trunk/src/net/sensiva/rochat/core/connection/CommandParser.java 2007-10-23 08:10:35 UTC (rev 36)
@@ -57,7 +57,14 @@
if (command.startsWith("/"))
{
- serverTab.getIRCConnection().send(command.substring(1, command.length()));
+ if (command.startsWith("/JOIN"))
+ {
+ m_MainFrame.getTabControl().createChannelTab(command.substring(5, command.length()), serverTab.getIRCConnection());
+ }
+ else
+ {
+ serverTab.getIRCConnection().send(command.substring(1, command.length()));
+ }
}
else
{
@@ -70,11 +77,22 @@
if (command.startsWith("/"))
{
- channelTab.getServer().send(command.substring(1, command.length()));
+ if (command.startsWith("/JOIN"))
+ {
+ m_MainFrame.getTabControl().createChannelTab(command.substring(5, command.length()), channelTab.getServer());
+ }
+ else
+ {
+ channelTab.getServer().send(command.substring(1, command.length()));
+ }
+
}
else
{
// Talk
+ String finalCommand = "PRIVMSG " + channelTab.getChannel().getChannelName() + " :";
+ finalCommand += command;
+ channelTab.getChannel().say(finalCommand);
}
}
return "";
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-22 17:49:36 UTC (rev 35)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-23 08:10:35 UTC (rev 36)
@@ -154,10 +154,42 @@
ServerMessageParser par = new ServerMessageParser(line);
fireServerMessageReceived(line);
- if (par.getCommand().equals("PING"))
+ String command = par.getCommand();
+ if (command.equals("PING"))
{
send("PONG " + par.getTrailing());
}
+ System.out.println("Middle: " + par.getMiddle());
+ System.out.println("Trailing: " + par.getTrailing());...
[truncated message content] |
|
From: <spi...@us...> - 2007-10-22 17:49:40
|
Revision: 35
http://rochat.svn.sourceforge.net/rochat/?rev=35&view=rev
Author: spike1506
Date: 2007-10-22 10:49:36 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
- Added a quick connect dialog (not yet finished).
Modified Paths:
--------------
trunk/nbproject/build-impl.xml
trunk/nbproject/genfiles.properties
trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java
Modified: trunk/nbproject/build-impl.xml
===================================================================
--- trunk/nbproject/build-impl.xml 2007-10-22 12:59:42 UTC (rev 34)
+++ trunk/nbproject/build-impl.xml 2007-10-22 17:49:36 UTC (rev 35)
@@ -1,532 +1,532 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
-
-For the purpose of easier reading the script
-is divided into following sections:
-
- - initialization
- - compilation
- - jar
- - execution
- - debugging
- - javadoc
- - junit compilation
- - junit execution
- - junit debugging
- - applet
- - cleanup
-
--->
-<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
- <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
- <target name="-pre-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-private" depends="-pre-init">
- <property file="nbproject/private/private.properties"/>
- </target>
- <target name="-init-user" depends="-pre-init,-init-private">
- <property file="${user.properties.file}"/>
- <!-- The two properties below are usually overridden -->
- <!-- by the active platform. Just a fallback. -->
- <property name="default.javac.source" value="1.4"/>
- <property name="default.javac.target" value="1.4"/>
- </target>
- <target name="-init-project" depends="-pre-init,-init-private,-init-user">
- <property file="nbproject/project.properties"/>
- </target>
- <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
- <available file="${manifest.file}" property="manifest.available"/>
- <condition property="manifest.available+main.class">
- <and>
- <isset property="manifest.available"/>
- <isset property="main.class"/>
- <not>
- <equals arg1="${main.class}" arg2="" trim="true"/>
- </not>
- </and>
- </condition>
- <condition property="manifest.available+main.class+mkdist.available">
- <and>
- <istrue value="${manifest.available+main.class}"/>
- <isset property="libs.CopyLibs.classpath"/>
- </and>
- </condition>
- <condition property="have.tests">
- <or/>
- </condition>
- <condition property="have.sources">
- <or>
- <available file="${src.dir}"/>
- </or>
- </condition>
- <condition property="netbeans.home+have.tests">
- <and>
- <isset property="netbeans.home"/>
- <isset property="have.tests"/>
- </and>
- </condition>
- <condition property="no.javadoc.preview">
- <isfalse value="${javadoc.preview}"/>
- </condition>
- <property name="run.jvmargs" value=""/>
- <property name="javac.compilerargs" value=""/>
- <property name="work.dir" value="${basedir}"/>
- <condition property="no.deps">
- <and>
- <istrue value="${no.dependencies}"/>
- </and>
- </condition>
- <property name="javac.debug" value="true"/>
- <property name="javadoc.preview" value="true"/>
- </target>
- <target name="-post-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
- <fail unless="src.dir">Must set src.dir</fail>
- <fail unless="build.dir">Must set build.dir</fail>
- <fail unless="dist.dir">Must set dist.dir</fail>
- <fail unless="build.classes.dir">Must set build.classes.dir</fail>
- <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
- <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
- <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
- <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
- <fail unless="dist.jar">Must set dist.jar</fail>
- </target>
- <target name="-init-macrodef-property">
- <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-javac">
- <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="srcdir" default="${src.dir}"/>
- <attribute name="destdir" default="${build.classes.dir}"/>
- <attribute name="classpath" default="${javac.classpath}"/>
- <attribute name="debug" default="${javac.debug}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${javac.compilerargs}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-junit">
- <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="includes" default="**/*Test.java"/>
- <sequential>
- <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
- <batchtest todir="${build.test.results.dir}"/>
- <classpath>
- <path path="${run.test.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper type="glob" from="test-sys-prop.*" to="*"/>
- </syspropertyset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <jvmarg line="${run.jvmargs}"/>
- </junit>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-nbjpda">
- <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <attribute name="stopclassname" default=""/>
- <sequential>
- <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </nbjpdastart>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="dir" default="${build.classes.dir}"/>
- <sequential>
- <nbjpdareload>
- <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
- </nbjpdareload>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-debug">
- <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="classname" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=none"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-java">
- <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="classname" default="${main.class}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="${run.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-presetdef-jar">
- <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
- <jar jarfile="${dist.jar}" compress="${jar.compress}">
- <j2seproject1:fileset dir="${build.classes.dir}"/>
- </jar>
- </presetdef>
- </target>
- <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
- <!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target name="deps-jar" depends="init" unless="no.deps"/>
- <target name="-pre-pre-compile" depends="init,deps-jar">
- <mkdir dir="${build.classes.dir}"/>
- </target>
- <target name="-pre-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
- <j2seproject3:javac/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
- </copy>
- </target>
- <target name="-post-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
- <target name="-pre-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac>
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- </target>
- <target name="-post-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
- <!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target name="-pre-pre-jar" depends="init">
- <dirname property="dist.jar.dir" file="${dist.jar}"/>
- <mkdir dir="${dist.jar.dir}"/>
- </target>
- <target name="-pre-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
- <j2seproject1:jar/>
- </target>
- <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
- <j2seproject1:jar manifest="${manifest.file}"/>
- </target>
- <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
- <j2seproject1:jar manifest="${manifest.file}">
- <j2seproject1:manifest>
- <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
- </j2seproject1:manifest>
- </j2seproject1:jar>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <pathconvert property="run.classpath.with.dist.jar">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
- </pathconvert>
- <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
- </target>
- <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <pathconvert property="run.classpath.without.build.classes.dir">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to=""/>
- </pathconvert>
- <pathconvert property="jar.classpath" pathsep=" ">
- <path path="${run.classpath.without.build.classes.dir}"/>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*" to="lib/*"/>
- </chainedmapper>
- </pathconvert>
- <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
- <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
- <fileset dir="${build.classes.dir}"/>
- <manifest>
- <attribute name="Main-Class" value="${main.class}"/>
- <attribute name="Class-Path" value="${jar.classpath}"/>
- </manifest>
- </copylibs>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <echo>java -jar "${dist.jar.resolved}"</echo>
- </target>
- <target name="-post-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
- <!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target name="run" depends="init,compile" description="Run a main class.">
- <j2seproject1:java>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <target name="run-single" depends="init,compile-single">
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
- <j2seproject1:java classname="${run.class}"/>
- </target>
- <!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target name="-debug-start-debugger" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart name="${debug.class}"/>
- </target>
- <target name="-debug-start-debuggee" depends="init,compile">
- <j2seproject3:debug>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
- <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
- </target>
- <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
- <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
- <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
- <j2seproject3:debug classname="${debug.class}"/>
- </target>
- <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
- <target name="-pre-debug-fix" depends="init">
- <fail unless="fix.includes">Must set fix.includes</fail>
- <property name="javac.includes" value="${fix.includes}.java"/>
- </target>
- <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
- <j2seproject1:nbjpdareload/>
- </target>
- <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
- <!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target name="-javadoc-build" depends="init">
- <mkdir dir="${dist.javadoc.dir}"/>
- <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
- <classpath>
- <path path="${javac.classpath}"/>
- </classpath>
- <sourcepath>
- <pathelement location="${src.dir}"/>
- </sourcepath>
- <packageset dir="${src.dir}" includes="*/**"/>
- <fileset dir="${src.dir}" includes="*.java"/>
- </javadoc>
- </target>
- <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
- <nbbrowse file="${dist.javadoc.dir}/index.html"/>
- </target>
- <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
- <!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
- <mkdir dir="${build.test.classes.dir}"/>
- </target>
- <target name="-pre-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
- <target name="-pre-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
- <!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target name="-pre-test-run" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
- <j2seproject3:junit/>
- </target>
- <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-report" if="have.tests" depends="init"/>
- <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
- <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
- <target name="-pre-test-run-single" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
- <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <j2seproject3:junit includes="${test.includes}"/>
- </target>
- <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
- <!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
- <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
- <customize>
- <arg line="${test.class}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
- <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
- </target>
- <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
- <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
- <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
- </target>
- <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
- <!--
- =========================
- APPLET EXECUTION SECTION
- =========================
- -->
- <target name="run-applet" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject1:java classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <!--
- =========================
- APPLET DEBUGGING SECTION
- =========================
- -->
- <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject3:debug classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
- <!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target name="deps-clean" depends="init" unless="no.deps"/>
- <target name="-do-clean" depends="init">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
- <target name="-post-clean">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
+ <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or/>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
Modified: trunk/nbproject/genfiles.properties
===================================================================
--- trunk/nbproject/genfiles.properties 2007-10-22 12:59:42 UTC (rev 34)
+++ trunk/nbproject/genfiles.properties 2007-10-22 17:49:36 UTC (rev 35)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=45f2cdb8
-build.xml.script.CRC32=11fe3129
-build.xml.stylesheet.CRC32=240b97a2
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=45f2cdb8
-nbproject/build-impl.xml.script.CRC32=51a2fb9b
-nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
+build.xml.data.CRC32=45f2cdb8
+build.xml.script.CRC32=11fe3129
+build.xml.stylesheet.CRC32=240b97a2
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=45f2cdb8
+nbproject/build-impl.xml.script.CRC32=51a2fb9b
+nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
Modified: trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java 2007-10-22 12:59:42 UTC (rev 34)
+++ trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java 2007-10-22 17:49:36 UTC (rev 35)
@@ -20,36 +20,67 @@
package net.sensiva.rochat.ui.file;
import net.sensiva.rochat.core.util.Constants;
+import javax.swing.border.*;
import javax.swing.*;
import java.awt.*;
public class ConnectDialog extends JDialog
{
+ private JTextField nickName, alterNative, ircServer;
+ private JLabel nickLabel, alterLabel, ircLabel;
+ private JButton ircConnect;
public ConnectDialog(JFrame frame)
{
- super(frame,"Connect",true);
+ super(frame,"Quick Connect",true);
initialize();
}
public void initialize()
{
- setSize(100,100);
+ setSize(220,100);
setLocationRelativeTo(null);
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ setResizable(false);
+
JPanel contentPane = new JPanel();
- contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.PAGE_AXIS));
+ contentPane.setLayout(new GridLayout(4,2));
setContentPane(contentPane);
contentPane.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
- setText();
+
+ nickLabel = new JLabel("Nickname: ");
+ nickLabel.setHorizontalAlignment(JLabel.RIGHT);
+
+ nickName = new JTextField(10);
+ //nickName.addActionListener();
+ nickName.setHorizontalAlignment(JTextField.LEFT);
+
+ alterLabel = new JLabel("Alternative: ");
+ alterLabel.setHorizontalAlignment(JLabel.RIGHT);
+
+ alterNative = new JTextField(10);
+ //alterNative.addActionListener();
+ alterNative.setHorizontalAlignment(JTextField.LEFT);
+
+ ircLabel = new JLabel("Server: ");
+ ircLabel.setHorizontalAlignment(JLabel.RIGHT);
+
+ ircServer = new JTextField(10);
+ //ircServer.addActionListener();
+ ircServer.setHorizontalAlignment(JTextField.LEFT);
+
+ ircConnect = new JButton("Connect");
+ //ircConnect.addActionListener();
+
+ add(nickLabel);
+ add(nickName);
+ add(alterLabel);
+ add(alterNative);
+ add(ircLabel);
+ add(ircServer);
+ add(new JLabel(""));
+ add(ircConnect);
setVisible(true);
}
-
- public void paintComponents(Graphics g) {
- }
- public void setText()
- {
-
- }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-22 12:59:45
|
Revision: 34
http://rochat.svn.sourceforge.net/rochat/?rev=34&view=rev
Author: levia
Date: 2007-10-22 05:59:42 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
- Added Channel.
- Changed lots of stuff in preparation for channels.
Modified Paths:
--------------
trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java
Added Paths:
-----------
trunk/src/net/sensiva/rochat/core/connection/Channel.java
Added: trunk/src/net/sensiva/rochat/core/connection/Channel.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/Channel.java (rev 0)
+++ trunk/src/net/sensiva/rochat/core/connection/Channel.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -0,0 +1,68 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.connection;
+
+import net.sensiva.rochat.core.logging.*;
+import net.sensiva.rochat.ui.tabs.*;
+import java.util.*;
+import java.net.*;
+import java.io.*;
+
+/**
+ * The class that is able to handle channels.
+*/
+public class Channel extends Thread
+{
+ private String m_Channel;
+ private IRCConnection m_Server;
+
+ /**
+ * Channels constructor.
+ *
+ * @param channel The channel this channel is handling.
+ * @Param server The server.
+ */
+ public Channel(String channel, IRCConnection server)
+ {
+ m_Channel = channel;
+ m_Server = server;
+ }
+
+ /**
+ * Get the channels name.
+ *
+ * \return The name of the channel.
+ */
+ public String getChannelName()
+ {
+ return m_Channel;
+ }
+
+ /**
+ * Get the server this channel is on.
+ *
+ * \return The server.
+ */
+ public IRCConnection getServer()
+ {
+ return m_Server;
+ }
+}
+
Modified: trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/CommandParser.java 2007-10-22 10:53:05 UTC (rev 33)
+++ trunk/src/net/sensiva/rochat/core/connection/CommandParser.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -49,16 +49,35 @@
*/
public String doCommand(String command)
{
- String finalCommand = null;
- if (command.startsWith("/"))
+ Tab selectedTab = m_MainFrame.getSelectedTab();
+
+ if (selectedTab instanceof StatusTab)
{
- finalCommand = command.substring(1, command.length());
+ StatusTab serverTab = (StatusTab)selectedTab;
+
+ if (command.startsWith("/"))
+ {
+ serverTab.getIRCConnection().send(command.substring(1, command.length()));
+ }
+ else
+ {
+ serverTab.addMessage("You cannot talk in a server tab.");
+ }
}
- else
+ else if (selectedTab instanceof ChannelTab)
{
- // Say in current channel.
+ ChannelTab channelTab = (ChannelTab)selectedTab;
+
+ if (command.startsWith("/"))
+ {
+ channelTab.getServer().send(command.substring(1, command.length()));
+ }
+ else
+ {
+ // Talk
+ }
}
- return finalCommand;
+ return "";
}
}
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-22 10:53:05 UTC (rev 33)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -43,7 +43,9 @@
private String m_Host;
private int m_Port;
+ private Vector<Channel> m_JoinedChannels = new Vector<Channel>();
+
/**
* ServerConnection constructor.
*/
@@ -202,11 +204,167 @@
send("USER "+ m_UserName + " " + m_Socket.getLocalAddress() + " " + m_Host + " :" + m_RealName);
}
+ /**
+ * Join a channel.
+ *
+ * @param channel The channel to join.
+ * \return A reference to the channel.
+ */
+ public Channel joinChannel(String channel)
+ {
+ if (hasJoinedChannel(channel))
+ {
+ fireMessageReceived("You have already joined " + channel);
+ return null;
+ }
+ Channel chan = new Channel(channel, this);
+ send("JOIN " + channel);
+ m_JoinedChannels.add(chan);
+ return chan;
+ }
+ /**
+ * Join channels.
+ *
+ * @param channels The channels to join.
+ * \return A array with the channels joined.
+ */
+ public Channel[] joinChannels(String[] channels)
+ {
+ Channel[] chans = new Channel[channels.length];
+ String joinCommand = "JOIN ";
+ for (int i = 0; i != channels.length; ++i)
+ {
+ if (hasJoinedChannel(channels[i]))
+ {
+ fireMessageReceived("You have already joined " + channels[i]);
+ continue;
+ }
+ Channel chan = new Channel(channels[i], this);
+ joinCommand += channels[i] + ",";
+ m_JoinedChannels.add(chan);
+ chans[i] = chan;
+ }
+ send(joinCommand);
+ return chans;
+ }
+ /**
+ * Part a channel.
+ *
+ * @param channelName The channel to part.
+ */
+ public void partChannel(String channelName)
+ {
+ for (Enumeration entries = m_JoinedChannels.elements(); entries.hasMoreElements();)
+ {
+ Channel channel = (Channel)entries.nextElement();
+
+ if (channel.getChannelName().equals(channelName))
+ {
+ send("PART " + channelName);
+ m_JoinedChannels.remove(channel);
+ return;
+ }
+ }
+ fireMessageReceived("You are not in channel " + channelName);
+ }
+ /**
+ * Part a channel.
+ *
+ * @param channel The channel to part.
+ */
+ public void partChannel(Channel channel)
+ {
+ if (m_JoinedChannels.contains(channel))
+ {
+ send("PART " + channel.getChannelName());
+ m_JoinedChannels.remove(channel);
+ return;
+ }
+ fireMessageReceived("You are not in channel " + channel.getChannelName());
+ }
/**
+ * Part multiple channels.
+ *
+ * @param channels The channels to part.
+ */
+ public void partChannels(Channel[] channels)
+ {
+ String partCommand = "PART ";
+ for (int i = 0; i != channels.length; ++i)
+ {
+ Channel chan = channels[i];
+ if (m_JoinedChannels.contains(chan))
+ {
+ partCommand += chan.getChannelName() + ",";
+ m_JoinedChannels.remove(chan);
+ }
+ fireMessageReceived("You are not in channel " + chan.getChannelName());
+ }
+ send(partCommand);
+ }
+
+ /**
+ * Part all channels.
+ */
+ public void partAllChannels()
+ {
+ if (!m_JoinedChannels.isEmpty())
+ {
+ String partCommand = "PART ";
+ for (Enumeration entries = m_JoinedChannels.elements(); entries.hasMoreElements();)
+ {
+ Channel chan = (Channel)entries.nextElement();
+
+ partCommand += chan.getChannelName() + ",";
+ m_JoinedChannels.remove(chan);
+ }
+ send(partCommand);
+ }
+ }
+
+ /**
+ * Checks whether a channel has been joined.
+ *
+ * @param channel The channel to check for.
+ * \return True if so, false if not.
+ */
+ public boolean hasJoinedChannel(String channel)
+ {
+ for (Enumeration entries = m_JoinedChannels.elements(); entries.hasMoreElements();)
+ {
+ Channel chan = (Channel)entries.nextElement();
+ if (chan.getChannelName().equals(channel))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Checks whether a channel has been joined.
+ *
+ * @param channel The channel to check for.
+ * \return True if so, false if not.
+ */
+ public boolean hasJoinedChannel(Channel channel)
+ {
+ if (m_JoinedChannels.contains(channel))
+ {
+ return true;
+ }
+ return false;
+ }
+
+
+
+
+
+ /**
* Gets the host it connects or is connected to.
*
* \return The host.
Modified: trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-22 10:53:05 UTC (rev 33)
+++ trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -34,6 +34,7 @@
{
private JFrame m_MainFrame;
private TabManager m_TabManager;
+ private CommandParser m_Parser;
/**
* Creates our frame, then initializes all components.
@@ -53,9 +54,9 @@
m_MainFrame = new JFrame("ROChat");
m_TabManager = new TabManager(this);
+ m_Parser = new CommandParser(this);
-
m_MainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
/*
* Don't use setLocationRelativeTo(null) because it will give some problems with dual-screens.
@@ -134,6 +135,17 @@
{
return (Tab)m_TabManager.getSelectedComponent();
}
+
+ /**
+ * Execute a command entered by the user.
+ *
+ * @param command The phrase the user entered.
+ * \return void.
+ */
+ public void executeCommand(String command)
+ {
+ String finalCommand = m_Parser.doCommand(command);
+ }
}
Modified: trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java 2007-10-22 10:53:05 UTC (rev 33)
+++ trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -31,27 +31,35 @@
public class ChannelTab extends JPanel implements Tab
{
private MainFrame m_MainFrame;
- private int m_TabIndex;
+ public int m_TabIndex;
private JPanel m_ContentPane;
- private JEditorPane m_MessageList;
+ private JTextPane m_MessageList;
private JTextField m_TextField;
private JList m_NickList;
private JSplitPane m_SplitPane;
- //private Channel m_Channel;
+ private Channel m_Channel;
private IRCConnection m_Connection;
+ /**
+ * ChannelTab constructor.
+ *
+ * @param mainFrame The Mainframe.
+ * @param channel The channel to join.
+ * @param server The server to join on.
+ */
public ChannelTab(MainFrame mainFrame, String channel, IRCConnection server)
{
m_MainFrame = mainFrame;
m_Connection = server;
- //m_Connection.joinChannel(channel);
-
+ m_Channel = m_Connection.joinChannel(channel);
}
-
- public void initialize()
+ /**
+ * Initializes this tab.
+ */
+ public void initialize()
{
setOpaque(false);
setLayout(new BoxLayout(this, BoxLayout.LINE_AXIS));
@@ -61,7 +69,9 @@
leftPane.setOpaque(false);
leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.PAGE_AXIS));
- m_MessageList = new JEditorPane();
+ m_MessageList = new JTextPane();
+ m_MessageList.setBackground(Color.WHITE);
+ m_MessageList.setEditable(false);
JScrollPane messagePane = new JScrollPane(m_MessageList);
@@ -87,12 +97,26 @@
m_SplitPane.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
m_SplitPane.setOpaque(false);
add(m_SplitPane);
-
}
- public int getTabIndex()
+ /**
+ * Get the channel.
+ *
+ * \return The channel.
+ */
+ public Channel getChannel()
{
- return m_TabIndex;
+ return m_Channel;
}
+ /**
+ * Get the server.
+ *
+ * \return The server.
+ */
+ public IRCConnection getServer()
+ {
+ return m_Connection;
+ }
+
}
Modified: trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java 2007-10-22 10:53:05 UTC (rev 33)
+++ trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java 2007-10-22 12:59:42 UTC (rev 34)
@@ -36,14 +36,12 @@
private JPanel m_ContentPane;
private JTextPane m_MessageList;
private JTextField m_TextField;
- private CommandParser m_Parser;
private IRCConnection m_Connection = null;
public StatusTab(MainFrame mainFrame)
{
m_MainFrame = mainFrame;
- m_Parser = new CommandParser(mainFrame);
}
public void initialize()
@@ -115,8 +113,8 @@
SimpleAttributeSet set = new SimpleAttributeSet();
StyleConstants.setForeground(set, Color.BLACK);
- m_MessageList.setCaretPosition(doc.getLength());
doc.insertString(doc.getLength(), message + "\n", set);
+ m_MessageList.setCaretPosition(doc.getLength());
}
catch (Exception e)
{
@@ -126,15 +124,7 @@
public void actionPerformed(ActionEvent event)
{
- String command = m_Parser.doCommand(m_TextField.getText());
- if (command == null)
- {
- addMessage("You can not talk in a server tab.");
- }
- else
- {
- m_Connection.send(command);
- }
+ m_MainFrame.executeCommand(m_TextField.getText());
m_TextField.setText("");
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-22 10:53:09
|
Revision: 33
http://rochat.svn.sourceforge.net/rochat/?rev=33&view=rev
Author: levia
Date: 2007-10-22 03:53:05 -0700 (Mon, 22 Oct 2007)
Log Message:
-----------
- Added CommandParser, it parses commands coming from users.
- Added TabManager, this is the new tab control used.
- Server commands now need to be entered with a '/' in front of it. Otherwise it will be seen as a message to a user or channel.
Modified Paths:
--------------
trunk/nbproject/build-impl.xml
trunk/nbproject/genfiles.properties
trunk/src/net/sensiva/rochat/core/connection/Connection.java
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
trunk/src/net/sensiva/rochat/ui/tabs/ChannelTab.java
trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java
trunk/src/net/sensiva/rochat/ui/tabs/Tab.java
Added Paths:
-----------
trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
trunk/src/net/sensiva/rochat/ui/tabs/TabManager.java
Modified: trunk/nbproject/build-impl.xml
===================================================================
--- trunk/nbproject/build-impl.xml 2007-10-21 19:16:25 UTC (rev 32)
+++ trunk/nbproject/build-impl.xml 2007-10-22 10:53:05 UTC (rev 33)
@@ -1,532 +1,532 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-*** GENERATED FROM project.xml - DO NOT EDIT ***
-*** EDIT ../build.xml INSTEAD ***
-
-For the purpose of easier reading the script
-is divided into following sections:
-
- - initialization
- - compilation
- - jar
- - execution
- - debugging
- - javadoc
- - junit compilation
- - junit execution
- - junit debugging
- - applet
- - cleanup
-
--->
-<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
- <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
- <!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
- <target name="-pre-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-private" depends="-pre-init">
- <property file="nbproject/private/private.properties"/>
- </target>
- <target name="-init-user" depends="-pre-init,-init-private">
- <property file="${user.properties.file}"/>
- <!-- The two properties below are usually overridden -->
- <!-- by the active platform. Just a fallback. -->
- <property name="default.javac.source" value="1.4"/>
- <property name="default.javac.target" value="1.4"/>
- </target>
- <target name="-init-project" depends="-pre-init,-init-private,-init-user">
- <property file="nbproject/project.properties"/>
- </target>
- <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
- <available file="${manifest.file}" property="manifest.available"/>
- <condition property="manifest.available+main.class">
- <and>
- <isset property="manifest.available"/>
- <isset property="main.class"/>
- <not>
- <equals arg1="${main.class}" arg2="" trim="true"/>
- </not>
- </and>
- </condition>
- <condition property="manifest.available+main.class+mkdist.available">
- <and>
- <istrue value="${manifest.available+main.class}"/>
- <isset property="libs.CopyLibs.classpath"/>
- </and>
- </condition>
- <condition property="have.tests">
- <or/>
- </condition>
- <condition property="have.sources">
- <or>
- <available file="${src.dir}"/>
- </or>
- </condition>
- <condition property="netbeans.home+have.tests">
- <and>
- <isset property="netbeans.home"/>
- <isset property="have.tests"/>
- </and>
- </condition>
- <condition property="no.javadoc.preview">
- <isfalse value="${javadoc.preview}"/>
- </condition>
- <property name="run.jvmargs" value=""/>
- <property name="javac.compilerargs" value=""/>
- <property name="work.dir" value="${basedir}"/>
- <condition property="no.deps">
- <and>
- <istrue value="${no.dependencies}"/>
- </and>
- </condition>
- <property name="javac.debug" value="true"/>
- <property name="javadoc.preview" value="true"/>
- </target>
- <target name="-post-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
- <fail unless="src.dir">Must set src.dir</fail>
- <fail unless="build.dir">Must set build.dir</fail>
- <fail unless="dist.dir">Must set dist.dir</fail>
- <fail unless="build.classes.dir">Must set build.classes.dir</fail>
- <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
- <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
- <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
- <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
- <fail unless="dist.jar">Must set dist.jar</fail>
- </target>
- <target name="-init-macrodef-property">
- <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-javac">
- <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="srcdir" default="${src.dir}"/>
- <attribute name="destdir" default="${build.classes.dir}"/>
- <attribute name="classpath" default="${javac.classpath}"/>
- <attribute name="debug" default="${javac.debug}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${javac.compilerargs}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-junit">
- <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="includes" default="**/*Test.java"/>
- <sequential>
- <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
- <batchtest todir="${build.test.results.dir}"/>
- <classpath>
- <path path="${run.test.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper type="glob" from="test-sys-prop.*" to="*"/>
- </syspropertyset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <jvmarg line="${run.jvmargs}"/>
- </junit>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-nbjpda">
- <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="name" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <attribute name="stopclassname" default=""/>
- <sequential>
- <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </nbjpdastart>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="dir" default="${build.classes.dir}"/>
- <sequential>
- <nbjpdareload>
- <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
- </nbjpdareload>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-debug">
- <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
- <attribute name="classname" default="${main.class}"/>
- <attribute name="classpath" default="${debug.classpath}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xnoagent"/>
- <jvmarg value="-Djava.compiler=none"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-java">
- <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
- <attribute name="classname" default="${main.class}"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java fork="true" classname="@{classname}" dir="${work.dir}">
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="${run.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper type="glob" from="run-sys-prop.*" to="*"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-presetdef-jar">
- <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
- <jar jarfile="${dist.jar}" compress="${jar.compress}">
- <j2seproject1:fileset dir="${build.classes.dir}"/>
- </jar>
- </presetdef>
- </target>
- <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
- <!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target name="deps-jar" depends="init" unless="no.deps"/>
- <target name="-pre-pre-compile" depends="init,deps-jar">
- <mkdir dir="${build.classes.dir}"/>
- </target>
- <target name="-pre-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
- <j2seproject3:javac/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
- </copy>
- </target>
- <target name="-post-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
- <target name="-pre-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac>
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- </target>
- <target name="-post-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
- <!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target name="-pre-pre-jar" depends="init">
- <dirname property="dist.jar.dir" file="${dist.jar}"/>
- <mkdir dir="${dist.jar.dir}"/>
- </target>
- <target name="-pre-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
- <j2seproject1:jar/>
- </target>
- <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
- <j2seproject1:jar manifest="${manifest.file}"/>
- </target>
- <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
- <j2seproject1:jar manifest="${manifest.file}">
- <j2seproject1:manifest>
- <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
- </j2seproject1:manifest>
- </j2seproject1:jar>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <pathconvert property="run.classpath.with.dist.jar">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
- </pathconvert>
- <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
- </target>
- <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
- <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
- <pathconvert property="run.classpath.without.build.classes.dir">
- <path path="${run.classpath}"/>
- <map from="${build.classes.dir.resolved}" to=""/>
- </pathconvert>
- <pathconvert property="jar.classpath" pathsep=" ">
- <path path="${run.classpath.without.build.classes.dir}"/>
- <chainedmapper>
- <flattenmapper/>
- <globmapper from="*" to="lib/*"/>
- </chainedmapper>
- </pathconvert>
- <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
- <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
- <fileset dir="${build.classes.dir}"/>
- <manifest>
- <attribute name="Main-Class" value="${main.class}"/>
- <attribute name="Class-Path" value="${jar.classpath}"/>
- </manifest>
- </copylibs>
- <echo>To run this application from the command line without Ant, try:</echo>
- <property name="dist.jar.resolved" location="${dist.jar}"/>
- <echo>java -jar "${dist.jar.resolved}"</echo>
- </target>
- <target name="-post-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
- <!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target name="run" depends="init,compile" description="Run a main class.">
- <j2seproject1:java>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <target name="run-single" depends="init,compile-single">
- <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
- <j2seproject1:java classname="${run.class}"/>
- </target>
- <!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target name="-debug-start-debugger" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart name="${debug.class}"/>
- </target>
- <target name="-debug-start-debuggee" depends="init,compile">
- <j2seproject3:debug>
- <customize>
- <arg line="${application.args}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
- <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
- <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
- </target>
- <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
- <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
- <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
- <j2seproject3:debug classname="${debug.class}"/>
- </target>
- <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
- <target name="-pre-debug-fix" depends="init">
- <fail unless="fix.includes">Must set fix.includes</fail>
- <property name="javac.includes" value="${fix.includes}.java"/>
- </target>
- <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
- <j2seproject1:nbjpdareload/>
- </target>
- <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
- <!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target name="-javadoc-build" depends="init">
- <mkdir dir="${dist.javadoc.dir}"/>
- <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
- <classpath>
- <path path="${javac.classpath}"/>
- </classpath>
- <sourcepath>
- <pathelement location="${src.dir}"/>
- </sourcepath>
- <packageset dir="${src.dir}" includes="*/**"/>
- <fileset dir="${src.dir}" includes="*.java"/>
- </javadoc>
- </target>
- <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
- <nbbrowse file="${dist.javadoc.dir}/index.html"/>
- </target>
- <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
- <!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
- <mkdir dir="${build.test.classes.dir}"/>
- </target>
- <target name="-pre-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
- <target name="-pre-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
- <customize>
- <patternset includes="${javac.includes}"/>
- </customize>
- </j2seproject3:javac>
- <copy todir="${build.test.classes.dir}"/>
- </target>
- <target name="-post-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
- <!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target name="-pre-test-run" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
- <j2seproject3:junit/>
- </target>
- <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-report" if="have.tests" depends="init"/>
- <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
- <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
- <target name="-pre-test-run-single" if="have.tests" depends="init">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
- <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <j2seproject3:junit includes="${test.includes}"/>
- </target>
- <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
- <!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
- <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
- <customize>
- <arg line="${test.class}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
- <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
- </target>
- <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
- <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
- <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
- </target>
- <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
- <!--
- =========================
- APPLET EXECUTION SECTION
- =========================
- -->
- <target name="run-applet" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject1:java classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject1:java>
- </target>
- <!--
- =========================
- APPLET DEBUGGING SECTION
- =========================
- -->
- <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
- <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
- <j2seproject3:debug classname="sun.applet.AppletViewer">
- <customize>
- <arg value="${applet.url}"/>
- </customize>
- </j2seproject3:debug>
- </target>
- <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
- <!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target name="deps-clean" depends="init" unless="no.deps"/>
- <target name="-do-clean" depends="init">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
- <target name="-post-clean">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+*** GENERATED FROM project.xml - DO NOT EDIT ***
+*** EDIT ../build.xml INSTEAD ***
+
+For the purpose of easier reading the script
+is divided into following sections:
+
+ - initialization
+ - compilation
+ - jar
+ - execution
+ - debugging
+ - javadoc
+ - junit compilation
+ - junit execution
+ - junit debugging
+ - applet
+ - cleanup
+
+-->
+<project name="ROChat-impl" default="default" basedir=".." xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:jaxws="http://www.netbeans.org/ns/jax-ws/1">
+ <target name="default" depends="test,jar,javadoc" description="Build and test whole project."/>
+ <!--
+ ======================
+ INITIALIZATION SECTION
+ ======================
+ -->
+ <target name="-pre-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-private" depends="-pre-init">
+ <property file="nbproject/private/private.properties"/>
+ </target>
+ <target name="-init-user" depends="-pre-init,-init-private">
+ <property file="${user.properties.file}"/>
+ <!-- The two properties below are usually overridden -->
+ <!-- by the active platform. Just a fallback. -->
+ <property name="default.javac.source" value="1.4"/>
+ <property name="default.javac.target" value="1.4"/>
+ </target>
+ <target name="-init-project" depends="-pre-init,-init-private,-init-user">
+ <property file="nbproject/project.properties"/>
+ </target>
+ <target name="-do-init" depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property">
+ <available file="${manifest.file}" property="manifest.available"/>
+ <condition property="manifest.available+main.class">
+ <and>
+ <isset property="manifest.available"/>
+ <isset property="main.class"/>
+ <not>
+ <equals arg1="${main.class}" arg2="" trim="true"/>
+ </not>
+ </and>
+ </condition>
+ <condition property="manifest.available+main.class+mkdist.available">
+ <and>
+ <istrue value="${manifest.available+main.class}"/>
+ <isset property="libs.CopyLibs.classpath"/>
+ </and>
+ </condition>
+ <condition property="have.tests">
+ <or/>
+ </condition>
+ <condition property="have.sources">
+ <or>
+ <available file="${src.dir}"/>
+ </or>
+ </condition>
+ <condition property="netbeans.home+have.tests">
+ <and>
+ <isset property="netbeans.home"/>
+ <isset property="have.tests"/>
+ </and>
+ </condition>
+ <condition property="no.javadoc.preview">
+ <isfalse value="${javadoc.preview}"/>
+ </condition>
+ <property name="run.jvmargs" value=""/>
+ <property name="javac.compilerargs" value=""/>
+ <property name="work.dir" value="${basedir}"/>
+ <condition property="no.deps">
+ <and>
+ <istrue value="${no.dependencies}"/>
+ </and>
+ </condition>
+ <property name="javac.debug" value="true"/>
+ <property name="javadoc.preview" value="true"/>
+ </target>
+ <target name="-post-init">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-init-check" depends="-pre-init,-init-private,-init-user,-init-project,-do-init">
+ <fail unless="src.dir">Must set src.dir</fail>
+ <fail unless="build.dir">Must set build.dir</fail>
+ <fail unless="dist.dir">Must set dist.dir</fail>
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
+ <fail unless="dist.jar">Must set dist.jar</fail>
+ </target>
+ <target name="-init-macrodef-property">
+ <macrodef name="property" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name"/>
+ <attribute name="value"/>
+ <sequential>
+ <property name="@{name}" value="${@{value}}"/>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-javac">
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="srcdir" default="${src.dir}"/>
+ <attribute name="destdir" default="${build.classes.dir}"/>
+ <attribute name="classpath" default="${javac.classpath}"/>
+ <attribute name="debug" default="${javac.debug}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <javac srcdir="@{srcdir}" destdir="@{destdir}" debug="@{debug}" deprecation="${javac.deprecation}" source="${javac.source}" target="${javac.target}" includeantruntime="false">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <compilerarg line="${javac.compilerargs}"/>
+ <customize/>
+ </javac>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-junit">
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="includes" default="**/*Test.java"/>
+ <sequential>
+ <junit showoutput="true" fork="true" dir="${basedir}" failureproperty="tests.failed" errorproperty="tests.failed">
+ <batchtest todir="${build.test.results.dir}"/>
+ <classpath>
+ <path path="${run.test.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="test-sys-prop."/>
+ <mapper type="glob" from="test-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <formatter type="brief" usefile="false"/>
+ <formatter type="xml"/>
+ <jvmarg line="${run.jvmargs}"/>
+ </junit>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-nbjpda">
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="name" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <attribute name="stopclassname" default=""/>
+ <sequential>
+ <nbjpdastart transport="dt_socket" addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}">
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ </nbjpdastart>
+ </sequential>
+ </macrodef>
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="dir" default="${build.classes.dir}"/>
+ <sequential>
+ <nbjpdareload>
+ <fileset includes="${fix.includes}*.class" dir="@{dir}"/>
+ </nbjpdareload>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-debug">
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
+ <attribute name="classname" default="${main.class}"/>
+ <attribute name="classpath" default="${debug.classpath}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg value="-Xdebug"/>
+ <jvmarg value="-Xnoagent"/>
+ <jvmarg value="-Djava.compiler=none"/>
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="@{classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-macrodef-java">
+ <macrodef name="java" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <attribute name="classname" default="${main.class}"/>
+ <element name="customize" optional="true"/>
+ <sequential>
+ <java fork="true" classname="@{classname}" dir="${work.dir}">
+ <jvmarg line="${run.jvmargs}"/>
+ <classpath>
+ <path path="${run.classpath}"/>
+ </classpath>
+ <syspropertyset>
+ <propertyref prefix="run-sys-prop."/>
+ <mapper type="glob" from="run-sys-prop.*" to="*"/>
+ </syspropertyset>
+ <customize/>
+ </java>
+ </sequential>
+ </macrodef>
+ </target>
+ <target name="-init-presetdef-jar">
+ <presetdef name="jar" uri="http://www.netbeans.org/ns/j2se-project/1">
+ <jar jarfile="${dist.jar}" compress="${jar.compress}">
+ <j2seproject1:fileset dir="${build.classes.dir}"/>
+ </jar>
+ </presetdef>
+ </target>
+ <target name="init" depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug,-init-macrodef-java,-init-presetdef-jar"/>
+ <!--
+ ===================
+ COMPILATION SECTION
+ ===================
+ -->
+ <target name="deps-jar" depends="init" unless="no.deps"/>
+ <target name="-pre-pre-compile" depends="init,deps-jar">
+ <mkdir dir="${build.classes.dir}"/>
+ </target>
+ <target name="-pre-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
+ <j2seproject3:javac/>
+ <copy todir="${build.classes.dir}">
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
+ </copy>
+ </target>
+ <target name="-post-compile">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile" depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project."/>
+ <target name="-pre-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-single" depends="init,deps-jar,-pre-pre-compile">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac>
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ </target>
+ <target name="-post-compile-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-single" depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single"/>
+ <!--
+ ====================
+ JAR BUILDING SECTION
+ ====================
+ -->
+ <target name="-pre-pre-jar" depends="init">
+ <dirname property="dist.jar.dir" file="${dist.jar}"/>
+ <mkdir dir="${dist.jar.dir}"/>
+ </target>
+ <target name="-pre-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-jar-without-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" unless="manifest.available">
+ <j2seproject1:jar/>
+ </target>
+ <target name="-do-jar-with-manifest" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available" unless="manifest.available+main.class">
+ <j2seproject1:jar manifest="${manifest.file}"/>
+ </target>
+ <target name="-do-jar-with-mainclass" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class" unless="manifest.available+main.class+mkdist.available">
+ <j2seproject1:jar manifest="${manifest.file}">
+ <j2seproject1:manifest>
+ <j2seproject1:attribute name="Main-Class" value="${main.class}"/>
+ </j2seproject1:manifest>
+ </j2seproject1:jar>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <pathconvert property="run.classpath.with.dist.jar">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to="${dist.jar.resolved}"/>
+ </pathconvert>
+ <echo>java -cp "${run.classpath.with.dist.jar}" ${main.class}</echo>
+ </target>
+ <target name="-do-jar-with-libraries" depends="init,compile,-pre-pre-jar,-pre-jar" if="manifest.available+main.class+mkdist.available">
+ <property name="build.classes.dir.resolved" location="${build.classes.dir}"/>
+ <pathconvert property="run.classpath.without.build.classes.dir">
+ <path path="${run.classpath}"/>
+ <map from="${build.classes.dir.resolved}" to=""/>
+ </pathconvert>
+ <pathconvert property="jar.classpath" pathsep=" ">
+ <path path="${run.classpath.without.build.classes.dir}"/>
+ <chainedmapper>
+ <flattenmapper/>
+ <globmapper from="*" to="lib/*"/>
+ </chainedmapper>
+ </pathconvert>
+ <taskdef classname="org.netbeans.modules.java.j2seproject.copylibstask.CopyLibs" name="copylibs" classpath="${libs.CopyLibs.classpath}"/>
+ <copylibs manifest="${manifest.file}" runtimeclasspath="${run.classpath.without.build.classes.dir}" jarfile="${dist.jar}" compress="${jar.compress}">
+ <fileset dir="${build.classes.dir}"/>
+ <manifest>
+ <attribute name="Main-Class" value="${main.class}"/>
+ <attribute name="Class-Path" value="${jar.classpath}"/>
+ </manifest>
+ </copylibs>
+ <echo>To run this application from the command line without Ant, try:</echo>
+ <property name="dist.jar.resolved" location="${dist.jar}"/>
+ <echo>java -jar "${dist.jar.resolved}"</echo>
+ </target>
+ <target name="-post-jar">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="jar" depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR."/>
+ <!--
+ =================
+ EXECUTION SECTION
+ =================
+ -->
+ <target name="run" depends="init,compile" description="Run a main class.">
+ <j2seproject1:java>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <target name="run-single" depends="init,compile-single">
+ <fail unless="run.class">Must select one file in the IDE or set run.class</fail>
+ <j2seproject1:java classname="${run.class}"/>
+ </target>
+ <!--
+ =================
+ DEBUGGING SECTION
+ =================
+ -->
+ <target name="-debug-start-debugger" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart name="${debug.class}"/>
+ </target>
+ <target name="-debug-start-debuggee" depends="init,compile">
+ <j2seproject3:debug>
+ <customize>
+ <arg line="${application.args}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug" if="netbeans.home" depends="init,compile,-debug-start-debugger,-debug-start-debuggee" description="Debug project in IDE."/>
+ <target name="-debug-start-debugger-stepinto" if="netbeans.home" depends="init">
+ <j2seproject1:nbjpdastart stopclassname="${main.class}"/>
+ </target>
+ <target name="debug-stepinto" if="netbeans.home" depends="init,compile,-debug-start-debugger-stepinto,-debug-start-debuggee"/>
+ <target name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single">
+ <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail>
+ <j2seproject3:debug classname="${debug.class}"/>
+ </target>
+ <target name="debug-single" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-single"/>
+ <target name="-pre-debug-fix" depends="init">
+ <fail unless="fix.includes">Must set fix.includes</fail>
+ <property name="javac.includes" value="${fix.includes}.java"/>
+ </target>
+ <target name="-do-debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,compile-single">
+ <j2seproject1:nbjpdareload/>
+ </target>
+ <target name="debug-fix" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix"/>
+ <!--
+ ===============
+ JAVADOC SECTION
+ ===============
+ -->
+ <target name="-javadoc-build" depends="init">
+ <mkdir dir="${dist.javadoc.dir}"/>
+ <javadoc destdir="${dist.javadoc.dir}" source="${javac.source}" notree="${javadoc.notree}" use="${javadoc.use}" nonavbar="${javadoc.nonavbar}" noindex="${javadoc.noindex}" splitindex="${javadoc.splitindex}" author="${javadoc.author}" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}" private="${javadoc.private}" additionalparam="${javadoc.additionalparam}" failonerror="true" useexternalfile="true">
+ <classpath>
+ <path path="${javac.classpath}"/>
+ </classpath>
+ <sourcepath>
+ <pathelement location="${src.dir}"/>
+ </sourcepath>
+ <packageset dir="${src.dir}" includes="*/**"/>
+ <fileset dir="${src.dir}" includes="*.java"/>
+ </javadoc>
+ </target>
+ <target name="-javadoc-browse" if="netbeans.home" unless="no.javadoc.preview" depends="init,-javadoc-build">
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
+ </target>
+ <target name="javadoc" depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc."/>
+ <!--
+ =========================
+ JUNIT COMPILATION SECTION
+ =========================
+ -->
+ <target name="-pre-pre-compile-test" if="have.tests" depends="init,compile">
+ <mkdir dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-pre-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test">
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}"/>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test" depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test"/>
+ <target name="-pre-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="-do-compile-test-single" if="have.tests" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single">
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
+ <j2seproject3:javac srcdir="" destdir="${build.test.classes.dir}" debug="true" classpath="${javac.test.classpath}">
+ <customize>
+ <patternset includes="${javac.includes}"/>
+ </customize>
+ </j2seproject3:javac>
+ <copy todir="${build.test.classes.dir}"/>
+ </target>
+ <target name="-post-compile-test-single">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="compile-test-single" depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single"/>
+ <!--
+ =======================
+ JUNIT EXECUTION SECTION
+ =======================
+ -->
+ <target name="-pre-test-run" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run" if="have.tests" depends="init,compile-test,-pre-test-run">
+ <j2seproject3:junit/>
+ </target>
+ <target name="-post-test-run" if="have.tests" depends="init,compile-test,-pre-test-run,-do-test-run">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-report" if="have.tests" depends="init"/>
+ <target name="-test-browse" if="netbeans.home+have.tests" depends="init"/>
+ <target name="test" depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests."/>
+ <target name="-pre-test-run-single" if="have.tests" depends="init">
+ <mkdir dir="${build.test.results.dir}"/>
+ </target>
+ <target name="-do-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single">
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
+ <j2seproject3:junit includes="${test.includes}"/>
+ </target>
+ <target name="-post-test-run-single" if="have.tests" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single">
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
+ </target>
+ <target name="test-single" depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test."/>
+ <!--
+ =======================
+ JUNIT DEBUGGING SECTION
+ =======================
+ -->
+ <target name="-debug-start-debuggee-test" if="have.tests" depends="init,compile-test">
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
+ <j2seproject3:debug classname="junit.textui.TestRunner" classpath="${debug.test.classpath}">
+ <customize>
+ <arg line="${test.class}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="-debug-start-debugger-test" if="netbeans.home+have.tests" depends="init,compile-test">
+ <j2seproject1:nbjpdastart name="${test.class}" classpath="${debug.test.classpath}"/>
+ </target>
+ <target name="debug-test" depends="init,compile-test,-debug-start-debugger-test,-debug-start-debuggee-test"/>
+ <target name="-do-debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,compile-test-single">
+ <j2seproject1:nbjpdareload dir="${build.test.classes.dir}"/>
+ </target>
+ <target name="debug-fix-test" if="netbeans.home" depends="init,-pre-debug-fix,-do-debug-fix-test"/>
+ <!--
+ =========================
+ APPLET EXECUTION SECTION
+ =========================
+ -->
+ <target name="run-applet" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject1:java classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject1:java>
+ </target>
+ <!--
+ =========================
+ APPLET DEBUGGING SECTION
+ =========================
+ -->
+ <target name="-debug-start-debuggee-applet" if="netbeans.home" depends="init,compile-single">
+ <fail unless="applet.url">Must select one file in the IDE or set applet.url</fail>
+ <j2seproject3:debug classname="sun.applet.AppletViewer">
+ <customize>
+ <arg value="${applet.url}"/>
+ </customize>
+ </j2seproject3:debug>
+ </target>
+ <target name="debug-applet" if="netbeans.home" depends="init,compile-single,-debug-start-debugger,-debug-start-debuggee-applet"/>
+ <!--
+ ===============
+ CLEANUP SECTION
+ ===============
+ -->
+ <target name="deps-clean" depends="init" unless="no.deps"/>
+ <target name="-do-clean" depends="init">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ </target>
+ <target name="-post-clean">
+ <!-- Empty placeholder for easier customization. -->
+ <!-- You can override this target in the ../build.xml file. -->
+ </target>
+ <target name="clean" depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products."/>
+</project>
Modified: trunk/nbproject/genfiles.properties
===================================================================
--- trunk/nbproject/genfiles.properties 2007-10-21 19:16:25 UTC (rev 32)
+++ trunk/nbproject/genfiles.properties 2007-10-22 10:53:05 UTC (rev 33)
@@ -1,8 +1,8 @@
-build.xml.data.CRC32=45f2cdb8
-build.xml.script.CRC32=11fe3129
-build.xml.stylesheet.CRC32=240b97a2
-# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
-# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
-nbproject/build-impl.xml.data.CRC32=45f2cdb8
-nbproject/build-impl.xml.script.CRC32=51a2fb9b
-nbproject/build-impl.xml.stylesheet.CRC32=20b9345e
+build.xml.data.CRC32=45f2cdb8
+build.xml.script.CRC32=11fe3129
+build.xml.stylesheet.CRC32=240b97a2
+# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
+# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
+nbproject/build-impl.xml.data.CRC32=45f2cdb8
+nbproject/build-impl.xml.script.CRC32=51a2fb9b
+nbproject/build-impl.xml.stylesheet.CRC32=65d7ca21
Added: trunk/src/net/sensiva/rochat/core/connection/CommandParser.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/CommandParser.java (rev 0)
+++ trunk/src/net/sensiva/rochat/core/connection/CommandParser.java 2007-10-22 10:53:05 UTC (rev 33)
@@ -0,0 +1,64 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.connection;
+
+import net.sensiva.rochat.core.logging.*;
+import net.sensiva.rochat.ui.main.*;
+import net.sensiva.rochat.ui.tabs.*;
+//import java.util.*;
+//import java.net.*;
+//import java.io.*;
+
+/**
+ * The class that parses commands given by users.
+*/
+public class CommandParser
+{
+ private MainFrame m_MainFrame;
+
+ /**
+ * CommandParser constructor.
+ */
+ public CommandParser(MainFrame frame)
+ {
+ m_MainFrame = frame;
+ }
+
+ /**
+ * Parses a given command.
+ *
+ * @param command The command to parse
+ * \return The command that needs to be executed on the server.
+ */
+ public String doCommand(String command)
+ {
+ String finalCommand = null;
+ if (command.startsWith("/"))
+ {
+ finalCommand = command.substring(1, command.length());
+ }
+ else
+ {
+ // Say in current channel.
+ }
+ return finalCommand;
+ }
+}
+
Modified: trunk/src/net/sensiva/rochat/core/connection/Connection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/Connection.java 2007-10-21 19:16:25 UTC (rev 32)
+++ trunk/src/net/sensiva/rochat/core/connection/Connection.java 2007-10-22 10:53:05 UTC (rev 33)
@@ -32,6 +32,8 @@
public abstract void connect(String host, int port);
public abstract void disconnect();
+ public abstract void send(String command);
+
public void addConnectionListener(ConnectionListener listener)
{
m_ConnectionListener.add(listener);
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-21 19:16:25 UTC (rev 32)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-22 10:53:05 UTC (rev 33)
@@ -204,4 +204,28 @@
+
+
+ /**
+ * Gets the host it connects or is connected to.
+ *
+ * \return The host.
+ */
+ public String getHost()
+ {
+ return m_Host;
+ }
+
+ /**
+ * Gets the port it connects or is connected through.
+ *
+ * \return The port.
+ */
+ public int getPort()
+ {
+ return m_Port;
+ }
+
+
+
}
Modified: trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-21 19:16:25 UTC (rev 32)
+++ trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-22 10:53:05 UTC (rev 33)
@@ -33,8 +33,7 @@
public class MainFrame
{
private JFrame m_MainFrame;
- private JTabbedPane m_Tabs;
- private ImageIcon m_TabClose;
+ private TabManager m_TabManager;
/**
* Creates our frame, then initializes all components.
@@ -53,10 +52,11 @@
ConfigurationManager.getInstance().loadFile("settings.xml");
m_MainFrame = new JFrame("ROChat");
- m_Tabs = new JTabbedPane();
+ m_TabManager = new TabManager(this);
+
+
m_MainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- m_TabClose = new ImageIcon(MainFrame.class.getResource("/net/sensiva/rochat/ui/icons/tab-close.png"));
/*
* Don't use setLocationRelativeTo(null) because it will give some problems with dual-screens.
*/
@@ -69,22 +69,13 @@
contentPane.setOpaque(true);
BoxLayout bl = new BoxLayout(contentPane,BoxLayout.PAGE_AXIS);
contentPane.setLayout(bl);
- ...
[truncated message content] |
|
From: <spi...@us...> - 2007-10-21 19:16:30
|
Revision: 32
http://rochat.svn.sourceforge.net/rochat/?rev=32&view=rev
Author: spike1506
Date: 2007-10-21 12:16:25 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
- Made a start with the quick connect dialog
Modified Paths:
--------------
trunk/build.xml
trunk/nbproject/project.xml
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
trunk/src/net/sensiva/rochat/ui/main/MenuBar.java
Added Paths:
-----------
trunk/src/net/sensiva/rochat/ui/file/
trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-10-21 18:31:08 UTC (rev 31)
+++ trunk/build.xml 2007-10-21 19:16:25 UTC (rev 32)
@@ -1,69 +1,69 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- You may freely edit this file. See commented blocks below for -->
-<!-- some examples of how to customize the build. -->
-<!-- (If you delete it and reopen the project it will be recreated.) -->
-<project name="ROChat" default="default" basedir=".">
- <description>Builds, tests, and runs the project ROChat.</description>
- <import file="nbproject/build-impl.xml"/>
- <!--
-
- There exist several targets which are by default empty and which can be
- used for execution of your tasks. These targets are usually executed
- before and after some main targets. They are:
-
- -pre-init: called before initialization of project properties
- -post-init: called after initialization of project properties
- -pre-compile: called before javac compilation
- -post-compile: called after javac compilation
- -pre-compile-single: called before javac compilation of single file
- -post-compile-single: called after javac compilation of single file
- -pre-compile-test: called before javac compilation of JUnit tests
- -post-compile-test: called after javac compilation of JUnit tests
- -pre-compile-test-single: called before javac compilation of single JUnit test
- -post-compile-test-single: called after javac compilation of single JUunit test
- -pre-jar: called before JAR building
- -post-jar: called after JAR building
- -post-clean: called after cleaning build products
-
- (Targets beginning with '-' are not intended to be called on their own.)
-
- Example of inserting an obfuscator after compilation could look like this:
-
- <target name="-post-compile">
- <obfuscate>
- <fileset dir="${build.classes.dir}"/>
- </obfuscate>
- </target>
-
- For list of available properties check the imported
- nbproject/build-impl.xml file.
-
-
- Another way to customize the build is by overriding existing main targets.
- The targets of interest are:
-
- -init-macrodef-javac: defines macro for javac compilation
- -init-macrodef-junit: defines macro for junit execution
- -init-macrodef-debug: defines macro for class debugging
- -init-macrodef-java: defines macro for class execution
- -do-jar-with-manifest: JAR building (if you are using a manifest)
- -do-jar-without-manifest: JAR building (if you are not using a manifest)
- run: execution of project
- -javadoc-build: Javadoc generation
- test-report: JUnit report generation
-
- An example of overriding the target for project execution could look like this:
-
- <target name="run" depends="ROChat-impl.jar">
- <exec dir="bin" executable="launcher.exe">
- <arg file="${dist.jar}"/>
- </exec>
- </target>
-
- Notice that the overridden target depends on the jar target and not only on
- the compile target as the regular run target does. Again, for a list of available
- properties which you can use, check the target you are overriding in the
- nbproject/build-impl.xml file.
-
- -->
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- You may freely edit this file. See commented blocks below for -->
+<!-- some examples of how to customize the build. -->
+<!-- (If you delete it and reopen the project it will be recreated.) -->
+<project name="ROChat" default="default" basedir=".">
+ <description>Builds, tests, and runs the project ROChat.</description>
+ <import file="nbproject/build-impl.xml"/>
+ <!--
+
+ There exist several targets which are by default empty and which can be
+ used for execution of your tasks. These targets are usually executed
+ before and after some main targets. They are:
+
+ -pre-init: called before initialization of project properties
+ -post-init: called after initialization of project properties
+ -pre-compile: called before javac compilation
+ -post-compile: called after javac compilation
+ -pre-compile-single: called before javac compilation of single file
+ -post-compile-single: called after javac compilation of single file
+ -pre-compile-test: called before javac compilation of JUnit tests
+ -post-compile-test: called after javac compilation of JUnit tests
+ -pre-compile-test-single: called before javac compilation of single JUnit test
+ -post-compile-test-single: called after javac compilation of single JUunit test
+ -pre-jar: called before JAR building
+ -post-jar: called after JAR building
+ -post-clean: called after cleaning build products
+
+ (Targets beginning with '-' are not intended to be called on their own.)
+
+ Example of inserting an obfuscator after compilation could look like this:
+
+ <target name="-post-compile">
+ <obfuscate>
+ <fileset dir="${build.classes.dir}"/>
+ </obfuscate>
+ </target>
+
+ For list of available properties check the imported
+ nbproject/build-impl.xml file.
+
+
+ Another way to customize the build is by overriding existing main targets.
+ The targets of interest are:
+
+ -init-macrodef-javac: defines macro for javac compilation
+ -init-macrodef-junit: defines macro for junit execution
+ -init-macrodef-debug: defines macro for class debugging
+ -init-macrodef-java: defines macro for class execution
+ -do-jar-with-manifest: JAR building (if you are using a manifest)
+ -do-jar-without-manifest: JAR building (if you are not using a manifest)
+ run: execution of project
+ -javadoc-build: Javadoc generation
+ test-report: JUnit report generation
+
+ An example of overriding the target for project execution could look like this:
+
+ <target name="run" depends="ROChat-impl.jar">
+ <exec dir="bin" executable="launcher.exe">
+ <arg file="${dist.jar}"/>
+ </exec>
+ </target>
+
+ Notice that the overridden target depends on the jar target and not only on
+ the compile target as the regular run target does. Again, for a list of available
+ properties which you can use, check the target you are overriding in the
+ nbproject/build-impl.xml file.
+
+ -->
+</project>
Modified: trunk/nbproject/project.xml
===================================================================
--- trunk/nbproject/project.xml 2007-10-21 18:31:08 UTC (rev 31)
+++ trunk/nbproject/project.xml 2007-10-21 19:16:25 UTC (rev 32)
@@ -1,14 +1,14 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://www.netbeans.org/ns/project/1">
- <type>org.netbeans.modules.java.j2seproject</type>
- <configuration>
- <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
- <name>ROChat</name>
- <minimum-ant-version>1.6.5</minimum-ant-version>
- <source-roots>
- <root id="src.dir"/>
- </source-roots>
- <test-roots/>
- </data>
- </configuration>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+ <type>org.netbeans.modules.java.j2seproject</type>
+ <configuration>
+ <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
+ <name>ROChat</name>
+ <minimum-ant-version>1.6.5</minimum-ant-version>
+ <source-roots>
+ <root id="src.dir"/>
+ </source-roots>
+ <test-roots/>
+ </data>
+ </configuration>
+</project>
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-21 18:31:08 UTC (rev 31)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-21 19:16:25 UTC (rev 32)
@@ -20,6 +20,7 @@
package net.sensiva.rochat.core.connection;
import net.sensiva.rochat.core.logging.*;
+import net.sensiva.rochat.ui.tabs.*;
import java.util.*;
import java.net.*;
import java.io.*;
Added: trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java (rev 0)
+++ trunk/src/net/sensiva/rochat/ui/file/ConnectDialog.java 2007-10-21 19:16:25 UTC (rev 32)
@@ -0,0 +1,55 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.ui.file;
+
+import net.sensiva.rochat.core.util.Constants;
+import javax.swing.*;
+import java.awt.*;
+
+public class ConnectDialog extends JDialog
+{
+
+ public ConnectDialog(JFrame frame)
+ {
+ super(frame,"Connect",true);
+ initialize();
+ }
+
+ public void initialize()
+ {
+ setSize(100,100);
+ setLocationRelativeTo(null);
+ setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
+ JPanel contentPane = new JPanel();
+ contentPane.setLayout(new BoxLayout(contentPane,BoxLayout.PAGE_AXIS));
+ setContentPane(contentPane);
+ contentPane.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
+ setText();
+ setVisible(true);
+ }
+
+ public void paintComponents(Graphics g) {
+ }
+
+ public void setText()
+ {
+
+ }
+}
Modified: trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-21 18:31:08 UTC (rev 31)
+++ trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-21 19:16:25 UTC (rev 32)
@@ -75,12 +75,12 @@
//Creates a statustab when the program initializes all components.
StatusTab statusTab = new StatusTab(this);
- statusTab.initialize("Server naam bijvoorbeeld", "Not connected!");
+ statusTab.initialize("Not connected...", "Not connected!");
ChannelTab channelTab = new ChannelTab(this);
channelTab.initialize("#Channel", "#Channel information!");
- IRCConnection irc = new IRCConnection("Levia_", "Levia_", "Levia_", "lars");
+ IRCConnection irc = new IRCConnection("ROChat", "ROChat_", "ROChat", "ROC");
statusTab.setIRCConnection(irc);
irc.connect("127.0.0.1", 6667);
Modified: trunk/src/net/sensiva/rochat/ui/main/MenuBar.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/main/MenuBar.java 2007-10-21 18:31:08 UTC (rev 31)
+++ trunk/src/net/sensiva/rochat/ui/main/MenuBar.java 2007-10-21 19:16:25 UTC (rev 32)
@@ -20,6 +20,7 @@
package net.sensiva.rochat.ui.main;
import net.sensiva.rochat.ui.help.*;
+import net.sensiva.rochat.ui.file.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
@@ -80,9 +81,12 @@
public void actionPerformed(ActionEvent event)
{
String e = event.getActionCommand();
-
- if (e.equals("Exit"))
+ if (e.equals("Connect"))
{
+ new ConnectDialog(m_Frame);
+ }
+ else if (e.equals("Exit"))
+ {
System.exit(0);
}
else if (e.equals("About"))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-21 18:31:20
|
Revision: 31
http://rochat.svn.sourceforge.net/rochat/?rev=31&view=rev
Author: levia
Date: 2007-10-21 11:31:08 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
- Added ServerMessageParser, but needs to be rewritten, it is copied.
Modified Paths:
--------------
trunk/src/net/sensiva/rochat/core/config/ConfigurationManager.java
trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
Added Paths:
-----------
trunk/src/net/sensiva/rochat/core/connection/ServerMessageParser.java
Modified: trunk/src/net/sensiva/rochat/core/config/ConfigurationManager.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/config/ConfigurationManager.java 2007-10-21 17:44:42 UTC (rev 30)
+++ trunk/src/net/sensiva/rochat/core/config/ConfigurationManager.java 2007-10-21 18:31:08 UTC (rev 31)
@@ -148,8 +148,6 @@
String value = element.getTextContent();
value = value.trim();
- System.out.println(key + " : " + value);
-
m_KeyMap.put(key, value);
}
logger.info("Successfully parsed settings file.");
Modified: trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-21 17:44:42 UTC (rev 30)
+++ trunk/src/net/sensiva/rochat/core/connection/IRCConnection.java 2007-10-21 18:31:08 UTC (rev 31)
@@ -118,13 +118,13 @@
*/
public synchronized void disconnect()
{
- //System.out.println(":D");
try
{
if (!m_Socket.isClosed())
{
m_Socket.close();
fireDisconnected();
+ fireMessageReceived("Disconnected from server.");
}
}
catch (IOException ioe)
@@ -147,11 +147,13 @@
if (line != null)
{
// Parse IRC messages here.
+
+ ServerMessageParser par = new ServerMessageParser(line);
fireServerMessageReceived(line);
- if (line.startsWith("PING"))
+ if (par.getCommand().equals("PING"))
{
- send("PONG " + line.substring(4, line.length()));
+ send("PONG " + par.getTrailing());
}
}
else
@@ -176,6 +178,7 @@
{
try
{
+ System.out.println("Sending: " + message);
m_Out.write(message + "\r\n");
m_Out.flush();
}
Added: trunk/src/net/sensiva/rochat/core/connection/ServerMessageParser.java
===================================================================
--- trunk/src/net/sensiva/rochat/core/connection/ServerMessageParser.java (rev 0)
+++ trunk/src/net/sensiva/rochat/core/connection/ServerMessageParser.java 2007-10-21 18:31:08 UTC (rev 31)
@@ -0,0 +1,166 @@
+/*
+ ROChat
+ Copyright (C) 2007 The ROChat team
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License
+ as published by the Free Software Foundation; either version 2
+ of the License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ ----------------------------------------------------------------------------
+*/
+package net.sensiva.rochat.core.connection;
+
+import net.sensiva.rochat.core.logging.*;
+import java.util.*;
+import java.net.*;
+import java.io.*;
+
+/**
+ * The class that parses the server messages.
+ *
+ * TODO: REWRITE!
+*/
+public class ServerMessageParser
+{
+ private String m_Message;
+ private String m_Command;
+ private String m_Middle;
+ private String m_Trailing;
+ private String m_Prefix;
+
+ public ServerMessageParser(String message)
+ {
+ m_Message = message;
+ parse(message);
+ }
+
+ protected void parse(String message)
+ {
+ int index = 0;
+ int trail;
+
+ String prefix = null, command = null, trailing = null, middle = null;
+
+ StringBuffer buf = new StringBuffer(message);
+ int len = buf.length();
+
+ // prefix
+ if (buf.charAt(0) == ':') {
+ prefix = buf.substring(1, (index = indexOf(buf, len, ' ', index)));
+ index++;
+ }
+
+ while (buf.charAt(index) == ' ')
+ index++;
+
+ // command
+ command = buf.substring(index, ((index = indexOf(buf, len, ' ', index)) != -1)
+ ? index : (index = len));
+
+ while (index < len && buf.charAt(index) == ' ')
+ index++;
+ index--;
+
+ // middle & trailing
+ if ((trail = indexOf(buf, len, " :", index)) != -1)
+ trailing = buf.substring(trail + 2, len);
+ else if ((trail = lastIndexOf(buf, len, ' ')) != -1 && trail >= index)
+ trailing = buf.substring(trail + 1, len);
+ middle = (index < trail) ? buf.substring(index + 1, trail) : "";
+
+ // save
+ m_Prefix = (prefix != null) ? prefix : "";
+ m_Command = (command != null) ? command : "";
+ m_Middle = (middle != null) ? middle : "";
+ m_Trailing = (trailing != null) ? trailing : "";
+
+ }
+
+ private int indexOf(StringBuffer buf, int len, int c, int i)
+ {
+ while (i < len)
+ {
+ if (buf.charAt(i++) == c)
+ {
+ return --i;
+ }
+ }
+ return -1;
+ }
+
+
+ private int indexOf(StringBuffer buf, int len, String str, int i)
+ {
+ int sublen = str.length();
+ int index = -1;
+ int j;
+ for ( ; i < len; i++)
+ {
+ for (index = i, j = 0; i < len && j < sublen; i++, j++)
+ {
+ if (buf.charAt(i) != str.charAt(j))
+ {
+ break;
+ }
+ else if (j + 1 == sublen)
+ {
+ return index;
+ }
+ }
+ }
+ return -1;
+ }
+
+ private int lastIndexOf(StringBuffer buf, int len, int c)
+ {
+ int i = len;
+ boolean ok = false;
+ while (i > 0)
+ {
+ if (buf.charAt(--i) != c)
+ {
+ ok = true;
+ }
+ else if (ok)
+ {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public String getCommand()
+ {
+ return m_Command;
+ }
+
+ public String getMiddle()
+ {
+ return m_Middle;
+ }
+
+ public String getTrailing()
+ {
+ return m_Trailing;
+ }
+
+ public String getPrefix()
+ {
+ return m_Prefix;
+ }
+
+ public String getMessage()
+ {
+ return m_Message;
+ }
+}
+
Modified: trunk/src/net/sensiva/rochat/ui/main/MainFrame.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-21 17:44:42 UTC (rev 30)
+++ trunk/src/net/sensiva/rochat/ui/main/MainFrame.java 2007-10-21 18:31:08 UTC (rev 31)
@@ -83,9 +83,6 @@
IRCConnection irc = new IRCConnection("Levia_", "Levia_", "Levia_", "lars");
statusTab.setIRCConnection(irc);
irc.connect("127.0.0.1", 6667);
- //irc.send("RPL_MOTDSTART");
- //irc.send("RPL_MOTD");
- //irc.send("RPL_MOTDEND");
}
@@ -99,6 +96,7 @@
{
m_MainFrame.setVisible(visible);
}
+
/**
* Adds a tab to the main window.
*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <le...@us...> - 2007-10-21 17:44:47
|
Revision: 30
http://rochat.svn.sourceforge.net/rochat/?rev=30&view=rev
Author: levia
Date: 2007-10-21 10:44:42 -0700 (Sun, 21 Oct 2007)
Log Message:
-----------
- Changed the widget in StatusTab to a JTextPane.
- Fixed the scrolling issue.
Modified Paths:
--------------
trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java
Modified: trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java
===================================================================
--- trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java 2007-10-21 17:39:29 UTC (rev 29)
+++ trunk/src/net/sensiva/rochat/ui/tabs/StatusTab.java 2007-10-21 17:44:42 UTC (rev 30)
@@ -114,7 +114,7 @@
StyleConstants.setForeground(set, Color.BLACK);
m_MessageList.setCaretPosition(doc.getLength());
- doc.insertString(doc.getLength(), m_TextField.getText() + "\n", set);
+ doc.insertString(doc.getLength(), message + "\n", set);
}
catch (Exception e)
{
@@ -134,7 +134,7 @@
StyleConstants.setForeground(set, Color.BLACK);
m_MessageList.setCaretPosition(doc.getLength());
- doc.insertString(doc.getLength(), m_TextField.getText() + "\n", set);
+ doc.insertString(doc.getLength(), message + "\n", set);
}
catch (Exception e)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|