blob: bc3db8f102508e9b7194916a9bfd69ee53c88fb2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
/*******************************************************************************
* Copyright (c) 2012 Google, Inc.
* 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:
* Alex Ruiz - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.codan.core.externaltool;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
/**
* Verifies that a <code>{@link IResource}</code> can be processed by an external tool.
*
* @author alruiz@google.com (Alex Ruiz)
*
* @since 2.1
*/
public interface ISupportedResourceVerifier {
/**
* Indicates whether the external tool is capable of processing the given
* <code>{@link IResource}</code>.
* <p>
* The minimum requirements that the given {@code IResource} should satisfy
* are:
* <ul>
* <li>should be an <code>{@link IFile}</code></li>
* <li>should be displayed in the current active editor</li>
* <li>should not have any unsaved changes</li>
* </ul>
* </p>
*
* @param resource the given {@code IResource}.
* @return {@code true} if the external tool is capable of processing the
* given file, {@code false} otherwise.
*/
boolean isSupported(IResource resource);
}
|