]> source.dussan.org Git - aspectj.git/commitdiff
pr145689 - telling AJDT through the progress monitor (rather than a debug interface...
authoraclement <aclement>
Mon, 24 Jul 2006 11:05:49 +0000 (11:05 +0000)
committeraclement <aclement>
Mon, 24 Jul 2006 11:05:49 +0000 (11:05 +0000)
ajde/src/org/aspectj/ajde/BuildProgressMonitor.java
ajde/src/org/aspectj/ajde/internal/AspectJBuildManager.java
ajde/src/org/aspectj/ajde/internal/CompilerAdapter.java
ajde/src/org/aspectj/ajde/ui/swing/DefaultBuildProgressMonitor.java
ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
ajde/testsrc/org/aspectj/ajde/NullIdeProgressMonitor.java
ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
testing/src/org/aspectj/testing/ajde/CompileCommand.java
tests/src/org/aspectj/systemtest/incremental/tools/AjdeInteractionTestbed.java

index 17fef6a8fec5459f4cacb5d3688f719028e017d0..2a3e2cd882b89180a028839353467b2eb83224a4 100644 (file)
@@ -61,5 +61,5 @@ public interface BuildProgressMonitor {
     /**
      * Jump the progress bar to the end and finish progress monitoring.
      */
-    public void finish();
+    public void finish(boolean wasFullBuild);
 }
index af23664817237186c2a3d4ca6e28a9babd3ebf06..eca810e5c979b4481ea59e911d4e5dfc4c2ef998 100644 (file)
@@ -202,7 +202,7 @@ public class AspectJBuildManager implements BuildManager {
                 Ajde.getDefault().getErrorHandler().handleError("Compile error, caught Throwable: " + e.toString(), e);
             } finally {
                 warnings = compilerMessages.hasWarning();
-                               progressMonitor.finish();
+                               progressMonitor.finish(compilerAdapter.wasFullBuild());
             }
             notifyCompileFinished(configFile, lastCompileTime, succeeded, warnings);
         }
index e113034c2bc983bc04f4fdae4cc6d3d21d09f5f2..0ba47eb7ff6b6b05b73afb449d0b89de354d7ead 100644 (file)
@@ -646,4 +646,8 @@ public class CompilerAdapter {
                buildManager.setState(buildState);      
                buildManager.setStructureModel(buildState.getStructureModel());
        }
+
+       public boolean wasFullBuild() {
+               return buildManager.wasFullBuild();
+       }
 } 
index 6cc1421924cb57c7d015b47b3529bf6e8345fca6..5328c96166d32ca6492a4b88038248d2d12ea832 100644 (file)
@@ -92,7 +92,7 @@ public class DefaultBuildProgressMonitor extends Thread implements BuildProgress
     /**
      * Jump the progress bar to the end and finish progress monitoring.
      */
-    public void finish() {
+    public void finish(boolean wasFullBuild) {
                progressDialog.finish();
                dialog.dispose();       
     }
index 2e5d0daccbb099cec3e01ce63f45e851d97d7613..80cda993dc0c7e0ec8b0b73b33d4b6319e166a90 100644 (file)
@@ -345,7 +345,7 @@ public class BuildCancellingTest extends AjdeTestCase {
                        return 100; // Causes setProgressBarVal() to be fed what are effectively percentages
                }
 
-               public void finish() {
+               public void finish(boolean b) {
                }
 
        }
index ebac2cf4513df5580396a509f8b903dca3079434..ab451f04d5ebd02500d8569863b5fca3dd2b65d3 100644 (file)
@@ -38,7 +38,7 @@ public class NullIdeProgressMonitor implements BuildProgressMonitor {
                return 0;
        }
 
-       public void finish() {
+       public void finish(boolean b) {
 
        }
 
index 74035a4c7fd0b4c870e4548f67e8c890d2401972..d2e95da66cfd3fd261a711dc548307d0d54d4775 100644 (file)
@@ -406,7 +406,7 @@ public class ReweavableTestCase extends AjdeTestCase {
                                        return 0;
                                }
 
-                               public void finish() {}
+                               public void finish(boolean b) {}
                
        }
        
index 34c7b05c10d103e1c475dd8d424b2b617af04c03..743c54c2ac5d5dac69bc42b22da89098dce119b7 100644 (file)
@@ -320,7 +320,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
                                        return 0;
                                }
 
-                               public void finish() {}
+                               public void finish(boolean b) {}
                
        }
        
index 8be020895ec47bb9d7e71f0fee250963cc2a62cc..246e3d2166ffa483c89c42f0bcd91d8b3bda9a72 100644 (file)
@@ -114,8 +114,8 @@ public class CompileCommand implements ICommand {
         TaskListManager taskListManager = myHandler;
         BuildProgressMonitor buildProgressMonitor =
             new DefaultBuildProgressMonitor(new Frame()) {
-            public void finish() {
-                super.finish();
+            public void finish(boolean b) {
+                super.finish(b);
                 setEndTime(System.currentTimeMillis());
             }
         };
@@ -280,6 +280,10 @@ class MyTaskListManager
             hasWarning = true;
         }
     }
+       public void buildSuccessful(boolean wasFullBuild) {
+               // TODO Auto-generated method stub
+               
+       }
 }
 
 class VoidInvocationHandler implements InvocationHandler {
index 4d0cb5ac708d54b315a8b56ffb8d38f68da7b641..d50e340fbe3b46d8e9fe32c6d0b222c2ad519828 100644 (file)
@@ -272,6 +272,8 @@ public class AjdeInteractionTestbed extends TestCase {
        
        
        public boolean wasFullBuild() {
+       // alternatives: statelistener is debug interface, progressmonitor is new proper interface (see pr145689)
+//             return MyBuildProgressMonitor.wasFullBuild();
                return MyStateListener.wasFullBuild();
        }
        
@@ -543,6 +545,7 @@ public class AjdeInteractionTestbed extends TestCase {
                
                public static void reset() {
                        _instance.finished = false;
+                       _instance.wasFullBuild=true;
                        _instance.compiledFiles.clear();
                        _instance.wovenClasses.clear();
                }
@@ -559,6 +562,7 @@ public class AjdeInteractionTestbed extends TestCase {
                private long starttime = 0;
                private long totaltimetaken = 0;
                private boolean finished = false;
+               private boolean wasFullBuild = true;
 
                public void start(String configFile) {
                        starttime = System.currentTimeMillis();
@@ -593,9 +597,10 @@ public class AjdeInteractionTestbed extends TestCase {
                        return 100;
                }
 
-               public void finish() {
+               public void finish(boolean b) {
                        log("BuildProgressMonitor.finish()");
                        _instance.finished=true;
+                       _instance.wasFullBuild = b;
                        _instance.totaltimetaken=(System.currentTimeMillis()-starttime);
                }
                
@@ -607,6 +612,10 @@ public class AjdeInteractionTestbed extends TestCase {
                        if (VERBOSE) System.out.println(s);
                }
                
+               public static boolean wasFullBuild() {
+                       return _instance.wasFullBuild;
+               }
+               
 
        }