diff --git a/Makefile b/Makefile index c59db41..ec18c07 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ JAVA = java JAVAC = javac JAVADOC = javadoc OPTIONSDOCS = -d docs -noqualifier all -JAVAC_OPTIONS = -d build -cp build:$$CLASSPATH -implicit:none +JAVAC_OPTIONS = -d build -Xlint:unchecked EXT = .java # CHEMINS @@ -13,26 +13,23 @@ DOCS = docs/ CORE = Main # CHEMINS RELATIF AU PROJET -EXCEPTION = ${SRCFULLPATH}/Exception -GRAPHICS = ${SRCFULLPATH}/Graphics -SETTINGS = ${SRCFULLPATH}/Settings -STORAGE = ${SRCFULLPATH}/Storage -MAIN = ${SRCFULLPATH}/Main.java +EXCEPTION = ${SRC}/Exception/*.java +STORAGE = ${SRC}/Storage/*.java +GRAPHICS = ${SRC}/Graphics/*.java +SETTINGS = ${SRC}/Settings/*.java +MAIN = ${SRC}/Main.java .PHONY: clean docs run run: - mkdir build - mkdir -p $(src)/ + make clean + mkdir build/ && mkdir docs/ + ${JAVAC} ${JAVAC_OPTIONS} ${SETTINGS} ${GRAPHICS} ${STORAGE} ${EXCEPTION} ${MAIN} + cd build && java fr.sae.JSonInspector.Main dfd && cd .. clean: - rm -rf ${BUILD} && rm -rf ${DOCS} + rm -rf build && rm -rf docs docs: rm -rf ${BUILD}* - ${JAVADOC} ${OPTIONSDOCS} ${ALL} - -# COMPILATION - -${build}/Exception/JsonSyntaxException.class : ${EXCEPTION}/JsonSyntaxException.java - ${JAVAC} ${JAVAC_OPTIONS} ${EXCEPTION}/JsonSyntaxException.java \ No newline at end of file + ${JAVADOC} ${OPTIONSDOCS} ${ALL} \ No newline at end of file diff --git a/build/fr/sae/JSonInspector/Exception/JsonSyntaxException.class b/build/fr/sae/JSonInspector/Exception/JsonSyntaxException.class new file mode 100644 index 0000000..193f951 Binary files /dev/null and b/build/fr/sae/JSonInspector/Exception/JsonSyntaxException.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/ArrayObjectListener.class b/build/fr/sae/JSonInspector/Graphics/ArrayObjectListener.class new file mode 100644 index 0000000..9f64b19 Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/ArrayObjectListener.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/Frame.class b/build/fr/sae/JSonInspector/Graphics/Frame.class new file mode 100644 index 0000000..92ddf33 Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/Frame.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/GraphicFile.class b/build/fr/sae/JSonInspector/Graphics/GraphicFile.class new file mode 100644 index 0000000..0e75b79 Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/GraphicFile.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/Line.class b/build/fr/sae/JSonInspector/Graphics/Line.class new file mode 100644 index 0000000..490d5bb Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/Line.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/MyJLabel.class b/build/fr/sae/JSonInspector/Graphics/MyJLabel.class new file mode 100644 index 0000000..c2bb386 Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/MyJLabel.class differ diff --git a/build/fr/sae/JSonInspector/Graphics/MyJPanel.class b/build/fr/sae/JSonInspector/Graphics/MyJPanel.class new file mode 100644 index 0000000..c0f1727 Binary files /dev/null and b/build/fr/sae/JSonInspector/Graphics/MyJPanel.class differ diff --git a/build/fr/sae/JSonInspector/Main.class b/build/fr/sae/JSonInspector/Main.class new file mode 100644 index 0000000..20ce6c2 Binary files /dev/null and b/build/fr/sae/JSonInspector/Main.class differ diff --git a/build/fr/sae/JSonInspector/Settings/Parameters.class b/build/fr/sae/JSonInspector/Settings/Parameters.class new file mode 100644 index 0000000..f70d776 Binary files /dev/null and b/build/fr/sae/JSonInspector/Settings/Parameters.class differ diff --git a/build/fr/sae/JSonInspector/Storage/Node.class b/build/fr/sae/JSonInspector/Storage/Node.class new file mode 100644 index 0000000..29b3981 Binary files /dev/null and b/build/fr/sae/JSonInspector/Storage/Node.class differ diff --git a/build/fr/sae/JSonInspector/Storage/Other.class b/build/fr/sae/JSonInspector/Storage/Other.class new file mode 100644 index 0000000..2345db5 Binary files /dev/null and b/build/fr/sae/JSonInspector/Storage/Other.class differ diff --git a/build/fr/sae/JSonInspector/Storage/Tree.class b/build/fr/sae/JSonInspector/Storage/Tree.class new file mode 100644 index 0000000..0ea4db4 Binary files /dev/null and b/build/fr/sae/JSonInspector/Storage/Tree.class differ diff --git a/build/fr/sae/JSonInspector/Storage/Type.class b/build/fr/sae/JSonInspector/Storage/Type.class new file mode 100644 index 0000000..10ffa47 Binary files /dev/null and b/build/fr/sae/JSonInspector/Storage/Type.class differ diff --git a/build/fr/sae/JSonInspector/Storage/Value.class b/build/fr/sae/JSonInspector/Storage/Value.class new file mode 100644 index 0000000..f46d10e Binary files /dev/null and b/build/fr/sae/JSonInspector/Storage/Value.class differ diff --git a/src/fr/sae/JSonInspector/Exception/JsonSyntaxException.java b/src/fr/sae/JSonInspector/Exception/JsonSyntaxException.java index bb4d5c1..25c79fa 100644 --- a/src/fr/sae/JSonInspector/Exception/JsonSyntaxException.java +++ b/src/fr/sae/JSonInspector/Exception/JsonSyntaxException.java @@ -4,7 +4,7 @@ package fr.sae.JSonInspector.Exception; * Exception lever lorsqu'une erreur de syntaxe est rencontrée */ public class JsonSyntaxException extends Throwable { - private static final String MESSAGE = "Syntax error in JSON file"; + private static final String MESSAGE = "[!] La syntaxe du fichier JSON est incorrect"; public JsonSyntaxException() { super(MESSAGE); diff --git a/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java b/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java index 5d55987..51cd965 100644 --- a/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java +++ b/src/fr/sae/JSonInspector/Graphics/ArrayObjectListener.java @@ -20,7 +20,7 @@ public class ArrayObjectListener implements MouseListener { /** * Change le statut d'affichage de la ligne * - * @param e the event to be processed + * @param e L'event en question */ @Override public void mouseClicked(MouseEvent e) { diff --git a/src/fr/sae/JSonInspector/Graphics/Frame.java b/src/fr/sae/JSonInspector/Graphics/Frame.java index ec97a6e..2dadd5b 100644 --- a/src/fr/sae/JSonInspector/Graphics/Frame.java +++ b/src/fr/sae/JSonInspector/Graphics/Frame.java @@ -21,7 +21,7 @@ public class Frame extends JFrame { private Tree tree; public Frame() { - super("Inspecteur JSON"); + super("Inspecteur JSON - Romain Besson & Bilal Boudjemline"); init(); this.setVisible(true); } @@ -182,13 +182,14 @@ public class Frame extends JFrame { cards.last(this.getContentPane()); } catch (MalformedURLException e) { - JOptionPane.showMessageDialog(this, "URL invalide", "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "[!] URL invalide", "Error", JOptionPane.ERROR_MESSAGE); } catch (JsonSyntaxException j) { - JOptionPane.showMessageDialog(this, "Erreur de syntax dans le fichier", "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "[!] Erreur de syntax dans le fichier", "Error", + JOptionPane.ERROR_MESSAGE); } catch (FileNotFoundException f) { - JOptionPane.showMessageDialog(this, "Impossible trouver le fichier", "Error", JOptionPane.ERROR_MESSAGE); + JOptionPane.showMessageDialog(this, "[!]Impossible trouver le fichier", "Error", JOptionPane.ERROR_MESSAGE); } } diff --git a/src/fr/sae/JSonInspector/Main.java b/src/fr/sae/JSonInspector/Main.java index 8b41e43..2685a70 100644 --- a/src/fr/sae/JSonInspector/Main.java +++ b/src/fr/sae/JSonInspector/Main.java @@ -18,11 +18,11 @@ public class Main { System.out.println(new Tree(file)); } catch (MalformedURLException e) { - System.err.println("Invalid URL"); + System.err.println("[!] Chemin du fichier invalide"); System.exit(1); } catch (JsonSyntaxException j) { - System.err.println("Invalid syntax in file"); + System.err.println("[!] Syntaxe du fichier invalide"); System.exit(1); } }