diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts index de0e383469b13d4228c44ed1ae2ba0b8b8cb8339..01f92fb5dc23f1896423c310b267f8b3e07465f2 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts @@ -18,16 +18,17 @@ export class AceAssertComponent implements AfterViewInit { ngAfterViewInit() { this.editor.setTheme('dracula'); this.editor.getEditor().setOptions({ - enableBasicAutocompletion: true + enableBasicAutocompletion: true, + highlightActiveLine : false }); - +/* this.editor.getEditor().commands.addCommand({ name: 'showOtherCompletions', bindKey: 'Ctrl-.', exec(editor) { } - }); + });*/ } } diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts index fd5548f64050717a5d9d8b06f4e6e4f0cb38ffa6..e431bcfec1b2becd41179a3597a245ece181435e 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts @@ -23,10 +23,10 @@ export class AceComponent implements AfterViewInit { ngAfterViewInit() { this.editor.setTheme('dracula'); - +/* this.editor.getEditor().setOptions({ - enableBasicAutocompletion: true - }); + + });*/ /* this.editor.getEditor().commands.addCommand({ diff --git a/tests/serveur_compilation/server_rest/.idea/compiler.xml b/tests/serveur_compilation/server_rest/.idea/compiler.xml index 14146fda1de7a458332cc41d7b9f3c0bc94f5b8f..f8ea6ba06071dd9b6dbd87cfb16260c791ab851c 100644 --- a/tests/serveur_compilation/server_rest/.idea/compiler.xml +++ b/tests/serveur_compilation/server_rest/.idea/compiler.xml @@ -6,8 +6,8 @@ <sourceOutputDir name="target/generated-sources/annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <outputRelativeToContentRoot value="true" /> - <module name="server_rest_new" /> <module name="09" /> + <module name="server_rest_new" /> </profile> </annotationProcessing> </component> diff --git a/tests/serveur_compilation/server_rest/.idea/workspace.xml b/tests/serveur_compilation/server_rest/.idea/workspace.xml index d70dceb00d833bb7628ea8595a12e2d52aa5c12d..a4fcd46e6ede305174cea7a751c2e198a175408f 100644 --- a/tests/serveur_compilation/server_rest/.idea/workspace.xml +++ b/tests/serveur_compilation/server_rest/.idea/workspace.xml @@ -2,19 +2,19 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="e6a1f2e5-4f60-4227-82bb-83eb10fa94a5" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package.json" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/../serveur_compilation/.idea/uiDesigner.xml" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/HostCompilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/ace-assert/ace-assert.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace-assert/ace-assert.component.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/app.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/target/classes/app.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/app.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../serveur_compilation/docker/dockerfile" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/../serveur_compilation/share_docker_file/test.txt" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/share_docker_file/Main.class" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/share_docker_file/kata.class" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/app.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/DockerCompilation.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> @@ -30,20 +30,23 @@ </component> <component name="FileEditorManager"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> - <file pinned="false" current-in-tab="true"> + <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="300"> - <caret line="20" column="12" lean-forward="true" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> + <caret line="20" column="12" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> </state> </provider> </entry> </file> - <file pinned="false" current-in-tab="false"> + <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="420"> - <caret line="33" selection-start-line="33" selection-end-line="33" /> + <state relative-caret-position="387"> + <caret line="32" column="112" lean-forward="true" selection-start-line="32" selection-start-column="112" selection-end-line="32" selection-end-column="112" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> @@ -75,11 +78,10 @@ </list> </option> </component> - <component name="ProjectFrameBounds" extendedState="6" fullScreen="true"> - <option name="x" value="180" /> - <option name="y" value="112" /> - <option name="width" value="1080" /> - <option name="height" value="676" /> + <component name="ProjectFrameBounds" extendedState="1"> + <option name="y" value="23" /> + <option name="width" value="1920" /> + <option name="height" value="1121" /> </component> <component name="ProjectLevelVcsManager" settingsEditedManually="true"> <ConfirmationsSetting value="1" id="Add" /> @@ -105,6 +107,7 @@ <property name="node.js.selected.package.eslint" value="(autodetect)" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" /> + <property name="restartRequiresConfirmation" value="false" /> </component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> @@ -166,14 +169,16 @@ <workItem from="1556827416534" duration="171000" /> <workItem from="1556827744217" duration="333000" /> <workItem from="1556829690737" duration="985000" /> + <workItem from="1556864771569" duration="1439000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="7523000" /> + <option name="totallyTimeSpent" value="8962000" /> </component> <component name="ToolWindowManager"> - <frame x="0" y="0" width="1440" height="900" extended-state="6" /> + <frame x="0" y="23" width="1920" height="1121" extended-state="1" /> + <editor active="true" /> <layout> <window_info content_ui="combo" id="Project" order="0" weight="0.2603834" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> @@ -184,7 +189,7 @@ <window_info id="Favorites" order="6" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Find" order="1" /> - <window_info anchor="bottom" id="Run" order="2" weight="0.3" /> + <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.2993197" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> @@ -192,9 +197,9 @@ <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="8" /> <window_info anchor="bottom" id="Database Changes" order="9" /> - <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.32891566" /> + <window_info anchor="bottom" id="Terminal" order="10" weight="0.3283186" /> <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" /> - <window_info anchor="bottom" id="Messages" order="12" /> + <window_info anchor="bottom" id="Messages" order="12" weight="0.32944608" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> @@ -213,14 +218,17 @@ <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="300"> - <caret line="20" column="12" lean-forward="true" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> + <caret line="20" column="12" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="420"> - <caret line="33" selection-start-line="33" selection-end-line="33" /> + <state relative-caret-position="387"> + <caret line="32" column="112" lean-forward="true" selection-start-line="32" selection-start-column="112" selection-end-line="32" selection-end-column="112" /> + <folding> + <element signature="imports" expanded="true" /> + </folding> </state> </provider> </entry> diff --git a/tests/serveur_compilation/server_rest/src/main/java/app.java b/tests/serveur_compilation/server_rest/src/main/java/app.java index 27b9c4e5341e40abe5b9b79cf48d6ddf3b230952..19c6cb7fd5629091e380d8c06ff57f4ff8fa0aad 100644 --- a/tests/serveur_compilation/server_rest/src/main/java/app.java +++ b/tests/serveur_compilation/server_rest/src/main/java/app.java @@ -1,6 +1,7 @@ import io.javalin.Javalin; import java.io.*; +import java.net.ConnectException; import java.net.HttpURLConnection; import java.net.URL; import org.apache.commons.lang.StringEscapeUtils; @@ -13,24 +14,38 @@ public class app { app.get("/run/", ctx -> { - - URL compilator = new URL("http://localhost:6999"); - HttpURLConnection connection = (HttpURLConnection) compilator.openConnection(); - - connection.setRequestMethod("POST"); - connection.setDoOutput(true); + HttpURLConnection connection = null; + try{ + URL compilator = new URL("http://localhost:6999"); + connection = (HttpURLConnection) compilator.openConnection(); + connection.setRequestMethod("POST"); + connection.setDoOutput(true); + }catch (ConnectException e){ + e.printStackTrace(); + } //Send request - DataOutputStream wr = new DataOutputStream (connection.getOutputStream()); String type = StringEscapeUtils.escapeJava(ctx.queryParams("language").get(0)); String code = StringEscapeUtils.escapeJava(ctx.queryParams("code").get(0)); String vassert = StringEscapeUtils.escapeJava(ctx.queryParams("test").get(0)); - wr.writeBytes("{\"language\":\""+type+"\",\"stream\":\""+code+"\",\"assert\":\""+vassert+"\"}"); + try(DataOutputStream wr = new DataOutputStream (connection.getOutputStream())){ + wr.writeBytes("{\"language\":\""+type+"\",\"stream\":\""+code+"\",\"assert\":\""+vassert+"\"}"); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + }catch (ConnectException e){ + e.printStackTrace(); + } - wr.close(); + try(BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()))){ + String response = in.readLine(); + ctx.result(response); + } catch(IOException e){ + e.printStackTrace(); + } - BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); //String inputLine; //while ((inputLine = in.readLine()) != null) @@ -38,10 +53,10 @@ public class app { // For now, we can assume we will only need to fetch one response since the compilation // server does send one json object with all the required data. - String response = in.readLine(); - ctx.result(response); - in.close(); + + + }); } diff --git a/tests/serveur_compilation/server_rest/target/classes/app.class b/tests/serveur_compilation/server_rest/target/classes/app.class index 776ea7c957bad8508fffbceb8541fe9774c7aa7e..42f739678407485c85fb4bae067343b87f49dc1f 100644 Binary files a/tests/serveur_compilation/server_rest/target/classes/app.class and b/tests/serveur_compilation/server_rest/target/classes/app.class differ diff --git a/tests/serveur_compilation/serveur_compilation/.idea/uiDesigner.xml b/tests/serveur_compilation/serveur_compilation/.idea/uiDesigner.xml new file mode 100644 index 0000000000000000000000000000000000000000..e96534fb27b68192f27f985d3879e173ec77adb8 --- /dev/null +++ b/tests/serveur_compilation/serveur_compilation/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Palette2"> + <group name="Swing"> + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> + </item> + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> + <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> + <initial-values> + <property name="text" value="Button" /> + </initial-values> + </item> + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="RadioButton" /> + </initial-values> + </item> + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="CheckBox" /> + </initial-values> + </item> + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="Label" /> + </initial-values> + </item> + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> + <preferred-size width="-1" height="20" /> + </default-constraints> + </item> + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> + </item> + </group> + </component> +</project> \ No newline at end of file diff --git a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml index 0d1cdeccd32fd7bad76eb3302b0967c1ee6efc2a..5c2cc0663cfb169a1825ce71b94fc137dd74b2f5 100644 --- a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml +++ b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml @@ -2,19 +2,19 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="8d8fb2c1-8426-4933-8193-ee68625cf8de" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package.json" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/src/main/java/HostCompilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/ace-assert/ace-assert.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace-assert/ace-assert.component.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../server_rest/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/src/main/java/app.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../server_rest/target/classes/app.class" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/target/classes/app.class" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/docker/dockerfile" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/share_docker_file/test.txt" beforeDir="false" /> - <change beforePath="$PROJECT_DIR$/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/compilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/share_docker_file/Main.class" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/share_docker_file/kata.class" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main/java/app.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/app.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/DockerCompilation.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/target/classes/compilation.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/compilation.class" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> @@ -40,10 +40,10 @@ </entry> </file> <file pinned="false" current-in-tab="true"> - <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/DockerCompilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="315"> - <caret line="21" column="179" selection-start-line="21" selection-start-column="179" selection-end-line="21" selection-end-column="287" /> + <state relative-caret-position="225"> + <caret line="15" column="53" lean-forward="true" selection-start-line="15" selection-start-column="53" selection-end-line="15" selection-end-column="53" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -54,14 +54,30 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="165"> - <caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" /> + <state relative-caret-position="105"> + <caret line="8" column="19" lean-forward="true" selection-start-line="8" selection-start-column="19" selection-end-line="8" selection-end-column="19" /> + </state> + </provider> + </entry> + </file> + <file pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/main/java/HostCompilation.java"> + <provider selected="true" editor-type-id="text-editor"> + <state> + <caret column="28" selection-start-column="28" selection-end-column="28" /> </state> </provider> </entry> </file> </leaf> </component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="Class" /> + </list> + </option> + </component> <component name="Git.Settings"> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../../.." /> </component> @@ -71,6 +87,7 @@ <option value="$PROJECT_DIR$/pom.xml" /> <option value="$PROJECT_DIR$/share_docker_file/Main.java" /> <option value="$PROJECT_DIR$/src/main/java/compilation.java" /> + <option value="$PROJECT_DIR$/src/main/java/Docker_compilation.java" /> </list> </option> </component> @@ -82,10 +99,9 @@ </option> </component> <component name="ProjectFrameBounds" fullScreen="true"> - <option name="x" value="180" /> - <option name="y" value="112" /> - <option name="width" value="1080" /> - <option name="height" value="676" /> + <option name="x" value="1920" /> + <option name="width" value="1920" /> + <option name="height" value="1200" /> </component> <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectView"> @@ -93,8 +109,6 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> - <pane id="PackagesPane" /> - <pane id="Scope" /> <pane id="ProjectPane"> <subPane> <expand> @@ -107,15 +121,41 @@ <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> <item name="docker" type="462c0819:PsiDirectoryNode" /> </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="docker" type="462c0819:PsiDirectoryNode" /> + <item name="java" type="462c0819:PsiDirectoryNode" /> + </path> <path> <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> <item name="share_docker_file" type="462c0819:PsiDirectoryNode" /> </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + <item name="main" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + <item name="main" type="462c0819:PsiDirectoryNode" /> + <item name="java" type="462c0819:PsiDirectoryNode" /> + </path> </expand> <select /> </subPane> </pane> + <pane id="Scope" /> + <pane id="PackagesPane" /> </panes> </component> <component name="PropertiesComponent"> @@ -193,11 +233,12 @@ <workItem from="1556827413018" duration="173000" /> <workItem from="1556827741611" duration="619000" /> <workItem from="1556829689470" duration="1450000" /> + <workItem from="1556864756289" duration="5129000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="9235000" /> + <option name="totallyTimeSpent" value="14364000" /> </component> <component name="TodoView"> <todo-panel id="selected-file"> @@ -209,10 +250,10 @@ </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="0" y="0" width="1440" height="900" extended-state="0" /> + <frame x="1920" y="0" width="1920" height="1200" extended-state="0" /> <editor active="true" /> <layout> - <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26824033" /> + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27103302" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Image Layers" order="2" /> <window_info id="Designer" order="3" /> @@ -221,8 +262,8 @@ <window_info id="Favorites" order="6" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Find" order="1" weight="0.32891566" /> - <window_info anchor="bottom" id="Run" order="2" weight="0.32891566" /> - <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> + <window_info anchor="bottom" id="Run" order="2" weight="0.3283186" /> + <window_info anchor="bottom" id="Debug" order="3" visible="true" weight="0.4" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> <window_info anchor="bottom" id="TODO" order="6" weight="0.32891566" /> @@ -246,20 +287,9 @@ <component name="TypeScriptGeneratedFilesManager"> <option name="version" value="1" /> </component> - <component name="XDebuggerManager"> - <breakpoint-manager> - <breakpoints> - <line-breakpoint enabled="true" type="java-line"> - <url>file://$PROJECT_DIR$/src/main/java/compilation.java</url> - <line>47</line> - <properties /> - <option name="timeStamp" value="1" /> - </line-breakpoint> - </breakpoints> - </breakpoint-manager> - </component> <component name="editorHistoryManager"> <entry file="file://$PROJECT_DIR$/share_docker_file/test.txt" /> + <entry file="file://$PROJECT_DIR$/share_docker_file/Main.java" /> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="705"> @@ -267,24 +297,24 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/HostCompilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="165"> - <caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" /> + <state> + <caret column="28" selection-start-column="28" selection-end-column="28" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/share_docker_file/Main.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="75"> - <caret line="5" column="48" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" /> + <state relative-caret-position="105"> + <caret line="8" column="19" lean-forward="true" selection-start-line="8" selection-start-column="19" selection-end-line="8" selection-end-column="19" /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> + <entry file="file://$PROJECT_DIR$/src/main/java/DockerCompilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="315"> - <caret line="21" column="179" selection-start-line="21" selection-start-column="179" selection-end-line="21" selection-end-column="287" /> + <state relative-caret-position="225"> + <caret line="15" column="53" lean-forward="true" selection-start-line="15" selection-start-column="53" selection-end-line="15" selection-end-column="53" /> <folding> <element signature="imports" expanded="true" /> </folding> diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class b/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class deleted file mode 100644 index 9d35e3f215771b81d68aa746f1598c6380db061d..0000000000000000000000000000000000000000 Binary files a/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class and /dev/null differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc b/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c307a156cefae4a96b140b2be5cbfa9a640c3a5c Binary files /dev/null and b/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class b/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class deleted file mode 100644 index 4f88cc83b4794d26f2a1d98c67e2a59a1e1e4a43..0000000000000000000000000000000000000000 Binary files a/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class and /dev/null differ diff --git a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java b/tests/serveur_compilation/serveur_compilation/src/main/java/DockerCompilation.java similarity index 95% rename from tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java rename to tests/serveur_compilation/serveur_compilation/src/main/java/DockerCompilation.java index 6706bfe8a346197afb6824214fa436eedca48779..f989ccdc37a3b47a9bbbffe091b2da01ff97f0f6 100644 --- a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java +++ b/tests/serveur_compilation/serveur_compilation/src/main/java/DockerCompilation.java @@ -3,7 +3,7 @@ import org.json.JSONObject; import java.io.*; import java.util.HashMap; -public class compilation { +public class DockerCompilation { public HashMap<String, Object> execute_kata(JSONObject input) { @@ -93,9 +93,9 @@ public class compilation { switch (input.get("language").toString()){ case "java": - file = new File("Main.class"); + file = new File("share_docker_file/Main.class"); file.delete(); - file = new File("kata.class"); + file = new File("share_docker_file/kata.class"); file.delete(); break; } diff --git a/tests/serveur_compilation/serveur_compilation/src/main/java/HostCompilation.java b/tests/serveur_compilation/serveur_compilation/src/main/java/HostCompilation.java new file mode 100644 index 0000000000000000000000000000000000000000..a6828f13fd5037e9ec58fd926d65dc520b3c7240 --- /dev/null +++ b/tests/serveur_compilation/serveur_compilation/src/main/java/HostCompilation.java @@ -0,0 +1,2 @@ +public class HostCompilation { +} diff --git a/tests/serveur_compilation/serveur_compilation/src/main/java/app.java b/tests/serveur_compilation/serveur_compilation/src/main/java/app.java index 3f62482815c7e71089053f471fbefe71940e6ed4..a7edb7976cce62a80a7e63cf493b85d28432dd83 100644 --- a/tests/serveur_compilation/serveur_compilation/src/main/java/app.java +++ b/tests/serveur_compilation/serveur_compilation/src/main/java/app.java @@ -7,7 +7,7 @@ public class app { Javalin app = Javalin.create().enableCorsForAllOrigins().start(6999); app.post("/", ctx -> { - compilation cpl = new compilation(); + DockerCompilation cpl = new DockerCompilation(); ctx.json(cpl.execute_kata(new JSONObject(ctx.body()))); }); } diff --git a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class index fb47885edf724fb107321d56c42e0a163ac90b5c..9cf5bafaff5fc88a86383db099a79eb571221bfe 100644 Binary files a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class and b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class differ