本文整理了Java中org.eclipse.ui.preferences.WorkingCopyManager
类的一些代码示例,展示了WorkingCopyManager
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkingCopyManager
类的具体详情如下:
包路径:org.eclipse.ui.preferences.WorkingCopyManager
类名称:WorkingCopyManager
[英]WorkingCopyManager is a concrete implementation of an IWorkingCopyManager.
This class is not intended to be sub-classed by clients.
[中]WorkingCopyManager是IWorkingCopyManager的具体实现。
此类不打算由客户机进行子分类。
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
@Override
public IWorkingCopyManager getWorkingCopyManager() {
if (workingCopyManager == null) {
workingCopyManager = new WorkingCopyManager();
}
return workingCopyManager;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
@Override
public Preferences node(String path) {
checkRemoved();
return manager.getWorkingCopy((IEclipsePreferences) getOriginal().node(path));
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
@Override
public Preferences parent() {
checkRemoved();
return manager.getWorkingCopy((IEclipsePreferences) getOriginal().parent());
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
/**
* Constructor
*
* @param project
*/
public ApiBaselinesConfigurationBlock(IWorkbenchPreferenceContainer container) {
fLookupOrder = new IScopeContext[] {
InstanceScope.INSTANCE, DefaultScope.INSTANCE };
if (container == null) {
fManager = new WorkingCopyManager();
} else {
fManager = container.getWorkingCopyManager();
}
}
代码示例来源:origin: org.eclipse.pde.api.tools/ui
/**
* Constructor
* @param project
*/
public ApiBaselinesConfigurationBlock(IWorkbenchPreferenceContainer container) {
fLookupOrder = new IScopeContext[] {
InstanceScope.INSTANCE,
DefaultScope.INSTANCE
};
if(container == null) {
fManager = new WorkingCopyManager();
}
else {
fManager = container.getWorkingCopyManager();
}
fOldProjectSettings = null;
}
代码示例来源:origin: org.eclipse.xtext/ui
protected IWorkingCopyManager getWorkingCopyManager() {
IWorkbenchPreferenceContainer container = (IWorkbenchPreferenceContainer) getContainer();
IWorkingCopyManager manager;
if (container == null) {
manager = new WorkingCopyManager();
} else {
manager = container.getWorkingCopyManager();
}
return manager;
}
代码示例来源:origin: org.eclipse.pde.api.tools/ui
/**
* Initializes the page
*/
private void performInit() {
if (getContainer() == null) {
fManager = new WorkingCopyManager();
} else {
fManager = ((IWorkbenchPreferenceContainer) getContainer()).getWorkingCopyManager();
}
fLocationList.clear();
String location = getStoredValue(IApiCoreConstants.API_USE_SCAN_LOCATION, null);
ArrayList checkedLocations = new ArrayList();
if (location != null && location.length() > 0) {
String[] locations = location.split(UseScanManager.ESCAPE_REGEX + UseScanManager.LOCATION_DELIM);
for (int i = 0; i < locations.length; i++) {
String values[] = locations[i].split(UseScanManager.ESCAPE_REGEX + UseScanManager.STATE_DELIM);
fLocationList.add(values[0]);
if (Boolean.valueOf(values[1]).booleanValue())
checkedLocations.add(values[0]);
}
fLocationList.remove(""); //$NON-NLS-1$
}
fTableViewer.setInput(fLocationList);
fTableViewer.setCheckedElements(checkedLocations.toArray(new String[checkedLocations.size()]));
fTableViewer.refresh();
setErrorMessage(null);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
/**
* Initializes the page
*/
private void performInit() {
if (getContainer() == null) {
fManager = new WorkingCopyManager();
} else {
fManager = ((IWorkbenchPreferenceContainer) getContainer()).getWorkingCopyManager();
}
fLocationList.clear();
String location = getStoredValue(IApiCoreConstants.API_USE_SCAN_LOCATION, null);
ArrayList<String> checkedLocations = new ArrayList<>();
if (location != null && location.length() > 0) {
String[] locations = location.split(UseScanManager.ESCAPE_REGEX + UseScanManager.LOCATION_DELIM);
for (String locationString : locations) {
String values[] = locationString.split(UseScanManager.ESCAPE_REGEX + UseScanManager.STATE_DELIM);
fLocationList.add(values[0]);
if (Boolean.valueOf(values[1]).booleanValue()) {
checkedLocations.add(values[0]);
}
}
fLocationList.remove(""); //$NON-NLS-1$
}
fTableViewer.setInput(fLocationList);
fTableViewer.setCheckedElements(checkedLocations.toArray(new String[checkedLocations.size()]));
fTableViewer.refresh();
setErrorMessage(null);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
fContainer= container;
if (container == null) {
fManager= new WorkingCopyManager();
} else {
fManager= container.getWorkingCopyManager();
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools.ui
/**
* Constructor
*
* @param project
*/
public ApiErrorsWarningsConfigurationBlock(IProject project, IWorkbenchPreferenceContainer container) {
fProject = project;
if (fProject != null) {
fLookupOrder = new IScopeContext[] {
new ProjectScope(fProject), InstanceScope.INSTANCE,
DefaultScope.INSTANCE };
} else {
fLookupOrder = new IScopeContext[] {
InstanceScope.INSTANCE, DefaultScope.INSTANCE };
}
if (container == null) {
fManager = new WorkingCopyManager();
} else {
fManager = container.getWorkingCopyManager();
}
if (fProject == null || hasProjectSpecificSettings(fProject)) {
fOldProjectSettings = null;
} else {
fOldProjectSettings = new IdentityHashMap<>();
for (Key key : fgAllKeys) {
fOldProjectSettings.put(key, key.getStoredValue(fLookupOrder, false, fManager));
}
}
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
fContainer= container;
if (container == null) {
fManager= new WorkingCopyManager();
} else {
fManager= container.getWorkingCopyManager();
代码示例来源:origin: org.eclipse.pde.api.tools/ui
fManager = new WorkingCopyManager();
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public void createControl(Composite parent) {
IPreferencePageContainer container= getContainer();
IWorkingCopyManager workingCopyManager;
if (container instanceof IWorkbenchPreferenceContainer) {
workingCopyManager= ((IWorkbenchPreferenceContainer) container).getWorkingCopyManager();
} else {
workingCopyManager= new WorkingCopyManager(); // non shared
}
PreferencesAccess access= PreferencesAccess.getWorkingCopyPreferences(workingCopyManager);
fConfigurationBlock= createConfigurationBlock(access);
super.createControl(parent);
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
public PDECompilersConfigurationBlock(IProject project, IWorkbenchPreferenceContainer container) {
fProject = project;
if (fProject != null) {
fLookupOrder = new IScopeContext[] {new ProjectScope(fProject), InstanceScope.INSTANCE, DefaultScope.INSTANCE};
} else {
fLookupOrder = new IScopeContext[] {InstanceScope.INSTANCE, DefaultScope.INSTANCE};
}
if (container == null) {
fManager = new WorkingCopyManager();
} else {
fManager = container.getWorkingCopyManager();
}
if (fProject == null || hasProjectSpecificSettings(fProject)) {
fOldProjectSettings = null;
} else {
fOldProjectSettings = new IdentityHashMap<>();
for (Key key : fgAllKeys) {
fOldProjectSettings.put(key, key.getStoredValue(fLookupOrder, false, fManager));
}
}
//make it load so we have access to the pde preferences initialized via pde core preferences
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=273017
PDECore.getDefault().getPreferencesManager();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
public void createControl(Composite parent) {
IPreferencePageContainer container= getContainer();
IWorkingCopyManager workingCopyManager;
if (container instanceof IWorkbenchPreferenceContainer) {
workingCopyManager= ((IWorkbenchPreferenceContainer) container).getWorkingCopyManager();
} else {
workingCopyManager= new WorkingCopyManager(); // non shared
}
PreferencesAccess access= PreferencesAccess.getWorkingCopyPreferences(workingCopyManager);
fConfigurationBlock= createConfigurationBlock(access);
super.createControl(parent);
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
public void createControl(Composite parent) {
IPreferencePageContainer container= getContainer();
IWorkingCopyManager workingCopyManager;
if (container instanceof IWorkbenchPreferenceContainer) {
workingCopyManager= ((IWorkbenchPreferenceContainer) container).getWorkingCopyManager();
} else {
workingCopyManager= new WorkingCopyManager(); // non shared
}
PreferencesAccess access= PreferencesAccess.getWorkingCopyPreferences(workingCopyManager);
fConfigurationBlock= createConfigurationBlock(access);
super.createControl(parent);
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
fContainer= container;
if (container == null) {
fManager= new WorkingCopyManager();
} else {
fManager= container.getWorkingCopyManager();
代码示例来源:origin: org.eclipse/org.eclipse.ltk.ui.refactoring
fManager= ((IWorkbenchPreferenceContainer) container).getWorkingCopyManager();
else
fManager= new WorkingCopyManager();
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
@Override
protected Control createPreferenceContent(Composite parent) {
IPreferencePageContainer container= getContainer();
IWorkingCopyManager manager;
if (container instanceof IWorkbenchPreferenceContainer) {
manager= ((IWorkbenchPreferenceContainer)container).getWorkingCopyManager();
} else {
manager= new WorkingCopyManager(); // non shared
}
fAccess= PreferencesAccess.getWorkingCopyPreferences(manager);
IProject project= getProject();
IScopeContext context;
if (project != null) {
context= fAccess.getProjectScope(project);
} else {
context= fAccess.getInstanceScope();
}
fConfigurationBlock= createConfigurationBlock(context);
Control content= fConfigurationBlock.createControl(parent);
fConfigurationBlock.initialize();
Dialog.applyDialogFont(content);
return content;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
@Override
protected Control createPreferenceContent(Composite parent) {
IPreferencePageContainer container= getContainer();
IWorkingCopyManager manager;
if (container instanceof IWorkbenchPreferenceContainer) {
manager= ((IWorkbenchPreferenceContainer)container).getWorkingCopyManager();
} else {
manager= new WorkingCopyManager(); // non shared
}
fAccess= PreferencesAccess.getWorkingCopyPreferences(manager);
IProject project= getProject();
IScopeContext context;
if (project != null) {
context= fAccess.getProjectScope(project);
} else {
context= fAccess.getInstanceScope();
}
fConfigurationBlock= createConfigurationBlock(context);
Control content= fConfigurationBlock.createControl(parent);
fConfigurationBlock.initialize();
Dialog.applyDialogFont(content);
return content;
}
内容来源于网络,如有侵权,请联系作者删除!