Java Code Examples for org.eclipse.ui.internal.ide.DialogUtil#inRegularFontMode()

The following examples show how to use org.eclipse.ui.internal.ide.DialogUtil#inRegularFontMode() . 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: ImportTraceWizardPage.java    From tracecompass with Eclipse Public License 2.0 6 votes vote down vote up
/**
 * Create the import source selection widget. (Copied from
 * WizardResourceImportPage but instead always uses the internal
 * ResourceTreeAndListGroup to keep compatibility with Kepler)
 */
@Override
protected void createFileSelectionGroup(Composite parent) {

    // Just create with a dummy root.
    fSelectionGroup = new ResourceTreeAndListGroup(parent,
            new FileSystemElement("Dummy", null, true), //$NON-NLS-1$
            getFolderProvider(), new WorkbenchLabelProvider(),
            getFileProvider(), new WorkbenchLabelProvider(), SWT.NONE,
            DialogUtil.inRegularFontMode(parent));

    ICheckStateListener listener = event -> updateWidgetEnablements();

    WorkbenchViewerComparator comparator = new WorkbenchViewerComparator();
    fSelectionGroup.setTreeComparator(comparator);
    fSelectionGroup.setListComparator(comparator);
    fSelectionGroup.addCheckStateListener(listener);

}
 
Example 2
Source File: WizardExportResourcesPage2.java    From translationstudio8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates the checkbox tree and list for selecting resources.
 * @param parent
 *            the parent control
 */
protected final void createResourcesGroup(Composite parent) {

	// create the input element, which has the root resource
	// as its only child
	List input = new ArrayList();
	IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
	for (int i = 0; i < projects.length; i++) {
		if (projects[i].isOpen()) {
			input.add(projects[i]);
		}
	}

	this.resourceGroup = new ResourceTreeAndListGroup(parent, input, getResourceProvider(IResource.FOLDER
			| IResource.PROJECT), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
			getResourceProvider(IResource.FILE), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
			SWT.NONE, DialogUtil.inRegularFontMode(parent));

	ICheckStateListener listener = new ICheckStateListener() {
		public void checkStateChanged(CheckStateChangedEvent event) {
			updateWidgetEnablements();
		}
	};

	this.resourceGroup.addCheckStateListener(listener);
}
 
Example 3
Source File: WizardExportResourcesPage2.java    From tmxeditor8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Creates the checkbox tree and list for selecting resources.
 * @param parent
 *            the parent control
 */
protected final void createResourcesGroup(Composite parent) {

	// create the input element, which has the root resource
	// as its only child
	List input = new ArrayList();
	IProject[] projects = ResourcesPlugin.getWorkspace().getRoot().getProjects();
	for (int i = 0; i < projects.length; i++) {
		if (projects[i].isOpen()) {
			input.add(projects[i]);
		}
	}

	this.resourceGroup = new ResourceTreeAndListGroup(parent, input, getResourceProvider(IResource.FOLDER
			| IResource.PROJECT), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
			getResourceProvider(IResource.FILE), WorkbenchLabelProvider.getDecoratingWorkbenchLabelProvider(),
			SWT.NONE, DialogUtil.inRegularFontMode(parent));

	ICheckStateListener listener = new ICheckStateListener() {
		public void checkStateChanged(CheckStateChangedEvent event) {
			updateWidgetEnablements();
		}
	};

	this.resourceGroup.addCheckStateListener(listener);
}