|
Lines 10-19
Link Here
|
| 10 |
*******************************************************************************/ |
10 |
*******************************************************************************/ |
| 11 |
package org.eclipse.ide4edu.javalite.infrastructure; |
11 |
package org.eclipse.ide4edu.javalite.infrastructure; |
| 12 |
|
12 |
|
|
|
13 |
import java.io.IOException; |
| 14 |
|
| 13 |
import org.eclipse.ide4edu.javalite.ui.view.LitePackageExplorer; |
15 |
import org.eclipse.ide4edu.javalite.ui.view.LitePackageExplorer; |
| 14 |
import org.eclipse.ui.IFolderLayout; |
16 |
import org.eclipse.ui.IFolderLayout; |
| 15 |
import org.eclipse.ui.IPageLayout; |
17 |
import org.eclipse.ui.IPageLayout; |
| 16 |
import org.eclipse.ui.IPerspectiveFactory; |
18 |
import org.eclipse.ui.IPerspectiveFactory; |
|
|
19 |
import org.eclipse.ui.editors.text.EditorsUI; |
| 20 |
import org.eclipse.ui.preferences.ScopedPreferenceStore; |
| 17 |
|
21 |
|
| 18 |
|
22 |
|
| 19 |
public class JavaLitePerspective implements IPerspectiveFactory { |
23 |
public class JavaLitePerspective implements IPerspectiveFactory { |
|
Lines 35-40
Link Here
|
| 35 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteProjectCreationWizard"); |
39 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteProjectCreationWizard"); |
| 36 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LitePackageCreationWizard"); |
40 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LitePackageCreationWizard"); |
| 37 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteClassCreationWizard"); |
41 |
layout.addNewWizardShortcut("org.eclipse.ide4edu.javalite.ui.LiteClassCreationWizard"); |
|
|
42 |
|
| 43 |
// get the preference store of the plug-in |
| 44 |
ScopedPreferenceStore prefs = (ScopedPreferenceStore) EditorsUI.getPreferenceStore(); |
| 45 |
|
| 46 |
// Check if this is the first time the JavaLitePerspective is being opened |
| 47 |
if (!prefs.contains("initial")) { |
| 48 |
// Mark that the JavaLitePerspective has been opened for the first time |
| 49 |
prefs.putValue("initial", "opened"); |
| 50 |
// display the line number ruler by default |
| 51 |
prefs.setValue("lineNumberRuler", true); |
| 52 |
|
| 53 |
try { |
| 54 |
// save the preferences |
| 55 |
prefs.save(); |
| 56 |
} catch (IOException e) { |
| 57 |
e.printStackTrace(); |
| 58 |
} |
| 59 |
} |
| 38 |
} |
60 |
} |
| 39 |
|
|
|
| 40 |
} |
61 |
} |