Révision 3513
TXM/trunk/org.txm.searchengine.core/src/org/txm/searchengine/core/IQuery.java (revision 3513) | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public String asString(); |
59 | 59 |
|
60 |
public boolean canBeMultiLine(); |
|
61 |
|
|
60 | 62 |
public static String toPrefString(IQuery query) { |
61 | 63 |
return query.getSearchEngine().getName()+"\t"+query.getQueryString(); |
62 | 64 |
} |
TXM/trunk/org.txm.searchengine.core/src/org/txm/searchengine/core/Query.java (revision 3513) | ||
---|---|---|
65 | 65 |
} |
66 | 66 |
return str.toString(); |
67 | 67 |
} |
68 |
|
|
69 |
public boolean canBeMultiLine() { |
|
70 |
return false; |
|
71 |
} |
|
68 | 72 |
|
69 | 73 |
/** |
70 | 74 |
* Converts the specified string to a list of Query. |
TXM/trunk/org.txm.searchengine.core/src/org/txm/searchengine/core/SearchEnginePreferences.java (revision 3513) | ||
---|---|---|
36 | 36 |
Preferences preferences = this.getDefaultPreferencesNode(); |
37 | 37 |
|
38 | 38 |
preferences.put(DEFAULT_SEARCH_ENGINE, "CQP"); |
39 |
preferences.putBoolean(SHOW_SEARCH_ENGINES, false);
|
|
39 |
preferences.putBoolean(SHOW_SEARCH_ENGINES, true);
|
|
40 | 40 |
} |
41 | 41 |
} |
TXM/trunk/org.txm.tigersearch.rcp/OSGI-INF/l10n/bundle_fr.properties (revision 3513) | ||
---|---|---|
7 | 7 |
command.label.0 = TIGERSearch |
8 | 8 |
command.label.3 = TIGERSearch |
9 | 9 |
command.label.4 = TIGERSearch |
10 |
command.label.5 = XML-TS
|
|
11 |
command.name.2 = Importer des annotations TIGERSearch... |
|
10 |
command.label.5 = XML-TIGERSearch
|
|
11 |
command.name.2 = Importer des annotations TIGERSearch depuis un r?pertoire...
|
|
12 | 12 |
|
13 | 13 |
editor.name = TIGERSearch |
14 | 14 |
editor.name.0 = Index TIGERSearch |
TXM/trunk/org.txm.tigersearch.rcp/OSGI-INF/l10n/bundle.properties (revision 3513) | ||
---|---|---|
11 | 11 |
command.label.2 = TS Index Recette 2 |
12 | 12 |
command.label.3 = TIGERSearch |
13 | 13 |
command.label.4 = TIGERSearch |
14 |
command.label.5 = XML-TS
|
|
14 |
command.label.5 = XML-TIGERSearch
|
|
15 | 15 |
editor.name = TIGERSearch |
16 | 16 |
editor.name.0 = TSIndex |
17 | 17 |
Bundle-Vendor = Textometrie.org |
18 |
command.name.2 = Import TIGERSearch Annotations... |
|
18 |
command.name.2 = Import TIGERSearch Annotations from directory...
|
|
19 | 19 |
PostTXMHOMEInstallationStep.description = Install TIGER Groovy Files |
20 | 20 |
page.name = TIGERSearch |
TXM/trunk/org.txm.tigersearch.rcp/groovy/org/txm/scripts/importer/tigersearch/TSImport.groovy (revision 3513) | ||
---|---|---|
71 | 71 |
getProjectPreferenceValue(project, TigerSearchPreferences.FEATURE_VALUES_TO_IGNORE_IN_HEADER, |
72 | 72 |
TigerSearchPreferences.getInstance().getString(TigerSearchPreferences.FEATURE_VALUES_TO_IGNORE_IN_HEADER)).split(",") as Set; |
73 | 73 |
|
74 |
println "Feature values to skiip when indexing corpus: $featuresToSkips"
|
|
74 |
println "Feature values to skip when indexing the corpus: $featuresToSkips"
|
|
75 | 75 |
|
76 | 76 |
HashMap<String, HashSet<String>> tfeatures = new HashMap<String, HashSet<String>>() |
77 | 77 |
HashMap<String, HashSet<String>> ntfeatures = new HashMap<String, HashSet<String>>() |
... | ... | |
221 | 221 |
masterwriter.flush() |
222 | 222 |
masterwriter.close() |
223 | 223 |
} |
224 |
|
|
224 | 225 |
TIGERSearchEngine.buildTIGERCorpus(tigerXmlSrcDir, this.binaryDirectory, corpusName); |
225 | 226 |
} |
226 | 227 |
} |
TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/function/tigersearch/TIGERTreeSearchSelector.java (revision 3513) | ||
---|---|---|
36 | 36 |
|
37 | 37 |
return TIGERQuery.class; |
38 | 38 |
} |
39 |
|
|
40 |
@Override |
|
41 |
public TreeSearch getTreeSearch(String resultnodepath, CQPCorpus corpus) { |
|
42 |
|
|
43 |
return new TIGERSearch(resultnodepath, corpus); |
|
44 |
} |
|
39 | 45 |
} |
TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TSCorpusManager.java (revision 3513) | ||
---|---|---|
33 | 33 |
import org.txm.core.messages.TXMCoreMessages; |
34 | 34 |
|
35 | 35 |
|
36 |
// TODO: Auto-generated Javadoc |
|
37 | 36 |
/** |
38 | 37 |
* The Class TSCorpusManager. |
39 | 38 |
*/ |
... | ... | |
57 | 56 |
* @param registrydir the registrydir |
58 | 57 |
* @param configdir the configdir |
59 | 58 |
*/ |
60 |
public TSCorpusManager(File registrydir, File configdir) |
|
61 |
{ |
|
59 |
public TSCorpusManager(File registrydir, File configdir) {
|
|
60 |
|
|
62 | 61 |
this.registrydir = registrydir; |
63 | 62 |
this.configFile = configdir; |
64 |
|
|
63 |
|
|
65 | 64 |
initok = true; |
66 | 65 |
|
67 | 66 |
if (!(registrydir.exists() && registrydir.canRead())) { |
68 |
System.out.println(TXMCoreMessages.errorRegDirColon+registrydir);
|
|
67 |
System.out.println(TXMCoreMessages.errorRegDirColon + registrydir);
|
|
69 | 68 |
initok = false; |
70 | 69 |
} |
70 |
|
|
71 | 71 |
if (!(configdir.exists() && configdir.canRead())) { |
72 |
System.out.println(TXMCoreMessages.errorConfigdirDirColon+configdir);
|
|
72 |
System.out.println(TXMCoreMessages.errorConfigdirDirColon + configdir);
|
|
73 | 73 |
initok = false; |
74 | 74 |
} |
75 | 75 |
} |
76 |
|
|
76 |
|
|
77 | 77 |
/** |
78 | 78 |
* Gets the registry path. |
79 | 79 |
* |
80 | 80 |
* @return the registry path |
81 | 81 |
*/ |
82 |
public String getRegistryPath() |
|
83 |
{ |
|
82 |
public String getRegistryPath() {
|
|
83 |
|
|
84 | 84 |
return registrydir.getAbsolutePath(); |
85 | 85 |
} |
86 |
|
|
86 |
|
|
87 | 87 |
/** |
88 | 88 |
* Gets the conf path. |
89 | 89 |
* |
90 | 90 |
* @return the conf path |
91 | 91 |
*/ |
92 |
public String getconfPath() |
|
93 |
{ |
|
92 |
public String getconfPath() {
|
|
93 |
|
|
94 | 94 |
return configFile.getAbsolutePath(); |
95 | 95 |
} |
96 |
|
|
96 |
|
|
97 | 97 |
/** |
98 | 98 |
* Checks if is initialized. |
99 | 99 |
* |
100 | 100 |
* @return true, if is initialized |
101 | 101 |
*/ |
102 | 102 |
public boolean isInitialized() { |
103 |
|
|
103 | 104 |
return initok; |
104 | 105 |
} |
105 | 106 |
|
... | ... | |
109 | 110 |
* @param id the id |
110 | 111 |
* @return the corpus |
111 | 112 |
*/ |
112 |
public TSCorpus getCorpus(String id) |
|
113 |
{ |
|
114 |
if (!corpora.containsKey(id)) |
|
115 |
{ |
|
113 |
public TSCorpus getCorpus(String id) { |
|
114 |
|
|
115 |
if (!corpora.containsKey(id)) { |
|
116 | 116 |
TSCorpus corpus = new TSCorpus(id, this); |
117 |
if (corpus.isOk()) |
|
117 |
if (corpus.isOk()) {
|
|
118 | 118 |
corpora.put(id, corpus); |
119 |
} |
|
119 | 120 |
} |
120 |
|
|
121 |
|
|
121 | 122 |
return corpora.get(id); |
122 | 123 |
} |
123 |
} |
|
124 |
} |
TXM/trunk/org.txm.tigersearch.rcp/src/org/txm/searchengine/ts/TIGERQuery.java (revision 3513) | ||
---|---|---|
25 | 25 |
return this; |
26 | 26 |
} |
27 | 27 |
|
28 |
public boolean canBeMultiLine() { |
|
29 |
return true; |
|
30 |
} |
|
31 |
|
|
28 | 32 |
@Override |
29 | 33 |
public boolean equals(IQuery q) { |
30 | 34 |
return this.getClass().equals(q.getClass()) && this.getQueryString().equals(q.getQueryString()); |
TXM/trunk/org.txm.translate.rcp/src/org/txm/rcp/translate/devtools/FixDoubleQuotes.java (revision 3513) | ||
---|---|---|
4 | 4 |
import java.io.FileNotFoundException; |
5 | 5 |
import java.io.IOException; |
6 | 6 |
import java.io.UnsupportedEncodingException; |
7 |
import java.util.ArrayList; |
|
8 | 7 |
import java.util.HashMap; |
9 | 8 |
|
10 | 9 |
import org.txm.rcp.translate.i18n.PluginMessagesManager; |
TXM/trunk/org.txm.connlu.core/src/org/txm/conllu/core/function/UDTreeSearchSelector.java (revision 3513) | ||
---|---|---|
28 | 28 |
|
29 | 29 |
return new UDSearch(corpus); |
30 | 30 |
} |
31 |
|
|
32 |
@Override |
|
33 |
public TreeSearch getTreeSearch(String resultnodepath, CQPCorpus corpus) { |
|
34 |
|
|
35 |
return new UDSearch(resultnodepath, corpus); |
|
36 |
} |
|
31 | 37 |
|
32 | 38 |
@Override |
33 | 39 |
public Class<? extends Query> getQueryClass() { |
TXM/trunk/org.txm.conllu.rcp/src/org/txm/conllu/rcp/commands/ExportCorpusAsCoNLLU.java (revision 3513) | ||
---|---|---|
639 | 639 |
} |
640 | 640 |
|
641 | 641 |
private static String[] getDefaultValues(MainCorpus mainCorpus, String property, int[] positions) throws UnexpectedAnswerException, IOException, CqiServerError, CqiClientException { |
642 |
|
|
642 | 643 |
String[] values = CQPSearchEngine.getCqiClient().cpos2Str(mainCorpus.getProperty(property).getQualifiedName(), positions); |
643 | 644 |
for (int iupos = 0; iupos < values.length; iupos++) { // recode the || CQP multiple values to ud multiple values |
644 | 645 |
if (values[iupos].length() > 2 && values[iupos].startsWith("|") && values[iupos].endsWith("|")) { |
... | ... | |
650 | 651 |
} |
651 | 652 |
|
652 | 653 |
private static HashMap<Integer, String> getNonUNDEFPositionsAndValues(MainCorpus mainCorpus, String property) throws UnexpectedAnswerException, IOException, CqiServerError, CqiClientException { |
654 |
|
|
653 | 655 |
HashMap<Integer, String> sentidStartPositions = new HashMap<>(); |
654 | 656 |
int[] ids = CQPSearchEngine.getCqiClient().regex2Id(mainCorpus.getProperty(property).getQualifiedName(), "(?!__UNDEF__).+"); |
655 | 657 |
String[] strs = CQPSearchEngine.getCqiClient().id2Str(mainCorpus.getProperty(property).getQualifiedName(), ids); |
... | ... | |
665 | 667 |
} |
666 | 668 |
|
667 | 669 |
private static void fixUNDEFValues(String[] values) { |
670 |
|
|
668 | 671 |
for (int i = 0; i < values.length; i++) { |
669 |
if (values[i].equals("__UNDEF__") || values[i].equals("")) { |
|
672 |
if (values[i].equals("__UNDEF__") || values[i].equals("") || values[i].equals("|_|")) {
|
|
670 | 673 |
values[i] = "_"; |
671 | 674 |
} |
672 | 675 |
} |
TXM/trunk/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xtz/XTZDefaultPagerStep.groovy (revision 3513) | ||
---|---|---|
323 | 323 |
|
324 | 324 |
boolean flagNote = false |
325 | 325 |
boolean flagW = false |
326 |
|
|
326 | 327 |
boolean allTags = true |
328 |
boolean ignoreUnmanagedTags = true |
|
329 |
// unmanagedElementsPolicyCombo.setItems("ignore", "keep as is", "rename to span"); |
|
330 |
String unmanagedElementsPolicy = pager.project.getTextualPlan("UnmanagedElementsPolicy", "rename to span") |
|
331 |
if (unmanagedElementsPolicy.equals("rename to span")) { |
|
332 |
allTags = true; |
|
333 |
} else if (unmanagedElementsPolicy.equals("ignore")) { |
|
334 |
allTags = false |
|
335 |
ignoreUnmanagedTags = true |
|
336 |
} else if (unmanagedElementsPolicy.equals("keep as it")) { |
|
337 |
allTags = false |
|
338 |
ignoreUnmanagedTags = false |
|
339 |
} |
|
327 | 340 |
String noteContent = "" |
328 | 341 |
String noteType = "" |
329 | 342 |
String rend = "" |
... | ... | |
545 | 558 |
noteType = getAttributeValue(parser, null, "type") |
546 | 559 |
} else if (allTags && !flagW && localname != paginationElement) { |
547 | 560 |
pagedWriter.writeStartElement("span", ["class":localname]) |
561 |
} else if (ignoreUnmanagedTags && !flagW && localname != paginationElement) { |
|
562 |
// do nothing |
|
563 |
} else { |
|
564 |
LinkedHashMap attributes = new LinkedHashMap(); |
|
565 |
for (int i = 0 ; i < parser.getAttributeCount() ; i++) { |
|
566 |
attributes[parser.getAttributeLocalName(i)] = parser.getAttributeValue(i).toString() |
|
567 |
} |
|
568 |
pagedWriter.writeStartElement(localname, attributes) |
|
548 | 569 |
} |
549 | 570 |
break; |
550 | 571 |
} |
... | ... | |
671 | 692 |
} |
672 | 693 |
} else if (allTags && !flagW && localname != paginationElement) { |
673 | 694 |
pagedWriter.writeEndElement() // </span@class=localname> |
695 |
} else if (ignoreUnmanagedTags && !flagW && localname != paginationElement) { |
|
696 |
// do nothing |
|
697 |
} else { |
|
698 |
pagedWriter.writeEndElement() // the element |
|
674 | 699 |
} |
675 | 700 |
// else { |
676 | 701 |
// pagedWriter.writeEndElement() // the element |
TXM/trunk/org.txm.edition.rcp/src/org/txm/edition/rcp/editors/EditionPanel.java (revision 3513) | ||
---|---|---|
895 | 895 |
|
896 | 896 |
if (!this.browser.isDisposed()) { |
897 | 897 |
|
898 |
if ("webkit".equals(this.browser.getBrowserType())) { |
|
899 |
String u = URLUtils.encodeURL(url); |
|
900 |
Log.finer("setting encoded URL: "+u); |
|
901 |
super.setURL(u); |
|
902 |
} else { |
|
903 |
Log.finer("setting URL: "+url); |
|
904 |
super.setURL(url); |
|
905 |
} |
|
898 |
super.setURL(url); |
|
906 | 899 |
|
900 |
// if ("webkit".equals(this.browser.getBrowserType())) { |
|
901 |
// String u = URLUtils.encodeURL(url); |
|
902 |
// Log.finer("setting encoded URL: "+u); |
|
903 |
// super.setURL(u); |
|
904 |
// } else { |
|
905 |
// Log.finer("setting URL: "+url); |
|
906 |
// super.setURL(url); |
|
907 |
// } |
|
908 |
// |
|
907 | 909 |
// // fix when the webbrowser can't open the URL -> but encoding&security are not well managed |
908 | 910 |
// URL url2; |
909 | 911 |
// try { |
TXM/trunk/org.txm.edition.rcp/plugin.xml (revision 3513) | ||
---|---|---|
149 | 149 |
</and> |
150 | 150 |
</activeWhen> |
151 | 151 |
</handler> |
152 |
<handler |
|
153 |
class="org.txm.edition.rcp.handlers.SendEditionTo" |
|
154 |
commandId="org.txm.treesearch.command.ComputeTreeSearch"> |
|
155 |
<activeWhen> |
|
156 |
<and> |
|
157 |
<reference |
|
158 |
definitionId="SelectionIsNotEmpty"> |
|
159 |
</reference> |
|
160 |
<reference |
|
161 |
definitionId="SendSelectionContextNotActive"> |
|
162 |
</reference> |
|
163 |
<reference |
|
164 |
definitionId="EditionEditorActive"> |
|
165 |
</reference> |
|
166 |
</and> |
|
167 |
</activeWhen> |
|
168 |
</handler> |
|
152 | 169 |
</extension> |
153 | 170 |
<extension |
154 | 171 |
point="org.eclipse.core.expressions.definitions"> |
TXM/trunk/org.txm.treesearch.rcp/src/org/txm/treesearch/command/ComputeTreeSearch.java (revision 3513) | ||
---|---|---|
36 | 36 |
import org.eclipse.core.runtime.RegistryFactory; |
37 | 37 |
import org.eclipse.jface.viewers.IStructuredSelection; |
38 | 38 |
import org.eclipse.ui.handlers.HandlerUtil; |
39 |
import org.osgi.service.prefs.BackingStoreException; |
|
40 |
import org.osgi.service.prefs.Preferences; |
|
39 | 41 |
import org.txm.core.messages.TXMCoreMessages; |
40 | 42 |
import org.txm.core.preferences.TXMPreferences; |
41 | 43 |
import org.txm.core.results.TXMResult; |
44 |
import org.txm.rcp.TxmPreferences; |
|
42 | 45 |
import org.txm.rcp.editors.TXMEditor; |
43 | 46 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
44 | 47 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
... | ... | |
72 | 75 |
// From link: creating from parameter node |
73 | 76 |
String parametersNodePath = event.getParameter(TXMPreferences.RESULT_PARAMETERS_NODE_PATH); |
74 | 77 |
if (parametersNodePath != null && !parametersNodePath.isEmpty()) { |
75 |
s = TXMResult.getResult(parametersNodePath); // a TreeSearch or a CQPCorpus |
|
78 |
//s = TXMResult.getResult(parametersNodePath); // a TreeSearch or a CQPCorpus |
|
79 |
s = parametersNodePath; |
|
76 | 80 |
} |
77 | 81 |
else { // From view result node |
78 | 82 |
IStructuredSelection selection = this.getCorporaViewSelection(event); |
... | ... | |
161 | 165 |
|
162 | 166 |
ts = (TreeSearch) obj; |
163 | 167 |
} |
168 |
else if (obj instanceof String) { |
|
169 |
|
|
170 |
//TXMResult.getResult((String)obj); |
|
171 |
Preferences node = TXMPreferences.getNode((String)obj); |
|
172 |
try { |
|
173 |
String[] keys = node.keys(); |
|
174 |
System.out.println("keys: "+keys); |
|
175 |
} |
|
176 |
catch (BackingStoreException e) { |
|
177 |
// TODO Auto-generated catch block |
|
178 |
e.printStackTrace(); |
|
179 |
} |
|
180 |
String parentPath = node.get(TXMPreferences.PARENT_PARAMETERS_NODE_PATH, null); |
|
181 |
TXMResult parent = TXMResult.getResult(parentPath); |
|
182 |
|
|
183 |
if (parent instanceof CQPCorpus) { |
|
184 |
CQPCorpus corpus = (CQPCorpus)parent; |
|
185 |
TreeSearchSelector s = getSelectorForCorpus(corpus, TreeSearchPreferences.getInstance().getString(TreeSearchPreferences.DEFAULT_REPRESENTATION)); |
|
186 |
ts = s.getTreeSearch((String)obj, corpus); |
|
187 |
} |
|
188 |
} |
|
164 | 189 |
else { |
165 | 190 |
|
166 | 191 |
Log.warning(Messages.bind(Messages.SelectionIsNotACorpusP0, obj)); |
TXM/trunk/org.txm.treesearch.rcp/plugin.xml (revision 3513) | ||
---|---|---|
97 | 97 |
</visibleWhen> |
98 | 98 |
</command> |
99 | 99 |
</menuContribution> |
100 |
|
|
101 | 100 |
<menuContribution |
102 |
locationURI="popup:org.txm.concordance.rcp.editors.ConcordanceEditor">
|
|
101 |
locationURI="popup:org.txm.edition.rcp.editors.SynopticEditionEditor">
|
|
103 | 102 |
<command |
104 |
commandId="org.txm.treesearch.command.ConcordanceLineToTreeSearch"
|
|
103 |
commandId="org.txm.treesearch.command.ComputeTreeSearch"
|
|
105 | 104 |
icon="icons/functions/Tree.png" |
106 | 105 |
label="%command.label" |
107 | 106 |
style="push"> |
108 | 107 |
</command> |
109 | 108 |
</menuContribution> |
109 |
|
|
110 | 110 |
</extension> |
111 | 111 |
<extension |
112 | 112 |
point="org.eclipse.ui.preferencePages"> |
TXM/trunk/org.txm.treesearch.core/src/org/txm/treesearch/function/TreeSearchSelector.java (revision 3513) | ||
---|---|---|
14 | 14 |
public abstract boolean canComputeWith(CQPCorpus corpus); |
15 | 15 |
|
16 | 16 |
public abstract TreeSearch getTreeSearch(CQPCorpus corpus); |
17 |
|
|
18 |
public abstract TreeSearch getTreeSearch(String resultnodepath, CQPCorpus corpus); |
|
17 | 19 |
|
18 | 20 |
public abstract Class<? extends Query> getQueryClass(); |
19 | 21 |
} |
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/swt/widget/QueryWidget.java (revision 3513) | ||
---|---|---|
30 | 30 |
import java.util.Deque; |
31 | 31 |
import java.util.LinkedList; |
32 | 32 |
|
33 |
import org.eclipse.swt.layout.GridData; |
|
33 | 34 |
import org.eclipse.swt.widgets.Combo; |
34 | 35 |
import org.eclipse.swt.widgets.Composite; |
35 | 36 |
import org.txm.searchengine.core.IQuery; |
36 | 37 |
import org.txm.searchengine.core.SearchEngine; |
37 | 38 |
import org.txm.searchengine.core.SearchEnginesManager; |
38 |
import org.txm.searchengine.cqp.corpus.CQPCorpus; |
|
39 | 39 |
|
40 | 40 |
// TODO: Auto-generated Javadoc |
41 | 41 |
/** |
... | ... | |
43 | 43 |
* full CQP query strings and simplif ied query strings (see |
44 | 44 |
* {@link org.txm.searchengine.cqp.corpus.query.CQLQuery#fixQuery(String)}) |
45 | 45 |
* |
46 |
* @author jmague |
|
46 |
* @author jmague, mdecorde
|
|
47 | 47 |
* |
48 | 48 |
*/ |
49 | 49 |
public class QueryWidget extends Combo { |
... | ... | |
69 | 69 |
this(composite, style, SearchEnginesManager.getCQPSearchEngine()); |
70 | 70 |
} |
71 | 71 |
|
72 |
/** |
|
73 |
* Set the SearchEngine to use with query |
|
74 |
* @param se |
|
75 |
*/ |
|
72 | 76 |
public void setSearchEngine(SearchEngine se) { |
73 | 77 |
this.se = se; |
78 |
// if (se.newQuery().canBeMultiLine()) { |
|
79 |
// Object l = this.getLayoutData(); // cannot change the widget style -> maybe use a ComboViewer OR recreate a widget (so the setSearchEngine must be moved) |
|
80 |
// if (l instanceof GridData) { |
|
81 |
// GridData gd = (GridData)l; |
|
82 |
// gd.minimumHeight = this.getSize().y * 2; |
|
83 |
// } |
|
84 |
// this.layout(); |
|
85 |
// } else { |
|
86 |
// Object l = this.getLayoutData(); // cannot change the widget style -> maybe use a ComboViewer OR recreate a widget (so the setSearchEngine must be moved) |
|
87 |
// if (l instanceof GridData) { |
|
88 |
// GridData gd = (GridData)l; |
|
89 |
// gd.minimumHeight = this.getSize().y / 2; |
|
90 |
// } |
|
91 |
// this.layout(); |
|
92 |
// } |
|
74 | 93 |
} |
75 | 94 |
|
76 | 95 |
|
TXM/trunk/org.txm.rcp/src/main/java/org/txm/rcp/editors/imports/sections/EditionSection.java (revision 3513) | ||
---|---|---|
7 | 7 |
import org.eclipse.swt.events.SelectionEvent; |
8 | 8 |
import org.eclipse.swt.events.SelectionListener; |
9 | 9 |
import org.eclipse.swt.widgets.Button; |
10 |
import org.eclipse.swt.widgets.Combo; |
|
10 | 11 |
import org.eclipse.swt.widgets.Composite; |
11 | 12 |
import org.eclipse.swt.widgets.DirectoryDialog; |
12 | 13 |
import org.eclipse.swt.widgets.Label; |
... | ... | |
48 | 49 |
Text imageDirectoryText; |
49 | 50 |
|
50 | 51 |
private Text defaultEditions; |
52 |
|
|
53 |
private Combo unmanagedElementsPolicyCombo; |
|
51 | 54 |
|
52 | 55 |
/** |
53 | 56 |
* |
... | ... | |
130 | 133 |
|
131 | 134 |
if (importName.startsWith("xtz")) { //$NON-NLS-1$ |
132 | 135 |
|
136 |
Label tmpLabel4 = toolkit.createLabel(sectionClient, "Unmanaged elements policy"); |
|
137 |
tmpLabel4.setToolTipText("ignore: the elements are not written ; convert to span: rename the element to 'span' and set the class attribute"); |
|
138 |
TableWrapData gdata4 = getLabelGridData(); |
|
139 |
gdata4.indent = 40; |
|
140 |
tmpLabel4.setLayoutData(gdata4); |
|
141 |
|
|
142 |
unmanagedElementsPolicyCombo = new Combo(sectionClient, SWT.BORDER|SWT.READ_ONLY); |
|
143 |
gdata4 = getTextGridData(); |
|
144 |
gdata4.colspan = 3; // one line |
|
145 |
unmanagedElementsPolicyCombo.setLayoutData(gdata4); |
|
146 |
unmanagedElementsPolicyCombo.setItems("ignore", "rename to span"); |
|
147 |
unmanagedElementsPolicyCombo.setToolTipText("ignore: the elements are not written ; convert to span: rename the element to 'span' and set the class attribute"); |
|
148 |
|
|
133 | 149 |
Label tmpLabel3 = toolkit.createLabel(sectionClient, TXMUIMessages.NoteElements); |
134 | 150 |
tmpLabel3.setToolTipText(TXMUIMessages.NoteElementsThatEncodePonctualNotes); |
135 | 151 |
TableWrapData gdata3 = getLabelGridData(); |
... | ... | |
297 | 313 |
noteElementsText.setText(project.getTextualPlan("Note", "note")); //$NON-NLS-1$ |
298 | 314 |
} |
299 | 315 |
|
316 |
if (unmanagedElementsPolicyCombo != null) { |
|
317 |
unmanagedElementsPolicyCombo.setText(project.getTextualPlan("UnmanagedElementsPolicy", "rename to span")); //$NON-NLS-1$ |
|
318 |
} |
|
319 |
|
|
300 | 320 |
String pbt = edition_params.getPageElement(); |
301 | 321 |
if (pageBreakText != null) { |
302 | 322 |
pageBreakText.setText(pbt); |
... | ... | |
352 | 372 |
project.setTextualPlan(TXMUIMessages.Note, noteElementsText.getText()); |
353 | 373 |
} |
354 | 374 |
|
375 |
if (unmanagedElementsPolicyCombo != null) { |
|
376 |
project.setTextualPlan("UnmanagedElementsPolicy", unmanagedElementsPolicyCombo.getText()); |
|
377 |
} |
|
378 |
|
|
355 | 379 |
if (buildFacsEditionCheckButton != null) { |
356 | 380 |
|
357 | 381 |
String images_directory = ""; //$NON-NLS-1$ |
Formats disponibles : Unified diff