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 162102 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.properties (+1 lines)
Lines 219-224 Link Here
219
PreferenceKeywords.Restore = restore
219
PreferenceKeywords.Restore = restore
220
PreferenceKeywords.State = state
220
PreferenceKeywords.State = state
221
PreferenceKeywords.Encoding = encoding
221
PreferenceKeywords.Encoding = encoding
222
PreferenceKeywords.RecentWorkspaces = workspaces prompt recent startup
222
223
223
# TODO This stuff is just to help me work on the parsing of the menus extension
224
# TODO This stuff is just to help me work on the parsing of the menus extension
224
# point.  It is likely not in its final form yet.
225
# point.  It is likely not in its final form yet.
(-)plugin.xml (+3 lines)
Lines 411-416 Link Here
411
            id="org.eclipse.ui.ide.startupAndShutdown"
411
            id="org.eclipse.ui.ide.startupAndShutdown"
412
            label="%PreferenceKeywords.StartupAndShutdown"/>
412
            label="%PreferenceKeywords.StartupAndShutdown"/>
413
      <keyword
413
      <keyword
414
            id="org.eclipse.ui.ide.recentWorkspaces"
415
            label="%PreferenceKeywords.RecentWorkspaces"/>
416
      <keyword
414
            id="org.eclipse.ui.ide.workspace"
417
            id="org.eclipse.ui.ide.workspace"
415
            label="%PreferenceKeywords.Workspace"/>
418
            label="%PreferenceKeywords.Workspace"/>
416
      <keyword
419
      <keyword
(-)plugin.xml (+7 lines)
Lines 19-24 Link Here
19
            id="org.eclipse.ui.preferencePages.Startup">
19
            id="org.eclipse.ui.preferencePages.Startup">
20
         <keywordReference id="org.eclipse.ui.ide.startupAndShutdown"/>
20
         <keywordReference id="org.eclipse.ui.ide.startupAndShutdown"/>
21
      </page>
21
      </page>
22
     <page
23
            name="%PreferencePages.Startup.Workspaces"
24
            category="org.eclipse.ui.preferencePages.Startup"
25
            class="org.eclipse.ui.internal.ide.application.dialogs.RecentWorkspacesPreferencePage"
26
            id="org.eclipse.ui.preferencePages.Startup.Workspaces">
27
         <keywordReference id="org.eclipse.ui.ide.recentWorkspaces"/>
28
      </page>
22
    </extension>
29
    </extension>
23
     <extension
30
     <extension
24
         point="org.eclipse.ui.perspectives">
31
         point="org.eclipse.ui.perspectives">
(-)plugin.properties (+1 lines)
Lines 12-17 Link Here
12
Plugin.providerName = Eclipse.org
12
Plugin.providerName = Eclipse.org
13
13
14
PreferencePages.Startup = Startup and Shutdown
14
PreferencePages.Startup = Startup and Shutdown
15
PreferencePages.Startup.Workspaces = Workspaces
15
16
16
Perspective.resourcePerspective = Resource
17
Perspective.resourcePerspective = Resource
17
Perspective.resourceDescription = This perspective is designed to provide general resource viewing and navigation. 
18
Perspective.resourceDescription = This perspective is designed to provide general resource viewing and navigation. 
(-)src/org/eclipse/ui/internal/ide/application/dialogs/RecentWorkspacesPreferencePage.java (+87 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2009 Eric Rizzo and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
8
 * Contributors:
9
 *     Eric Rizzo - initial API and implementation
10
 *******************************************************************************/
11
package org.eclipse.ui.internal.ide.application.dialogs;
12
13
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.layout.GridData;
15
import org.eclipse.swt.layout.GridLayout;
16
import org.eclipse.swt.widgets.Button;
17
import org.eclipse.swt.widgets.Composite;
18
import org.eclipse.swt.widgets.Control;
19
import org.eclipse.swt.widgets.Group;
20
import org.eclipse.swt.widgets.Label;
21
import org.eclipse.swt.widgets.List;
22
import org.eclipse.swt.widgets.Spinner;
23
import org.eclipse.ui.IWorkbench;
24
import org.eclipse.ui.IWorkbenchPreferencePage;
25
import org.eclipse.ui.internal.dialogs.StartupPreferencePage;
26
27
28
/**
29
 * Preference page for editing the list of recent workspaces and whether or not
30
 * the user is prompted at startup.
31
 * 
32
 * @since 3.5
33
 */
34
public class RecentWorkspacesPreferencePage extends StartupPreferencePage
35
	implements IWorkbenchPreferencePage {
36
37
	private Button removeButton;
38
	private Spinner maxWorkspacesField;
39
	private Button promptButton;
40
	private List workspacesList;
41
42
43
	public Control createContents(Composite parent) {
44
		Composite container = new Composite(parent, SWT.NULL);
45
		final GridLayout gridLayout = new GridLayout();
46
		gridLayout.numColumns = 2;
47
		gridLayout.marginHeight = 0;
48
		gridLayout.marginWidth = 0;
49
		container.setLayout(gridLayout);
50
51
		promptButton = new Button(container, SWT.CHECK);
52
		promptButton.setText("Prompt for &workspace on startup"); //$NON-NLS-1$
53
		new Label(container, SWT.NONE);
54
55
		final Label numberOfLabel = new Label(container, SWT.NONE);
56
		numberOfLabel.setText("&Number of recent workspaces to remember:"); //$NON-NLS-1$
57
58
		maxWorkspacesField = new Spinner(container, SWT.BORDER);
59
		maxWorkspacesField.setTextLimit(2);
60
		maxWorkspacesField.setMinimum(1);
61
		maxWorkspacesField.setMaximum(99);
62
63
		final Group recentWorkspacesGroup = new Group(container, SWT.NONE);
64
		recentWorkspacesGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
65
		recentWorkspacesGroup.setText("Recent workspaces"); //$NON-NLS-1$
66
		final GridLayout gridLayout_1 = new GridLayout();
67
		gridLayout_1.numColumns = 2;
68
		recentWorkspacesGroup.setLayout(gridLayout_1);
69
70
		workspacesList = new List(recentWorkspacesGroup, SWT.BORDER);
71
		final GridData gd_workspacesList = new GridData(SWT.FILL, SWT.FILL, true, true);
72
		workspacesList.setLayoutData(gd_workspacesList);
73
74
		removeButton = new Button(recentWorkspacesGroup, SWT.NONE);
75
		final GridData gd_removeButton = new GridData(SWT.CENTER, SWT.TOP, false, false);
76
		removeButton.setLayoutData(gd_removeButton);
77
		removeButton.setText("&Remove"); //$NON-NLS-1$
78
79
		return container;
80
	}
81
82
83
	public void init(IWorkbench workbench) {
84
		// Initialize the preference page
85
	}
86
87
}

Return to bug 162102