blob: b84bd4ba0f2c984c3afa1950839c2896e7acb2ee [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2006, 2019 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.nico.ui;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.statet.nico.core.runtime.ToolProcess;
/**
* The tool registry tracks activation of tools. One Eclipse workbench page has
* one active tool session.
*/
public interface IToolRegistry {
/**
*
* @param listener the listener to register
* @param page the workbench page or <code>null</code> if register to all pages
*/
public void addListener(IToolRegistryListener listener, IWorkbenchPage page);
/**
*
* @param listener the listener to remove
*/
public void removeListener(IToolRegistryListener listener);
/**
*
* @return never <code>null</code>, but the fields can be <code>null</code>.
*/
public ToolSessionUIData getActiveToolSession(IWorkbenchPage page);
/**
*
* @return best workbench page, never <code>null</code>
*/
public IWorkbenchPage findWorkbenchPage(ToolProcess process);
}