/******************************************************************************* * Copyright (c) 2008-2011 Chair for Applied Software Engineering, * Technische Universitaet Muenchen. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Maximilian Koegel - initial API and implementation ******************************************************************************/ package org.eclipse.emf.emfstore.common; import org.eclipse.core.runtime.IProgressMonitor; /** * Progress Monitor with output to System.out. * * @author koegel */ public final class ESSystemOutProgressMonitor implements IProgressMonitor { /** * Indicates whether cancel has been requested. */ private boolean cancelled; /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#beginTask(java.lang.String, int) */ public void beginTask(String name, int totalWork) { System.out.print(name + ":"); //$NON-NLS-1$ } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#done() */ public void done() { System.out.println("...DONE"); //$NON-NLS-1$ } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#internalWorked(double) */ public void internalWorked(double work) { // do nothing } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#isCanceled() */ public boolean isCanceled() { return cancelled; } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#setCanceled(boolean) */ public void setCanceled(boolean cancelled) { this.cancelled = cancelled; } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#setTaskName(java.lang.String) */ public void setTaskName(String name) { // do nothing } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#subTask(java.lang.String) */ public void subTask(String name) { // do nothing } /** * {@inheritDoc} * * @see org.eclipse.core.runtime.IProgressMonitor#worked(int) */ public void worked(int work) { System.out.print("."); //$NON-NLS-1$ } }