本文整理汇总了Java中org.eclipse.core.runtime.Preferences.contains方法的典型用法代码示例。如果您正苦于以下问题:Java Preferences.contains方法的具体用法?Java Preferences.contains怎么用?Java Preferences.contains使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.core.runtime.Preferences
的用法示例。
在下文中一共展示了Preferences.contains方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMaxRowPreference
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
private int getMaxRowPreference( )
{
int maxRow;
Preferences preferences = ReportPlugin.getDefault( )
.getPluginPreferences( );
if ( preferences.contains( DateSetPreferencePage.USER_MAXROW ) )
{
maxRow = preferences.getInt( DateSetPreferencePage.USER_MAXROW );
}
else
{
maxRow = DateSetPreferencePage.DEFAULT_MAX_ROW;
preferences.setValue( DateSetPreferencePage.USER_MAXROW, maxRow );
}
return maxRow;
}
示例2: setDefaultPereferencesIfNeed
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
private void setDefaultPereferencesIfNeed( )
{
Preferences preferences = JdbcPlugin.getDefault( )
.getPluginPreferences( );
if ( !preferences.contains( DateSetPreferencePage.SCHEMAS_PREFETCH_CONFIG ) )
{
preferences.setValue( DateSetPreferencePage.SCHEMAS_PREFETCH_CONFIG,
DateSetPreferencePage.ENABLED );
}
if ( !preferences.contains( DateSetPreferencePage.ENABLE_CODE_ASSIST ) )
{
preferences.setValue( DateSetPreferencePage.ENABLE_CODE_ASSIST,
DateSetPreferencePage.ENABLED );
}
if ( !preferences.contains( DateSetPreferencePage.USER_MAX_NUM_OF_SCHEMA ) )
{
preferences.setValue( DateSetPreferencePage.USER_MAX_NUM_OF_SCHEMA,
String.valueOf( DateSetPreferencePage.DEFAULT_MAX_NUM_OF_SCHEMA ) );
}
if ( !preferences.contains( DateSetPreferencePage.USER_MAX_NUM_OF_TABLE_EACH_SCHEMA ) )
{
preferences.setValue( DateSetPreferencePage.USER_MAX_NUM_OF_TABLE_EACH_SCHEMA,
String.valueOf( DateSetPreferencePage.DEFAULT_MAX_NUM_OF_TABLE_EACH_SCHEMA ) );
}
if ( !preferences.contains( DateSetPreferencePage.USER_TIMEOUT_LIMIT ) )
{
preferences.setValue( DateSetPreferencePage.USER_TIMEOUT_LIMIT,
String.valueOf( DateSetPreferencePage.DEFAULT_TIMEOUT_LIMIT ) );
}
}
示例3: getBoolean
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public boolean getBoolean( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getBoolean( name );
}
return prefsStore.getBoolean( name );
}
示例4: getDouble
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public double getDouble( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getDouble( name );
}
return prefsStore.getDouble( name );
}
示例5: getFloat
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public float getFloat( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getFloat( name );
}
return prefsStore.getFloat( name );
}
示例6: getInt
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public int getInt( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getInt( name );
}
return prefsStore.getInt( name );
}
示例7: getLong
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public long getLong( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getLong( name );
}
return prefsStore.getLong( name );
}
示例8: getString
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public String getString( String name )
{
if ( this.preferenceType == SPECIAL_TYPE && project != null )
{
Preferences preference = prefs.getReportPreference( project );
if ( preference != null && preference.contains( name ) )
return preference.getString( name );
}
return prefsStore.getString( name );
}
示例9: contains
import org.eclipse.core.runtime.Preferences; //导入方法依赖的package包/类
public static boolean contains(String key) {
Preferences prefs = getPreferences();
return prefs.contains(key);
}