Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Does DLTK have an API to read the .buildpath file?

Hi Gabriel,

Please use the following methods:
org.eclipse.dltk.core.IScriptProject.getRawBuildpath()
org.eclipse.dltk.core.IScriptProject.setRawBuildpath(IBuildpathEntry[], IProgressMonitor)

For example:
IBuildpathEntry[] originalPath = project.getRawBuildpath();
IBuildpathEntry[] newPath = new IBuildpathEntry[originalPath.length + 1];
System.arraycopy(originalPath, 0, newPath, 0, originalPath.length);
IBuildpathEntry newEntry = DLTKCore.newSourceEntry(new Path("/P/moreSource"));
newPath[originalPath.length] = newEntry;
project.setRawBuildpath(newPath, null);

Regards,
Alex

----- Original Message -----
From: "Gabriel Petrovay" <gabipetrovay@xxxxxxxxx>
To: "dltk-dev" <dltk-dev@xxxxxxxxxxx>
Sent: Monday, August 24, 2009 5:12:51 PM GMT +06:00 Almaty, Novosibirsk
Subject: [Dltk-dev] Does DLTK have an API to read the .buildpath file?

Hi,

I can write  to the .buildpath file using the BuildpathsBlock.flush()
method the way the New Project wizards do. But how can read the
entries in the file? All I want to do is to add an additional source
folder (from code).

Thanks!

Gabriel


-- 
MSc Gabriel Petrovay
Mobile: +41(0)787978034
www.28msec.com
_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev


Back to the top