Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

AjdeCoreBuildNotifierAdapter.java 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  8. *
  9. * Contributors:
  10. * Xerox/PARC initial implementation
  11. * Helen Hawkins converted to new interface (pr148190)
  12. * ******************************************************************/
  13. package org.aspectj.ajde.core.internal;
  14. import org.aspectj.ajde.core.IBuildProgressMonitor;
  15. import org.aspectj.bridge.IProgressListener;
  16. /**
  17. * Enables the compiler/weaver progres to be related to the user via the
  18. * IBuildProgressMonitor as well as relating whether or not the user has
  19. * cancelled the build progress back to the compiler/weaver.
  20. */
  21. public class AjdeCoreBuildNotifierAdapter implements IProgressListener {
  22. private IBuildProgressMonitor progressMonitor;
  23. public AjdeCoreBuildNotifierAdapter(IBuildProgressMonitor progressMonitor) {
  24. this.progressMonitor = progressMonitor;
  25. }
  26. public void setProgress(double percentDone) {
  27. progressMonitor.setProgress(percentDone);
  28. }
  29. public void setText(String text) {
  30. progressMonitor.setProgressText(text);
  31. }
  32. public boolean isCancelledRequested() {
  33. return progressMonitor.isCancelRequested();
  34. }
  35. public void setCancelledRequested(boolean cancelRequested) {
  36. // do nothing - since ask the progressMonitor whether
  37. // cancel has been requested
  38. }
  39. }