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 32319
Collapse All | Expand All

(-)Eclipse (+35 lines)
Added Link Here
1
/*
2
 * Created on Feb 21, 2003
3
 *
4
 * To change this generated comment go to 
5
 * Window>Preferences>Java>Code Generation>Code and Comments
6
 */
7
package org.eclipse.ui.actions;
8
9
import java.util.MissingResourceException;
10
import java.util.ResourceBundle;
11
12
/**
13
 * @author tod
14
 *
15
 * To change this generated comment go to 
16
 * Window>Preferences>Java>Code Generation>Code and Comments
17
 */
18
public class Messages {
19
20
	private static final String BUNDLE_NAME = "org.eclipse.jface.wizard.test"; //$NON-NLS-1$
21
22
	private static final ResourceBundle RESOURCE_BUNDLE =
23
		ResourceBundle.getBundle(BUNDLE_NAME);
24
25
	private Messages() {
26
	}
27
28
	public static String getString(String key) {
29
		try {
30
			return RESOURCE_BUNDLE.getString(key);
31
		} catch (MissingResourceException e) {
32
			return '!' + key + '!';
33
		}
34
	}
35
}
(-)Eclipse UI/org/eclipse/ui/actions/NewExampleAction.java (+1 lines)
Lines 111-116 Link Here
111
		Shell parent = window.getShell();
111
		Shell parent = window.getShell();
112
		WizardDialog dialog = new WizardDialog(parent, wizard);
112
		WizardDialog dialog = new WizardDialog(parent, wizard);
113
		dialog.create();
113
		dialog.create();
114
		wizard.setWindowTitle(WorkbenchMessages.getString(Messages.getString("NewExampleAction.NewExample.title_1"))); //$NON-NLS-1$
114
		dialog.getShell().setSize(
115
		dialog.getShell().setSize(
115
			Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
116
			Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
116
			SIZING_WIZARD_HEIGHT);
117
			SIZING_WIZARD_HEIGHT);
(-)Eclipse UI/org/eclipse/ui/internal/messages.properties (+3 lines)
Lines 646-651 Link Here
646
ZipExport.unableToClose = Unable to close destination file: {0}
646
ZipExport.unableToClose = Unable to close destination file: {0}
647
ZipExport.errorOnResource = Error exporting {0}
647
ZipExport.errorOnResource = Error exporting {0}
648
648
649
# --- New Example ---
650
NewExample.title = New Example
651
649
# --- New Project ---
652
# --- New Project ---
650
NewProject.title = New Project
653
NewProject.title = New Project
651
WizardNewProjectCreationPage.description = Create a new project
654
WizardNewProjectCreationPage.description = Create a new project
(-)Eclipse UI/org/eclipse/ui/internal/dialogs/NewWizardNewPage.java (-7 / +15 lines)
Lines 125-133 Link Here
125
		categoryTreeViewer.setLabelProvider(new WorkbenchLabelProvider());
125
		categoryTreeViewer.setLabelProvider(new WorkbenchLabelProvider());
126
		categoryTreeViewer.setSorter(NewWizardCollectionSorter.INSTANCE);
126
		categoryTreeViewer.setSorter(NewWizardCollectionSorter.INSTANCE);
127
		categoryTreeViewer.addSelectionChangedListener(this);
127
		categoryTreeViewer.addSelectionChangedListener(this);
128
		if (wizardCategories.getParent(wizardCategories) == null)
128
		if (wizardCategories.getParent(wizardCategories) == null) {
129
			categoryTreeViewer.setInput(wizardCategories);
129
			categoryTreeViewer.setInput(wizardCategories);
130
		else
130
		} else
131
			categoryTreeViewer.setInput(new RootElementProxy(wizardCategories));
131
			categoryTreeViewer.setInput(new RootElementProxy(wizardCategories));
132
		tree.setFont(wizardFont);
132
		tree.setFont(wizardFont);
133
133
Lines 248-257 Link Here
248
		if (currentSelection != selectedCategory) {
248
		if (currentSelection != selectedCategory) {
249
			page.selectWizardNode(null);
249
			page.selectWizardNode(null);
250
			wizardSelectionViewer.setInput(selectedCategory);
250
			wizardSelectionViewer.setInput(selectedCategory);
251
			if(selectedCategory instanceof WizardCollectionElement){
251
			if (selectedCategory instanceof WizardCollectionElement) {
252
				Object[] children = ((WizardCollectionElement) selectedCategory).getWizards();
252
				Object[] children =
253
				if(children.length == 1)
253
					((WizardCollectionElement) selectedCategory).getWizards();
254
					selectWizard(children[0]);	
254
				if (children.length == 1)
255
					selectWizard(children[0]);
255
			}
256
			}
256
		}
257
		}
257
	}
258
	}
Lines 425-431 Link Here
425
426
426
		public RootElementProxy(WizardCollectionElement element) {
427
		public RootElementProxy(WizardCollectionElement element) {
427
			super();
428
			super();
428
			elements = new WizardCollectionElement[] { element };
429
			//If the element has no wizard then it is an empty category
430
			//and we should collapse
431
			if (element.getWizards().length == 0) {
432
				Object[] children = element.getChildren();
433
				elements = new WizardCollectionElement[children.length];
434
				System.arraycopy(children, 0, elements, 0, elements.length);
435
			} else
436
				elements = new WizardCollectionElement[] { element };
429
		}
437
		}
430
438
431
		public Object getAdapter(Class adapter) {
439
		public Object getAdapter(Class adapter) {

Return to bug 32319