Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Two DSLs in one Eclipse project, only one is active(Noob)
Two DSLs in one Eclipse project, only one is active [message #1214498] Wed, 27 November 2013 13:26 Go to next message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
I've just recovered from a few days of almost nothing happening due to a missing imported package. Now that I'm somewhat stable (emotionally) I'm trying to work on my DSL development again! I have two DSLs side by side which are usually both active when I launch the Eclipse Runtime. This has been working for several weeks without incident.

Since I recovered from the missing package, only the second one is active.

I've regenerated the Xtext artifacts.

What should I check?

Thanks,

GW
Re: Two DSLs in one Eclipse project, only one is active [message #1214499 is a reply to message #1214498] Wed, 27 November 2013 13:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6132
Registered: July 2009
Senior Member
Hi have a look at the plugin.XML does it register both Lang's?

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Two DSLs in one Eclipse project, only one is active [message #1214676 is a reply to message #1214499] Wed, 27 November 2013 15:12 Go to previous messageGo to next message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
Hi Christian, I have, e.g.

spincad
- plugin.xml

spincad.ui
- plugin.xml

spincadmenu
- plugin.xml

spincadmenu.ui
- plugin.xml

spincad and spincadmenu are my two DSLs. Which plugin.xml file are we talking about?

[Updated on: Wed, 27 November 2013 15:13]

Report message to a moderator

Re: Two DSLs in one Eclipse project, only one is active [message #1214802 is a reply to message #1214676] Wed, 27 November 2013 16:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6132
Registered: July 2009
Senior Member
Sorry I thought you have only 2 projects. So do you get any errors in
the host eclipse console if you start a runtime eclipse application?

And are you sure the plugin is contained in this app (run as ... Then
plugins tab)

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Two DSLs in one Eclipse project, only one is active [message #1214951 is a reply to message #1214802] Wed, 27 November 2013 17:57 Go to previous messageGo to next message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
I created two Xtext projects, spincad and spincadmenu that share this workspace. Each created 4 packages (root, sdk, test, ui) and two of those (root and ui) contain plugins.xml.

When I select the spincad package and choose "Run as..", I get the options:

Eclipse Application
Java Applicaion
Java applet
OSGi framework

In the runtime Eclipse, my project does not appear to have a MANIFEST.MF or plugins.xml. In spite of that the spincadmenu DSL is active. Unfortunately I want to work on the other one! Laughing

Don't know if this view is helpful. Both of my DSLs reference the same packages.

http://img823.imageshack.us/img823/6872/s3p2.png

Uploaded with ImageShack.us

[Updated on: Wed, 27 November 2013 18:08]

Report message to a moderator

Re: Two DSLs in one Eclipse project, only one is active [message #1215221 is a reply to message #1214951] Wed, 27 November 2013 20:42 Go to previous messageGo to next message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
I decided to run validation on the plugins and came up with this.

http://img43.imageshack.us/img43/6879/0yep.png

Uploaded with ImageShack.us

Tried adding these to the dependencies in manifest.mf, but error persists.

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: spincad
Bundle-Vendor: Holy City Audio
Bundle-Version: 0.91
Bundle-SymbolicName: spincad;singleton:=true
Require-Bundle: org.eclipse.core.filebuffers;bundle-version="3.5.300",
 org.eclipse.xtext.xbase;resolution:=optional;visibility:=reexport,
 org.eclipse.xtext.generator;resolution:=optional,
 org.eclipse.emf.mwe2.launch;resolution:=optional,
 com.google.inject.source;bundle-version="3.0.0",
 org.eclipse.xtext.junit4;bundle-version="2.4.3",
 org.apache.log4j;bundle-version="1.2.15",
 org.apache.commons.codec;bundle-version="1.4.0",
 org.apache.commons.io;bundle-version="2.0.1",
 org.apache.commons.lang;bundle-version="2.6.0",
 org.apache.commons.lang3;bundle-version="3.1.0",
 org.apache.commons.logging;bundle-version="1.1.1",
 org.apache.commons.math;bundle-version="2.1.0",
 org.apache.commons.pool;bundle-version="1.6.0",
 org.apache.commons.primitives;bundle-version="1.0.0",
 org.eclipse.xtext,
 org.eclipse.xtext.util,
 org.eclipse.emf.ecore,
 org.eclipse.emf.common,
 org.antlr.runtime,
 org.eclipse.xtext.common.types,
 org.eclipse.core.filebuffers.source;bundle-version="3.5.300"
Import-Package: org.apache.log4j,
 org.eclipse.ui,
 org.eclipse.xtext.xbase.lib
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Export-Package: com.holycityaudio.spincad,
 com.holycityaudio.spincad.services,
 com.holycityaudio.spincad.spinCAD,
 com.holycityaudio.spincad.spinCAD.impl,
 com.holycityaudio.spincad.spinCAD.util,
 com.holycityaudio.spincad.serializer,
 com.holycityaudio.spincad.parser.antlr,
 com.holycityaudio.spincad.parser.antlr.internal,
 com.holycityaudio.spincad.validation,
 com.holycityaudio.spincad.scoping,
 com.holycityaudio.spincad.generator,
 com.holycityaudio.spincad.formatting
Re: Two DSLs in one Eclipse project, only one is active [message #1215737 is a reply to message #1215221] Thu, 28 November 2013 01:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6132
Registered: July 2009
Senior Member
Hi at the place where you do the run as:
(Run -> Run Configurations -> choose yours under eclipse apps)
Open the config dialog goto the plugins tab and hit add required (if
you don't have chosen all in your case) there is a validate button
too.


Sorry there are too many options so it is extremely hard to help

BTW there should / maybe multiple/a manifest.mf_gen or
plugin.XML_gen you should compare with the companion without the gen

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Two DSLs in one Eclipse project, only one is active [message #1216664 is a reply to message #1215737] Thu, 28 November 2013 10:26 Go to previous messageGo to next message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
Thanks Christian, yes it is rather complicated! I will keep looking. I'm confused as to why one of my DSLs works where the other doesn't. Perhaps there is an explicit plugin included (I did export to plugin at one time but never really used these).

I confirmed these files are present in the plugins folder of my Eclipse installation:

org.eclipse.core.filebuffers_3.5.300.v20130225-1821.jar
com.google.inject.source_3.0.0.v201203062045
Re: Two DSLs in one Eclipse project, only one is active [message #1216676 is a reply to message #1216664] Thu, 28 November 2013 10:34 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian Dietrich
Messages: 6132
Registered: July 2009
Senior Member
you you can start the eclipse with -console and then use the console to see if the plugins are there and if they start

ss this.is.my.plugin gives an id
start <id> starts the plugin.

Re: Two DSLs in one Eclipse project, only one is active [message #1219024 is a reply to message #1216676] Fri, 29 November 2013 13:20 Go to previous message
Gary Worsham is currently offline Gary Worsham
Messages: 157
Registered: September 2013
Senior Member
I had changed so many things randomly hoping for some miracle that this morning I finally gave up.

Since my DSL is based on only 6 source files, I saved these in a separate location then I erased everything in my workspace folder. I went back to Eclipse and recreated a new Xtext project then copied the source code files into the freshly generated template xtext and DomainModelGenerator.xtend files. I did not import the saved files into the workspace as this has confused me before. I just wanted to leave the entire structure just as the Eclipse Xtext project creator intended.

And, wonderfully, it seems like it works again. That was a really painful and frustrating 2 or 3 weeks though!

My "idiot's" lesson is:
1) Don't change anything unless you know 100% what it does.
2) If you are not sure what you're doing, keep notes on before/after settings if you do change something.
3) Keep backups of everything.
Previous Topic:While Parsing the xtext models,Getting Resource factory needed
Next Topic:absolute paths in ._trace files
Goto Forum:
  


Current Time: Mon Jul 28 08:24:03 EDT 2014

Powered by FUDForum. Page generated in 0.02508 seconds