Révision 1400
tmp/org.txm.rcp/plugin.xml (revision 1400) | ||
---|---|---|
2004 | 2004 |
</test> |
2005 | 2005 |
<test |
2006 | 2006 |
property="org.txm.rcp.testers.PersistenceEnabled" |
2007 |
value="true">
|
|
2007 |
value="false">
|
|
2008 | 2008 |
</test> |
2009 | 2009 |
</and> |
2010 | 2010 |
</visibleWhen> |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/PersistenceEnabled.java (revision 1400) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.eclipse.core.expressions.PropertyTester; |
4 | 4 |
import org.txm.core.preferences.TBXPreferences; |
5 |
import org.txm.rcp.preferences.RCPPreferences; |
|
5 | 6 |
|
6 | 7 |
/** |
7 | 8 |
* Checks if the results persistence is enabled. |
... | ... | |
19 | 20 |
@Override |
20 | 21 |
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { |
21 | 22 |
|
22 |
boolean enabled = TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED);
|
|
23 |
boolean enabled = RCPPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED);
|
|
23 | 24 |
System.err.println("IS results persistence enabled: " + enabled); |
24 | 25 |
return enabled; |
25 | 26 |
} |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/testers/ExpertEnabled.java (revision 1400) | ||
---|---|---|
2 | 2 |
|
3 | 3 |
import org.eclipse.core.expressions.PropertyTester; |
4 | 4 |
import org.txm.core.preferences.TBXPreferences; |
5 |
import org.txm.core.preferences.TXMPreferences; |
|
6 | 5 |
|
7 | 6 |
public class ExpertEnabled extends PropertyTester { |
8 | 7 |
|
tmp/org.txm.rcp/src/main/java/org/txm/rcp/preferences/RCPPreferences.java (revision 1400) | ||
---|---|---|
1 | 1 |
package org.txm.rcp.preferences; |
2 | 2 |
|
3 |
import org.eclipse.core.runtime.preferences.DefaultScope; |
|
4 |
import org.eclipse.ui.IWorkbench; |
|
5 |
import org.osgi.framework.FrameworkUtil; |
|
6 | 3 |
import org.osgi.service.prefs.Preferences; |
7 | 4 |
import org.txm.core.preferences.TBXPreferences; |
8 | 5 |
import org.txm.core.preferences.TXMPreferences; |
9 | 6 |
|
10 | 7 |
|
11 | 8 |
/** |
12 |
* |
|
9 |
* RCP Preferences initializer. |
|
10 |
* @author mdecorde |
|
13 | 11 |
* @author sjacquot |
14 | 12 |
* |
15 | 13 |
*/ |
... | ... | |
58 | 56 |
|
59 | 57 |
@Override |
60 | 58 |
public void initializeDefaultPreferences() { |
59 |
|
|
60 |
// FIXME: to store/merge and share all the prefs in the Core node |
|
61 |
//this.commandPreferencesNodeQualifier = "org.txm.core"; |
|
62 |
|
|
61 | 63 |
super.initializeDefaultPreferences(); |
62 | 64 |
Preferences preferences = this.getDefaultPreferencesNode(); |
63 | 65 |
|
Formats disponibles : Unified diff