Révision 370
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/ConcordanceToIndex.java (revision 370) | ||
---|---|---|
37 | 37 |
import org.eclipse.osgi.util.NLS; |
38 | 38 |
import org.eclipse.ui.IWorkbenchPage; |
39 | 39 |
import org.eclipse.ui.PartInitException; |
40 |
import org.txm.concordances.functions.Line; |
|
40 |
import org.txm.concordance.core.functions.Line; |
|
41 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
|
41 | 42 |
import org.txm.index.rcp.editors.IndexEditor; |
42 | 43 |
import org.txm.index.rcp.editors.IndexEditorInput; |
43 | 44 |
import org.txm.rcp.Messages; |
44 |
import org.txm.rcp.editors.concordances.ConcordancesEditor; |
|
45 | 45 |
import org.txm.searchengine.cqp.corpus.Corpus; |
46 | 46 |
import org.txm.searchengine.cqp.corpus.Property; |
47 | 47 |
import org.txm.searchengine.cqp.corpus.query.Query; |
... | ... | |
67 | 67 |
* @param selection the selection |
68 | 68 |
* @return the object |
69 | 69 |
*/ |
70 |
public static Object link(ConcordancesEditor concordanceEditor,
|
|
70 |
public static Object link(ConcordanceEditor concordanceEditor, |
|
71 | 71 |
IStructuredSelection selection) { |
72 | 72 |
if (selection.getFirstElement() == null) return null; |
73 | 73 |
assert (selection.getFirstElement() instanceof Line); |
... | ... | |
83 | 83 |
.openEditor(editorInput, |
84 | 84 |
"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$ |
85 | 85 |
voceditor.setFocus(query); |
86 |
voceditor.compute(); |
|
86 |
voceditor.computeResult();
|
|
87 | 87 |
} catch (PartInitException e) { |
88 | 88 |
System.err.println(NLS.bind(Messages.GetConcordances_4, e)); |
89 | 89 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToConcordance.java (revision 370) | ||
---|---|---|
38 | 38 |
import org.eclipse.ui.IWorkbenchWindow; |
39 | 39 |
import org.eclipse.ui.PartInitException; |
40 | 40 |
import org.eclipse.ui.handlers.HandlerUtil; |
41 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
|
42 |
import org.txm.concordance.rcp.editors.ConcordanceEditorInput; |
|
41 | 43 |
import org.txm.index.core.functions.Line; |
42 | 44 |
import org.txm.index.rcp.editors.IndexEditor; |
43 | 45 |
import org.txm.rcp.Messages; |
44 |
import org.txm.rcp.editors.concordances.ConcordancesEditor; |
|
45 |
import org.txm.rcp.editors.input.ConcordancesEditorInput; |
|
46 | 46 |
import org.txm.searchengine.cqp.corpus.Corpus; |
47 | 47 |
import org.txm.searchengine.cqp.corpus.Property; |
48 | 48 |
import org.txm.searchengine.cqp.corpus.StructuralUnitProperty; |
... | ... | |
61 | 61 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
62 | 62 |
IWorkbenchWindow window; |
63 | 63 |
IStructuredSelection selection; |
64 |
ConcordancesEditorInput editorInput;
|
|
64 |
ConcordanceEditorInput editorInput; |
|
65 | 65 |
window = HandlerUtil.getActiveWorkbenchWindow(event); |
66 | 66 |
selection = (IStructuredSelection) HandlerUtil.getCurrentSelection(event); |
67 | 67 |
|
... | ... | |
81 | 81 |
|
82 | 82 |
Corpus corpus = voceditor.getCorpus(); |
83 | 83 |
|
84 |
editorInput = new ConcordancesEditorInput(corpus, null);
|
|
84 |
editorInput = new ConcordanceEditorInput(corpus, null); |
|
85 | 85 |
|
86 | 86 |
IWorkbenchPage page = window.getActivePage(); |
87 | 87 |
try { |
88 |
ConcordancesEditor conceditor = (ConcordancesEditor) page
|
|
88 |
ConcordanceEditor conceditor = (ConcordanceEditor) page
|
|
89 | 89 |
.openEditor(editorInput, |
90 |
"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
|
|
90 |
"ConcordanceEditor"); //$NON-NLS-1$
|
|
91 | 91 |
conceditor.setQuery(query); |
92 | 92 |
conceditor.compute(); |
93 | 93 |
} catch (PartInitException e) { |
... | ... | |
111 | 111 |
if (query.length() == 0) |
112 | 112 |
return null; |
113 | 113 |
Corpus corpus = voceditor.getCorpus(); |
114 |
ConcordancesEditorInput editorInput = new ConcordancesEditorInput(
|
|
114 |
ConcordanceEditorInput editorInput = new ConcordanceEditorInput(
|
|
115 | 115 |
corpus, null); |
116 | 116 |
// try { |
117 | 117 |
// System.out.println("Compute indexResult query: "+voceditor.getQuery()); |
... | ... | |
148 | 148 |
IWorkbenchPage page = voceditor.getEditorSite().getWorkbenchWindow() |
149 | 149 |
.getActivePage(); |
150 | 150 |
try { |
151 |
ConcordancesEditor conceditor = (ConcordancesEditor) page
|
|
151 |
ConcordanceEditor conceditor = (ConcordanceEditor) page
|
|
152 | 152 |
.openEditor(editorInput, |
153 |
"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$
|
|
153 |
"ConcordanceEditor"); //$NON-NLS-1$
|
|
154 | 154 |
conceditor.setQuery(query); |
155 | 155 |
conceditor.compute(); |
156 | 156 |
} catch (PartInitException e) { |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/LexiconToIndex.java (revision 370) | ||
---|---|---|
96 | 96 |
.openEditor(editorInput, |
97 | 97 |
"org.txm.rcp.editors.index.IndexEditor"); //$NON-NLS-1$ |
98 | 98 |
voceditor.setFocus(query); |
99 |
voceditor.compute(); |
|
99 |
voceditor.computeResult();
|
|
100 | 100 |
} catch (PartInitException e) { |
101 | 101 |
System.err.println(NLS.bind(Messages.GetConcordances_4, e)); |
102 | 102 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/CooccurrencesToConcordances.java (revision 370) | ||
---|---|---|
39 | 39 |
import org.eclipse.ui.IWorkbenchWindow; |
40 | 40 |
import org.eclipse.ui.PartInitException; |
41 | 41 |
import org.eclipse.ui.handlers.HandlerUtil; |
42 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
|
43 |
import org.txm.concordance.rcp.editors.ConcordanceEditorInput; |
|
42 | 44 |
import org.txm.cooccurrence.core.functions.Cooccurrence; |
43 | 45 |
import org.txm.cooccurrence.core.functions.Cooccurrence.CLine; |
44 | 46 |
import org.txm.cooccurrence.rcp.editors.CooccurrencesEditor; |
45 | 47 |
import org.txm.rcp.Messages; |
46 |
import org.txm.rcp.editors.concordances.ConcordancesEditor; |
|
47 |
import org.txm.rcp.editors.input.ConcordancesEditorInput; |
|
48 | 48 |
import org.txm.searchengine.cqp.corpus.Corpus; |
49 | 49 |
import org.txm.searchengine.cqp.corpus.Property; |
50 | 50 |
import org.txm.searchengine.cqp.corpus.query.Query; |
... | ... | |
62 | 62 |
private IStructuredSelection selection; |
63 | 63 |
|
64 | 64 |
/** The editor input. */ |
65 |
private static ConcordancesEditorInput editorInput;
|
|
65 |
private static ConcordanceEditorInput editorInput; |
|
66 | 66 |
|
67 | 67 |
/* (non-Javadoc) |
68 | 68 |
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
... | ... | |
123 | 123 |
|
124 | 124 |
Corpus corpus = cooc.getCorpus(); |
125 | 125 |
|
126 |
editorInput = new ConcordancesEditorInput(corpus, null);
|
|
126 |
editorInput = new ConcordanceEditorInput(corpus, null); |
|
127 | 127 |
|
128 | 128 |
IWorkbenchPage page = editor.getEditorSite().getWorkbenchWindow().getActivePage(); |
129 | 129 |
|
130 | 130 |
try { |
131 |
ConcordancesEditor conceditor = (ConcordancesEditor) page |
|
132 |
.openEditor(editorInput, |
|
133 |
"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$ |
|
131 |
ConcordanceEditor conceditor = (ConcordanceEditor) page |
|
132 |
.openEditor(editorInput, "ConcordanceEditor"); //$NON-NLS-1$ |
|
134 | 133 |
conceditor.setQuery(query); |
135 | 134 |
conceditor.compute(); |
136 | 135 |
} catch (PartInitException e) { |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToCooccurrence.java (revision 370) | ||
---|---|---|
41 | 41 |
import org.txm.index.core.functions.Line; |
42 | 42 |
import org.txm.index.rcp.editors.IndexEditor; |
43 | 43 |
import org.txm.rcp.Messages; |
44 |
import org.txm.rcp.editors.TXMResultEditorInput; |
|
44 | 45 |
import org.txm.searchengine.cqp.corpus.Corpus; |
45 | 46 |
import org.txm.searchengine.cqp.corpus.Property; |
46 | 47 |
import org.txm.searchengine.cqp.corpus.query.Query; |
... | ... | |
78 | 79 |
|
79 | 80 |
IWorkbenchPage page = window.getActivePage(); |
80 | 81 |
try { |
81 |
CooccurrencesEditor conceditor = (CooccurrencesEditor) page |
|
82 |
.openEditor(editorInput, |
|
83 |
"org.txm.rcp.editors.cooccurrences.CooccurrencesEditor"); //$NON-NLS-1$ |
|
82 |
//FIXME: tests |
|
83 |
// CooccurrencesEditor conceditor = (CooccurrencesEditor) page.openEditor(editorInput, "org.txm.rcp.editors.cooccurrences.CooccurrencesEditor"); //$NON-NLS-1$ |
|
84 |
CooccurrencesEditor conceditor = (CooccurrencesEditor) page.openEditor(new TXMResultEditorInput(corpus), "CooccurrencesEditor"); //$NON-NLS-1$ |
|
85 |
|
|
86 |
|
|
87 |
|
|
84 | 88 |
conceditor.setFocus(query); |
85 |
conceditor.compute();
|
|
89 |
conceditor.computeResult(false);
|
|
86 | 90 |
} catch (Exception e) { |
87 | 91 |
System.out.println(Messages.IndexToCooccurrence_0); |
88 | 92 |
org.txm.rcp.utils.Logger.printStackTrace(e); |
... | ... | |
114 | 118 |
.openEditor(editorInput, |
115 | 119 |
"org.txm.rcp.editors.cooccurrences.CooccurrencesEditor"); //$NON-NLS-1$ |
116 | 120 |
conceditor.setFocus(query); |
117 |
conceditor.compute();
|
|
121 |
conceditor.computeResult(false);
|
|
118 | 122 |
} catch (Exception e) { |
119 | 123 |
System.out.println(Messages.IndexToCooccurrence_0); |
120 | 124 |
org.txm.rcp.utils.Logger.printStackTrace(e); |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/IndexToProgression.java (revision 370) | ||
---|---|---|
38 | 38 |
import org.eclipse.swt.widgets.Shell; |
39 | 39 |
import org.eclipse.ui.IWorkbenchWindow; |
40 | 40 |
import org.eclipse.ui.handlers.HandlerUtil; |
41 |
import org.txm.concordance.rcp.editors.ConcordanceEditorInput; |
|
41 | 42 |
import org.txm.index.core.functions.Line; |
42 | 43 |
import org.txm.index.rcp.editors.IndexEditor; |
43 | 44 |
import org.txm.progression.rcp.dialogs.ProgressionDialog; |
44 | 45 |
import org.txm.progression.rcp.handlers.ComputeProgression; |
45 |
import org.txm.rcp.editors.input.ConcordancesEditorInput; |
|
46 | 46 |
import org.txm.searchengine.cqp.corpus.Corpus; |
47 | 47 |
import org.txm.searchengine.cqp.corpus.Property; |
48 | 48 |
import org.txm.searchengine.cqp.corpus.query.Query; |
... | ... | |
61 | 61 |
private IStructuredSelection selection; |
62 | 62 |
|
63 | 63 |
/** The editor input. */ |
64 |
private ConcordancesEditorInput editorInput;
|
|
64 |
private ConcordanceEditorInput editorInput; |
|
65 | 65 |
|
66 | 66 |
/* (non-Javadoc) |
67 | 67 |
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent) |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/link/TextToConcordance.java (revision 370) | ||
---|---|---|
36 | 36 |
import org.eclipse.ui.IWorkbenchWindow; |
37 | 37 |
import org.eclipse.ui.PartInitException; |
38 | 38 |
import org.eclipse.ui.handlers.HandlerUtil; |
39 |
import org.txm.concordance.rcp.editors.ConcordanceEditor; |
|
40 |
import org.txm.concordance.rcp.editors.ConcordanceEditorInput; |
|
39 | 41 |
import org.txm.rcp.Messages; |
40 | 42 |
import org.txm.rcp.editors.IEditionEditor; |
41 |
import org.txm.rcp.editors.concordances.ConcordancesEditor; |
|
42 |
import org.txm.rcp.editors.input.ConcordancesEditorInput; |
|
43 | 43 |
import org.txm.searchengine.cqp.corpus.Corpus; |
44 | 44 |
|
45 | 45 |
// TODO: Auto-generated Javadoc |
... | ... | |
57 | 57 |
public Object execute(ExecutionEvent event) throws ExecutionException { |
58 | 58 |
//System.out.println("Call TextToConcordance"); |
59 | 59 |
IWorkbenchWindow window; |
60 |
ConcordancesEditorInput editorInput;
|
|
60 |
ConcordanceEditorInput editorInput; |
|
61 | 61 |
window = HandlerUtil.getActiveWorkbenchWindow(event); |
62 | 62 |
//selection = HandlerUtil.getCurrentSelection(event); |
63 | 63 |
|
... | ... | |
74 | 74 |
query = fixQuery(query); |
75 | 75 |
|
76 | 76 |
Corpus corpus = ((IEditionEditor)editor).getCorpus(); |
77 |
editorInput = new ConcordancesEditorInput(corpus, null);
|
|
77 |
editorInput = new ConcordanceEditorInput(corpus, null); |
|
78 | 78 |
|
79 | 79 |
IWorkbenchPage page = window.getActivePage(); |
80 | 80 |
try { |
81 |
ConcordancesEditor conceditor = (ConcordancesEditor) page |
|
82 |
.openEditor(editorInput, |
|
83 |
"org.txm.rcp.editors.ConcordancesEditor"); //$NON-NLS-1$ |
|
81 |
ConcordanceEditor conceditor = (ConcordanceEditor) page |
|
82 |
.openEditor(editorInput, "ConcordanceEditor"); //$NON-NLS-1$ |
|
84 | 83 |
conceditor.setQuery(query); |
85 | 84 |
conceditor.compute(); |
86 | 85 |
} catch (PartInitException e) { |
Formats disponibles : Unified diff