Bug 90257 [Preferences] Want to create an instanceof of a WorkingCopyManager
20050405 I'm currently referencing the internal class org.eclipse.ui.internal.preferences.WorkingCopyManager I have a base class that manages all the current settings and I changes that class to use the working copy manager. For the following reasons I also have to function when I don't get a working copy manager. To avoid complicated code it would be nice if in these case I could just use an internal instance of the working copy manager. - In the preference page, when testing if my container is really of kind IWorkbenchPreferenceContainer (so I can access the working copy manager) I have to also handle the case that the test returns false - We have some pages that are contributed by extension point that don't give me access to the container due to API limitations.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/preferences/OptionsConfigurationBlock.java
checkBox.addSelectionListener(getSelectionListener());
		
		makeScrollableCompositeAware(checkBox);
		
		String currValue= getValue(key);
		checkBox.setSelection(data.getSelection(currValue) == 0);
		
		fCheckBoxes.add(checkBox);
		
		return checkBox;
	}
	
	protected Button addCheckBoxWithLink(Composite parent, String label, Key key, String[] values, int indent, int widthHint, SelectionListener listener) {
		ControlData data= new ControlData(key, values);
		
		GridData gd= new GridData(GridData.FILL, GridData.FILL, true, false);
		gd.horizontalSpan= 3;
		gd.horizontalIndent= indent;
		
		Composite composite= new Composite(parent, SWT.NONE);
		GridLayout layout= new GridLayout();
		layout.marginHeight= 0;
		layout.marginWidth= 0;
		layout.numColumns= 2;
		composite.setLayout(layout);
		composite.setLayoutData(gd);
		
		Button checkBox= new Button(composite, SWT.CHECK);
		checkBox.setFont(JFaceResources.getDialogFont());
		checkBox.setData(data);