MAJ 4.3.1 (Correction Bug sur le collage d'un node)
This commit is contained in:
parent
da32cacfc2
commit
963098c9de
7
.project
7
.project
@ -15,4 +15,11 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>cXML</name>
|
||||
<type>2</type>
|
||||
<location>C:/Users/pabr6/eclipse-workspace/cXML</location>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
Binary file not shown.
1
bin/.gitignore
vendored
1
bin/.gitignore
vendored
@ -1,2 +1 @@
|
||||
/MEPTL/
|
||||
/fenetres/
|
||||
|
Binary file not shown.
Binary file not shown.
@ -35,9 +35,12 @@ public class actCopy extends AbstractAction{
|
||||
|
||||
Clipboard cb = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
|
||||
StringSelection texto = new StringSelection(Run.ecritureNode(nod, 0).toString());
|
||||
String textNodes = Run.ecritureNode(nod, 0).toString().replace("\t","").replace("\r", "").replace("\n", "");
|
||||
StringSelection texto = new StringSelection(textNodes);
|
||||
|
||||
cb.setContents(texto, texto);
|
||||
cb.setContents(texto, null);
|
||||
|
||||
System.out.println(texto.toString());
|
||||
|
||||
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise()+"<hr><h2>Le node est copié dans le presse papier.</h2><hr>");
|
||||
}
|
||||
|
@ -39,16 +39,16 @@ public class actPaste extends AbstractAction{
|
||||
Clipboard c = Toolkit.getDefaultToolkit().getSystemClipboard();
|
||||
String paste;
|
||||
try {
|
||||
paste = c.getContents(null).getTransferData(DataFlavor.stringFlavor).toString();
|
||||
paste = "<!-- ? -->" + c.getContents(null).getTransferData(DataFlavor.stringFlavor).toString().replace("\t","").replace("\r", "").replace("\n", "");
|
||||
if (!paste.equals(initial)) {
|
||||
node nodCopy = Run.XMLContent(paste);
|
||||
node nodCopy =new node(paste);
|
||||
if(!nodCopy.getNomElt().isEmpty()) {
|
||||
node nod = (node) fenetres.create.getSelectNode().getUserObject();
|
||||
nod.getNodes().add(nodCopy);
|
||||
fenetres.create.constructionTree();
|
||||
initial = paste;
|
||||
}else {
|
||||
JOptionPane.showMessageDialog(null, "Le collage n'est pas réalisé.<br>Ce n'est pas un node.");
|
||||
JOptionPane.showMessageDialog(null, "Le collage n'est pas réalisé.");
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user