|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Xtext Web - Code generation [message #1721455 is a reply to message #1721454] |
Wed, 27 January 2016 15:07 |
Kostas Kls Messages: 20 Registered: October 2015 |
Junior Member |
|
|
Here is the index file
<html lang="en">
<head>
<meta charset="utf-8">
<title>EDL WEB editor</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="keywords" content="opensource rich wysiwyg text editor jquery bootstrap execCommand html5" />
<meta name="description" content="This tiny jQuery Bootstrap WYSIWYG plugin turns any DIV into a HTML5 rich text editor" />
<link rel="apple-touch-icon" href="//mindmup.s3.amazonaws.com/lib/img/apple-touch-icon.png" />
<link rel="shortcut icon" href="http://mindmup.s3.amazonaws.com/lib/img/favicon.ico" >
<link href="external/google-code-prettify/prettify.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="external/jquery.hotkeys.js"></script>
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
<script src="external/google-code-prettify/prettify.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css" >
<!-- Optional theme -->
<link rel="stylesheet" href="css/bootstrap-theme.min.css">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<link href="index.css" rel="stylesheet">
<script src="bootstrap-wysiwyg.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="en-us">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<link rel="stylesheet" type="text/css" href="xtext/2.9.0.beta2/xtext.css"/>
<link rel="stylesheet" type="text/css" href="index.css" />
<script src="webjars/requirejs/2.1.17/require.min.js"></script>
<script type="text/javascript" src="my_scripts/scripts.js"></script>
<script type="text/javascript" src="my_scripts/code_templates.js"></script>
<!-- <script type="text/javascript" src="my_scripts/code_templates_with_predefined_values.js"><</script> -->
<script type="text/javascript" src="my_scripts/script__experiment_on_load.js"></script>
<script type="text/javascript" src="/xtext/2.9.0.beta2/xtext.js"></script>
<script type="text/javascript">
require.config({
paths: {
"text": "webjars/requirejs-text/2.0.10-3/text",
"jquery": "webjars/jquery/2.1.4/jquery.min",
"xtext/xtext": "xtext/2.9.0.beta2/xtext",
"ace/ext/language_tools": "webjars/ace/1.2.0/src/ext-language_tools",
"xtext/xtext-ace": "xtext/2.9.2-SNAPSHOT/xtext-ace"
}
});
require(["xtext/xtext"], function(xtext) {
alert("prosbash 1");
var editor = xtext.createEditor({syntaxDefinition: "xtext/edl-syntax", enableGeneratorService: "true"});
alert("prosbash 2");
jQuery('#generate-button').bind("click", function(e){
alert('generate button pressed!!');
jQuery('#generator-result').html('<iframe src="http://' + location.host + '/xtext-service/generate?resource=script.edl"></iframe>');
alert('passed!!');
e.preventDefault();
});
});
</script>
</head>
<body onload="skeleton()">
<div class="container-fluid" style="min-height:100% ; background-color: rgb(102,150,211); " >
<!-- ------------------------------------------------ MAIN ROW ------------------------------------------------- -->
<div class="row " style=" min-height:100%; " >
<!-- --------------------------------------------------- [ Buttons (10)] --------------------------------------- -->
<div class="col-md-10" >
<!-- --------------------------------------------------- WEB editor ----------------------------------- -->
<div class="col-md-12 " style="margin-left: -20px; margin-top: -10px;">
<p>
<h2 style="font-style:italics; color:rgb(92,198,211); color:rgb(0,12,90);
color:#bc9a65; color:white; color:rgb(230,230,230); color:rgb(210,210,210); color:rgb(0,12,90); ">
<strong><i> EDL WEB editor </i>
<!-- <hr style="margin-top: -2px; margin-right: 900px">
<hr style="margin-top: -15px; margin-right: 900px"> -->
</strong>
</h2>
<div class="btn-group" id="myButtons" data-target="#editor" data-role="editor-toolbar"><small><center>Tools</center></small>
<button type="button" id="generate-button" class="btn btn-default" title="JSON" style=" padding:0px 0px 0px 0px; background-position: 1px 1px;" >
<img src="my_icons/json1.jpg"
class="img-thumbnail" alt="JSON" style=" max-height: 32px; max-width:32px ;" >
</button>
<button type="button" class="btn btn-default" title="Files" style=" padding:0px 0px 0px 0px; background-position: 1px 1px;" >
<img src="my_icons/files-icon.png"
class="img-thumbnail" alt="Files" style=" max-height: 32px; max-width:32px ;" >
</button>
</div>
</div>
<!-- ------------------------------------------------------- EDITOR -------------------------------------------- -->
<div class="col-md-6 edit">
<div class="xtext-editor" data-editor-lang="edl" data-editor-resource-id="script.edl" style="width:100%;height:800px;" >
</div>
</div>
<!-- --------------------------------------------------------- MAP ---------------------------------------------- -->
<div class="col-md-6 map">
<!-- <img align="right" src="smy_icons/map.png" class="img-thumbnail" alt="RAWFiE Logo" width="90%"
style=" margin: 5px -7px; background-color: rgb(102,150,211); border-color:rgb(102,150,211); " >
-->
<div id="googleMap" style="width:100%;height:800px;"></div>
</div>
<div class="col-md-6 edit">
<div id="generator-result"></div>
</div>
</div>
</div>
</div>
</body>
</html>
I should note that during the execution of gradle i take an error in the xtend-gen/Generator at the line 50
public static int[][] newIntegerArrayOfSize(final int nrow, final int ncol) {
Object[] _newArrayOfSize = new Object[nrow];
final Function1<Object, int[]> _function = (Object it) -> {
return new int[nrow][ncol];
};
return ((int[][])Conversions.unwrapArray(ListExtensions.<Object, int[]>map(((List<Object>)Conversions.doWrapArray(_newArrayOfSize)), _function), int[].class));
}
Finally, when i run the gradle and go to the http://localhost:8081/xtext/services/ no services are listed.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.07008 seconds