View Javadoc
1   /*
2    * Copyright (C) 2012, Sasa Zivkov <sasa.zivkov@sap.com> and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  package org.eclipse.jgit.lib;
11  
12  /**
13   * A convenient base class which provides empty method bodies for all
14   * ProgressMonitor methods.
15   * <p>
16   * Could be used in scenarios when only some of the progress notifications are
17   * important and others can be ignored.
18   */
19  public abstract class EmptyProgressMonitor implements ProgressMonitor {
20  
21  	/** {@inheritDoc} */
22  	@Override
23  	public void start(int totalTasks) {
24  		// empty
25  	}
26  
27  	/** {@inheritDoc} */
28  	@Override
29  	public void beginTask(String title, int totalWork) {
30  		// empty
31  	}
32  
33  	/** {@inheritDoc} */
34  	@Override
35  	public void update(int completed) {
36  		// empty
37  	}
38  
39  	/** {@inheritDoc} */
40  	@Override
41  	public void endTask() {
42  		// empty
43  	}
44  
45  	/** {@inheritDoc} */
46  	@Override
47  	public boolean isCancelled() {
48  		return false;
49  	}
50  
51  }