org.eclipse.ui.preferences.IWorkingCopyManager Java Examples

The following examples show how to use org.eclipse.ui.preferences.IWorkingCopyManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PreferenceKey.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager)
{
	IEclipsePreferences node = context.getNode(fQualifier);
	if (manager != null)
	{
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example #2
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public static boolean hasProjectSpecificOptions(IProject project, Key[] allKeys, IWorkingCopyManager manager) {
	if (project != null) {
		IScopeContext projectContext= new ProjectScope(project);
		for (int i= 0; i < allKeys.length; i++) {
			if (allKeys[i].getStoredValue(projectContext, manager) != null) {
				return true;
			}
		}
	}
	return false;
}
 
Example #3
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) {
	if (value != null) {
		fValues.put(context, value);
	} else {
		fValues.remove(context);
	}
}
 
Example #4
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) {
	if (value != null) {
		getNode(context, manager).put(fKey, value);
	} else {
		getNode(context, manager).remove(fKey);
	}
}
 
Example #5
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public String getStoredValue(IScopeContext[] lookupOrder, boolean ignoreTopScope, IWorkingCopyManager manager) {
	for (int i= ignoreTopScope ? 1 : 0; i < lookupOrder.length; i++) {
		String value= getStoredValue(lookupOrder[i], manager);
		if (value != null) {
			return value;
		}
	}
	return null;
}
 
Example #6
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
	IEclipsePreferences node= context.getNode(fQualifier);
	if (manager != null) {
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example #7
Source File: PreferenceKey.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager)
{
	if (value != null)
	{
		getNode(context, manager).put(fKey, value);
	}
	else
	{
		getNode(context, manager).remove(fKey);
	}
}
 
Example #8
Source File: PreferenceKey.java    From APICloud-Studio with GNU General Public License v3.0 5 votes vote down vote up
public String getStoredValue(IScopeContext[] lookupOrder, boolean ignoreTopScope, IWorkingCopyManager manager)
{
	for (int i = ignoreTopScope ? 1 : 0; i < lookupOrder.length; i++)
	{
		String value = getStoredValue(lookupOrder[i], manager);
		if (value != null)
		{
			return value;
		}
	}
	return null;
}
 
Example #9
Source File: OptionsConfigurationBlock.java    From typescript.java with MIT License 5 votes vote down vote up
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) {
	if (value != null) {
		getNode(context, manager).put(fKey, value);
	} else {
		getNode(context, manager).remove(fKey);
	}
}
 
Example #10
Source File: OptionsConfigurationBlock.java    From typescript.java with MIT License 5 votes vote down vote up
public String getStoredValue(IScopeContext[] lookupOrder, boolean ignoreTopScope, IWorkingCopyManager manager) {
	for (int i = ignoreTopScope ? 1 : 0; i < lookupOrder.length; i++) {
		String value = getStoredValue(lookupOrder[i], manager);
		if (value != null) {
			return value;
		}
	}
	return null;
}
 
Example #11
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public String getStoredValue(IScopeContext[] lookupOrder, boolean ignoreTopScope, IWorkingCopyManager manager) {
	for (int i= ignoreTopScope ? 1 : 0; i < lookupOrder.length; i++) {
		String value= getStoredValue(lookupOrder[i], manager);
		if (value != null) {
			return value;
		}
	}
	return null;
}
 
Example #12
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
    IEclipsePreferences node= context.getNode(fQualifier);
    if (manager != null) {
        return manager.getWorkingCopy(node);
    }
    return node;
}
 
Example #13
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public static void removeChangeListener(IScopeContext context, IWorkingCopyManager manager, 
                                        String qualifier, IPreferenceChangeListener listener) 
{
    IEclipsePreferences node= context.getNode(qualifier);
    if (manager != null) {
        node =  manager.getWorkingCopy(node);
    }
    node.removePreferenceChangeListener(listener);
}
 
Example #14
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public static void addChangeListener(IScopeContext context, IWorkingCopyManager manager, 
                                     String qualifier, IPreferenceChangeListener listener) 
{
    IEclipsePreferences node= context.getNode(qualifier);
    if (manager != null) {
        node =  manager.getWorkingCopy(node);
    }
    node.addPreferenceChangeListener(listener);
}
 
Example #15
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public void setStoredInt(IScopeContext context, Integer value, IWorkingCopyManager manager) {
    if (value != null) {
        getNode(context, manager).putInt(fKey, value);
    } else {
        getNode(context, manager).remove(fKey);
    }
}
 
Example #16
Source File: OptionsConfigurationBlock.java    From typescript.java with MIT License 5 votes vote down vote up
private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) {
	IEclipsePreferences node = context.getNode(fQualifier);
	if (manager != null) {
		return manager.getWorkingCopy(node);
	}
	return node;
}
 
Example #17
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) {
	if (value != null) {
		getNode(context, manager).put(fKey, value);
	} else {
		getNode(context, manager).remove(fKey);
	}
}
 
Example #18
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 5 votes vote down vote up
public void setStoredBoolean(IScopeContext context, Boolean value, IWorkingCopyManager manager) {
	if (value != null) {
		getNode(context, manager).putBoolean(fKey, value);
	} else {
		getNode(context, manager).remove(fKey);
	}
}
 
Example #19
Source File: PreferencesAccess.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private WorkingCopyPreferencesAccess(IWorkingCopyManager workingCopyManager) {
	fWorkingCopyManager= workingCopyManager;
}
 
Example #20
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
public boolean getStoredBoolean(IScopeContext context, IWorkingCopyManager manager){
	return getNode(context, manager).getBoolean(fKey, defBooleanValue);
}
 
Example #21
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public String getStoredValue(IScopeContext context, IWorkingCopyManager manager) {
	return fValues.get(context);
}
 
Example #22
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
public int getStoredInt(IScopeContext context, IWorkingCopyManager manager){
    return getNode(context, manager).getInt(fKey, defIntValue);
}
 
Example #23
Source File: OptionsConfigurationBlock.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public String getStoredValue(IScopeContext context, IWorkingCopyManager manager) {
	return getNode(context, manager).get(fKey, null);
}
 
Example #24
Source File: PreferencesAccess.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public WorkingCopyScopeContext(IWorkingCopyManager workingCopyManager, IScopeContext original) {
	fWorkingCopyManager= workingCopyManager;
	fOriginal= original;
}
 
Example #25
Source File: PreferencesAccess.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public static PreferencesAccess getWorkingCopyPreferences(IWorkingCopyManager workingCopyManager) {
	return new WorkingCopyPreferencesAccess(workingCopyManager);
}
 
Example #26
Source File: PreferenceKey.java    From APICloud-Studio with GNU General Public License v3.0 4 votes vote down vote up
public String getStoredValue(IScopeContext context, IWorkingCopyManager manager)
{
	return getNode(context, manager).get(fKey, null);
}
 
Example #27
Source File: PreferenceKey.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
public String getStoredValue(IScopeContext context, IWorkingCopyManager manager) {
	return getNode(context, manager).get(fKey, defStringValue);
}
 
Example #28
Source File: OptionsConfigurationBlock.java    From typescript.java with MIT License 4 votes vote down vote up
public String getStoredValue(IScopeContext context, IWorkingCopyManager manager) {
	return getNode(context, manager).get(fKey, null);
}