Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Storing an existing xls file in ProjectExplorer view of dsl editor
Storing an existing xls file in ProjectExplorer view of dsl editor [message #1124431] Thu, 03 October 2013 14:30
Ashwini Nayak is currently offline Ashwini NayakFriend
Messages: 19
Registered: July 2013
Junior Member
Hi,

I am facing an issue while working on XText.

I have a file ExportGenerator.xtend whose contents are as below:

class ExportGenerator implements IGenerator
{
override void doGenerate(Resource resource, IFileSystemAccess fsa)
{
//method implementation goes here.......
fsa.generateFile("fileName.xls", "contents")
}
}



What I do in this method is, I generate an xls file with some contents and store that file inside a folder in ProjectExplorer view of my dsl editor. I generate the xls file by passing the fileName and contents as a parameter to the generateFile method. And the contents belong to charSequence datatype.

But, Instead of creating a new file by passing the fileName and contents, I wanted to add some contents to an existing xls template which is saved in my local machine and store that xls file in ProjectExplorer view of dsl editor.

I was successful in adding the contents to an existing xls template. But, I need to save that file in the Project Explorer view of my dsl editor. The only method call which I found for creating a file is

fsa.generateFile(String fileName, CharSequence contents)

But, this method call generates a new xls file. Is there any way to store an existing xls file under a folder in Project Explorer view of my dsl editor. How can I do that?


Thanks in advance
Previous Topic:Change IResourceClusteringPolicy
Next Topic:Performance Issues
Goto Forum:
  


Current Time: Fri Apr 26 18:11:37 GMT 2024

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

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

Back to the top