Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Web Editor (Web Editor Installation/Tutorial and possible to create multiple dsl files?)
Xtext Web Editor [message #1734627] Fri, 10 June 2016 06:34 Go to next message
Jahic Benjamin is currently offline Jahic BenjaminFriend
Messages: 10
Registered: October 2015
Junior Member
Good morning all,

I'm currently working on a dsl for educational institutions. This DSL should provide features like describing course syllabi, program descriptions etc. Since the dsl should also be used by people who are not from the PC domain, i wanted to use the web editor.

However I did not manage to install one of the three Orion, Ace or CodeMirror after several hours of research and checks. Does there exist a tutorial for running one of these 3? Or could I get any help please?

Additionally I wanted to ask if the web editors provide the feature to create some sort of project explorer to create multiple files of my DSL? I've seen that dsl forge provides some sort of project explorer but I think it covers less functionalities than the Xtext web editors?

Thank you for any information and help
Benjamin
Re: Xtext Web Editor [message #1734628 is a reply to message #1734627] Fri, 10 June 2016 06:37 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
hi can you be a bit more specific on what you mean by the term "install"

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Web Editor [message #1734630 is a reply to message #1734628] Fri, 10 June 2016 06:38 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
p.s.: and no there is no multi file / project explorer thingy available out of the box right no - but we are working on it

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de

[Updated on: Fri, 10 June 2016 06:39]

Report message to a moderator

Re: Xtext Web Editor [message #1734639 is a reply to message #1734627] Fri, 10 June 2016 07:04 Go to previous messageGo to next message
Jahic Benjamin is currently offline Jahic BenjaminFriend
Messages: 10
Registered: October 2015
Junior Member
Thank you for your fast reply, well actually I've added in the MWE2Workflow in the language section the webSupport section : Here the code
language = StandardLanguage {
			name = "lu.uni.lassy.messep.tesma.Tesma"
			fileExtensions = "tes"

			serializer = {
				generateStub = false
			}
			
			[i]webSupport = {
				generateHtmlExample = true
				framework = "CODEMIRROR"
			}[/i]

			validator = {
				// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
			}



and I've changed the script section in the index.html file to
require.config({
		    paths: {
		        "jquery": "webjars/jquery/<version>/jquery.min",
		        "xtext/xtext-codemirror": "xtext/<version>/xtext-codemirror"
		    },
		    packages: [{
		        name: "codemirror",
		        location: "webjars/codemirror/<version>",
		        main: "lib/codemirror"
		    }]
		});
		require(["xtext/xtext-codemirror"], function(xtext) {
		    xtext.createEditor();
		});
		}

and then I've executed the jettyrun command, the server starts properly but the textbox is actually not editable in the web application, neither in chrome or safari.

In attachement, I've put a screenshot of the web browser.

Thank you in advance

[Updated on: Fri, 10 June 2016 07:05]

Report message to a moderator

Re: Xtext Web Editor [message #1734644 is a reply to message #1734639] Fri, 10 June 2016 07:20 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
first question: did you give it a try with ace first (default setup)?
was it working?

did you adapt build.gradle for the codemirror web jar to be downloaded.

when you open the browser and have a look at the javascript console - which errors do you get ?

do you get any errors in the console of the jettyrun?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Web Editor [message #1734646 is a reply to message #1734644] Fri, 10 June 2016 07:31 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
and you may need to add a

def void configureIPreferenceValuesProvider(Binder binder) {
binder.bind(IPreferenceValuesProvider).annotatedWith(FormatterPreferences).to(FormatterPreferenceValuesProvider)
}

to the webmodule if you use xtext 2.10

i filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=495851

for that


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Web Editor [message #1734740 is a reply to message #1734646] Fri, 10 June 2016 20:17 Go to previous messageGo to next message
Jahic Benjamin is currently offline Jahic BenjaminFriend
Messages: 10
Registered: October 2015
Junior Member
Great Thank you for your help.. I made it actually run with the ACE standard version run after reinstalling a new Eclipse Java and updating with the Xtext update site. It was actually due to the low internet connection I had. It could not download a file (i do not remember the name) for making jettyrun run.



Re: Xtext Web Editor [message #1750943 is a reply to message #1734646] Mon, 02 January 2017 13:25 Go to previous messageGo to next message
Puneet Patwari is currently offline Puneet PatwariFriend
Messages: 64
Registered: November 2014
Member
Hi Christian

Quote:
and you may need to add a

def void configureIPreferenceValuesProvider(Binder binder) {
binder.bind(IPreferenceValuesProvider).annotatedWith(FormatterPreferences).to(FormatterPreferenceValuesProvider)
}

to the webmodule if you use xtext 2.10

This is a very important piece of information. I have wasted 1 day figuring out my mistake. I recently downloaded Xtext 2.10 for using Xtext on Web. And i ran into this error which I could not find any help for. Now it's working fine.

Thanks for writing the solution.

Puneet

[Updated on: Mon, 02 January 2017 13:26]

Report message to a moderator

Re: Xtext Web Editor [message #1750945 is a reply to message #1750943] Mon, 02 January 2017 14:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
see https://github.com/eclipse/xtext-web/issues/5
issue is fixed in the upcoming 2.11 version


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext Web Editor [message #1750982 is a reply to message #1750945] Tue, 03 January 2017 12:12 Go to previous messageGo to next message
Puneet Patwari is currently offline Puneet PatwariFriend
Messages: 64
Registered: November 2014
Member
Hi Christian

I want to understand how the Xtext on the web works, the various artifacts that gets generated in the .web project, use of the three javascript editor libraries, how could I save files from the browser (like we did in the eclipse version). Do you have an architecture for the "web support" feature so that it is easier to understand the new concepts.

Thanks in advance,
Puneet
Re: Xtext Web Editor [message #1750985 is a reply to message #1750982] Tue, 03 January 2017 12:50 Go to previous messageGo to next message
Miro Spönemann is currently offline Miro SpönemannFriend
Messages: 78
Registered: March 2015
Location: Kiel, Germany
Member

The Xtext Web integration is not an IDE. If you want to save any files, you need to take care of that yourself by extending the server implementation. See the documentation.
Re: Xtext Web Editor [message #1751212 is a reply to message #1750985] Thu, 05 January 2017 17:10 Go to previous messageGo to next message
Puneet Patwari is currently offline Puneet PatwariFriend
Messages: 64
Registered: November 2014
Member
Hi

Do I need to bind the IServerResourceHandler in WebModule code? Can you help me with a link that shows how I can implement the persistence mechanism? I am lost. I am also unable to run Orion editor. I can use the default ACE editor easily. I have seen the documentation on the official website but I do not think its sufficient to get a complete idea as to what is happening behind the curtains. I am very curious to know how the things are working within Xtext.

Thanks
:Puneet

[Updated on: Thu, 05 January 2017 17:19]

Report message to a moderator

Re: Xtext Web Editor [message #1751226 is a reply to message #1751212] Thu, 05 January 2017 20:09 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
Yes you can use the web module.
I don't know any public example besides this one
https://github.com/eclipse/xtext-web/blob/master/org.eclipse.xtext.web/src/main/xtend-gen/org/eclipse/xtext/web/server/persistence/FileResourceHandler.java
For Orion: did you download and extract the Orion javascript files?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:[Highlighting] override text style
Next Topic:Combining Xtext with a MySQL database
Goto Forum:
  


Current Time: Tue Apr 16 06:44:42 GMT 2024

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

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

Back to the top