Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] Programmatically setting up projects for JSDT

Hi Matthias,

Check out the org.eclipse.wst.jsdt.web.core.internal.project.JsWebNature.java class in the org.eclipse.wst.jsdt.web.core plugin. It's doing almost exactly what you've described. JsWebNature is the helper class that performs JSDT setup on dynamic/static web projects.

Thanks,
Brad Childs

IBM Software Group
Emerging Internet Technology / Browser Technology Center
Inactive hide details for Matthias Kempka <mkempka@xxxxxxxxxxxxxx>Matthias Kempka <mkempka@xxxxxxxxxxxxxx>


          Matthias Kempka <mkempka@xxxxxxxxxxxxxx>
          Sent by: wtp-dev-bounces@xxxxxxxxxxx

          05/13/2008 10:26 AM

          Please respond to
          "General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

To

"General discussion of project-wide or architectural issues." <wtp-dev@xxxxxxxxxxx>

cc


Subject

[wtp-dev] Programmatically setting up projects for JSDT

I have problems with setting up JSDT projects programmatically.  
Currently, I'm adding libraries to the include path using this code:

    IJavaScriptProject jp = _javascript_Core.create( project );
    List<IIncludePathEntry> cp = new ArrayList<IIncludePathEntry>();
    cp.add( _javascript_Core.newSourceEntry( project.getFullPath() ) );
     
cp
.add
( _javascript_Core
.newContainerEntry( JavaRuntime.newDefaultJREContainerPath() ) );
    cp.add( _javascript_Core.newContainerEntry( new  
Path( "org.eclipse.wst.jsdt.USER_LIBRARY/myQx" ),
                                              false ) );
    IPath outputLocation = project.getFolder( "bin" ).getFullPath();
    jp.setRawIncludepath( cp.toArray( new  
IIncludePathEntry[ cp.size() ] ),
                          outputLocation,
                          monitor );

However, I don't see how to add an existing system library.  
Specifically, I'd like to add the ECMA 3 library to my include path  
for a testcase for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=231809
But trying to add a library entry using new  
Path( "org.eclipse.wst.jsdt.launching.baseBrowserLibrary" ) in any of  
the static methods _javascript_Core provides failed so far.

I've also tried to just copy the .settings/ directory from an existing  
project to my newly created project, then refresh and reread it, but  
without success.

Are there some API calls that I can call to create a web based  
_javascript_ project?

Regards,
Matthias
--
Dipl.-Inform. Matthias Kempka
Innoopract Informationssysteme GmbH
mkempka@xxxxxxxxxxxxxx
Tel:  0721 - 66 47 33 - 0
Fax: 0721 - 66 47 33 29
========================= Legal Disclaimer =====================
According to Section 80 of the German Corporation Act
Innoopract Informationssysteme GmbH must indicate the following  
information:
Address: Stephanienstrasse 20, 76133 Karlsruhe Germany
General Manager: Jochen Krause, Eric von der Heyden
Registered Office: Karlsruhe, Commercial Register Karlsruhe HRB 7883
============================================================





_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev

GIF image

GIF image

GIF image


Back to the top