Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Creating WTP project in code - Setting project location
Creating WTP project in code - Setting project location [message #726626] Mon, 19 September 2011 04:05
Vidya Chandrasekaran is currently offline Vidya ChandrasekaranFriend
Messages: 3
Registered: July 2009
Junior Member
Hi,

I am creating a WTP project using the following code snippet.

IDataModel newWebProjectDataModel = DataModelFactory.createDataModel(IWebFacetInstallDataModelProperties.class);
newWebProjectDataModel.setProperty(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME, projectName);
newWebProjectDataModel.getDefaultOperation().execute(monitor.newChild(30), null);


I cannot figure out how to set the project location though. I tried

IFacetedProjectWorkingCopy wc = (IFacetedProjectWorkingCopy) newWebProjectDataModel .getProperty(IFacetProjectCreationDataModelProperties.FACETED_PROJECT_WORKING_COPY);
wc.setProjectLocation(loc);

This does not seem to have any effect. Any ideas on how I can create a project in a custom location.

Thanks.

Previous Topic:Help! Class not found java.lang.class
Next Topic:JSDT Quick fix to create local variable doesn't appear
Goto Forum:
  


Current Time: Fri Dec 19 09:26:23 GMT 2014

Powered by FUDForum. Page generated in 0.13233 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software