blob: b1440d9599d0745ac2db5304e0ab67b447eb4be5 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 KPIT Technologies.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Jan Mauersberger- initial API and implementation
* Sascha Baumgart- initial API and implementation
*******************************************************************************/
package org.eclipse.opencert.infra.ui.loadresource;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.part.FileEditorInput;
public class EditorTypeUtil {
public static boolean isFileEditor(IEditorPart editor) {
boolean result = false;
IEditorInput editorInput = editor.getEditorInput();
if (editorInput instanceof FileEditorInput) {
result = true;
}
return result;
}
}