Skip to main content
summaryrefslogtreecommitdiffstats
blob: a78c6aa7799b4b6de02d63bc144ab67e715bc600 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*=============================================================================#
 # Copyright (c) 2010, 2022 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.rj.renv.core;

import java.nio.file.Path;

import org.eclipse.statet.jcommons.lang.NonNullByDefault;
import org.eclipse.statet.jcommons.lang.Nullable;


/**
 * A single R library.
 * 
 * It usually points to a directory in a file system with
 * subdirectories containing the R packages.
 */
@NonNullByDefault
public interface RLibLocation {
	
	
	/** Source type constant */
	String R= "r"; //$NON-NLS-1$
	/** Source type constant */
	String EPLUGIN= "eplugin"; //$NON-NLS-1$
	/** Source type constant */
	String USER= "user"; //$NON-NLS-1$
	
	String MISSING= "missing"; //$NON-NLS-1$
	
	
	String getSource();
	
	@Nullable String getLabel();
	
	/**
	 * Returns the directory as specified (may contain variables).
	 * 
	 * @return the directory path string
	 */
	String getDirectory();
	/**
	 * Returns the directory as local NIO path.
	 * 
	 * @return the directory path; or <code>null</code> if the specified path is not local or
	 *     cannot be resolved
	 */
	@Nullable Path getDirectoryPath();
	
}

Back to the top