use of org.eclipse.ui.preferences.ScopedPreferenceStore in project translationstudio8 by heartsome.
the class TSPreferenceInitializer method initializeDefaultPreferences.
@Override
public void initializeDefaultPreferences() {
// 设置 colors 首选项页的初始值
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TAG_FG_COLOR, new RGB(234, 234, 234));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TAG_BG_COLOR, new RGB(223, 112, 0));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.WRONG_TAG_COLOR, new RGB(255, 0, 0));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.DIFFERENCE_FG_COLOR, new RGB(255, 0, 0));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.DIFFERENCE_BG_COLOR, new RGB(244, 244, 159));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.PT_COLOR, new RGB(255, 0, 0));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.QT_COLOR, new RGB(255, 204, 204));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.MT_COLOR, new RGB(171, 217, 198));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH101_COLOR, new RGB(255, 255, 204));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH100_COLOR, new RGB(37, 168, 204));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH90_COLOR, new RGB(79, 185, 214));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH80_COLOR, new RGB(114, 199, 222));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH70_COLOR, new RGB(155, 215, 231));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.TM_MATCH0_COLOR, new RGB(198, 240, 251));
PreferenceConverter.setDefault(store, IColorPreferenceConstant.HIGHLIGHTED_TERM_COLOR, new RGB(170, 255, 85));
// 设置 net.heartsome.cat.common.core 插件中的语言代码初始值
IPreferenceStore corePreferenceStore = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, CoreActivator.getDefault().getBundle().getSymbolicName());
corePreferenceStore.setDefault(IPreferenceConstants.LANGUAGECODE, LocaleService.getLanguageConfigAsString());
// 设置选择路径对话框的初始值
PlatformUI.getPreferenceStore().setDefault(IPreferenceConstants.LAST_DIRECTORY, System.getProperty("user.home"));
ColorConfigLoader.init();
}
use of org.eclipse.ui.preferences.ScopedPreferenceStore in project flux by eclipse.
the class ConnectionPreferencePage method init.
@Override
public void init(IWorkbench workbench) {
setDescription("Allows setting of various Flux server connection parameters.");
setPreferenceStore(new ScopedPreferenceStore(InstanceScope.INSTANCE, Activator.PLUGIN_ID));
if (!editable) {
setMessage("Settings cannot be changed from UI. They are set via environment variable and/or command line arguments", IMessageProvider.WARNING);
}
}
use of org.eclipse.ui.preferences.ScopedPreferenceStore in project xtext-xtend by eclipse.
the class LineSeparatorConversionTest method testSeparator.
private void testSeparator(String separator) throws Exception {
IProject project = workbenchTestHelper.getProject();
ScopedPreferenceStore projectPreferenceStore = new ScopedPreferenceStore(new ProjectScope(project), Platform.PI_RUNTIME);
projectPreferenceStore.setValue(Platform.PREF_LINE_SEPARATOR, separator);
workbenchTestHelper.createFile("Foo.xtend", "class Foo {}");
waitForBuild();
IFile compiledFile = project.getFile("xtend-gen/Foo.java");
workbenchTestHelper.getFiles().add(compiledFile);
String contents = WorkbenchTestHelper.getContentsAsString(compiledFile);
List<String> expectedLines = ImmutableList.of("@SuppressWarnings(\"all\")", "public class Foo {", "}", "");
String expectedContent = Joiner.on(separator).join(expectedLines);
assertEquals(expectedContent, contents);
}
use of org.eclipse.ui.preferences.ScopedPreferenceStore in project xtext-xtend by eclipse.
the class UnicodeEscapeTest method getProject.
private IProject getProject(String encoding) throws CoreException {
IProject project = workbenchTestHelper.getProject();
ScopedPreferenceStore projectPreferenceStore = new ScopedPreferenceStore(new ProjectScope(project), Platform.PI_RUNTIME);
projectPreferenceStore.setValue(Platform.PREF_LINE_SEPARATOR, "\n");
project.setDefaultCharset(encoding, null);
return project;
}
use of org.eclipse.ui.preferences.ScopedPreferenceStore in project linuxtools by eclipse.
the class AbstractProviderPreferencesPage method init.
@Override
public void init(IWorkbench workbench) {
final IPreferenceStore store = new ScopedPreferenceStore(ConfigurationScope.INSTANCE, ProviderProfileConstants.PLUGIN_ID);
setPreferenceStore(store);
}
Aggregations