Author: rob.stryker(a)jboss.com
Date: 2008-09-18 21:07:50 -0400 (Thu, 18 Sep 2008)
New Revision: 10370
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntArchivesCore.java
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntBuildListener.java
Log:
JBIDE-1426 - more logging for ant to inform along as the build goes
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntArchivesCore.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntArchivesCore.java 2008-09-19
00:38:23 UTC (rev 10369)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntArchivesCore.java 2008-09-19
01:07:50 UTC (rev 10370)
@@ -129,7 +129,7 @@
case IStatus.ERROR: return Project.MSG_ERR;
case IStatus.WARNING: return Project.MSG_WARN;
case IStatus.INFO: return Project.MSG_INFO;
- case IStatus.OK: return Project.MSG_VERBOSE;
+ case IStatus.OK: return Project.MSG_DEBUG;
}
return Project.MSG_DEBUG;
}
Modified:
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntBuildListener.java
===================================================================
---
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntBuildListener.java 2008-09-19
00:38:23 UTC (rev 10369)
+++
trunk/archives/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/ant/AntBuildListener.java 2008-09-19
01:07:50 UTC (rev 10370)
@@ -1,13 +1,15 @@
package org.jboss.ide.eclipse.archives.core.ant;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.jboss.ide.eclipse.archives.core.ArchivesCore;
-import org.jboss.ide.eclipse.archives.core.model.AbstractBuildListener;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveBuildListener;
+import org.jboss.ide.eclipse.archives.core.model.IArchiveFileSet;
import org.jboss.ide.eclipse.archives.core.model.IArchiveNode;
+import
org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory.DirectoryScannerExtension.FileWrapper;
-public class AntBuildListener extends AbstractBuildListener {
-
+public class AntBuildListener implements IArchiveBuildListener {
public void buildFailed(IArchive pkg, IStatus status) {
ArchivesCore.getInstance().getLogger().log(status);
}
@@ -16,4 +18,46 @@
ArchivesCore.getInstance().getLogger().log(multi[i]);
}
}
+
+ public void cleanArchive(IArchive pkg) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Cleaned archive " +
pkg.getName(), null);
+ }
+ public void cleanProject(IPath project) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Cleaned project " +
project, null);
+ }
+ public void fileRemoved(IArchive topLevelArchive, IArchiveFileSet fileset,
+ IPath filePath) {
+ FileWrapper[] wrappers = fileset.getMatches(filePath);
+ for( int i = 0; i < wrappers.length; i++ ) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.OK, "Removed " + filePath
+ " in " + topLevelArchive.getName()
+ + " at " + wrappers[i].getRootArchiveRelative().toString(), null);
+ }
+ }
+ public void fileUpdated(IArchive topLevelArchive, IArchiveFileSet fileset,
+ IPath filePath) {
+ FileWrapper[] wrappers = fileset.getMatches(filePath);
+ for( int i = 0; i < wrappers.length; i++ ) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.OK, "Updated " + filePath
+ " in " + topLevelArchive.getName()
+ + " at " + wrappers[i].getRootArchiveRelative().toString(), null);
+ }
+ }
+ public void finishedBuild(IPath project) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Finished building "
+ project.toString(), null);
+ }
+ public void finishedBuildingArchive(IArchive pkg) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Finished building
archive " + pkg.getRootArchiveRelativePath(), null);
+ }
+ public void finishedCollectingFileSet(IArchiveFileSet fileset) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Finished collecting
fileset " + fileset.toString(), null);
+ }
+ public void startedBuild(IPath project) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Started building project
" + project.toString(), null);
+ }
+ public void startedBuildingArchive(IArchive pkg) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Started building archive
" + pkg.toString(), null);
+ }
+ public void startedCollectingFileSet(IArchiveFileSet fileset) {
+ ArchivesCore.getInstance().getLogger().log(IStatus.INFO, "Started collecting
fileset " + fileset.toString(), null);
+ }
+
}
Show replies by date