Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
 
 package org.eclipse.team.internal.ccvs.ui.repo;
 
 
 import  org.eclipse.swt.SWT;
 import  org.eclipse.swt.layout.GridLayout;
 import  org.eclipse.swt.widgets.Composite;
Page that allows the user to select the remote projects whose tags should be refreshed.
 
     
Custom input provider which returns the list of root folders
 
 	private class InputElement implements IWorkbenchAdapterIAdaptable {
 		public Object[] getChildren(Object o) {
 			return ;
 		}
 			return null;
 		}
 		public String getLabel(Object o) {
 			return null;
 		}
 		public Object getParent(Object o) {
 			return null;
 		}
 		public Object getAdapter(Class adapter) {
 			if (adapter == IWorkbenchAdapter.classreturn this;
 			return null;
 		}
 	}

Constructor for RemoteProjectSelectionPage.

Parameters:
pageName
title
titleImage
description
 
 			String pageName,
 			String title,
 			ImageDescriptor titleImage,
 			String description
 			IDialogSettings settings,
 			ICVSRemoteResource[] rootFolders) {
 		super(pageNametitletitleImagedescription);
 		this. = settings;
 		this. = rootFolders;
 	}

See also:
org.eclipse.jface.dialogs.IDialogPage.createControl(org.eclipse.swt.widgets.Composite)
 
 	public void createControl(Composite parent) {
 		
 		final Composite composite = new Composite(parent, SWT.NONE);
 		composite.setLayout(new GridLayout(1, false));
 		
 		setControl(composite);
 		
 		// set F1 help
			new InputElement(), 
		.createArea(composite);
			public void propertyChange(PropertyChangeEvent event) {
			}
		});
			public void propertyChange(PropertyChangeEvent event) {
			}
		});
        Dialog.applyDialogFont(parent);
	}

Sets the working set that should be selected in the most recently used working set list.

Parameters:
workingSet the working set that should be selected. has to exist in the list returned by org.eclipse.ui.IWorkingSetManager#getRecentWorkingSets(). Must not be null.
	public void setWorkingSet(IWorkingSet workingSet) {
		this. = workingSet;
		if ( != null) {
		}
	}
	private void handleWorkingSetChange() {
		if ( != null) {
			// check any projects in the working set
			RepositoryManager manager = CVSUIPlugin.getPlugin().getRepositoryManager();
			for (int i = 0; i < resources.lengthi++) {
				ICVSRemoteResource resource = resources[i];
				.getViewer().setChecked(resourcetrue);
			}
		}
	}
	private void updateEnablement() {
		boolean atLeastOne = .getViewer().getCheckedElements().length > 0;
		setPageComplete(atLeastOne);
	}

Method getSelectedRemoteProject.

Returns:
ICVSRemoteResource[]
		return (ICVSRemoteResource[]) Arrays.asList(checked).toArray(new ICVSRemoteResource[checked.length]);
	}
New to GrepCode? Check out our FAQ X