org.eclipse.ui.IEditorMatchingStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of workbench Show documentation
Show all versions of workbench Show documentation
This plug-in contains the bulk of the Workbench implementation, and depends on JFace, SWT, and Core Runtime. It cannot be used independently from org.eclipse.ui. Workbench client plug-ins should not depend directly on this plug-in.
The newest version!
/*******************************************************************************
* Copyright (c) 2005 IBM Corporation and others.
* 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.ui;
/**
* An editor matching strategy allows editor extensions to provide their own
* algorithm for matching the input of an open editor of that type to a
* given editor input. This is used to find a matching editor during
* {@link org.eclipse.ui.IWorkbenchPage#openEditor(IEditorInput, String, boolean)} and
* {@link org.eclipse.ui.IWorkbenchPage#findEditor(IEditorInput)}.
*
* @since 3.1
*/
public interface IEditorMatchingStrategy {
/**
* Returns whether the editor represented by the given editor reference
* matches the given editor input.
*
* Implementations should inspect the given editor input first,
* and try to reject it early before calling IEditorReference.getEditorInput()
,
* since that method may be expensive.
*
*
* @param editorRef the editor reference to match against
* @param input the editor input to match
* @return true
if the editor matches the given editor input,
* false
if it does not match
*/
boolean matches(IEditorReference editorRef, IEditorInput input);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy