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

Collapse All | Expand All

(-)META-INF/MANIFEST.MF (-28 / +29 lines)
Lines 1-28 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: Eclipse IDE for Education Java UI (Incubation)
3
Bundle-Name: Eclipse IDE for Education Java UI (Incubation)
4
Bundle-SymbolicName: org.eclipse.ide4edu.javalite.ui;singleton:=true
4
Bundle-SymbolicName: org.eclipse.ide4edu.javalite.ui;singleton:=true
5
Bundle-Version: 0.1.0.qualifier
5
Bundle-Version: 0.1.0.qualifier
6
Bundle-Activator: org.eclipse.ide4edu.javalite.infrastructure.Activator
6
Bundle-Activator: org.eclipse.ide4edu.javalite.infrastructure.Activator
7
Require-Bundle: org.eclipse.ui,
7
Require-Bundle: org.eclipse.ui,
8
 org.eclipse.core.runtime,
8
 org.eclipse.core.runtime,
9
 org.eclipse.core.resources,
9
 org.eclipse.core.resources,
10
 org.eclipse.jdt.core,
10
 org.eclipse.jdt.core,
11
 org.eclipse.jdt.ui,
11
 org.eclipse.jdt.ui,
12
 org.eclipse.core.filesystem,
12
 org.eclipse.core.filesystem,
13
 org.eclipse.ui.ide,
13
 org.eclipse.ui.ide,
14
 org.eclipse.jdt.launching,
14
 org.eclipse.jdt.launching,
15
 org.eclipse.debug.ui,
15
 org.eclipse.debug.ui,
16
 org.eclipse.jdt,
16
 org.eclipse.jdt,
17
 org.eclipse.jdt.core.manipulation,
17
 org.eclipse.jdt.core.manipulation,
18
 org.eclipse.jdt.debug,
18
 org.eclipse.jdt.debug,
19
 org.eclipse.jdt.debug.ui,
19
 org.eclipse.jdt.debug.ui,
20
 org.eclipse.core.expressions,
20
 org.eclipse.core.expressions,
21
 org.eclipse.ui.ide.application,
21
 org.eclipse.ui.ide.application,
22
 org.eclipse.jface.text;bundle-version="3.4.0",
22
 org.eclipse.jface.text;bundle-version="3.4.0",
23
 org.eclipse.ide4edu.javalite.constructors;bundle-version="[0.1.0,1.0.0)"
23
 org.eclipse.ide4edu.javalite.constructors;bundle-version="[0.1.0,1.0.0)",
24
Bundle-ActivationPolicy: lazy
24
 org.eclipse.ui.editors;bundle-version="3.5.0"
25
Export-Package: org.eclipse.ide4edu.javalite.ui.view
25
Bundle-ActivationPolicy: lazy
26
Bundle-Vendor: The Eclipse Foundation
26
Export-Package: org.eclipse.ide4edu.javalite.ui.view
27
Bundle-RequiredExecutionEnvironment: J2SE-1.5
27
Bundle-Vendor: The Eclipse Foundation
28
28
Bundle-RequiredExecutionEnvironment: J2SE-1.5
29
(-)src/org/eclipse/ide4edu/javalite/infrastructure/JavaLitePerspective.java (-37 / +58 lines)
Lines 1-37 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008 The Eclipse Foundation and others
2
 * Copyright (c) 2008 The Eclipse Foundation 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
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 *
7
 *
8
 * Contributors:
8
 * Contributors:
9
 *     Eclipse Foundation - initial API and implementation
9
 *     Eclipse Foundation - initial API and implementation
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.ide4edu.javalite.infrastructure;
11
package org.eclipse.ide4edu.javalite.infrastructure;
12
12
13
import org.eclipse.ide4edu.javalite.ui.view.LitePackageExplorer;
13
import java.io.IOException;
14
import org.eclipse.ui.IFolderLayout;
14
15
import org.eclipse.ui.IPageLayout;
15
import org.eclipse.ide4edu.javalite.ui.view.LitePackageExplorer;
16
import org.eclipse.ui.IPerspectiveFactory;
16
import org.eclipse.ui.IFolderLayout;
17
17
import org.eclipse.ui.IPageLayout;
18
18
import org.eclipse.ui.IPerspectiveFactory;
19
public class JavaLitePerspective implements IPerspectiveFactory {
19
import org.eclipse.ui.editors.text.EditorsUI;
20
	
20
import org.eclipse.ui.preferences.ScopedPreferenceStore;
21
	public void createInitialLayout(IPageLayout layout){
21
22
		String editorArea = layout.getEditorArea();
22
23
		
23
public class JavaLitePerspective implements IPerspectiveFactory {
24
		//Create folder layout (left to editor) to hold views
24
	
25
		IFolderLayout leftFolder = layout.createFolder("leftFolder",IPageLayout.LEFT, (float) 0.20, editorArea); 
25
	public void createInitialLayout(IPageLayout layout){
26
		leftFolder.addView(LitePackageExplorer.ID);
26
		String editorArea = layout.getEditorArea();
27
		
27
		
28
		IFolderLayout bottomFolder = layout.createFolder("bottomFolder",IPageLayout.BOTTOM, (float) 0.80, editorArea); 
28
		//Create folder layout (left to editor) to hold views
29
		bottomFolder.addView("org.eclipse.ui.console.ConsoleView");
29
		IFolderLayout leftFolder = layout.createFolder("leftFolder",IPageLayout.LEFT, (float) 0.20, editorArea); 
30
		
30
		leftFolder.addView(LitePackageExplorer.ID);
31
		//layout.setEditorAreaVisible(false);
31
		
32
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteProjectCreationWizard");
32
		IFolderLayout bottomFolder = layout.createFolder("bottomFolder",IPageLayout.BOTTOM, (float) 0.80, editorArea); 
33
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LitePackageCreationWizard");
33
		bottomFolder.addView("org.eclipse.ui.console.ConsoleView");
34
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteClassCreationWizard");
34
		
35
	} 
35
		//layout.setEditorAreaVisible(false);
36
36
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteProjectCreationWizard");
37
}
37
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LitePackageCreationWizard");
38
		layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteClassCreationWizard");
39
		
40
		// get the preference store of the plug-in
41
		ScopedPreferenceStore prefs = (ScopedPreferenceStore) EditorsUI.getPreferenceStore();
42
		
43
		// Check if this is the first time the JavaLitePerspective is being opened
44
		if (!prefs.contains("initial")) {
45
			// Mark that the JavaLitePerspective has been opened for the first time
46
			prefs.putValue("initial", "opened");	
47
			// display the line number ruler by default
48
			prefs.setValue("lineNumberRuler", true);
49
			
50
			try {
51
				// save the preferences
52
				prefs.save();
53
			} catch (IOException e) {
54
				e.printStackTrace();
55
			}
56
		}
57
	} 
58
}

Return to bug 293888