$
This commit is contained in:
parent
5d7acefae2
commit
b7d56f4480
25
Makefile
25
Makefile
@ -3,7 +3,7 @@ JAVA = java
|
|||||||
JAVAC = javac
|
JAVAC = javac
|
||||||
JAVADOC = javadoc
|
JAVADOC = javadoc
|
||||||
OPTIONSDOCS = -d docs -noqualifier all
|
OPTIONSDOCS = -d docs -noqualifier all
|
||||||
JAVAC_OPTIONS = -d build -cp build:$$CLASSPATH -implicit:none
|
JAVAC_OPTIONS = -d build -Xlint:unchecked
|
||||||
EXT = .java
|
EXT = .java
|
||||||
|
|
||||||
# CHEMINS
|
# CHEMINS
|
||||||
@ -13,26 +13,23 @@ DOCS = docs/
|
|||||||
CORE = Main
|
CORE = Main
|
||||||
|
|
||||||
# CHEMINS RELATIF AU PROJET
|
# CHEMINS RELATIF AU PROJET
|
||||||
EXCEPTION = ${SRCFULLPATH}/Exception
|
EXCEPTION = ${SRC}/Exception/*.java
|
||||||
GRAPHICS = ${SRCFULLPATH}/Graphics
|
STORAGE = ${SRC}/Storage/*.java
|
||||||
SETTINGS = ${SRCFULLPATH}/Settings
|
GRAPHICS = ${SRC}/Graphics/*.java
|
||||||
STORAGE = ${SRCFULLPATH}/Storage
|
SETTINGS = ${SRC}/Settings/*.java
|
||||||
MAIN = ${SRCFULLPATH}/Main.java
|
MAIN = ${SRC}/Main.java
|
||||||
|
|
||||||
.PHONY: clean docs run
|
.PHONY: clean docs run
|
||||||
|
|
||||||
run:
|
run:
|
||||||
mkdir build
|
make clean
|
||||||
mkdir -p $(src)/
|
mkdir build/ && mkdir docs/
|
||||||
|
${JAVAC} ${JAVAC_OPTIONS} ${SETTINGS} ${GRAPHICS} ${STORAGE} ${EXCEPTION} ${MAIN}
|
||||||
|
cd build && java fr.sae.JSonInspector.Main dfd && cd ..
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf ${BUILD} && rm -rf ${DOCS}
|
rm -rf build && rm -rf docs
|
||||||
|
|
||||||
docs:
|
docs:
|
||||||
rm -rf ${BUILD}*
|
rm -rf ${BUILD}*
|
||||||
${JAVADOC} ${OPTIONSDOCS} ${ALL}
|
${JAVADOC} ${OPTIONSDOCS} ${ALL}
|
||||||
|
|
||||||
# COMPILATION
|
|
||||||
|
|
||||||
${build}/Exception/JsonSyntaxException.class : ${EXCEPTION}/JsonSyntaxException.java
|
|
||||||
${JAVAC} ${JAVAC_OPTIONS} ${EXCEPTION}/JsonSyntaxException.java
|
|
BIN
build/fr/sae/JSonInspector/Exception/JsonSyntaxException.class
Normal file
BIN
build/fr/sae/JSonInspector/Exception/JsonSyntaxException.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/ArrayObjectListener.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/ArrayObjectListener.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/Frame.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/Frame.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/GraphicFile.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/GraphicFile.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/Line.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/Line.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/MyJLabel.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/MyJLabel.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Graphics/MyJPanel.class
Normal file
BIN
build/fr/sae/JSonInspector/Graphics/MyJPanel.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Main.class
Normal file
BIN
build/fr/sae/JSonInspector/Main.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Settings/Parameters.class
Normal file
BIN
build/fr/sae/JSonInspector/Settings/Parameters.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Storage/Node.class
Normal file
BIN
build/fr/sae/JSonInspector/Storage/Node.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Storage/Other.class
Normal file
BIN
build/fr/sae/JSonInspector/Storage/Other.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Storage/Tree.class
Normal file
BIN
build/fr/sae/JSonInspector/Storage/Tree.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Storage/Type.class
Normal file
BIN
build/fr/sae/JSonInspector/Storage/Type.class
Normal file
Binary file not shown.
BIN
build/fr/sae/JSonInspector/Storage/Value.class
Normal file
BIN
build/fr/sae/JSonInspector/Storage/Value.class
Normal file
Binary file not shown.
@ -4,7 +4,7 @@ package fr.sae.JSonInspector.Exception;
|
|||||||
* Exception lever lorsqu'une erreur de syntaxe est rencontrée
|
* Exception lever lorsqu'une erreur de syntaxe est rencontrée
|
||||||
*/
|
*/
|
||||||
public class JsonSyntaxException extends Throwable {
|
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() {
|
public JsonSyntaxException() {
|
||||||
super(MESSAGE);
|
super(MESSAGE);
|
||||||
|
@ -20,7 +20,7 @@ public class ArrayObjectListener implements MouseListener {
|
|||||||
/**
|
/**
|
||||||
* Change le statut d'affichage de la ligne
|
* Change le statut d'affichage de la ligne
|
||||||
*
|
*
|
||||||
* @param e the event to be processed
|
* @param e L'event en question
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
|
@ -21,7 +21,7 @@ public class Frame extends JFrame {
|
|||||||
private Tree tree;
|
private Tree tree;
|
||||||
|
|
||||||
public Frame() {
|
public Frame() {
|
||||||
super("Inspecteur JSON");
|
super("Inspecteur JSON - Romain Besson & Bilal Boudjemline");
|
||||||
init();
|
init();
|
||||||
this.setVisible(true);
|
this.setVisible(true);
|
||||||
}
|
}
|
||||||
@ -182,13 +182,14 @@ public class Frame extends JFrame {
|
|||||||
cards.last(this.getContentPane());
|
cards.last(this.getContentPane());
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
JOptionPane.showMessageDialog(this, "URL invalide", "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, "[!] URL invalide", "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
|
||||||
} catch (JsonSyntaxException j) {
|
} 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) {
|
} 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,11 +18,11 @@ public class Main {
|
|||||||
System.out.println(new Tree(file));
|
System.out.println(new Tree(file));
|
||||||
|
|
||||||
} catch (MalformedURLException e) {
|
} catch (MalformedURLException e) {
|
||||||
System.err.println("Invalid URL");
|
System.err.println("[!] Chemin du fichier invalide");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
|
|
||||||
} catch (JsonSyntaxException j) {
|
} catch (JsonSyntaxException j) {
|
||||||
System.err.println("Invalid syntax in file");
|
System.err.println("[!] Syntaxe du fichier invalide");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user