Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 210164 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/team/internal/ui/synchronize/ForwardingChangesSection.java (-2 / +2 lines)
Lines 83-89 Link Here
83
	
83
	
84
	protected Composite getEmptyChangesComposite(Composite parent) {
84
	protected Composite getEmptyChangesComposite(Composite parent) {
85
		Composite composite = new Composite(parent, SWT.NONE);
85
		Composite composite = new Composite(parent, SWT.NONE);
86
		composite.setBackground(getBackgroundColor());
86
		composite.setBackground(getBackgroundColor2());
87
		GridLayout layout = new GridLayout();
87
		GridLayout layout = new GridLayout();
88
		layout.numColumns = 2;
88
		layout.numColumns = 2;
89
		composite.setLayout(layout);
89
		composite.setLayout(layout);
Lines 140-146 Link Here
140
		data.widthHint = 100;
140
		data.widthHint = 100;
141
		description.setLayoutData(data);
141
		description.setLayoutData(data);
142
		description.setText(text);
142
		description.setText(text);
143
		description.setBackground(getBackgroundColor());
143
		description.setBackground(getBackgroundColor2());
144
		return description;
144
		return description;
145
	}
145
	}
146
	
146
	
(-)src/org/eclipse/team/internal/ui/synchronize/SyncInfoSetChangesSection.java (-3 / +3 lines)
Lines 179-185 Link Here
179
	
179
	
180
	private Composite getErrorComposite(Composite parent) {
180
	private Composite getErrorComposite(Composite parent) {
181
		Composite composite = new Composite(parent, SWT.NONE);
181
		Composite composite = new Composite(parent, SWT.NONE);
182
		composite.setBackground(getBackgroundColor());
182
		composite.setBackground(getBackgroundColor2());
183
		GridLayout layout = new GridLayout();
183
		GridLayout layout = new GridLayout();
184
		layout.numColumns = 2;
184
		layout.numColumns = 2;
185
		composite.setLayout(layout);
185
		composite.setLayout(layout);
Lines 194-200 Link Here
194
				showErrors();
194
				showErrors();
195
			}
195
			}
196
		});
196
		});
197
		link.setBackground(getBackgroundColor());
197
		link.setBackground(getBackgroundColor2());
198
		link.setUnderlined(true);
198
		link.setUnderlined(true);
199
		
199
		
200
		link = new Hyperlink(composite, SWT.WRAP);
200
		link = new Hyperlink(composite, SWT.WRAP);
Lines 204-210 Link Here
204
				getPage().reset();
204
				getPage().reset();
205
			}
205
			}
206
		});
206
		});
207
		link.setBackground(getBackgroundColor());
207
		link.setBackground(getBackgroundColor2());
208
		link.setUnderlined(true);
208
		link.setUnderlined(true);
209
		
209
		
210
		createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) })); 
210
		createDescriptionLabel(composite, NLS.bind(TeamUIMessages.ChangesSection_10, new String[] { Utils.shortenText(SynchronizeView.MAX_NAME_LENGTH, getConfiguration().getParticipant().getName()) })); 
(-)src/org/eclipse/team/internal/ui/synchronize/ChangesSection.java (-3 / +3 lines)
Lines 68-76 Link Here
68
		setLayoutData(data);
68
		setLayoutData(data);
69
		
69
		
70
		forms = new FormToolkit(parent.getDisplay());
70
		forms = new FormToolkit(parent.getDisplay());
71
		forms.setBackground(getBackgroundColor());
71
		forms.setBackground(getBackgroundColor2());
72
		HyperlinkGroup group = forms.getHyperlinkGroup();
72
		HyperlinkGroup group = forms.getHyperlinkGroup();
73
		group.setBackground(getBackgroundColor());
73
		group.setBackground(getBackgroundColor2());
74
		
74
		
75
		changesSectionContainer = new PageBook(this, SWT.NONE);
75
		changesSectionContainer = new PageBook(this, SWT.NONE);
76
		data = new GridData(GridData.FILL_BOTH);
76
		data = new GridData(GridData.FILL_BOTH);
Lines 79-85 Link Here
79
		changesSectionContainer.setLayoutData(data);
79
		changesSectionContainer.setLayoutData(data);
80
	}
80
	}
81
	
81
	
82
	protected Color getBackgroundColor() {
82
	protected Color getBackgroundColor2() {
83
		return getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
83
		return getShell().getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND);
84
	}
84
	}
85
	
85
	
(-)src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizardMainPage.java (-2 / +35 lines)
Lines 51-56 Link Here
51
	
51
	
52
	private IWizard selectedWizard;
52
	private IWizard selectedWizard;
53
	
53
	
54
	private String selectedWizardId;
55
	
54
	/**
56
	/**
55
	 * Create a new ConfigureProjectWizardMainPage
57
	 * Create a new ConfigureProjectWizardMainPage
56
	 * 
58
	 * 
Lines 80-86 Link Here
80
		this.disabledWizards = disabledWizards;
82
		this.disabledWizards = disabledWizards;
81
		this.description = description;
83
		this.description = description;
82
	}
84
	}
83
	
85
86
	void setInitialWizardId(String id) {
87
		this.selectedWizardId = id;
88
	}
89
90
	String getSelectedWizardId() {
91
		return selectedWizardId;
92
	}
93
84
	public IWizard getSelectedWizard() {
94
	public IWizard getSelectedWizard() {
85
		return selectedWizard;
95
		return selectedWizard;
86
	}
96
	}
Lines 122-139 Link Here
122
				ISelection selection = event.getSelection();
132
				ISelection selection = event.getSelection();
123
				if (selection == null || !(selection instanceof IStructuredSelection)) {
133
				if (selection == null || !(selection instanceof IStructuredSelection)) {
124
					selectedWizard = null;
134
					selectedWizard = null;
135
					selectedWizardId = null;
125
					setPageComplete(false);
136
					setPageComplete(false);
126
					return;
137
					return;
127
				}
138
				}
128
				IStructuredSelection ss = (IStructuredSelection)selection;
139
				IStructuredSelection ss = (IStructuredSelection)selection;
129
				if (ss.size() != 1) {
140
				if (ss.size() != 1) {
130
					selectedWizard = null;
141
					selectedWizard = null;
142
					selectedWizardId = null;
131
					setPageComplete(false);
143
					setPageComplete(false);
132
					return;
144
					return;
133
				}
145
				}
134
				ConfigurationWizardElement selectedElement = (ConfigurationWizardElement)ss.getFirstElement();
146
				ConfigurationWizardElement selectedElement = (ConfigurationWizardElement)ss.getFirstElement();
135
				try {
147
				try {
136
					selectedWizard = (IWizard)selectedElement.createExecutableExtension(getUnsharedProjects());
148
					selectedWizard = (IWizard)selectedElement.createExecutableExtension(getUnsharedProjects());
149
					selectedWizardId = selectedElement.getID();
137
				} catch (CoreException e) {					
150
				} catch (CoreException e) {					
138
					return;
151
					return;
139
				}
152
				}
Lines 181-189 Link Here
181
		} else {
194
		} else {
182
			viewer.setInput(wizards);
195
			viewer.setInput(wizards);
183
		}
196
		}
197
		ConfigurationWizardElement e = findWizardById(((AdaptableList) viewer.getInput()).getChildren(), selectedWizardId);
198
		if (e != null) {
199
		    viewer.setSelection(new StructuredSelection(e));
200
		}
184
        Dialog.applyDialogFont(parent);
201
        Dialog.applyDialogFont(parent);
185
	}
202
	}
186
	
203
204
	private ConfigurationWizardElement findWizardById(Object[] children, String wizardId) {
205
		if (children == null) {
206
			return null;
207
		}
208
		for (int i = 0; i < children.length; i++) {
209
			try {
210
				ConfigurationWizardElement e = (ConfigurationWizardElement)children[i];
211
				if (e.getID().equals(wizardId)) {
212
					return e;
213
				}
214
			} catch(ClassCastException e) {
215
			}
216
		}
217
		return null;
218
	}
219
187
	/* package */ IProject[] getUnsharedProjects() {
220
	/* package */ IProject[] getUnsharedProjects() {
188
		java.util.List unshared = new ArrayList();
221
		java.util.List unshared = new ArrayList();
189
		for (int i = 0; i < projects.length; i++) {
222
		for (int i = 0; i < projects.length; i++) {
(-)src/org/eclipse/team/internal/ui/wizards/ConfigureProjectWizard.java (-2 / +12 lines)
Lines 20-25 Link Here
20
import org.eclipse.ui.activities.IActivityManager;
20
import org.eclipse.ui.activities.IActivityManager;
21
import org.eclipse.ui.activities.IIdentifier;
21
import org.eclipse.ui.activities.IIdentifier;
22
import org.eclipse.ui.model.AdaptableList;
22
import org.eclipse.ui.model.AdaptableList;
23
import org.osgi.service.prefs.Preferences;
23
24
24
/**
25
/**
25
 * The wizard for associating projects with team providers
26
 * The wizard for associating projects with team providers
Lines 35-41 Link Here
35
	protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
36
	protected final static String ATT_CLASS = "class"; //$NON-NLS-1$
36
	protected final static String ATT_ICON = "icon"; //$NON-NLS-1$
37
	protected final static String ATT_ICON = "icon"; //$NON-NLS-1$
37
	protected final static String ATT_ID = "id"; //$NON-NLS-1$
38
	protected final static String ATT_ID = "id"; //$NON-NLS-1$
38
	
39
	protected final static String PREF_LAST_WIZARD_ID = "lastWizardId"; //$NON-NLS-1$
40
39
	private ConfigureProjectWizard(IProject[] projects) {
41
	private ConfigureProjectWizard(IProject[] projects) {
40
		this.projects = projects;
42
		this.projects = projects;
41
		setNeedsProgressMonitor(true);
43
		setNeedsProgressMonitor(true);
Lines 51-56 Link Here
51
		mainPage = new ConfigureProjectWizardMainPage("configurePage1", TeamUIMessages.ConfigureProjectWizard_configureProject, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE), wizards, disabledWizards); //$NON-NLS-1$
53
		mainPage = new ConfigureProjectWizardMainPage("configurePage1", TeamUIMessages.ConfigureProjectWizard_configureProject, TeamUIPlugin.getImageDescriptor(ITeamUIImages.IMG_WIZBAN_SHARE), wizards, disabledWizards); //$NON-NLS-1$
52
		mainPage.setDescription(TeamUIMessages.ConfigureProjectWizard_description);
54
		mainPage.setDescription(TeamUIMessages.ConfigureProjectWizard_description);
53
		mainPage.setProjects(projects);
55
		mainPage.setProjects(projects);
56
		Preferences preferences = TeamUIPlugin.getPlugin().getInstancePreferences();
57
		String initialWizardId = preferences.get(PREF_LAST_WIZARD_ID, null);
58
		mainPage.setInitialWizardId(initialWizardId);
54
		addPage(mainPage);
59
		addPage(mainPage);
55
	}
60
	}
56
61
Lines 79-88 Link Here
79
			if (noPageWizard != null) {
84
			if (noPageWizard != null) {
80
				if (noPageWizard.canFinish()) 
85
				if (noPageWizard.canFinish()) 
81
				{
86
				{
87
					Preferences preferences = TeamUIPlugin.getPlugin().getInstancePreferences();
88
					preferences.put(PREF_LAST_WIZARD_ID, mainPage.getSelectedWizardId());
82
					return noPageWizard.performFinish();
89
					return noPageWizard.performFinish();
83
				}
90
				}
84
			}
91
			}
85
		}		
92
		}
93
		Preferences preferences = TeamUIPlugin.getPlugin().getInstancePreferences();
94
		preferences.put(PREF_LAST_WIZARD_ID, mainPage.getSelectedWizardId());
95
86
		// If the wizard has pages and there are several
96
		// If the wizard has pages and there are several
87
		// wizards registered then the registered wizard
97
		// wizards registered then the registered wizard
88
		// will call it's own performFinish().		
98
		// will call it's own performFinish().		
(-)src/org/eclipse/team/internal/ui/mapping/DiffTreeChangesSection.java (-5 / +5 lines)
Lines 291-297 Link Here
291
291
292
	private Composite createEnableParticipantModelProvidersPane(Composite parent) {
292
	private Composite createEnableParticipantModelProvidersPane(Composite parent) {
293
		Composite composite = new Composite(parent, SWT.NONE);
293
		Composite composite = new Composite(parent, SWT.NONE);
294
		composite.setBackground(getBackgroundColor());
294
		composite.setBackground(getBackgroundColor2());
295
		GridLayout layout = new GridLayout();
295
		GridLayout layout = new GridLayout();
296
		layout.numColumns = 2;
296
		layout.numColumns = 2;
297
		composite.setLayout(layout);
297
		composite.setLayout(layout);
Lines 358-364 Link Here
358
358
359
	private Composite getInitializationPane(Composite parent) {
359
	private Composite getInitializationPane(Composite parent) {
360
		Composite composite = new Composite(parent, SWT.NONE);
360
		Composite composite = new Composite(parent, SWT.NONE);
361
		composite.setBackground(getBackgroundColor());
361
		composite.setBackground(getBackgroundColor2());
362
		GridLayout layout = new GridLayout();
362
		GridLayout layout = new GridLayout();
363
		layout.numColumns = 2;
363
		layout.numColumns = 2;
364
		composite.setLayout(layout);
364
		composite.setLayout(layout);
Lines 417-423 Link Here
417
417
418
	private Composite getInitializingMessagePane(Composite parent) {
418
	private Composite getInitializingMessagePane(Composite parent) {
419
		Composite composite = new Composite(parent, SWT.NONE);
419
		Composite composite = new Composite(parent, SWT.NONE);
420
		composite.setBackground(getBackgroundColor());
420
		composite.setBackground(getBackgroundColor2());
421
		GridLayout layout = new GridLayout();
421
		GridLayout layout = new GridLayout();
422
		layout.numColumns = 2;
422
		layout.numColumns = 2;
423
		composite.setLayout(layout);
423
		composite.setLayout(layout);
Lines 442-448 Link Here
442
442
443
	private Composite getPointerToModel(Composite parent, final ModelProvider provider, String oldId) {
443
	private Composite getPointerToModel(Composite parent, final ModelProvider provider, String oldId) {
444
		Composite composite = new Composite(parent, SWT.NONE);
444
		Composite composite = new Composite(parent, SWT.NONE);
445
		composite.setBackground(getBackgroundColor());
445
		composite.setBackground(getBackgroundColor2());
446
		GridLayout layout = new GridLayout();
446
		GridLayout layout = new GridLayout();
447
		layout.numColumns = 2;
447
		layout.numColumns = 2;
448
		composite.setLayout(layout);
448
		composite.setLayout(layout);
Lines 532-538 Link Here
532
	
532
	
533
	private Composite getErrorComposite(Composite parent) {
533
	private Composite getErrorComposite(Composite parent) {
534
		Composite composite = new Composite(parent, SWT.NONE);
534
		Composite composite = new Composite(parent, SWT.NONE);
535
		composite.setBackground(getBackgroundColor());
535
		composite.setBackground(getBackgroundColor2());
536
		GridLayout layout = new GridLayout();
536
		GridLayout layout = new GridLayout();
537
		layout.numColumns = 2;
537
		layout.numColumns = 2;
538
		composite.setLayout(layout);
538
		composite.setLayout(layout);

Return to bug 210164