Révision 1628
| tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 1628) | ||
|---|---|---|
| 33 | 33 |
import org.osgi.framework.Bundle; |
| 34 | 34 |
import org.txm.edition.rcp.messages.EditionUIMessages; |
| 35 | 35 |
import org.txm.edition.rcp.preferences.SynopticEditionPreferences; |
| 36 |
import org.txm.objects.CorpusBuild; |
|
| 37 | 36 |
import org.txm.objects.Edition; |
| 38 | 37 |
import org.txm.objects.Page; |
| 39 | 38 |
import org.txm.objects.Project; |
| ... | ... | |
| 891 | 890 |
|
| 892 | 891 |
Object ret = evaluate(SCRIPT02_getspans); |
| 893 | 892 |
if (ret instanceof Object[]) {
|
| 894 |
Log.fine("selection word ids="+Arrays.toString((Object[])ret)); //$NON-NLS-1$
|
|
| 893 |
Log.finer("selection word ids="+Arrays.toString((Object[])ret)); //$NON-NLS-1$
|
|
| 895 | 894 |
Object[] array = (Object[])ret; |
| 896 | 895 |
String[] sel = new String[2]; |
| 897 | 896 |
if (array.length == 0) {
|
| ... | ... | |
| 1099 | 1098 |
} |
| 1100 | 1099 |
|
| 1101 | 1100 |
public void setHighlightedArea(HashSet<int[]> positions) {
|
| 1102 |
Log.fine("Highlight area: not implemented");
|
|
| 1101 |
Log.finer("Highlight area: not implemented");
|
|
| 1103 | 1102 |
} |
| 1104 | 1103 |
|
| 1105 | 1104 |
public void expandSelectionTo(String[] ids) {
|
| tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditionEditor.java (revision 1628) | ||
|---|---|---|
| 676 | 676 |
@Override |
| 677 | 677 |
public void init(IEditorSite site, IEditorInput input) |
| 678 | 678 |
throws PartInitException {
|
| 679 |
|
|
| 680 |
corpus = ((SynopticEditorInput) input).getCorpus(); |
|
| 681 |
corpus = corpus.getMainCorpus(); // get the main corpus of the corpus |
|
| 682 |
text = ((SynopticEditorInput) input).getText(); |
|
| 683 |
editionNames = ((SynopticEditorInput) input).getEditions(); |
|
| 684 |
|
|
| 679 | 685 |
super.init(site, input); |
| 680 |
|
|
| 681 |
corpus = ((SynopticEditorInput) getEditorInput()).getCorpus(); |
|
| 682 |
corpus = corpus.getMainCorpus(); // get the main corpus of the corpus |
|
| 683 |
text = ((SynopticEditorInput) getEditorInput()).getText(); |
|
| 684 |
editionNames = ((SynopticEditorInput) getEditorInput()).getEditions(); |
|
| 685 | 686 |
} |
| 686 | 687 |
|
| 687 | 688 |
public boolean isDisposed() {
|
| tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/SynopticEditorInput.java (revision 1628) | ||
|---|---|---|
| 7 | 7 |
import org.eclipse.ui.IEditorInput; |
| 8 | 8 |
import org.eclipse.ui.IPersistableElement; |
| 9 | 9 |
import org.eclipse.ui.plugin.AbstractUIPlugin; |
| 10 |
import org.txm.objects.Project; |
|
| 10 | 11 |
import org.txm.objects.Text; |
| 11 | 12 |
import org.txm.rcp.Application; |
| 12 | 13 |
import org.txm.rcp.IImageKeys; |
| 13 | 14 |
import org.txm.rcp.editors.TXMResultEditorInput; |
| 14 | 15 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
| 15 | 16 |
|
| 16 |
public class SynopticEditorInput extends TXMResultEditorInput implements IEditorInput {
|
|
| 17 |
public class SynopticEditorInput extends TXMResultEditorInput<Text> implements IEditorInput {
|
|
| 17 | 18 |
|
| 18 | 19 |
private CQPCorpus corpus; |
| 19 |
private Text text; |
|
| 20 | 20 |
private List<String> editions; |
| 21 | 21 |
|
| 22 | 22 |
/** |
| ... | ... | |
| 26 | 26 |
* @param text, the text to show |
| 27 | 27 |
* @param editions, the editions to show |
| 28 | 28 |
*/ |
| 29 |
public SynopticEditorInput(CQPCorpus corpus, String text, List<String> editions) {
|
|
| 30 |
super(corpus);
|
|
| 29 |
public SynopticEditorInput(Text text, CQPCorpus corpus, List<String> editions) {
|
|
| 30 |
super(text);
|
|
| 31 | 31 |
|
| 32 | 32 |
this.corpus = corpus; |
| 33 |
corpus = corpus.getMainCorpus(); |
|
| 34 | 33 |
this.editions = editions; |
| 35 | 34 |
|
| 36 |
if (text == null) {
|
|
| 37 |
this.text = corpus.getProject().getFirstText(); |
|
| 38 |
} else {
|
|
| 39 |
this.text = corpus.getProject().getText(text); |
|
| 40 |
} |
|
| 35 |
// if (text == null) {
|
|
| 36 |
// this.text = corpus.getProject().getFirstText();
|
|
| 37 |
// } else {
|
|
| 38 |
// this.text = corpus.getProject().getText(text);
|
|
| 39 |
// }
|
|
| 41 | 40 |
|
| 42 | 41 |
if (editions == null) {
|
| 43 | 42 |
String[] defaultEditions = {corpus.getProject().getDefaultEdition()};
|
| ... | ... | |
| 59 | 58 |
*/ |
| 60 | 59 |
@Override |
| 61 | 60 |
public String getName() {
|
| 62 |
return corpus.getName()+ " - "+text+ " - "+editions; //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 61 |
return corpus.getName()+ " - "+getResult()+ " - "+editions; //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 63 | 62 |
} |
| 64 | 63 |
|
| 65 | 64 |
/* (non-Javadoc) |
| ... | ... | |
| 96 | 95 |
} |
| 97 | 96 |
|
| 98 | 97 |
public Text getText() {
|
| 99 |
return text;
|
|
| 98 |
return getResult();
|
|
| 100 | 99 |
} |
| 101 | 100 |
|
| 102 | 101 |
public List<String> getEditions() {
|
| tmp/org.txm.edition.rcp/src/org/txm/edition/rcp/handlers/OpenEdition.java (revision 1628) | ||
|---|---|---|
| 186 | 186 |
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); |
| 187 | 187 |
IWorkbenchPage page = window.getActivePage(); |
| 188 | 188 |
|
| 189 |
SynopticEditorInput editorInput = new SynopticEditorInput(corpus, text.getName(), editions);
|
|
| 189 |
SynopticEditorInput editorInput = new SynopticEditorInput(text, corpus, editions);
|
|
| 190 | 190 |
SynopticEditionEditor editor = (SynopticEditionEditor) page.openEditor(editorInput, SynopticEditionEditor.ID, true); |
| 191 | 191 |
|
| 192 | 192 |
return editor; |
| tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/UnitToolbar.java (revision 1628) | ||
|---|---|---|
| 1153 | 1153 |
@Override |
| 1154 | 1154 |
public void notifyEndOfRefresh() throws Exception {
|
| 1155 | 1155 |
// TODO Auto-generated method stub |
| 1156 |
|
|
| 1157 | 1156 |
} |
| 1158 | 1157 |
|
| 1159 | 1158 |
@Override |
| 1160 | 1159 |
public void notifyStartOfCreatePartControl() throws Exception {
|
| 1161 | 1160 |
// TODO Auto-generated method stub |
| 1162 |
|
|
| 1163 | 1161 |
} |
| 1164 | 1162 |
|
| 1165 | 1163 |
@Override |
| 1166 | 1164 |
public void notifyStartOfRefresh() throws Exception {
|
| 1167 | 1165 |
// TODO Auto-generated method stub |
| 1168 |
|
|
| 1169 | 1166 |
} |
| 1170 | 1167 |
|
| 1171 | 1168 |
ProgressListener pageProgressListener = null; |
| tmp/org.txm.analec.rcp/src/org/txm/annotation/urs/toolbar/SchemaToolbar.java (revision 1628) | ||
|---|---|---|
| 646 | 646 |
} |
| 647 | 647 |
|
| 648 | 648 |
protected void onIdentifiantComboSelected(SelectionEvent e) {
|
| 649 |
Log.fine("Identifiants SelectionListener: "+navigationField.getSelectionIndex());
|
|
| 649 |
Log.finer("Identifiants SelectionListener: "+navigationField.getSelectionIndex());
|
|
| 650 | 650 |
int iSchema = navigationField.getSelectionIndex(); |
| 651 | 651 |
if (iSchema <= 0) {
|
| 652 | 652 |
if (previousSelectedSchemaIDS != null) {
|
| ... | ... | |
| 672 | 672 |
} |
| 673 | 673 |
|
| 674 | 674 |
protected void onTypeComboSelected(SelectionEvent e) {
|
| 675 |
Log.fine("Types SelectionListener: "+typeCombo.getSelectionIndex());
|
|
| 675 |
Log.finer("Types SelectionListener: "+typeCombo.getSelectionIndex());
|
|
| 676 | 676 |
reloadIdentifiants(); |
| 677 | 677 |
if (typeCombo.getSelectionIndex() > 0) {
|
| 678 | 678 |
//String type = unitesAVoir[typeCombo.getSelectionIndex()-1]; |
| ... | ... | |
| 698 | 698 |
* @param unite the unite to select, may be null |
| 699 | 699 |
*/ |
| 700 | 700 |
public void reloadIdentifiants() {
|
| 701 |
Log.fine("Reloading identifiants combo values.");
|
|
| 701 |
Log.finer("Reloading identifiants combo values.");
|
|
| 702 | 702 |
String type0 = typeCombo.getText(); |
| 703 | 703 |
schemas = vue.getSchemasAVoir(type0); |
| 704 | 704 |
String[] identifiants = vue.getIdSchemas(type0, schemas); |
| ... | ... | |
| 712 | 712 |
* @param unite the unite to select, may be null |
| 713 | 713 |
*/ |
| 714 | 714 |
public void reloadIdentifiantsUnites() {
|
| 715 |
Log.fine("Reloading unites combo values.");
|
|
| 715 |
Log.finer("Reloading unites combo values.");
|
|
| 716 | 716 |
int iSchema = navigationField.getSelectionIndex(); |
| 717 | 717 |
if (iSchema <= 0) {
|
| 718 | 718 |
subNavigationField.setIdentifiants(new String[0], null, null); |
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/ApplicationWorkbenchAdvisor.java (revision 1628) | ||
|---|---|---|
| 846 | 846 |
* @param monitor |
| 847 | 847 |
*/ |
| 848 | 848 |
private void installCorporaDirectory(IProgressMonitor monitor) {
|
| 849 |
|
|
| 849 |
if (Toolbox.getTxmHomePath().endsWith("-dev")) {
|
|
| 850 |
System.out.println("DEV MODE: no corpus restored!");
|
|
| 851 |
return; // dev mode |
|
| 852 |
} |
|
| 853 |
|
|
| 850 | 854 |
String installdirpath = Toolbox.getInstallDirectory(); |
| 851 | 855 |
File sampleCorporaDirectory = new File(installdirpath, "samples"); //$NON-NLS-1$ |
| 852 | 856 |
|
| tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java (revision 1628) | ||
|---|---|---|
| 246 | 246 |
|
| 247 | 247 |
for (IConfigurationElement e : config) {
|
| 248 | 248 |
try {
|
| 249 |
//Log.finest(" "+e.getName()+" from "+e.getContributor().getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 249 |
Log.finer(" "+e.getName()+" from "+e.getContributor().getName()); //$NON-NLS-1$ //$NON-NLS-2$
|
|
| 250 | 250 |
final Object o = e.createExecutableExtension("class"); //$NON-NLS-1$
|
| 251 | 251 |
if (o instanceof TXMEditorExtension) {
|
| 252 | 252 |
ISafeRunnable runnable = new ISafeRunnable() {
|
| ... | ... | |
| 264 | 264 |
if (getResult() == null) return; |
| 265 | 265 |
|
| 266 | 266 |
if (ext.getTXMResultValidClasses() == null || ext.getTXMResultValidClasses().contains(getResult().getClass())) {
|
| 267 |
Log.finest("Installing TXMEditorExtension: "+ext.getName()); //$NON-NLS-1$
|
|
| 267 |
Log.finer("Installing TXMEditorExtension: "+ext.getName()); //$NON-NLS-1$
|
|
| 268 | 268 |
ext.setEditor(TXMEditor.this); |
| 269 | 269 |
extensions.add(ext); |
| 270 | 270 |
} |
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/CQPSearchEngine.java (revision 1628) | ||
|---|---|---|
| 29 | 29 |
import org.txm.utils.logger.Log; |
| 30 | 30 |
|
| 31 | 31 |
public class CQPSearchEngine extends SearchEngine {
|
| 32 |
|
|
| 33 | 32 |
|
| 34 | 33 |
public static final String NAME = "CQP"; |
| 35 | 34 |
|
| tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/MemCqiServer.java (revision 1628) | ||
|---|---|---|
| 446 | 446 |
* @throws Exception |
| 447 | 447 |
*/ |
| 448 | 448 |
public static void main(String[] args) throws Exception {
|
| 449 |
String pathToCQPLibDirectory = "/home/mdecorde/workspace37/CWB-lib/src/cqp/";
|
|
| 450 |
String cqpserverPathToExecutable = "/home/mdecorde/workspace37/CWB-lib/src/cqp/cqpserver";
|
|
| 451 |
String pathToRegistry = "/home/mdecorde/TXM/registry"; |
|
| 452 |
String pathToInitFile = "/usr/lib/TXM/cwb/cqpserver.init";
|
|
| 449 |
String pathToCQPLibDirectory = "/home/mdecorde/workspace047/org.txm.libs.cqp.linux/res/linux64/";
|
|
| 450 |
String cqpserverPathToExecutable = pathToCQPLibDirectory+"cqpserver";
|
|
| 451 |
String pathToRegistry = "/home/mdecorde/TXM-0.8.0/corpora/DEMOCRATLYON5/registry";
|
|
| 452 |
String pathToInitFile = "/home/mdecorde/workspace047/org.txm.libs.cqp.linux/res/cqpserver.init";
|
|
| 453 | 453 |
|
| 454 |
String corpus = "DISCOURS";
|
|
| 454 |
String corpus = "DEMOCRATLYON5";
|
|
| 455 | 455 |
String subcorpusname = "SUB"; |
| 456 | 456 |
String subcorpusid = corpus+":"+subcorpusname; |
| 457 | 457 |
String query = "[word=\"j.*\"]"; |
| ... | ... | |
| 475 | 475 |
|
| 476 | 476 |
MemCqiServer server = new MemCqiServer(pathToRegistry, pathToInitFile, " -b 10000000 -d OFF", false); |
| 477 | 477 |
if (server.start()) System.out.println("Mem Server ok");
|
| 478 |
System.out.println("SERVER="+server);
|
|
| 478 | 479 |
MemCqiClient client = new MemCqiClient(server); |
| 479 | 480 |
if (client.connect("anonymous", "")) System.out.println("Mem Client ok");
|
| 480 | 481 |
|
| tmp/org.txm.core/src/java/org/txm/objects/Text.java (revision 1628) | ||
|---|---|---|
| 64 | 64 |
this.setVisible(false); |
| 65 | 65 |
this.internalPersistable = true; |
| 66 | 66 |
} |
| 67 |
|
|
| 68 |
public Project getParent() {
|
|
| 69 |
return (Project) super.getParent(); |
|
| 70 |
} |
|
| 67 | 71 |
|
| 68 | 72 |
/** |
| 69 | 73 |
* Instantiates a new text. |
| tmp/org.txm.annotation.rcp/src/org/txm/annotation/rcp/editor/AnnotationExtension.java (revision 1628) | ||
|---|---|---|
| 77 | 77 |
if (!aa.getAnnotatedTXMResultClass().equals(editor.getResult().getClass())) {
|
| 78 | 78 |
continue; |
| 79 | 79 |
} |
| 80 |
Log.finest("Installing AnnotationExtension: "+aa.getName());
|
|
| 80 |
Log.finer("Installing AnnotationExtension: "+aa.getName());
|
|
| 81 | 81 |
modes.add(aa.getName()); // get the annotation name |
| 82 | 82 |
|
| 83 | 83 |
listeners.add(new SelectionListener() { // create alistener to instantiate a new AnnotationArea
|
Formats disponibles : Unified diff