Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[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 = JavaScriptCore.create( project );
    List<IIncludePathEntry> cp = new ArrayList<IIncludePathEntry>();
    cp.add( JavaScriptCore.newSourceEntry( project.getFullPath() ) );
cp .add ( JavaScriptCore .newContainerEntry( JavaRuntime.newDefaultJREContainerPath() ) ); cp.add( JavaScriptCore.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() ] ),
                          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 But trying to add a library entry using new Path( "org.eclipse.wst.jsdt.launching.baseBrowserLibrary" ) in any of the static methods JavaScriptCore 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?

Dipl.-Inform. Matthias Kempka
Innoopract Informationssysteme GmbH
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

Back to the top