本文整理汇总了Java中org.eclipse.core.runtime.preferences.DefaultScope.INSTANCE属性的典型用法代码示例。如果您正苦于以下问题:Java DefaultScope.INSTANCE属性的具体用法?Java DefaultScope.INSTANCE怎么用?Java DefaultScope.INSTANCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.core.runtime.preferences.DefaultScope
的用法示例。
在下文中一共展示了DefaultScope.INSTANCE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OptionsConfigurationBlock
public OptionsConfigurationBlock(IStatusChangeListener context, IProject project, Key[] allKeys,
IWorkbenchPreferenceContainer container) {
fContext = context;
fProject = project;
fAllKeys = allKeys;
fContainer = container;
if (container == null) {
fManager = new WorkingCopyManager();
} else {
fManager = container.getWorkingCopyManager();
}
if (fProject != null) {
fLookupOrder = new IScopeContext[] { new ProjectScope(fProject), InstanceScope.INSTANCE,
DefaultScope.INSTANCE };
} else {
fLookupOrder = new IScopeContext[] { InstanceScope.INSTANCE, DefaultScope.INSTANCE };
}
testIfOptionsComplete(allKeys);
if (fProject == null || hasProjectSpecificOptions(fProject)) {
fDisabledProjectSettings = null;
} else {
fDisabledProjectSettings = new IdentityHashMap();
for (int i = 0; i < allKeys.length; i++) {
Key curr = allKeys[i];
fDisabledProjectSettings.put(curr, curr.getStoredValue(fLookupOrder, false, fManager));
}
}
settingsUpdated();
fCheckBoxes = new ArrayList();
fComboBoxes = new ArrayList();
fTextBoxes = new ArrayList(2);
fLabels = new HashMap();
fExpandedComposites = new ArrayList();
fRebuildCount = getRebuildCount();
}
示例2: TypeScriptMainPreferencePage
public TypeScriptMainPreferencePage() {
super(GRID);
IScopeContext scope = DefaultScope.INSTANCE;
setPreferenceStore(new ScopedPreferenceStore(scope, TypeScriptCorePlugin.PLUGIN_ID));
// setDescription(Messages.js_debug_pref_page_desc);
setImageDescriptor(TypeScriptUIImageResource.getImageDescriptor(TypeScriptUIImageResource.IMG_LOGO));
}
示例3: isParamAttrGenerated
private boolean isParamAttrGenerated()
{
IScopeContext[] contexts;
if (project != null)
{
contexts = new IScopeContext[]{
new ProjectScope(project.getProject()), InstanceScope.INSTANCE,
ConfigurationScope.INSTANCE, DefaultScope.INSTANCE
};
}
else
{
contexts = new IScopeContext[]{
InstanceScope.INSTANCE, ConfigurationScope.INSTANCE, DefaultScope.INSTANCE
};
}
for (int j = 0; j < contexts.length; ++j)
{
String value = contexts[j].getNode(JavaCore.PLUGIN_ID)
.get(JavaCore.COMPILER_CODEGEN_METHOD_PARAMETERS_ATTR, null);
if (value != null)
{
value = value.trim();
if (!value.isEmpty())
return "generate".equals(value.trim());
}
}
return false;
}
示例4: initializeDefaultPreferences
public void initializeDefaultPreferences() {
IScopeContext context = DefaultScope.INSTANCE;
IEclipsePreferences node = context.getNode(CoreActivator.getDefault().getBundle().getSymbolicName());
String folderPath = ConfigConstants.MAIN_CONFIG_FOLDER;
node.put(DesignerCoreConstants.CONFIG_FOLDER_PREFERENCE, folderPath);
}
示例5: getDefaultScope
public static IScopeContext getDefaultScope() {
return DefaultScope.INSTANCE;
}
示例6: getDefaultScope
public IScopeContext getDefaultScope() {
return DefaultScope.INSTANCE;
}
示例7: OptionsConfigurationBlock
public OptionsConfigurationBlock(IStatusChangeListener context, IProject project, Key[] allKeys, IWorkbenchPreferenceContainer container) {
fContext= context;
fProject= project;
fAllKeys= allKeys;
fContainer= container;
if (container == null) {
fManager= new WorkingCopyManager();
} else {
fManager= container.getWorkingCopyManager();
}
if (fProject != null) {
fLookupOrder= new IScopeContext[] {
new ProjectScope(fProject),
InstanceScope.INSTANCE,
DefaultScope.INSTANCE
};
} else {
fLookupOrder= new IScopeContext[] {
InstanceScope.INSTANCE,
DefaultScope.INSTANCE
};
}
testIfOptionsComplete(allKeys);
if (fProject == null || hasProjectSpecificOptions(fProject)) {
fDisabledProjectSettings= null;
} else {
fDisabledProjectSettings= new IdentityHashMap<Key, String>();
for (int i= 0; i < allKeys.length; i++) {
Key curr= allKeys[i];
fDisabledProjectSettings.put(curr, curr.getStoredValue(fLookupOrder, false, fManager));
}
}
settingsUpdated();
fCheckBoxes= new ArrayList<Button>();
fComboBoxes= new ArrayList<Combo>();
fTextBoxes= new ArrayList<Text>(2);
fLinks= new ArrayList<Link>(2);
fLabels= new HashMap<Control, Label>();
fExpandableComposites= new ArrayList<ExpandableComposite>();
fRebuildCount= getRebuildCount();
}
示例8: CustomScopedPreferenceStore
/**
* The default constructor.
*
* @param context
* The scope to store to, e.g., {@link InstanceScope#INSTANCE}.
* @param qualifier
* The qualifer used to look up the preference node, e.g., the
* bundle's ID.
*/
public CustomScopedPreferenceStore(IScopeContext context, String qualifier) {
super(context, qualifier);
this.context = context;
this.qualifier = qualifier;
defaultContext = DefaultScope.INSTANCE;
}