ch.sahits.codegen.core.util
Class WorkspaceFragmentProvider

java.lang.Object
  extended by ch.sahits.codegen.core.util.WorkspaceFragmentProvider

public final class WorkspaceFragmentProvider
extends java.lang.Object

This class encapsules functionality that you will need throughout the plugins concearning eclipse specific ressources.

Since:
1.2.0
Author:
Andi Hotz, Sahits GmbH

Constructor Summary
WorkspaceFragmentProvider()
           
 
Method Summary
static java.lang.String getAbsolutWorkspacePath()
          Retrieve the absolute file system path for the worspace without trailing path separator
static java.util.List<IJavaProject> getOpenJavaProjects()
          Compile a list of Java projects in the workspace
static java.util.List<IProject> getOpenProjects()
          Compile a list of Projects in the workspace
static java.lang.String getRelativeSourceFragment(IJavaProject project)
          Retrieve the relative path within the workspace to the first source directory of the Java project
static IWorkspace getWorkspace()
          Retrieve an instance of the current workspace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkspaceFragmentProvider

public WorkspaceFragmentProvider()
Method Detail

getWorkspace

public static IWorkspace getWorkspace()
Retrieve an instance of the current workspace

Returns:
this workspace

getAbsolutWorkspacePath

public static java.lang.String getAbsolutWorkspacePath()
Retrieve the absolute file system path for the worspace without trailing path separator

Returns:
absolute path to the workspace

getOpenProjects

public static java.util.List<IProject> getOpenProjects()
Compile a list of Projects in the workspace

Returns:
List with open projects

getOpenJavaProjects

public static java.util.List<IJavaProject> getOpenJavaProjects()
Compile a list of Java projects in the workspace

Returns:
List of all open projects

getRelativeSourceFragment

public static java.lang.String getRelativeSourceFragment(IJavaProject project)
Retrieve the relative path within the workspace to the first source directory of the Java project

Parameters:
project - Java project
Returns:
relative path to the first source directory or null if no source directory exists or an error occured that is logged in the Error log