Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] Computing default classpath and sourcelookup


The classpath on my launch be default consists of only two external jars.  However, my source lookup path is a set of projects that I can compute when needed.  

Hardcoding the way defaults are computed basicly ties the java launch delegate to launches that are project based ( something I thought was trying to be avoided ).  If the two boolean flags were changed to point to classes that could compute the defaults then the launch delegate would be significantly more flexible.  

A simple interface with a single method like the following would be good....

        public IRuntimeClasspathEntry[] computeSourceEntries(ILaunchConfiguration config);

A similar thing could be done with default classpath.  No function would be lost, and the java launch configuration tab group could just use some default java setting computer which looks at the config and finds the project and does whatever it wants with it.  When the attribute is set, then the source/classpath computer is called before every launch to determine the defaults.



Darin_Wright@xxxxxxx
Sent by: jdt-debug-dev-admin@xxxxxxxxxxx

05/08/2002 10:20 AM
Please respond to jdt-debug-dev

       
        To:        jdt-debug-dev@xxxxxxxxxxx
        cc:        
        Subject:        Re: [jdt-debug-dev] Computing default classpath and sourcelookup



Do you mean that you launch does not map to any project, or it maps to more than one project? The current classpath computation performs a transitive closure on required projects, and the source lookup path is the same as the classpath (by default). If your launch maps to more than one project, why is this not described in the "build path"?


Currently, there is no way for you to override the classpath computation, except to define a new type of launch configuration, and subclass AbstractJavaLaunchConfigurationDelegate overriding the appropriate methods. You would also need to set a source lookup path explicitly.


Darin



Matt_Lavin@xxxxxxx
Sent by: jdt-debug-dev-admin@xxxxxxxxxxx

05/08/2002 09:03 AM
Please respond to jdt-debug-dev

       
       To:        jdt-debug-dev@xxxxxxxxxxx
       cc:        
       Subject:        [jdt-debug-dev] Computing default classpath and sourcelookup




If I have a launch configuration object and set either ATTR_DEFAULT_SOURCE_PATH and ATTR_DEFAULT_CLASSPATH to true then the default values for the respective attributes are computed each time the configuration is launched.  This works great since new additions to a projects classpath will be added on every launch.  Since my launch does not directly map to one project, I would like to be able to change how the default source lookup path and default classpath are computed.... how can I do this?



Back to the top