Skip to main content
summaryrefslogtreecommitdiffstats
blob: b5cd6189ab20b65da81eba1f72a3efe88485e91c (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
62
63
64
65
66
/*******************************************************************************
 * Copyright (c) 2005, 2007 committers of openArchitectureWare 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:
 *     committers of openArchitectureWare - initial API and implementation
 *******************************************************************************/

package org.eclipse.xtend.shared.ui.core;

import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.IJavaProject;

/**
 * Represents a project containing openArchitectureWare resources. These are Xpand template, Xtend
 * files, Workflow files etc.
 * @since 4.0
 */
public interface IXtendXpandProject {
	/**
	 * Finds an oAW resource by its fully qualified name and file extension.
	 * @param fqn The full qualified name in oAW syntax. For example: my::templates::Main 
	 * @return The resource or null if the resource could not be located.
	 */
    IXtendXpandResource findExtXptResource(String fqn, String extension);
    
    /**
     * Finds an oAW resource by it's underlying IStorage instance
     * @param 
     * @return The resource or null if the resource could not be located (i.e it's not an oaw resource).
     */
    IXtendXpandResource findOawResource(IStorage file);

    /**
     * Returns all registered resources within the project.
     * @return
     */
    IXtendXpandResource[] getRegisteredResources();

    /**
     * Returns the corresponding {@link IJavaProject Java Project}. 
     */
    IJavaProject getProject();

    /**
     * Unregisters a resource from the project.
     * @param res Resource which should be unregistered.
     */
    void unregisterOawResource(IXtendXpandResource res);

    /**
     * Analyzes the project's resources and marks erraneous resources.
     * @param monitor (optional) A monitor for the progress of the analysis.
     */
    void analyze(IProgressMonitor monitor);

	public IXtendXpandResource[] getAllRegisteredResources();

	public IXtendXpandProject[] getReferencedProjects();

	public IXtendXpandProject[] getAllReferencedProjects();
}

Back to the top