Révision 429
tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/preferences/RPreferencePage.java (revision 429) | ||
---|---|---|
140 | 140 |
// addField(r_svg_device); |
141 | 141 |
|
142 | 142 |
|
143 |
changeFieldStates(TXMPreferences.getBoolean(RPreferences.PREFERENCES_NODE, RPreferences.REMOTE));
|
|
143 |
changeFieldStates(TXMPreferences.getBoolean(RPreferences.REMOTE, RPreferences.PREFERENCES_NODE));
|
|
144 | 144 |
} |
145 | 145 |
|
146 | 146 |
|
... | ... | |
193 | 193 |
|
194 | 194 |
RWorkspace rw = RWorkspace.getRWorkspaceInstance(); |
195 | 195 |
if (rw != null) { |
196 |
RWorkspace.setUseFileCommunication(TXMPreferences.getBoolean(RPreferences.PREFERENCES_NODE, RPreferences.FILE_TRANSFERT));
|
|
196 |
RWorkspace.setUseFileCommunication(TXMPreferences.getBoolean(RPreferences.FILE_TRANSFERT, RPreferences.PREFERENCES_NODE));
|
|
197 | 197 |
} |
198 | 198 |
} catch (Exception e) { |
199 | 199 |
System.err.println(Messages.FAILED_TO_SAVE_PREFERENCES + e); |
tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/views/RVariablesView.java (revision 429) | ||
---|---|---|
64 | 64 |
import org.txm.concordance.core.functions.Concordance; |
65 | 65 |
import org.txm.cooccurrence.core.functions.Cooccurrence; |
66 | 66 |
import org.txm.core.preferences.TBXPreferences; |
67 |
import org.txm.core.results.ITXMResult;
|
|
67 |
import org.txm.core.results.TXMResult; |
|
68 | 68 |
import org.txm.functions.referencer.Referencer; |
69 | 69 |
import org.txm.index.core.functions.Index; |
70 | 70 |
import org.txm.lexicaltable.core.functions.LexicalTable; |
... | ... | |
149 | 149 |
*/ |
150 | 150 |
protected void buildTreeContent(List<MainCorpus> corpora) |
151 | 151 |
{ |
152 |
ArrayList<ITXMResult> notempty = new ArrayList<ITXMResult>(corpora);
|
|
153 |
for(ITXMResult container : corpora)
|
|
152 |
ArrayList<TXMResult> notempty = new ArrayList<TXMResult>(corpora);
|
|
153 |
for(TXMResult container : corpora) |
|
154 | 154 |
{ |
155 | 155 |
String symbol = null; |
156 | 156 |
try { |
... | ... | |
184 | 184 |
* @param container the container |
185 | 185 |
* @return true, if successful |
186 | 186 |
*/ |
187 |
protected boolean deepSearch(ITXMResult container)
|
|
187 |
protected boolean deepSearch(TXMResult container) |
|
188 | 188 |
{ |
189 | 189 |
boolean own = hasSymbol(container.getResults()); |
190 | 190 |
if (own) |
... | ... | |
194 | 194 |
else // continue deeper |
195 | 195 |
{ |
196 | 196 |
|
197 |
for(ITXMResult children : container.getResults())
|
|
197 |
for(TXMResult children : container.getResults()) |
|
198 | 198 |
{ |
199 | 199 |
boolean childrencontainer = deepSearch(children); |
200 | 200 |
if (childrencontainer) |
... | ... | |
210 | 210 |
* @param results the results |
211 | 211 |
* @return true, if successful |
212 | 212 |
*/ |
213 |
private boolean hasSymbol(ArrayList<ITXMResult> results) {
|
|
213 |
private boolean hasSymbol(ArrayList<TXMResult> results) { |
|
214 | 214 |
String symbol = null; |
215 | 215 |
for(Object rez : results) |
216 | 216 |
{ |
... | ... | |
395 | 395 |
@Override |
396 | 396 |
public Object[] getChildren(Object element) { |
397 | 397 |
//System.out.println("get children of "+element); |
398 |
if (element instanceof ITXMResult) {
|
|
398 |
if (element instanceof TXMResult) { |
|
399 | 399 |
// List<Object> results = ((HasResults) element).getResults(); |
400 |
// ArrayList<ITXMResult> sub = ((HasResults) element).getSubHasResults();
|
|
400 |
// ArrayList<TXMResult> sub = ((HasResults) element).getSubHasResults(); |
|
401 | 401 |
//ArrayList<Object> children = new ArrayList<Object>(); |
402 | 402 |
// children.addAll(sub); |
403 | 403 |
// children.addAll(results); |
404 | 404 |
|
405 |
ArrayList<ITXMResult> children = ((ITXMResult)element).getDeepResults();
|
|
405 |
ArrayList<TXMResult> children = ((TXMResult)element).getDeepResults();
|
|
406 | 406 |
|
407 | 407 |
for(int i = 0 ; i < children.size() ; i++) |
408 | 408 |
{ |
409 | 409 |
|
410 | 410 |
Object obj = children.get(i); |
411 | 411 |
//System.out.println("test > "+obj); |
412 |
if (obj instanceof ITXMResult)
|
|
412 |
if (obj instanceof TXMResult) |
|
413 | 413 |
{ |
414 | 414 |
//System.out.println("deap "+obj); |
415 |
if (!deepSearch((ITXMResult) obj))
|
|
415 |
if (!deepSearch((TXMResult) obj)) |
|
416 | 416 |
{ |
417 | 417 |
children.remove(i); |
418 | 418 |
i--; |
... | ... | |
469 | 469 |
*/ |
470 | 470 |
@Override |
471 | 471 |
public boolean hasChildren(Object element) { |
472 |
if (element instanceof ITXMResult) {
|
|
472 |
if (element instanceof TXMResult) { |
|
473 | 473 |
return getChildren(element).length > 0; |
474 | 474 |
} |
475 | 475 |
return false; |
tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/ExecuteRScript.java (revision 429) | ||
---|---|---|
110 | 110 |
} |
111 | 111 |
dialog.setFilterExtensions(new String[] { "*.R" }); //$NON-NLS-1$ |
112 | 112 |
|
113 |
String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.USER_TXM_HOME)+ "/scripts";
|
|
113 |
String scriptCurrentDir = TXMPreferences.getString(TBXPreferences.USER_TXM_HOME, TBXPreferences.PREFERENCES_NODE)+ "/scripts";
|
|
114 | 114 |
|
115 | 115 |
dialog.setFilterPath(scriptCurrentDir); |
116 | 116 |
result = dialog.open(); |
tmp/org.txm.statsengine.r.rcp/src/org/txm/statsengine/r/rcp/handlers/CheckRPackages.java (revision 429) | ||
---|---|---|
17 | 17 |
import org.rosuda.REngine.RList; |
18 | 18 |
import org.txm.EngineType; |
19 | 19 |
import org.txm.Toolbox; |
20 |
import org.txm.Toolbox; |
|
21 | 20 |
import org.txm.core.preferences.TBXPreferences; |
22 | 21 |
import org.txm.core.preferences.TXMPreferences; |
23 | 22 |
import org.txm.rcp.handlers.BaseAbstractHandler; |
... | ... | |
157 | 156 |
|
158 | 157 |
public static boolean installRPAckagesViaRscript() throws IOException { |
159 | 158 |
String cmd = ""; //$NON-NLS-1$ |
160 |
String installPath = TXMPreferences.getString(TBXPreferences.PREFERENCES_NODE, TBXPreferences.INSTALL_DIR);
|
|
159 |
String installPath = TXMPreferences.getString(TBXPreferences.INSTALL_DIR, TBXPreferences.PREFERENCES_NODE);
|
|
161 | 160 |
if (Util.isMac() || Util.isLinux()) { |
162 | 161 |
cmd = "R --no-save < \""+installPath+"/R/rlibs.R\""; //$NON-NLS-1$ //$NON-NLS-2$ |
163 | 162 |
} else if (Util.isWindows()) { |
Formats disponibles : Unified diff