From 5a6232ab7d401bc38ee8a976be816b0c9d76b737 Mon Sep 17 00:00:00 2001 From: lonnen Date: Wed, 8 Sep 2010 07:34:37 +0000 Subject: [PATCH] Minor bug fixes in new sketch template and perspective. --- .../Processing Plugin for Eclipse/feature.xml | 13 ++++-- .../processing.plugin.ui/META-INF/MANIFEST.MF | 2 +- editor/processing.plugin.ui/plugin.xml | 43 ++++++++++++++++--- .../plugin/ui/perspective/Sketching.java | 36 ++++------------ editor/processing.plugin.updateSite/site.xml | 2 +- 5 files changed, 59 insertions(+), 37 deletions(-) diff --git a/editor/Processing Plugin for Eclipse/feature.xml b/editor/Processing Plugin for Eclipse/feature.xml index ab5bf972f..cf0ba8c2d 100644 --- a/editor/Processing Plugin for Eclipse/feature.xml +++ b/editor/Processing Plugin for Eclipse/feature.xml @@ -2,7 +2,7 @@ @@ -33,14 +33,21 @@ All images are included under a creative commons license (http://creativecommons - + + + + + - + + + + - + + name="Processing Wizards"> @@ -51,7 +53,6 @@ Hides the generated folder and its contents from the UI. - @@ -63,6 +64,7 @@ id="processing.plugin.ui.launching.runSketchAsApplet" label="Processing Sketch (Applet)" modes="run"> + @@ -90,6 +92,37 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/editor/processing.plugin.ui/src/processing/plugin/ui/perspective/Sketching.java b/editor/processing.plugin.ui/src/processing/plugin/ui/perspective/Sketching.java index ead62a575..8b99d4f03 100644 --- a/editor/processing.plugin.ui/src/processing/plugin/ui/perspective/Sketching.java +++ b/editor/processing.plugin.ui/src/processing/plugin/ui/perspective/Sketching.java @@ -19,41 +19,23 @@ public class Sketching implements IPerspectiveFactory { /* (non-JavaDoc) organization suggested by http://www.eclipse.org/articles/using-perspectives/PerspectiveArticle.html */ public void createInitialLayout(IPageLayout layout) { - defineMenuItemOptions(layout); - defineLayout(layout); - } - - /** Define what menu items */ - public void defineMenuItemOptions(IPageLayout layout){ - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); - layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); - layout.addNewWizardShortcut("processing.plugin.ui.wizards.NewSketchWizard"); - //TODO "processing.plugin.ui.wizards.NewTab" equivalent - - // Add them to the Window -> Show view menu - layout.addShowViewShortcut(IPageLayout.ID_EDITOR_AREA); - layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); - layout.addShowViewShortcut("org.eclipse.ui.console.ConsoleView"); - layout.addShowViewShortcut(IPageLayout.ID_PROJECT_EXPLORER); - } - - public void defineLayout(IPageLayout layout){ //Editors are in assumed to be in the center, so there is no placement info for them. + String editorAreaIdentifier = layout.getEditorArea(); + + // Left set of stuff + float leftPanelSizeAsRatio = 0.2f; + IFolderLayout leftPanels = + layout.createFolder("left", IPageLayout.LEFT, leftPanelSizeAsRatio, editorAreaIdentifier); + leftPanels.addView(IPageLayout.ID_RES_NAV); - // Fast view of the file manager - float fastViewSizeAsRatio = 0.3f; // ratio of the screen this should overlay - layout.addFastView(IPageLayout.ID_PROJECT_EXPLORER, fastViewSizeAsRatio); - - // Bottom set of tabs. + // Bottom set of tabs // strangely, this number is the screen ratio the bottom panel should *not* take up // which is different than the fast view size as ratio float bottomPanelSizeAsInverseRatio = 0.7f; - String editorAreaIdentifier = layout.getEditorArea(); IFolderLayout bottomPanels = layout.createFolder("bottom", IPageLayout.BOTTOM, bottomPanelSizeAsInverseRatio, editorAreaIdentifier); bottomPanels.addView(IPageLayout.ID_PROBLEM_VIEW); - bottomPanels.addView("org.eclipse.ui.console.ConsoleView"); - } + bottomPanels.addView("org.eclipse.ui.console.ConsoleView"); } /* //TODO Fix the toolbars * Frustratingly I cannot figure out much here. Toolbar contributions diff --git a/editor/processing.plugin.updateSite/site.xml b/editor/processing.plugin.updateSite/site.xml index f27c666f5..75ae7a81a 100644 --- a/editor/processing.plugin.updateSite/site.xml +++ b/editor/processing.plugin.updateSite/site.xml @@ -1,6 +1,6 @@ - +