Bug 193822 - Make plugin Variables XML Visible
Summary: Make plugin Variables XML Visible
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-21 15:15 EDT by Mi Amidot CLA
Modified: 2007-07-23 10:46 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mi Amidot CLA 2007-06-21 15:15:30 EDT
Containers and variables are mememorised by Eclipse in the file
.metadata\.plugins\org.eclipse.jdt.core\variablesAndContainers.dat, which is in binary format.

This file should be in XML to allow it to be easily read by Ant or any scripting language I may choose to use to integrate batch and controlled building with developer's IDE view of variables.

I suggest a format like this:

<variables>
  <container path="org.eclipse.jdt.launching.JRE_CONTAINER"
    location="C:/program files/Java/JDK1.5.0_05/jre"/>
  <variable path="org.apache.commons"
    location="C:/program files/Java/Apache/commons"/>
<variables>

Also, when we define a JEE server like Tomcat, where does Eclipse store the path to Tomcat? I looked at  .metadata\.plugins\org.eclipse.wst.server.core\servers\xml and do not find that path there. When I add tomcat server runtime into project buildpath, the server entry is recorded in .classpath file as 

<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v5.5"/>

Where does Eclipse store the system path to resolve to this variable path, in order to allow my build script to read it?

In summary, Eclipse team conglomeratively needs to come up with a definite standard to specify XML visibility of Eclipse variables.
Comment 1 Tim deBoer CLA 2007-07-18 11:28:00 EDT
Tomcat (and all server locations) is stored in Eclipse preferences here:
<workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.wst.server.core.prefs

Like any file in .metadata, the location of these settings is not API and may change in a future release. Another option for you is to launch Eclipse headless (i.e. no UI), use API to obtain these values in a public/supported way, and serialize it to a file for your scripts to use.

Passing bug on to JDT for further comment.
Comment 2 Olivier Thomann CLA 2007-07-19 14:42:54 EDT
Move to JDT/Debug
Comment 3 Darin Wright CLA 2007-07-23 10:46:29 EDT
The mentioned files are owned by JDT Core.