Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Removing unnecessary files in ProjectCreator
Removing unnecessary files in ProjectCreator [message #629361] Mon, 27 September 2010 23:47 Go to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
When I create a new project for my DSL, it creates the follows:

src/
src-gen/
MANIFEST-MF
build.properties
JRE-System library
Plug-in Dependencies.

I only want src/ src-gen created. I don't want the rest of these files/directories to exist when a new project is creaetd. Is it possible to do this? If so, how?

I will only be exporting the DSL + UI plugin. I am not generating anything from it for now. Thanks for any ideas.
Re: Removing unnecessary files in ProjectCreator [message #629381 is a reply to message #629361] Tue, 28 September 2010 06:07 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi,

a project without the JRE lib and Plug-in deps cannot be neither a
working plug-in project nor a java project. If you want to create a
simple project, have a look at the
org.eclipse.xtext.ui.wizard.AbstractProjectCreator and the simplest
implementation of the org.eclipse.xtext.ui.util.ProjectFactory.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 28.09.10 01:47, schrieb pgbackup@yahoo.com:
> When I create a new project for my DSL, it creates the follows:
>
> src/
> src-gen/
> MANIFEST-MF
> build.properties
> JRE-System library
> Plug-in Dependencies.
>
> I only want src/ src-gen created. I don't want the rest of these
> files/directories to exist when a new project is creaetd. Is it possible
> to do this? If so, how?
>
> I will only be exporting the DSL + UI plugin. I am not generating
> anything from it for now. Thanks for any ideas.
Re: Removing unnecessary files in ProjectCreator [message #629557 is a reply to message #629381] Tue, 28 September 2010 17:04 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
Hi,

Thanks for the response. As a developer, from Xtext, I only export the grammar and the UI plugin. I don't use the generator in any way.

As a user of the grammar, I just want to create an empty project with .foo (my grammar filename extension) files only. Since I'm not going to generate any workflow etc, I dont need the generator part. Also it is not a java project so there shouldn't be any jar dependencies etc.

Does the user project need to have any .jar dependencies for the Xtext aware grammar editor to work properly?

Thanks
Re: Removing unnecessary files in ProjectCreator [message #629563 is a reply to message #629557] Tue, 28 September 2010 17:18 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 101
Registered: August 2010
Senior Member
Also one more question. If I'm to write my own class for the project creator. Where do I store it? It seems like everytime I run the .mwe2 file in the grammar component, it regenerate My<DSL>ProjectCreator.java in the src-gen folder for the UI component. Thanks.
Re: Removing unnecessary files in ProjectCreator [message #629594 is a reply to message #629563] Tue, 28 September 2010 19:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
hi,

this is why the src-gen folder is called src-gen (source generated) and a separate source folder - so store it somewhere in the src folder

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Removing unnecessary files in ProjectCreator [message #1480884 is a reply to message #629361] Thu, 20 November 2014 15:19 Go to previous message
S Matharoo is currently offline S MatharooFriend
Messages: 1
Registered: November 2014
Junior Member
Another option that worked for me was to put the following in the custom ProjectCreator


try {
project.getFile("build.properties").delete(true, null);
project.getFolder("META-INF").delete(true, null);
} catch (CoreException e) {
// Ignore
}
Previous Topic:Using Xtext and Code Generator without Runtime
Next Topic:How to unregister xText from an running jboss-eap
Goto Forum:
  


Current Time: Fri Apr 26 12:35:27 GMT 2024

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

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

Back to the top