org.apache.commons.jelly.eclipse.ui
Class JellyLaunchUtils

java.lang.Object
  extended byorg.apache.commons.jelly.eclipse.ui.JellyLaunchUtils

public class JellyLaunchUtils
extends java.lang.Object

Utility class with static methods for launch support of Jelly

Since:
0.9
Author:
Juergen Mayrbaeurl

Constructor Summary
JellyLaunchUtils()
           
 
Method Summary
static void addUserClassPathOfProject(org.eclipse.core.resources.IProject theProject, java.util.List classPathEntryList)
          Adds the user class path entries of a Java project or the working directory of a non Java project to the list of class path entries, stored in classPathEntryList
static org.eclipse.core.runtime.IPath getFilesProjectPath(org.eclipse.core.resources.IFile aFile)
          Returns the full path of the project, the aFile is owned
static java.lang.String getJellyPlugInLibDir()
          Tries to find the libary folder of the base Jelly Plugin (org.apache.jelly) and returns the absolute path to the library
static java.lang.String getJellyPlugInLibMainClassJar()
          Tries to find the Jelly jar library in the library directory of the base Jelly PlugIn and returns the absolute path to the jar library file
static java.util.List getJellyPlugInLibs()
          Returns the list of jar libraries, currently installed in the library directory of the base Jelly PlugIn
static void initializeClasspath(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config, org.eclipse.core.resources.IFile scriptFile)
          Initializes the runtime classpath by adding all jar libraries of the library directory of the base Jelly PlugIn, the default JRE, the working directory and the class path entries of the project of the scriptFile (if not null)
protected static void initializeJellyInstallpath(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config, org.eclipse.core.resources.IFile scriptFile)
          Initializes the attribute in the launch configuration, that stores the absolute path to the Jelly runtime jar library
static void initializeWorkingDir(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config, org.eclipse.core.resources.IFile scriptFile)
          Initalizes the working directory setup in the launch configuration, by setting the working directory to the project's working directory the scriptFile belongs to
static void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config, org.eclipse.core.resources.IFile scriptFile)
          Sets the defaults of the launch configuration by initalizing the classpath (including jar libraries of the base Jelly plugin) and setting the working directory to the scriptFile eclipse project
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JellyLaunchUtils

public JellyLaunchUtils()
Method Detail

getJellyPlugInLibDir

public static java.lang.String getJellyPlugInLibDir()
Tries to find the libary folder of the base Jelly Plugin (org.apache.jelly) and returns the absolute path to the library

Returns:
the absolute path to the library directory of the base Jelly Plugin, can be null if not found

getJellyPlugInLibMainClassJar

public static java.lang.String getJellyPlugInLibMainClassJar()
Tries to find the Jelly jar library in the library directory of the base Jelly PlugIn and returns the absolute path to the jar library file

Returns:
absolute path to the jar file, that contains the main class of Jelly (may be null)

getJellyPlugInLibs

public static java.util.List getJellyPlugInLibs()
Returns the list of jar libraries, currently installed in the library directory of the base Jelly PlugIn

Returns:
the list of Jelly libraries (all tag libraries and the jelly main library)

setDefaults

public static void setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config,
                               org.eclipse.core.resources.IFile scriptFile)
                        throws org.eclipse.core.runtime.CoreException
Sets the defaults of the launch configuration by initalizing the classpath (including jar libraries of the base Jelly plugin) and setting the working directory to the scriptFile eclipse project

Parameters:
config - the working copy of the launch configuration, must not be null
scriptFile - the Jelly script file, may be null
Throws:
org.eclipse.core.runtime.CoreException

initializeClasspath

public static void initializeClasspath(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config,
                                       org.eclipse.core.resources.IFile scriptFile)
                                throws org.eclipse.core.runtime.CoreException
Initializes the runtime classpath by adding all jar libraries of the library directory of the base Jelly PlugIn, the default JRE, the working directory and the class path entries of the project of the scriptFile (if not null)

Parameters:
config - working copy of the launch configuration
scriptFile - Jelly script file as member of a project
Throws:
org.eclipse.core.runtime.CoreException - if no Java Runtime can't be found

initializeJellyInstallpath

protected static void initializeJellyInstallpath(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config,
                                                 org.eclipse.core.resources.IFile scriptFile)
Initializes the attribute in the launch configuration, that stores the absolute path to the Jelly runtime jar library

Parameters:
config - working copy of the launch configuration
scriptFile - Jelly script file (as project member)

initializeWorkingDir

public static void initializeWorkingDir(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy config,
                                        org.eclipse.core.resources.IFile scriptFile)
Initalizes the working directory setup in the launch configuration, by setting the working directory to the project's working directory the scriptFile belongs to

Parameters:
config - working copy of the launch configuration
scriptFile - Jelly script file (as project member)

getFilesProjectPath

public static org.eclipse.core.runtime.IPath getFilesProjectPath(org.eclipse.core.resources.IFile aFile)
Returns the full path of the project, the aFile is owned

Parameters:
aFile - a file owned by a project
Returns:
the IPath object of the project (can be null)

addUserClassPathOfProject

public static void addUserClassPathOfProject(org.eclipse.core.resources.IProject theProject,
                                             java.util.List classPathEntryList)
Adds the user class path entries of a Java project or the working directory of a non Java project to the list of class path entries, stored in classPathEntryList

Parameters:
theProject - the project
classPathEntryList - the list of class path entries


Copyright © 2004 Juergen Mayrbaeurl. All Rights Reserved.