Révision 580
tmp/org.txm.core/src/java/org/txm/core/preferences/TXMPreferences.java (revision 580) | ||
---|---|---|
880 | 880 |
* @param nodeQualifier |
881 | 881 |
* @throws BackingStoreException |
882 | 882 |
*/ |
883 |
public static String[] getKeys(String nodeQualifier) throws BackingStoreException { |
|
883 |
public static String[] getKeys(IScopeContext scope, String nodeQualifier) throws BackingStoreException {
|
|
884 | 884 |
IEclipsePreferences preferences = scope.getNode(nodeQualifier); |
885 | 885 |
return preferences.keys(); |
886 | 886 |
} |
887 | 887 |
|
888 |
public static String[] getCommandScopeKeys(String nodeQualifier) throws BackingStoreException { |
|
889 |
return getKeys(scope, nodeQualifier); |
|
890 |
} |
|
888 | 891 |
|
892 |
public static String[] getDefaultScopeKeys(String nodeQualifier) throws BackingStoreException { |
|
893 |
return getKeys(DefaultScope.INSTANCE, nodeQualifier); |
|
894 |
} |
|
895 |
|
|
896 |
|
|
897 |
|
|
898 |
|
|
889 | 899 |
/** |
890 | 900 |
* Dumps the keys and values of the specified node, of the specified result node and also of the alternative nodes. |
891 | 901 |
* @param nodeQualifier |
tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java (revision 580) | ||
---|---|---|
373 | 373 |
return this.preferencesNodeQualifier; |
374 | 374 |
} |
375 | 375 |
|
376 |
public String[] getParametersKeys() throws BackingStoreException {
|
|
377 |
return TXMPreferences.getKeys(this.preferencesNodeQualifier); |
|
376 |
public String[] getCommandPreferencesKeys() throws BackingStoreException {
|
|
377 |
return TXMPreferences.getCommandScopeKeys(this.preferencesNodeQualifier);
|
|
378 | 378 |
} |
379 | 379 |
|
380 |
public String[] getDefaultPreferencesKeys() throws BackingStoreException { |
|
381 |
return TXMPreferences.getDefaultScopeKeys(this.preferencesNodeQualifier); |
|
382 |
} |
|
383 |
|
|
384 |
|
|
380 | 385 |
/** |
381 | 386 |
* Gets the value of the specified key in parameters, local result node or |
382 | 387 |
* default preferences nodes. |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/cmdparameters/ParametersView.java (revision 580) | ||
---|---|---|
27 | 27 |
// |
28 | 28 |
package org.txm.rcp.views.cmdparameters; |
29 | 29 |
|
30 |
import java.util.Arrays; |
|
31 |
|
|
32 |
import org.apache.commons.lang.ArrayUtils; |
|
30 | 33 |
import org.eclipse.swt.SWT; |
31 | 34 |
import org.eclipse.swt.widgets.Composite; |
32 | 35 |
import org.eclipse.swt.widgets.Label; |
... | ... | |
92 | 95 |
|
93 | 96 |
|
94 | 97 |
try { |
95 |
// Preferences |
|
96 |
String[] keys = result.getParametersKeys(); |
|
98 |
// Command preferences |
|
99 |
//String[] keys = result.getCommandPreferencesKeys(); |
|
100 |
String[] keys = (String[])ArrayUtils.addAll(result.getCommandPreferencesKeys(), result.getDefaultPreferencesKeys()); |
|
101 |
Arrays.sort(keys); |
|
102 |
|
|
97 | 103 |
buffer.append("Command preferences (count = " + keys.length + ", node path = " + result.getPreferencesNodeQualifier() + "): \n"); |
98 |
buffer.append("Command preferences (" + keys.length + "): \n"); |
|
99 | 104 |
for (String key : keys) { |
100 | 105 |
buffer.append(key + "=" + result.getStringParameterValue(key) + "\n"); |
101 | 106 |
} |
Formats disponibles : Unified diff