MAJ V4.2.2

Modification des méthodes actInsereInformationTrue et
actInsereInformationMultipleTrue pour insérer que des informations aux
nodes de la listeDesNodesInfos (text:p, text:h, text:list, text:span)
This commit is contained in:
pablo rodriguez 2023-01-26 11:23:38 +01:00
parent 1d928f5a8c
commit 341168657d
14 changed files with 193 additions and 18 deletions

View File

@ -12,6 +12,6 @@
<classpathentry kind="lib" path="C:/Users/pabr6/git/analyseWriter/MEPTL/miglayout15-swing.jar"/>
<classpathentry kind="lib" path="jgoodies-forms-1.8.0.jar" sourcepath="jgoodies-forms-1.8.0-sources.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/Exportation documentation analyseWriter/plugins/documentation.analyseWriter_1.0.0.202212032022.jar"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar" sourcepath="/cXML"/>
<classpathentry kind="lib" path="C:/Users/pabr6/eclipse-workspace/cXML.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Binary file not shown.

Binary file not shown.

6
bin/.gitignore vendored
View File

@ -1,8 +1,2 @@
/MEPTL/
/fenetres/
/list/
/resources/
/menuEvalTousParagraphe.png
/menuEvalTousParagraphe.svg
/menuEvalTousParagraphemini.png
/evaluer/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="45"
height="45"
viewBox="0 0 11.90625 11.90625"
version="1.1"
id="svg5"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="menuEvalTousParagraphe.svg"
inkscape:export-filename="menuEvalTousParagraphemini.png"
inkscape:export-xdpi="51.200001"
inkscape:export-ydpi="51.200001"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="11.675119"
inkscape:cx="31.734152"
inkscape:cy="20.428057"
inkscape:window-width="1920"
inkscape:window-height="1009"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g542" />
<defs
id="defs2" />
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g350"
transform="translate(-0.04532431,0.11331077)">
<g
id="g542"
transform="translate(-0.31727014,0.47590521)">
<g
id="g602"
transform="translate(3.5352959,-0.92914823)">
<rect
style="fill:#f2f2f2;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
id="rect586"
width="7.0821118"
height="10.702716"
x="0.61310935"
y="0.51447743" />
<g
id="g600"
transform="translate(-0.02266215,-0.06798646)">
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="3.4024146"
id="text590"><tspan
sodipodi:role="line"
id="tspan588"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="3.4024146">¶</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="6.8697238"
id="text594"><tspan
sodipodi:role="line"
id="tspan592"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="6.8697238">¶</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="10.337033"
id="text598"><tspan
sodipodi:role="line"
id="tspan596"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="10.337033">¶</tspan></text>
</g>
</g>
<g
id="g584"
transform="translate(0.43058091,-0.02266215)">
<rect
style="fill:#f2f2f2;stroke:#000000;stroke-width:0.25;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
id="rect263"
width="7.0821118"
height="10.702716"
x="0.61310935"
y="0.51447743" />
<g
id="g574"
transform="translate(-0.02266215,-0.06798646)">
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="3.4024146"
id="text483"><tspan
sodipodi:role="line"
id="tspan481"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="3.4024146">¶</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="6.8697238"
id="text562"><tspan
sodipodi:role="line"
id="tspan560"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="6.8697238">¶</tspan></text>
<text
xml:space="preserve"
style="font-size:3.52778px;line-height:1.2;font-family:Symbol;-inkscape-font-specification:Symbol;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="10.337033"
id="text566"><tspan
sodipodi:role="line"
id="tspan564"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:3.52778px;font-family:Arial;-inkscape-font-specification:Arial;fill:#0000ff;stroke-width:0.264583"
x="5.4385843"
y="10.337033">¶</tspan></text>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

View File

@ -8,6 +8,7 @@ import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
import list.listeDesNodesInfos;
public class actInsereInformationMultipleTrue extends AbstractAction{
{
@ -25,11 +26,13 @@ public class actInsereInformationMultipleTrue extends AbstractAction{
node nod = (node) fenetres.create.getSelectNode().getUserObject();
for(int i = 0 ; i < nod.getNodes().size();i++) {
String content = nod.getNodes().get(i).retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.getNodes().get(i).getNomElt() + " : " + content;
nod.getNodes().get(i).getAttributs().put("information", content);
if(listeDesNodesInfos.isInfo(nod.getNodes().get(i))) {
String content = nod.getNodes().get(i).retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.getNodes().get(i).getNomElt() + " : " + content;
nod.getNodes().get(i).getAttributs().put("information", content);
}
}
fenetres.create.getTextNodeSelect().refreshAffichage(nod);

View File

@ -8,6 +8,7 @@ import javax.swing.ImageIcon;
import cXML.node;
import fenetres.create;
import list.listeDesNodesInfos;
public class actInsereInformationTrue extends AbstractAction{
{
@ -23,12 +24,14 @@ public class actInsereInformationTrue extends AbstractAction{
@Override
public void actionPerformed(ActionEvent e) {
node nod = (node) fenetres.create.getSelectNode().getUserObject();
String content = nod.retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.getNomElt() + " : " + content;
nod.getAttributs().put("information", content);
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
if(listeDesNodesInfos.isInfo(nod)) {
String content = nod.retourneLesContenusEnfants("");
if(!content.isEmpty()) if(content.replaceAll(" ", "").length()==0) content=content.replaceAll(" ", "");
if(content.length()>300) content = content.substring(0, 299);
content = nod.getNomElt() + " : " + content;
nod.getAttributs().put("information", content);
fenetres.create.getTextNodeSelect().refreshAffichage(nod);
}
}
}

View File

@ -0,0 +1,25 @@
package list;
import cXML.node;
public class listeDesNodesInfos {
public static boolean isInfo(node nod) {
String nameNode = nod.getNomElt();
switch (nameNode) {
case "text:p": return true;
case "text:h": return true;
case "text:list": return true;
case "text:span": return true;
default:
return false;
}
}
}