Révision 3284
| TXM/main/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 3284) | ||
|---|---|---|
| 1383 | 1383 |
|
| 1384 | 1384 |
|
| 1385 | 1385 |
public void goToPage(String text, String name) {
|
| 1386 |
Text newText = this.synopticEditionEditor.getCorpus().getProject().getText(text); |
|
| 1387 |
if (newText == null) {
|
|
| 1388 |
return; |
|
| 1386 |
if (text != null) {
|
|
| 1387 |
Text newText = this.synopticEditionEditor.getCorpus().getProject().getText(text); |
|
| 1388 |
if (newText == null) {
|
|
| 1389 |
return; |
|
| 1390 |
} |
|
| 1391 |
if (!newText.equals(currentText)) {
|
|
| 1392 |
setText(newText, false); |
|
| 1393 |
} |
|
| 1389 | 1394 |
} |
| 1390 |
if (!newText.equals(currentText)) {
|
|
| 1391 |
setText(newText, false); |
|
| 1392 |
} |
|
| 1393 | 1395 |
|
| 1394 |
|
|
| 1395 | 1396 |
Page next = currentEdition.getPageForName(name); |
| 1396 | 1397 |
// System.out.println(Messages.TxmBrowser_4+currentPage); |
| 1397 | 1398 |
if (next != null) {
|
| TXM/main/org.txm.internalview.core/src/org/txm/internalview/core/functions/InternalView.java (revision 3284) | ||
|---|---|---|
| 3 | 3 |
import java.io.File; |
| 4 | 4 |
import java.io.PrintWriter; |
| 5 | 5 |
import java.util.ArrayList; |
| 6 |
import java.util.Arrays; |
|
| 6 | 7 |
import java.util.Collection; |
| 7 | 8 |
import java.util.HashMap; |
| 8 | 9 |
import java.util.LinkedHashMap; |
| ... | ... | |
| 91 | 92 |
public boolean loadParameters() throws Exception {
|
| 92 | 93 |
try {
|
| 93 | 94 |
String str = this.getStringParameterValue(TXMPreferences.STRUCTURAL_UNIT); |
| 94 |
this.pStructuralUnit = this.getCorpus().getStructuralUnit(str); |
|
| 95 |
if (str.length() == 0) {
|
|
| 96 |
try {
|
|
| 97 |
StructuralUnit struct = this.getCorpus().getStructuralUnit("text");
|
|
| 98 |
if (struct != null) {
|
|
| 99 |
this.pStructuralUnit = struct; |
|
| 100 |
} |
|
| 101 |
struct = this.getCorpus().getStructuralUnit("div");
|
|
| 102 |
if (struct != null) {
|
|
| 103 |
this.pStructuralUnit = struct; |
|
| 104 |
} |
|
| 105 |
struct = this.getCorpus().getStructuralUnit("p");
|
|
| 106 |
if (struct != null) {
|
|
| 107 |
this.pStructuralUnit = struct; |
|
| 108 |
} |
|
| 109 |
} |
|
| 110 |
catch (CqiClientException e1) {
|
|
| 111 |
// TODO Auto-generated catch block |
|
| 112 |
e1.printStackTrace(); |
|
| 113 |
} |
|
| 114 |
} else {
|
|
| 115 |
this.pStructuralUnit = this.getCorpus().getStructuralUnit(str); |
|
| 116 |
} |
|
| 117 |
|
|
| 95 | 118 |
} |
| 96 | 119 |
catch (Exception e) {
|
| 97 | 120 |
Log.printStackTrace(e); |
| ... | ... | |
| 105 | 128 |
} |
| 106 | 129 |
try {
|
| 107 | 130 |
String str = this.getStringParameterValue(TXMPreferences.STRUCTURAL_UNIT_PROPERTIES); |
| 108 |
this.pStructuralUnitsProperties = StructuralUnitProperty.stringToProperties(this.getCorpus(), str); |
|
| 131 |
if (str.length() == 0) {
|
|
| 132 |
StructuralUnitProperty structP = pStructuralUnit.getProperty("id");
|
|
| 133 |
if (structP != null) {
|
|
| 134 |
this.pStructuralUnitsProperties = Arrays.asList(structP); |
|
| 135 |
} |
|
| 136 |
structP = pStructuralUnit.getProperty("n");
|
|
| 137 |
if (structP != null) {
|
|
| 138 |
this.pStructuralUnitsProperties = Arrays.asList(structP); |
|
| 139 |
} |
|
| 140 |
} else {
|
|
| 141 |
this.pStructuralUnitsProperties = StructuralUnitProperty.stringToProperties(this.getCorpus(), str); |
|
| 142 |
} |
|
| 109 | 143 |
} |
| 110 | 144 |
catch (Exception e3) {
|
| 111 | 145 |
Log.printStackTrace(e3); |
| ... | ... | |
| 365 | 399 |
this.setDirty(); |
| 366 | 400 |
} |
| 367 | 401 |
|
| 368 |
|
|
| 369 |
|
|
| 370 |
|
|
| 371 | 402 |
@Override |
| 372 | 403 |
public boolean setParameters(TXMParameters parameters) {
|
| 373 | 404 |
System.err.println("InternalView.setParameters(): not yet implemented.");
|
| ... | ... | |
| 438 | 469 |
return InternalViewCoreMessages.RESULT_TYPE; |
| 439 | 470 |
} |
| 440 | 471 |
|
| 441 |
} |
|
| 472 |
} |
|
| TXM/main/org.txm.internalview.core/src/org/txm/internalview/core/preferences/InternalViewPreferences.java (revision 3284) | ||
|---|---|---|
| 37 | 37 |
super.initializeDefaultPreferences(); |
| 38 | 38 |
Preferences preferences = this.getDefaultPreferencesNode(); |
| 39 | 39 |
|
| 40 |
preferences.put(STRUCTURAL_UNIT, TBXPreferences.DEFAULT_STRUCTURAL_UNIT);
|
|
| 40 |
preferences.put(STRUCTURAL_UNIT, "");
|
|
| 41 | 41 |
preferences.put(UNIT_PROPERTIES, TBXPreferences.DEFAULT_UNIT_PROPERTY); |
| 42 |
preferences.put(STRUCTURAL_UNIT_PROPERTIES, TBXPreferences.DEFAULT_STRUCTURAL_UNIT_PROPERTY);
|
|
| 42 |
preferences.put(STRUCTURAL_UNIT_PROPERTIES, "");
|
|
| 43 | 43 |
preferences.putInt(CURRENT_PAGE, 0); |
| 44 | 44 |
} |
| 45 |
} |
|
| 45 |
} |
|
| TXM/main/org.txm.core/src/java/org/txm/xml/DOMIdentityHook.java (revision 3284) | ||
|---|---|---|
| 73 | 73 |
parentParser.writer.writeCharacters("\n");
|
| 74 | 74 |
Element e = (Element) node; |
| 75 | 75 |
NodeList children = e.getChildNodes(); |
| 76 |
String ns = e.getNamespaceURI(); |
|
| 77 |
String ln = e.getLocalName(); |
|
| 76 | 78 |
if (children.getLength() > 0) {
|
| 77 |
String ns = e.getNamespaceURI(); |
|
| 78 |
String ln = e.getLocalName(); |
|
| 79 | 79 |
if (ns == null) {
|
| 80 | 80 |
parentParser.writer.writeStartElement(ln); |
| 81 | 81 |
} else {
|
| ... | ... | |
| 83 | 83 |
} |
| 84 | 84 |
} |
| 85 | 85 |
else {
|
| 86 |
parentParser.writer.writeEmptyElement(e.getNamespaceURI(), e.getLocalName()); |
|
| 86 |
if (ns == null) {
|
|
| 87 |
parentParser.writer.writeEmptyElement(ln); |
|
| 88 |
} else {
|
|
| 89 |
parentParser.writer.writeEmptyElement(ns, ln); |
|
| 90 |
} |
|
| 87 | 91 |
} |
| 88 | 92 |
|
| 89 | 93 |
for (int i = 0; i < e.getAttributes().getLength(); i++) {
|
| ... | ... | |
| 102 | 106 |
} |
| 103 | 107 |
if (children.getLength() > 0) {
|
| 104 | 108 |
parentParser.writer.writeEndElement(); |
| 105 |
parentParser.writer.writeCharacters("\n");
|
|
| 109 |
//parentParser.writer.writeCharacters("\n");
|
|
| 106 | 110 |
} |
| 107 | 111 |
} |
| 108 | 112 |
else if (node.getNodeType() == Node.TEXT_NODE) {
|
| 109 | 113 |
parentParser.writer.writeCharacters(node.getTextContent()); |
| 114 |
} else if (node.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE) {
|
|
| 115 |
parentParser.writer.writeProcessingInstruction(node.getNodeName(), node.getNodeValue()); |
|
| 116 |
} else if (node.getNodeType() == Node.CDATA_SECTION_NODE) {
|
|
| 117 |
parentParser.writer.writeCData(node.getNodeValue()); |
|
| 118 |
} else if (node.getNodeType() == Node.COMMENT_NODE) {
|
|
| 119 |
parentParser.writer.writeComment(node.getNodeValue()); |
|
| 110 | 120 |
} |
| 111 | 121 |
} |
| 112 | 122 |
|
| ... | ... | |
| 139 | 149 |
|
| 140 | 150 |
@Override |
| 141 | 151 |
protected void processEntityReference() throws XMLStreamException {}
|
| 142 |
} |
|
| 152 |
} |
|
| TXM/main/org.txm.rcp/plugin.xml (revision 3284) | ||
|---|---|---|
| 1031 | 1031 |
<command |
| 1032 | 1032 |
commandId="org.txm.rcp.commands.workspace.UpdateCorpus" |
| 1033 | 1033 |
icon="icons/functions/update.png" |
| 1034 |
label="Update corpus"
|
|
| 1034 |
label="%command.name.98"
|
|
| 1035 | 1035 |
style="push" |
| 1036 | 1036 |
tooltip="Only the modified XML-TXM files will update the texts"> |
| 1037 | 1037 |
<visibleWhen |
| ... | ... | |
| 1046 | 1046 |
<command |
| 1047 | 1047 |
commandId="org.txm.rcp.commands.workspace.UpdateCorpus" |
| 1048 | 1048 |
icon="icons/functions/update.png" |
| 1049 |
label="Force corpus update"
|
|
| 1049 |
label="%command.name.981"
|
|
| 1050 | 1050 |
style="push" |
| 1051 | 1051 |
tooltip="All texts will be updated from the XML-TXM files"> |
| 1052 | 1052 |
<visibleWhen |
| TXM/main/org.txm.rcp/OSGI-INF/l10n/bundle.properties (revision 3284) | ||
|---|---|---|
| 306 | 306 |
command.name.96=TextToConcordance |
| 307 | 307 |
command.name.97=Save Annotations |
| 308 | 308 |
command.name.98=Update corpus |
| 309 |
command.name.981=Force update corpus |
|
| 309 | 310 |
command.name.99=KR view |
| 310 | 311 |
command.tooltip=Open in a web browser |
| 311 | 312 |
command.tooltip.0=Open the settings windows |
| TXM/main/org.txm.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 3284) | ||
|---|---|---|
| 318 | 318 |
command.name.96=TextToConcordance |
| 319 | 319 |
command.name.97=Enregistrer les annotations |
| 320 | 320 |
command.name.98=Mettre ? jour le corpus |
| 321 |
command.name.981=Forcer la mise ? jour du corpus |
|
| 321 | 322 |
command.name.99=Vue r?f?rentiels |
| 322 | 323 |
command.tooltip=Ouvrir dans un navigateur web |
| 323 | 324 |
command.tooltip.0=Afficher la fen?tre des pr?f?rences |
Formats disponibles : Unified diff