Subversion Repositories XServices

Compare Revisions

Ignore whitespace Rev 94 → Rev 166

/xservices/trunk/src/java/net/brutex/xservices/util/BasicCVSListener.java
1,104 → 1,78
package net.brutex.xservices.util;
/* */ package net.brutex.xservices.util;
/* */
/* */ import java.io.PrintStream;
/* */ import org.netbeans.lib.cvsclient.event.BinaryMessageEvent;
/* */ import org.netbeans.lib.cvsclient.event.CVSListener;
/* */ import org.netbeans.lib.cvsclient.event.FileAddedEvent;
/* */ import org.netbeans.lib.cvsclient.event.FileInfoEvent;
/* */ import org.netbeans.lib.cvsclient.event.FileRemovedEvent;
/* */ import org.netbeans.lib.cvsclient.event.FileToRemoveEvent;
/* */ import org.netbeans.lib.cvsclient.event.FileUpdatedEvent;
/* */ import org.netbeans.lib.cvsclient.event.MessageEvent;
/* */ import org.netbeans.lib.cvsclient.event.ModuleExpansionEvent;
/* */ import org.netbeans.lib.cvsclient.event.TerminationEvent;
/* */
/* */ public abstract class BasicCVSListener
/* */ implements CVSListener
/* */ {
/* 24 */ private final StringBuffer taggedLine = new StringBuffer();
/* */
/* 26 */ private final boolean showEvents = true;
/* */
/* */ public void messageSent(MessageEvent e)
/* */ {
/* 36 */ String line = e.getMessage();
/* 37 */ PrintStream stream = e.isError() ? System.err :
/* 38 */ System.out;
/* */
/* 40 */ if (e.isTagged())
/* */ {
/* 42 */ String str1 = MessageEvent.parseTaggedMessage(this.taggedLine, line);
/* */ }
/* */ }
/* */
/* */ public void commandTerminated(TerminationEvent arg0)
/* */ {
/* 59 */ System.out.println("commandTerminated");
/* */ }
/* */
/* */ public void fileAdded(FileAddedEvent arg0)
/* */ {
/* 65 */ System.out.println("fileAdded");
/* */ }
/* */
/* */ public void fileInfoGenerated(FileInfoEvent arg0)
/* */ {
/* 71 */ System.out.println("fileInfoGenerated");
/* */ }
/* */
/* */ public void fileRemoved(FileRemovedEvent arg0)
/* */ {
/* 76 */ System.out.println("fileRemoved");
/* */ }
/* */
/* */ public void fileToRemove(FileToRemoveEvent arg0)
/* */ {
/* 82 */ System.out.println("fileToRemove");
/* */ }
/* */
/* */ public void fileUpdated(FileUpdatedEvent arg0)
/* */ {
/* 88 */ System.out.println("fileUpdated");
/* */ }
/* */
/* */ public void messageSent(BinaryMessageEvent arg0)
/* */ {
/* 94 */ System.out.println("messageSent_Binary");
/* */ }
/* */
/* */ public void moduleExpanded(ModuleExpansionEvent arg0)
/* */ {
/* 100 */ System.out.println("ModuleExpansionEvent");
/* */ }
/* */ }
 
import java.io.PrintStream;
 
import org.netbeans.lib.cvsclient.command.FileInfoContainer;
import org.netbeans.lib.cvsclient.command.log.LogInformation;
import org.netbeans.lib.cvsclient.event.BinaryMessageEvent;
import org.netbeans.lib.cvsclient.event.CVSAdapter;
import org.netbeans.lib.cvsclient.event.CVSListener;
import org.netbeans.lib.cvsclient.event.FileAddedEvent;
import org.netbeans.lib.cvsclient.event.FileInfoEvent;
import org.netbeans.lib.cvsclient.event.FileRemovedEvent;
import org.netbeans.lib.cvsclient.event.FileToRemoveEvent;
import org.netbeans.lib.cvsclient.event.FileUpdatedEvent;
import org.netbeans.lib.cvsclient.event.MessageEvent;
import org.netbeans.lib.cvsclient.event.ModuleExpansionEvent;
import org.netbeans.lib.cvsclient.event.TerminationEvent;
 
public abstract class BasicCVSListener implements CVSListener
{
/**
* Stores a tagged line
*/
private final StringBuffer taggedLine = new StringBuffer();
 
/**
* Called when the server wants to send a message to be displayed to
* the user. The message is only for information purposes and clients
* can choose to ignore these messages if they wish.
* @param e the event
*/
public void messageSent(MessageEvent e)
{
String line = e.getMessage();
PrintStream stream = e.isError() ? System.err
: System.out;
 
if (e.isTagged())
{
String message = e.parseTaggedMessage(taggedLine, line);
// if we get back a non-null line, we have something
// to output. Otherwise, there is more to come and we
// should do nothing yet.
if (message != null)
{
//stream.println("Message: " + message);
}
}
else
{
//stream.println("Message: " + line);
}
}
 
@Override
public void commandTerminated(TerminationEvent arg0) {
}
 
@Override
public void fileAdded(FileAddedEvent arg0) {
}
 
@Override
public void fileInfoGenerated(FileInfoEvent arg0) {
FileInfoContainer info = arg0.getInfoContainer();
LogInformation info2 = (LogInformation) info;
System.out.println(info2.getRepositoryFilename());
System.out.println(info2.getDescription());
}
 
@Override
public void fileRemoved(FileRemovedEvent arg0) {
// TODO Auto-generated method stub
}
 
@Override
public void fileToRemove(FileToRemoveEvent arg0) {
// TODO Auto-generated method stub
}
 
@Override
public void fileUpdated(FileUpdatedEvent arg0) {
// TODO Auto-generated method stub
}
 
@Override
public void messageSent(BinaryMessageEvent arg0) {
// TODO Auto-generated method stub
}
 
@Override
public void moduleExpanded(ModuleExpansionEvent arg0) {
// TODO Auto-generated method stub
}
}
/* Location: C:\Users\brosenberger\Documents\My Box Files\XBridgeNG-download\XServices-20130131 - Kopie\WEB-INF\classes\net.zip
* Qualified Name: net.brutex.xservices.util.BasicCVSListener
* JD-Core Version: 0.6.2
*/