本文整理匯總了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();
}
}