本文整理汇总了Java中org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer类的典型用法代码示例。如果您正苦于以下问题:Java AbstractPreferenceInitializer类的具体用法?Java AbstractPreferenceInitializer怎么用?Java AbstractPreferenceInitializer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
AbstractPreferenceInitializer类属于org.eclipse.core.runtime.preferences包,在下文中一共展示了AbstractPreferenceInitializer类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testExtension
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; //导入依赖的package包/类
@Test
public void testExtension() {
AbstractPreferenceInitializer actual = createExtension();
assertThat( actual )
.isInstanceOf( WorkspaceScopePreferenceInitializer.class );
}
示例2: createExtension
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; //导入依赖的package包/类
private static <T extends AbstractPreferenceInitializer> T createExtension(
String extensionPointId , Class<T> initializerType )
{
return initializerType.cast( new RegistryAdapter()
.createExecutableExtension( extensionPointId, AbstractPreferenceInitializer.class )
.thatMatches( attribute( "class", initializerType.getName() ) )
.process() );
}
示例3: createExtension
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; //导入依赖的package包/类
private static AbstractPreferenceInitializer createExtension() {
return new RegistryAdapter()
.createExecutableExtension( EXTENION_POINT_ID, AbstractPreferenceInitializer.class )
.thatMatches( attribute( "class", WorkspaceScopePreferenceInitializer.class.getName() ) )
.process();
}
示例4: initializeDefaultPreferences
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; //导入依赖的package包/类
@Override
public void initializeDefaultPreferences() {
IPreferenceStore store = Activator.getDefault().getPreferenceStore();
store.setDefault(WRITE_TML, false);
store.setDefault(TML_CONTAINER, "test_files");
store.setDefault(TEST_PROJECT_POSTFIX, ".test");
store.setDefault(TEST_SOURCE_FOLDER_NAME, "src");
store.setDefault(TEST_CLASS_SUPER_TYPE, "");
store.setDefault(TEST_CLASS_PREFIX, "");
store.setDefault(TEST_CLASS_POSTFIX, "Test");
store.setDefault(TEST_PACKAGE_POSTFIX, "");
store.setDefault(TEST_METHOD_PREFIX, "test");
store.setDefault(TEST_METHOD_POSTFIX, "");
store.setDefault(TEST_METHOD_FILTER_NAME, DEFAULT_METHOD_FILTER_NAME);
store.setDefault(TEST_METHOD_FILTER_MODIFIER,
DEFAULT_METHOD_FILTER_MODIFIER);
store.setDefault(MOCK_PROJECT, "org.junit.tools.mock");
store.setDefault(MOCK_SAVE_IN_TESTPROJECT, true);
store.setDefault(TEST_CLASS_ANNOTATIONS, "");
store.setDefault(MOCK_CLASS_ANNOTATIONS, "");
store.setDefault(STATIC_BINDINGS, "");
// initialize JUT-preferences
JUTPreferences.initialize();
// set custom preferences
ExtensionPointHandler extensionHandler = Activator.getDefault()
.getExtensionHandler();
for (AbstractPreferenceInitializer initializer : extensionHandler
.getPreferenceInitializer()) {
initializer.initializeDefaultPreferences();
}
}