View | Details | Raw Unified | Return to bug 195729 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/ui/wizards/imports/CVSBundleImportPage.java (-19 / +12 lines)
Lines 10-40 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.pde.internal.ui.wizards.imports;
11
package org.eclipse.pde.internal.ui.wizards.imports;
12
12
13
import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
14
15
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
16
17
import org.eclipse.jface.dialogs.IDialogSettings;
13
import org.eclipse.jface.dialogs.IDialogSettings;
18
import org.eclipse.jface.viewers.ArrayContentProvider;
14
import org.eclipse.jface.viewers.*;
19
import org.eclipse.jface.viewers.ILabelProvider;
20
import org.eclipse.jface.viewers.StyledCellLabelProvider;
21
import org.eclipse.jface.viewers.StyledString;
22
import org.eclipse.jface.viewers.TableViewer;
23
import org.eclipse.jface.viewers.ViewerCell;
24
import org.eclipse.jface.viewers.ViewerComparator;
25
import org.eclipse.jface.wizard.WizardPage;
15
import org.eclipse.jface.wizard.WizardPage;
26
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
16
import org.eclipse.pde.internal.core.importing.CvsBundleImportDescription;
17
import org.eclipse.pde.internal.core.importing.provisional.BundleImportDescription;
27
import org.eclipse.pde.internal.ui.PDEUIMessages;
18
import org.eclipse.pde.internal.ui.PDEUIMessages;
28
import org.eclipse.pde.internal.ui.SWTFactory;
19
import org.eclipse.pde.internal.ui.SWTFactory;
20
import org.eclipse.pde.internal.ui.provisional.IBundeImportWizardPage;
29
import org.eclipse.swt.SWT;
21
import org.eclipse.swt.SWT;
30
import org.eclipse.swt.events.SelectionAdapter;
22
import org.eclipse.swt.events.*;
31
import org.eclipse.swt.events.SelectionEvent;
32
import org.eclipse.swt.events.SelectionListener;
33
import org.eclipse.swt.graphics.Image;
23
import org.eclipse.swt.graphics.Image;
34
import org.eclipse.swt.layout.GridData;
24
import org.eclipse.swt.layout.GridData;
35
import org.eclipse.swt.widgets.Button;
25
import org.eclipse.swt.widgets.*;
36
import org.eclipse.swt.widgets.Composite;
37
import org.eclipse.swt.widgets.Table;
38
import org.eclipse.ui.PlatformUI;
26
import org.eclipse.ui.PlatformUI;
39
import org.eclipse.ui.ide.IDE;
27
import org.eclipse.ui.ide.IDE;
40
28
Lines 161-168 Link Here
161
		useHead.setSelection(head);
149
		useHead.setSelection(head);
162
		versions.setSelection(!head);
150
		versions.setSelection(!head);
163
151
164
		// fill viewer
152
		if (descriptions != null) {
165
		bundlesViewer.setInput(descriptions);
153
			bundlesViewer.setInput(descriptions);
154
		}
166
	}
155
	}
167
156
168
	/* (non-Javadoc)
157
	/* (non-Javadoc)
Lines 215-220 Link Here
215
	 */
204
	 */
216
	public void setSelection(BundleImportDescription[] descriptions) {
205
	public void setSelection(BundleImportDescription[] descriptions) {
217
		this.descriptions = descriptions;
206
		this.descriptions = descriptions;
207
		// fill viewer
208
		if (bundlesViewer != null) {
209
			bundlesViewer.setInput(descriptions);
210
		}
218
	}
211
	}
219
212
220
}
213
}
(-)src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizard.java (-3 / +3 lines)
Lines 97-103 Link Here
97
97
98
		}
98
		}
99
		if (page1.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
99
		if (page1.getImportType() == PluginImportOperation.IMPORT_FROM_REPOSITORY) {
100
			if (getContainer().getCurrentPage() == page3) {
100
			if (getContainer().getCurrentPage() instanceof BaseImportWizardSecondPage) {
101
				// ensure to set the models to import when finished is pressed without advancing to the repository pages
101
				// ensure to set the models to import when finished is pressed without advancing to the repository pages
102
				page1.configureBundleImportPages(models);
102
				page1.configureBundleImportPages(models);
103
			}
103
			}
Lines 182-188 Link Here
182
			}
182
			}
183
			return page2;
183
			return page2;
184
		}
184
		}
185
		if (page.equals(page3)) {
185
		if (page.equals(page2) || page.equals(page3)) {
186
			return page1.getNextPage(page);
186
			return page1.getNextPage(page);
187
		}
187
		}
188
		return null;
188
		return null;
Lines 210-216 Link Here
210
	 * @see org.eclipse.jface.dialogs.IPageChangingListener#handlePageChanging(org.eclipse.jface.dialogs.PageChangingEvent)
210
	 * @see org.eclipse.jface.dialogs.IPageChangingListener#handlePageChanging(org.eclipse.jface.dialogs.PageChangingEvent)
211
	 */
211
	 */
212
	public void handlePageChanging(PageChangingEvent event) {
212
	public void handlePageChanging(PageChangingEvent event) {
213
		if (event.getCurrentPage() == page3 && event.getTargetPage() instanceof IBundeImportWizardPage) {
213
		if (event.getCurrentPage() instanceof BaseImportWizardSecondPage && event.getTargetPage() instanceof IBundeImportWizardPage) {
214
			IPluginModelBase[] models = getModelsToImport();
214
			IPluginModelBase[] models = getModelsToImport();
215
			page1.configureBundleImportPages(models);
215
			page1.configureBundleImportPages(models);
216
		}
216
		}
(-)src/org/eclipse/pde/internal/ui/wizards/imports/PluginImportWizardFirstPage.java (-26 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2009 IBM Corporation and others.
2
 * Copyright (c) 2003, 2010 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 135-163 Link Here
135
		Group importChoices = SWTFactory.createGroup(container, PDEUIMessages.ImportWizard_FirstPage_importGroup, 1, 1, GridData.FILL_HORIZONTAL);
135
		Group importChoices = SWTFactory.createGroup(container, PDEUIMessages.ImportWizard_FirstPage_importGroup, 1, 1, GridData.FILL_HORIZONTAL);
136
		scanButton = SWTFactory.createRadioButton(importChoices, PDEUIMessages.ImportWizard_FirstPage_scanAll);
136
		scanButton = SWTFactory.createRadioButton(importChoices, PDEUIMessages.ImportWizard_FirstPage_scanAll);
137
		importButton = SWTFactory.createRadioButton(importChoices, PDEUIMessages.ImportWizard_FirstPage_importPrereqs);
137
		importButton = SWTFactory.createRadioButton(importChoices, PDEUIMessages.ImportWizard_FirstPage_importPrereqs);
138
		SelectionAdapter adapter = new SelectionAdapter() {
139
			public void widgetSelected(SelectionEvent e) {
140
				updateRepositoryOption();
141
			}
142
		};
143
		scanButton.addSelectionListener(adapter);
144
		importButton.addSelectionListener(adapter);
145
	}
146
147
	/**
148
	 * For now, disable repository import when not scanning.
149
	 * TODO: this should be supported in the future.
150
	 */
151
	private void updateRepositoryOption() {
152
		if (importButton.getSelection()) {
153
			repositoryButton.setEnabled(false);
154
			if (repositoryButton.getSelection()) {
155
				repositoryButton.setSelection(false);
156
				binaryButton.setSelection(true);
157
			}
158
		} else {
159
			repositoryButton.setEnabled(true);
160
		}
161
	}
138
	}
162
139
163
	/**
140
	/**
Lines 218-224 Link Here
218
		}
195
		}
219
		scanButton.setSelection(scan);
196
		scanButton.setSelection(scan);
220
		importButton.setSelection(!scan);
197
		importButton.setSelection(!scan);
221
		updateRepositoryOption();
222
198
223
	}
199
	}
224
200
Lines 765-771 Link Here
765
				return (IWizardPage) nextPages.get(index + 1);
741
				return (IWizardPage) nextPages.get(index + 1);
766
			}
742
			}
767
		}
743
		}
768
		if (page instanceof PluginImportWizardDetailedPage) {
744
		if (page instanceof PluginImportWizardDetailedPage || page instanceof PluginImportWizardExpressPage) {
769
			return (IWizardPage) nextPages.get(0);
745
			return (IWizardPage) nextPages.get(0);
770
		}
746
		}
771
		return null;
747
		return null;

Return to bug 195729