diff --git a/analyseWriter.jar b/analyseWriter.jar index 0c31fd2..a6980bd 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/.gitignore b/bin/.gitignore index c4a86de..1f05cf0 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,7 +1,6 @@ +/MEPTL/ +/calcul/ +/evaluer/ /fenetres/ /list/ -/MEPTL/ -/evaluer/ -/evaluer.png -/evaluer.svg -/evaluermini.png +/resources/ diff --git a/bin/MEPTL/ecritureSujet.class b/bin/MEPTL/ecritureSujet.class index a816281..c520e94 100644 Binary files a/bin/MEPTL/ecritureSujet.class and b/bin/MEPTL/ecritureSujet.class differ diff --git a/bin/MEPTL/meptl.class b/bin/MEPTL/meptl.class index b1784e0..ef5f8ca 100644 Binary files a/bin/MEPTL/meptl.class and b/bin/MEPTL/meptl.class differ diff --git a/bin/MEPTL/rechercherUnNodeStudent.class b/bin/MEPTL/rechercherUnNodeStudent.class index ae6d772..7a10a5a 100644 Binary files a/bin/MEPTL/rechercherUnNodeStudent.class and b/bin/MEPTL/rechercherUnNodeStudent.class differ diff --git a/bin/calcul/calculNombrePointEvaluation.class b/bin/calcul/calculNombrePointEvaluation.class index 1561dd8..0d47c70 100644 Binary files a/bin/calcul/calculNombrePointEvaluation.class and b/bin/calcul/calculNombrePointEvaluation.class differ diff --git a/bin/evaluer.png b/bin/evaluer.png new file mode 100644 index 0000000..e06ad32 Binary files /dev/null and b/bin/evaluer.png differ diff --git a/bin/evaluer.svg b/bin/evaluer.svg new file mode 100644 index 0000000..195f890 --- /dev/null +++ b/bin/evaluer.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + diff --git a/bin/evaluer/analyseLesNodesPrincipaux.class b/bin/evaluer/analyseLesNodesPrincipaux.class index 16b9b75..c7d1aa7 100644 Binary files a/bin/evaluer/analyseLesNodesPrincipaux.class and b/bin/evaluer/analyseLesNodesPrincipaux.class differ diff --git a/bin/evaluer/evaluationAttribut.class b/bin/evaluer/evaluationAttribut.class index 008255f..c4f99fe 100644 Binary files a/bin/evaluer/evaluationAttribut.class and b/bin/evaluer/evaluationAttribut.class differ diff --git a/bin/evaluermini.png b/bin/evaluermini.png new file mode 100644 index 0000000..59d6087 Binary files /dev/null and b/bin/evaluermini.png differ diff --git a/bin/fenetres/afficheText.class b/bin/fenetres/afficheText.class index 219458d..1eb9421 100644 Binary files a/bin/fenetres/afficheText.class and b/bin/fenetres/afficheText.class differ diff --git a/bin/fenetres/create$1.class b/bin/fenetres/create$1.class index a6c4bae..897d63b 100644 Binary files a/bin/fenetres/create$1.class and b/bin/fenetres/create$1.class differ diff --git a/bin/fenetres/create$2.class b/bin/fenetres/create$2.class index 1fe52a8..ca62773 100644 Binary files a/bin/fenetres/create$2.class and b/bin/fenetres/create$2.class differ diff --git a/bin/fenetres/create$3.class b/bin/fenetres/create$3.class index fd003f9..6a6a51f 100644 Binary files a/bin/fenetres/create$3.class and b/bin/fenetres/create$3.class differ diff --git a/bin/fenetres/create.class b/bin/fenetres/create.class index 35811b5..97f2dd8 100644 Binary files a/bin/fenetres/create.class and b/bin/fenetres/create.class differ diff --git a/bin/fenetres/createPopupMenu.class b/bin/fenetres/createPopupMenu.class index c092809..a5f34b8 100644 Binary files a/bin/fenetres/createPopupMenu.class and b/bin/fenetres/createPopupMenu.class differ diff --git a/bin/fenetres/create_act/actEvalNameNodeNon.class b/bin/fenetres/create_act/actEvalNameNodeNon.class index cf8a46e..3f5a523 100644 Binary files a/bin/fenetres/create_act/actEvalNameNodeNon.class and b/bin/fenetres/create_act/actEvalNameNodeNon.class differ diff --git a/bin/fenetres/create_act/actEvalNameNodeOui.class b/bin/fenetres/create_act/actEvalNameNodeOui.class index cbe5b0b..a485f32 100644 Binary files a/bin/fenetres/create_act/actEvalNameNodeOui.class and b/bin/fenetres/create_act/actEvalNameNodeOui.class differ diff --git a/bin/fenetres/evaluerLesFichiersEtudiants.class b/bin/fenetres/evaluerLesFichiersEtudiants.class index df19371..623b5c2 100644 Binary files a/bin/fenetres/evaluerLesFichiersEtudiants.class and b/bin/fenetres/evaluerLesFichiersEtudiants.class differ diff --git a/bin/list/listeAttributsAnalyseWriter.class b/bin/list/listeAttributsAnalyseWriter.class index 08121cd..8b1645b 100644 Binary files a/bin/list/listeAttributsAnalyseWriter.class and b/bin/list/listeAttributsAnalyseWriter.class differ diff --git a/icons/heritagestyle.png b/icons/heritagestyle.png new file mode 100644 index 0000000..18eca3c Binary files /dev/null and b/icons/heritagestyle.png differ diff --git a/icons/heritagestyle.svg b/icons/heritagestyle.svg new file mode 100644 index 0000000..bede975 --- /dev/null +++ b/icons/heritagestyle.svg @@ -0,0 +1,105 @@ + + + +S diff --git a/icons/heritagestylemini.png b/icons/heritagestylemini.png new file mode 100644 index 0000000..1e858de Binary files /dev/null and b/icons/heritagestylemini.png differ diff --git a/icons/heritagestyletouslesnodes.png b/icons/heritagestyletouslesnodes.png new file mode 100644 index 0000000..c160716 Binary files /dev/null and b/icons/heritagestyletouslesnodes.png differ diff --git a/icons/heritagestyletouslesnodes.svg b/icons/heritagestyletouslesnodes.svg new file mode 100644 index 0000000..d2acd20 --- /dev/null +++ b/icons/heritagestyletouslesnodes.svg @@ -0,0 +1,127 @@ + + + +SSS diff --git a/icons/heritagestyletouslesnodesmini.png b/icons/heritagestyletouslesnodesmini.png new file mode 100644 index 0000000..dd5bba2 Binary files /dev/null and b/icons/heritagestyletouslesnodesmini.png differ diff --git a/src/MEPTL/ecritureSujet.java b/src/MEPTL/ecritureSujet.java index 2c4b7f3..c295434 100644 --- a/src/MEPTL/ecritureSujet.java +++ b/src/MEPTL/ecritureSujet.java @@ -308,7 +308,7 @@ public class ecritureSujet { if(listeDesNodesSautEtTitre(no.get(k).getNomElt())) {no.get(k).getAttributs().put("saut", "false"); no.get(k).getAttributs().put("titre", "");} if(listeDesNodesRechercheByContenu.isRechercheByContenu(no.get(k))) {no.get(k).getAttributs().put("recherche_index", "false"); no.get(k).getAttributs().put("recherche_contenu_exact", "false");no.get(k).getAttributs().put("recherche_contenu_plus_proche_voisin", "false");no.get(k).getAttributs().put("allContent", "strict0");} if(listeDesNodesEvalPlacement.isPlacement(no.get(k)))no.get(k).getAttributs().put("evalPlacement", "0"); - if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) no.get(k).getAttributs().put("analyseStyle", "false"); + if(listeDesNodesAnalyseStyle.isAnalyseStyle(no.get(k))) {no.get(k).getAttributs().put("analyseStyle", "false");no.get(k).getAttributs().put("evalNameLegacyStyle", "0");} if(listeRechercheParAnchorPageNumber.isRechercheParAnchorPageNumber(no.get(k))) no.get(k).getAttributs().put("recherche_anchor-page-number", "false"); if(!no.get(k).getNodes().isEmpty()) { diff --git a/src/MEPTL/meptl.java b/src/MEPTL/meptl.java index 9df26a2..fcc6f05 100644 --- a/src/MEPTL/meptl.java +++ b/src/MEPTL/meptl.java @@ -1177,6 +1177,7 @@ public class meptl { fichier.getNodes().add(nodhistorique); fichier = attributLesParentsAuxNodes(fichier); + fichier.setParent(null); return fichier; } @@ -1189,7 +1190,8 @@ public class meptl { */ public static node attributLesParentsAuxNodes(node nod){ for(int i = 0 ; i0) nodStudent = nodStudentTableI.getNodes().get(0); + //********************************************* //** analyse les attributs des nodes ** //********************************************* diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java index 08c36fa..94fa525 100644 --- a/src/evaluer/evaluationAttribut.java +++ b/src/evaluer/evaluationAttribut.java @@ -1,6 +1,8 @@ package evaluer; import java.util.Enumeration; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import cXML.node; import list.listeAttributsAnalyseWriter; @@ -194,6 +196,51 @@ public class evaluationAttribut { } } + if(k.equals("evalNameLegacyStyle") && !sujet.getAttributs().get(k).equals("0")) { + String nameLegacyStyleSujet = sujet.getAttributs().get("text:style-name"); + String point = sujet.getAttributs().get(k); + + Pattern p = Pattern.compile("^P[0-9]{1,}|^T[0-9]{1,}|^L[0-9]{1,}"); + + if(nameLegacyStyleSujet!=null) { + Matcher m = p.matcher(nameLegacyStyleSujet); + if(m.find()) { + node fichier = sujet.racineDuNode(); + node styleParagraphs = fichier.retourneFirstEnfantsByName("style:paragraph").retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nameLegacyStyleSujet); + if(styleParagraphs!=null) { + if(styleParagraphs.getAttributs().get("style:parent-style-name")!=null) { + nameLegacyStyleSujet = styleParagraphs.getAttributs().get("style:parent-style-name"); + } + } + } + } + + String nameLegacyStyleStudent=""; + if(nodeStudent!=null) { + nameLegacyStyleStudent = nodeStudent.getAttributs().get("text:style-name"); + Matcher m = p.matcher(nameLegacyStyleStudent); + if(m.find()) { + if(nodeStudent.getAttributs().get("text:style-name")!=null) { + String nameStyle1 = nodeStudent.getAttributs().get("text:style-name"); + node fichier = nodeStudent.racineDuNode(); + node styleParagraphs = fichier.retourneFirstEnfantsByName("style:paragraph").retourneFirstNodeByNameAndAttributValueExactStrict("style:style", "style:name", nameStyle1); + if(styleParagraphs!=null) { + if(styleParagraphs.getAttributs().get("style:parent-style-name")!=null) { + nameLegacyStyleStudent = styleParagraphs.getAttributs().get("style:parent-style-name"); + } + } + } + } + } + + if(nodeStudent!=null) { + retour = evaluNameLegacyStyle(retour,nodeStudent, sujet.getNomElt(), point, nameElt, nameLegacyStyleStudent, nameLegacyStyleSujet) ; + }else { + retour = evaluNameLegacyStyle(retour,null, sujet.getNomElt(), point, nameElt, nameLegacyStyleStudent, nameLegacyStyleSujet) ; + } + + } + if(k.equals("evalNameCreator") && sujet.getNomElt().equals("dc:creator")) { if(nodeStudent!=null) { retour = evaluNameCreator(retour,nodeStudent, nodeStudent.getContenu().get(0), sujet.getAttributs().get("evalNameCreator"),"Editeur"); @@ -427,6 +474,33 @@ public class evaluationAttribut { return retour; } + /** + * Evaluation du nom du style hérité.
+ *
+ * @param retour : node retour pour le node d'analyse ana:xxx + * @param nodStudent : node Student + * @param nameNode : nom du node + * @param point : point mise en jeu. + * @param nameElt : nom de l'élément pour le feedback (attribut) + * @param nameStyleLegacyStudent : Contenu textuel (le nom dy style hérité de l'étudiant) + * @param nameStyleLegacySujet : Contenu textuel (le nom dy style hérité du sujet) + * @return + */ + private static node evaluNameLegacyStyle(node retour,node nodStudent, String nameNode, String point, String nameElt, String nameStyleLegacyStudent, String nameStyleLegacySujet) { + node item = null; + if(nodStudent!=null) { + item = retourneNoteAvecResultatsAnalyse(nameNode,"style hérité", nameStyleLegacyStudent, nameStyleLegacySujet + "‽" + point, nameElt); + }else { + evaluation.IncrementPointTotal(Integer.valueOf(point)); + item = new node(nameNode, "Erreur : -"+evaluation.getPointEnJeu()+" pt", "style hérité" , "null", nameStyleLegacySujet, 2, evaluation.getPointEnJeu(),nameElt); + } + retour.getNodes().add(item); + return retour; + } + + + + /** * Si le node style:header-style ne possède pas d'attribut alors l'entete n'est pas activé.
* Le nombre d'attribut est null. diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java index 5327dcd..5ddaaad 100644 --- a/src/fenetres/afficheText.java +++ b/src/fenetres/afficheText.java @@ -61,6 +61,7 @@ public class afficheText extends JEditorPane { String imageOU= ""; String imageEvalPlacement= ""; String imageMarqueNode= ""; + String imageEvalNameLegacyStyle= ""; StringBuilder sb = new StringBuilder(); @@ -214,7 +215,9 @@ public class afficheText extends JEditorPane { if(Lesattributsdunode.get(i).equals("evalPlacement") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { sb.append("
  • "+imageEvalPlacement+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } - + if(Lesattributsdunode.get(i).equals("evalNameLegacyStyle") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) { + sb.append("
  • "+imageEvalNameLegacyStyle+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); + } // sb.append("
  • " + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"
  • "); } @@ -375,13 +378,9 @@ public class afficheText extends JEditorPane { * Affiche le chargement du fichier d'analyse.
    */ public void afficheChargementFichierAnalyse(){ - - System.out.println( "Affichage information du fichier d'analyse" ); - String v = commandes.analyse_version; if(v.isEmpty()) v = commandes.version; - StringBuilder text = new StringBuilder(); text.append(baliseStyle.balise()); text.append("

    INFORMATIONS

    Fichier d'analyse créé avec la version : " + v+ "



    "); diff --git a/src/fenetres/create.java b/src/fenetres/create.java index bbbd39a..f0f4fd8 100644 --- a/src/fenetres/create.java +++ b/src/fenetres/create.java @@ -435,6 +435,10 @@ public final class create extends JFrame { toolBarPrincipal.addSeparator(); JButton btnTotalPoint = new JButton(new actTotalPoint()); + btnTotalPoint.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + } + }); btnTotalPoint.setToolTipText("Nombre de point total dans l'exercice."); btnTotalPoint.setText(""); btnTotalPoint.setIcon(new ImageIcon(create.class.getResource("/resources/totalpoint.png"))); diff --git a/src/fenetres/createPopupMenu.java b/src/fenetres/createPopupMenu.java index 5902bc0..8d15c15 100644 --- a/src/fenetres/createPopupMenu.java +++ b/src/fenetres/createPopupMenu.java @@ -41,6 +41,10 @@ import fenetres.create_act.actEvalTextUserDefinedNon; import fenetres.create_act.actEvalTextUserDefinedOui; import fenetres.create_act.actEvalueFalse; import fenetres.create_act.actEvalueTrue; +import fenetres.create_act.actEvaluerNomDuStyleHeriteFalse; +import fenetres.create_act.actEvaluerNomDuStyleHeriteTousLesNodesFalse; +import fenetres.create_act.actEvaluerNomDuStyleHeriteTousLesNodesTrue; +import fenetres.create_act.actEvaluerNomDuStyleHeriteTrue; import fenetres.create_act.actEvaluerStyleFalse; import fenetres.create_act.actEvaluerStyleTrue; import fenetres.create_act.actEvaluerTousLesStylesParagraphesFalse; @@ -316,7 +320,7 @@ if(nod!=null) { * @return */ private JMenu mnAnalyseStyle() { - JMenu mnAnalyseStyle = new JMenu("Evaluer le style"); + JMenu mnAnalyseStyle = new JMenu("Evaluer le style appliqué"); mnAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/evaluerstylemini.png"))); mnAnalyseStyle.add(new actEvaluerStyleTrue()); mnAnalyseStyle.add( new actEvaluerStyleFalse()); @@ -551,6 +555,33 @@ if(nod!=null) { return mnMarqueNode; } + /** + * Menu pour évaluer le nom du style hérité.
    + * Permet d'évaluer les formatages directs sans utiliser analyseStyle.
    + * @return + */ + private JMenu mnEvalNameLegacyStyle() { + JMenu mnevalNameLegacyStyle = new JMenu("Evaluer le nom du style hérité"); + mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestylemini.png"))); + mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTrue()); + mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteFalse()); + return mnevalNameLegacyStyle; + } + + /** + * Menu pour évaluer le nom du style hérité de tous les nodes text:p, text:h, text:span (voir plus tard text:list).
    + * Permet d'évaluer les formatages directs sans utiliser analyseStyle.
    + * @return + */ + private JMenu mnEvalNameLegacyStyleTousLesNodes() { + JMenu mnevalNameLegacyStyle = new JMenu("Evaluer les noms de tous des styles hérités, de tous les nodes"); + mnevalNameLegacyStyle.setIcon( new ImageIcon(create.class.getResource("/resources/heritagestyletouslesnodesmini.png"))); + mnevalNameLegacyStyle.add(new actEvaluerNomDuStyleHeriteTousLesNodesTrue()); + mnevalNameLegacyStyle.add( new actEvaluerNomDuStyleHeriteTousLesNodesFalse()); + return mnevalNameLegacyStyle; + } + + /** * Menu regroupant les menus permettant de recherche un node par son contenu textuel.
    @@ -605,6 +636,8 @@ if(nod!=null) { if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod)) { mnGroupeMethodeEvaluer.addSeparator(); mnGroupeMethodeEvaluer.add(mnAnalyseStyle()); + mnGroupeMethodeEvaluer.addSeparator(); + mnGroupeMethodeEvaluer.add(mnEvalNameLegacyStyle()); } if(listeDesNodesEvalPlacement.isPlacement(nod)) { @@ -621,6 +654,8 @@ if(nod!=null) { mnGroupeMethodeEvaluer.add(mnEvalNumeroAbsoluePage()); mnGroupeMethodeEvaluer.addSeparator(); mnGroupeMethodeEvaluer.add(mnEvaluerStylesParagraphes()); + mnGroupeMethodeEvaluer.addSeparator(); + mnGroupeMethodeEvaluer.add(mnEvalNameLegacyStyleTousLesNodes()); } if(listeDesNodesPourEvaluationEntetePage.isEntete(nod)) { diff --git a/src/fenetres/create_act/actEvalNameNodeNon.java b/src/fenetres/create_act/actEvalNameNodeNon.java index 51d59ad..b8ad647 100644 --- a/src/fenetres/create_act/actEvalNameNodeNon.java +++ b/src/fenetres/create_act/actEvalNameNodeNon.java @@ -17,7 +17,7 @@ public class actEvalNameNodeNon extends AbstractAction{ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Supprime l'évaluation de la présence du node" ); - putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du node" ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence du node." ); putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) ); } @Override diff --git a/src/fenetres/create_act/actEvalNameNodeOui.java b/src/fenetres/create_act/actEvalNameNodeOui.java index b845e5c..0ccc6b0 100644 --- a/src/fenetres/create_act/actEvalNameNodeOui.java +++ b/src/fenetres/create_act/actEvalNameNodeOui.java @@ -19,7 +19,7 @@ public class actEvalNameNodeOui extends AbstractAction{ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Oui, combien de point?" ); - putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce node" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence de ce node." ); putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")) ); } @Override diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteFalse.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteFalse.java new file mode 100644 index 0000000..440cac8 --- /dev/null +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteFalse.java @@ -0,0 +1,30 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.ImageIcon; + +import cXML.node; +import fenetres.create; + +public class actEvaluerNomDuStyleHeriteFalse extends AbstractAction{ + { + putValue( Action.NAME, "Supprime l'évaluation du nom du style hérité." ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation du nom du style hérité." ); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) ); + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + nod.supprimeAttribut("evalNameLegacyStyle"); + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } + +} diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java new file mode 100644 index 0000000..41286c2 --- /dev/null +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesFalse.java @@ -0,0 +1,35 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.ImageIcon; + +import cXML.node; +import fenetres.create; +import list.listeDesNodesAnalyseStyle; + +public class actEvaluerNomDuStyleHeriteTousLesNodesFalse extends AbstractAction{ + { + putValue( Action.NAME, "Supprime l'évaluation de tous les noms des styles hérités dans tous les nodes." ); + putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation des noms des styles hérités." ); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) ); + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + for(int i = 0 ; i < nod.getNodes().size();i++) { + if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) { + nod.getNodes().get(i).supprimeAttribut("evalNameLegacyStyle"); + } + } + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } + +} diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java new file mode 100644 index 0000000..7e3f61c --- /dev/null +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTousLesNodesTrue.java @@ -0,0 +1,60 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; + +import cXML.node; +import fenetres.baliseStyle; +import fenetres.create; +import list.listeDesNodesAnalyseStyle; + +public class actEvaluerNomDuStyleHeriteTousLesNodesTrue extends AbstractAction{ + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom du style hérité. Si pas d'héritage alors évalue celui du nom de ce style.\n" + + "Interreant pour les formatages directs."); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png"))); + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + int point = 0; + + String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); + + if(!a.isEmpty()) { + try { + point = Integer.valueOf(a); + if(point<=0) { + nod.getAttributs().put("evalNameNode", String.valueOf(0)); + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalNameLegacyStyle=0.

    "); + }else { + + for(int i = 0 ; i < nod.getNodes().size(); i++) { + if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod.getNodes().get(i))) { + nod.getNodes().get(i).getAttributs().put("evalNameLegacyStyle", String.valueOf(point)); + } + } + + + } + } catch (Exception e2) { + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } + + +} diff --git a/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java new file mode 100644 index 0000000..aefed43 --- /dev/null +++ b/src/fenetres/create_act/actEvaluerNomDuStyleHeriteTrue.java @@ -0,0 +1,54 @@ +package fenetres.create_act; + +import java.awt.event.ActionEvent; + +import javax.swing.AbstractAction; +import javax.swing.Action; +import javax.swing.ImageIcon; +import javax.swing.JOptionPane; + +import cXML.node; +import fenetres.baliseStyle; +import fenetres.create; + +public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{ + { + putValue( Action.NAME, "Oui, combien de point?" ); + putValue( Action.SHORT_DESCRIPTION, "Evaluer le nom du style hérité. Si pas d'héritage alors évalue celui du nom de ce style.\n" + + "Interreant pour les formatages directs."); + putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png"))); + } + /** + * + */ + private static final long serialVersionUID = 1L; + + @Override + public void actionPerformed(ActionEvent e) { + node nod = (node) fenetres.create.getSelectNode().getUserObject(); + int point = 0; + if(nod.getAttributs().get("evalNameLegacyStyle")!=null) { + point = Integer.valueOf(nod.getAttributs().get("evalNameLegacyStyle")); + } + + String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point); + + if(!a.isEmpty()) { + try { + point = Integer.valueOf(a); + if(point<=0) { + nod.getAttributs().put("evalNameNode", String.valueOf(0)); + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
    Cependant,la valeur a été modifiée.
    evalNameLegacyStyle=0.

    "); + }else { + nod.getAttributs().put("evalNameLegacyStyle", String.valueOf(point)); + } + } catch (Exception e2) { + fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()); + fenetres.create.getTextNodeSelect().setText("

    Erreur la valeur doit être un nombre entier.
    L'attribut n'a pas été modifiée.

    "); + } + } + fenetres.create.getTextNodeSelect().refreshAffichage(nod); + } + +} diff --git a/src/fenetres/evaluerLesFichiersEtudiants.java b/src/fenetres/evaluerLesFichiersEtudiants.java index c5033c1..ba618c1 100644 --- a/src/fenetres/evaluerLesFichiersEtudiants.java +++ b/src/fenetres/evaluerLesFichiersEtudiants.java @@ -195,7 +195,6 @@ public class evaluerLesFichiersEtudiants implements Runnable{ if(!commandes.sansFeeback&&!commandes.ecritNodeAnalyse) { if(!commandes.zipfeedback) { //feedback(ana, verif); //classique directement dans le répertoire - System.out.println("feedback non zippé."); try { feedbacks.feedback(ana,verif, false,false); } catch (IOException e) { diff --git a/src/list/listeAttributsAnalyseWriter.java b/src/list/listeAttributsAnalyseWriter.java index c9d5ec0..e105755 100644 --- a/src/list/listeAttributsAnalyseWriter.java +++ b/src/list/listeAttributsAnalyseWriter.java @@ -23,6 +23,7 @@ public class listeAttributsAnalyseWriter { if(attribut.equals("marquenode")) return true; if(attribut.equals("poids")) return true; if(attribut.equals("analyseStyle")) return true; + if(attribut.equals("evalNameLegacyStyle")) return true; if(attribut.equals("allContent")) return true; if(attribut.equals("index")) return true; if(attribut.equals("recherche_index")) return true; diff --git a/src/resources/heritagestyle.png b/src/resources/heritagestyle.png new file mode 100644 index 0000000..18eca3c Binary files /dev/null and b/src/resources/heritagestyle.png differ diff --git a/src/resources/heritagestylemini.png b/src/resources/heritagestylemini.png new file mode 100644 index 0000000..1e858de Binary files /dev/null and b/src/resources/heritagestylemini.png differ diff --git a/src/resources/heritagestyletouslesnodes.png b/src/resources/heritagestyletouslesnodes.png new file mode 100644 index 0000000..c160716 Binary files /dev/null and b/src/resources/heritagestyletouslesnodes.png differ diff --git a/src/resources/heritagestyletouslesnodesmini.png b/src/resources/heritagestyletouslesnodesmini.png new file mode 100644 index 0000000..dd5bba2 Binary files /dev/null and b/src/resources/heritagestyletouslesnodesmini.png differ