org.eclipse.xtend.shared.ui.core.internal
Class XtendXpandProject

java.lang.Object
  extended by org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IXtendXpandProject

public class XtendXpandProject
extends java.lang.Object
implements IXtendXpandProject


Constructor Summary
XtendXpandProject(org.eclipse.jdt.core.IJavaProject resource)
           
 
Method Summary
 void analyze(org.eclipse.core.runtime.IProgressMonitor monitor, ExecutionContext ctx)
          Analyzes the project's resources and marks erraneous resources.
protected  boolean containsRemovedClassPathEntry(org.eclipse.jdt.core.IJavaElementDelta[] affectedChildren)
           
 IXtendXpandResource findExtXptResource(java.lang.String fqn, java.lang.String extension)
          Finds an Xtend resource by its fully qualified name and file extension.
 IXtendXpandResource findXtendXpandResource(org.eclipse.core.resources.IStorage file)
          Finds an Xtend resource by it's underlying IStorage instance
 java.lang.Object getAdapter(java.lang.Class adapter)
          Returns an object which is an instance of the given class associated with this object.
 IXtendXpandProject[] getAllReferencedProjects()
           
 IXtendXpandResource[] getAllRegisteredResources()
           
 org.eclipse.jdt.core.IJavaProject getProject()
          Returns the corresponding Java Project.
 IXtendXpandProject[] getReferencedProjects()
           
 IXtendXpandResource[] getRegisteredResources()
          Returns all registered resources within the project.
protected  void removeResourcesFromJar()
           
 java.lang.String toString()
          Returns the name of the underlying project.
 void unregisterXtendXpandResource(IXtendXpandResource res)
          Unregisters a resource from the project.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XtendXpandProject

public XtendXpandProject(org.eclipse.jdt.core.IJavaProject resource)
Method Detail

containsRemovedClassPathEntry

protected boolean containsRemovedClassPathEntry(org.eclipse.jdt.core.IJavaElementDelta[] affectedChildren)

removeResourcesFromJar

protected void removeResourcesFromJar()

getRegisteredResources

public IXtendXpandResource[] getRegisteredResources()
Description copied from interface: IXtendXpandProject
Returns all registered resources within the project.

Specified by:
getRegisteredResources in interface IXtendXpandProject
Returns:
See Also:
IXtendXpandProject.getRegisteredResources()

getAllRegisteredResources

public IXtendXpandResource[] getAllRegisteredResources()
Specified by:
getAllRegisteredResources in interface IXtendXpandProject
See Also:
IXtendXpandProject.getAllRegisteredResources()

getReferencedProjects

public IXtendXpandProject[] getReferencedProjects()
Specified by:
getReferencedProjects in interface IXtendXpandProject
See Also:
IXtendXpandProject.getReferencedProjects()

getAllReferencedProjects

public IXtendXpandProject[] getAllReferencedProjects()
Specified by:
getAllReferencedProjects in interface IXtendXpandProject
See Also:
IXtendXpandProject.getAllReferencedProjects()

getProject

public org.eclipse.jdt.core.IJavaProject getProject()
Description copied from interface: IXtendXpandProject
Returns the corresponding Java Project.

Specified by:
getProject in interface IXtendXpandProject

unregisterXtendXpandResource

public void unregisterXtendXpandResource(IXtendXpandResource res)
Description copied from interface: IXtendXpandProject
Unregisters a resource from the project.

Specified by:
unregisterXtendXpandResource in interface IXtendXpandProject
Parameters:
res - Resource which should be unregistered.
See Also:
IXtendXpandProject.unregisterXtendXpandResource(IXtendXpandResource)

findExtXptResource

public IXtendXpandResource findExtXptResource(java.lang.String fqn,
                                              java.lang.String extension)
Description copied from interface: IXtendXpandProject
Finds an Xtend resource by its fully qualified name and file extension.

Specified by:
findExtXptResource in interface IXtendXpandProject
Parameters:
fqn - The full qualified name in Xtend syntax. For example: my::templates::Main
Returns:
The resource or null if the resource could not be located.
See Also:
IXtendXpandProject.findExtXptResource(String, String)

findXtendXpandResource

public IXtendXpandResource findXtendXpandResource(org.eclipse.core.resources.IStorage file)
Description copied from interface: IXtendXpandProject
Finds an Xtend resource by it's underlying IStorage instance

Specified by:
findXtendXpandResource in interface IXtendXpandProject
Returns:
The resource or null if the resource could not be located (i.e it's not an Xtend/Xpand resource).
See Also:
IXtendXpandProject#findExtXptResource(IPath, boolean)

analyze

public void analyze(org.eclipse.core.runtime.IProgressMonitor monitor,
                    ExecutionContext ctx)
Description copied from interface: IXtendXpandProject
Analyzes the project's resources and marks erraneous resources.

Specified by:
analyze in interface IXtendXpandProject
Parameters:
monitor - (optional) A monitor for the progress of the analysis.
See Also:
IXtendXpandProject#analyze(IProgressMonitor)

toString

public java.lang.String toString()
Returns the name of the underlying project.

Overrides:
toString in class java.lang.Object

getAdapter

public final java.lang.Object getAdapter(java.lang.Class adapter)
Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.

This implementation of the method declared by IAdaptable passes the request along to the platform's adapter manager; roughly Platform.getAdapterManager().getAdapter(this, adapter).

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Parameters:
adapter - the class to adapt to
Returns:
the adapted object or null
See Also:
IAdaptable#getAdapter(Class)