diff --git a/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java b/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java index 0f92c2f14d9..c746731db52 100644 --- a/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java +++ b/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java @@ -42,9 +42,7 @@ private SourceStructureBox() { false); // removable // Creates the child instance according to the enabled features. - SUBINSTANCE = AppInventorFeatures.enableFutureFeatures() - ? new SourceStructureBoxNew(this) - : new SourceStructureBoxClassic(); + SUBINSTANCE = new SourceStructureBoxFilter(this); setContent(SUBINSTANCE.getSourceStructureExplorer()); } diff --git a/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxNew.java b/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxFilter.java similarity index 93% rename from appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxNew.java rename to appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxFilter.java index 463b73963e3..d3c55abd31e 100644 --- a/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxNew.java +++ b/appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxFilter.java @@ -23,16 +23,16 @@ /** * Box implementation for source structure explorer (new style, with filters). */ -public final class SourceStructureBoxNew implements ISourceStructureBox { +public final class SourceStructureBoxFilter implements ISourceStructureBox { private Integer view = 1; private final DropDownButton dropDownButton; - private final SourceStructureExplorer sourceStructureExplorer = new SourceStructureExplorer(false); + private final SourceStructureExplorer sourceStructureExplorer = new SourceStructureExplorer(); /** * Creates new source structure explorer box. */ - public SourceStructureBoxNew(SourceStructureBox container) { + public SourceStructureBoxFilter(SourceStructureBox container) { super(); List items = new ArrayList<>(); @@ -105,7 +105,7 @@ public void execute() { MockForm form = ((YaFormEditor) Ode.getInstance().getCurrentFileEditor()).getForm(); sourceStructureExplorer.updateTree(form.buildComponentsTree(view), form.getForm().getLastSelectedComponent().getSourceStructureExplorerItem()); - SourceStructureBoxNew.this.setView(view); + SourceStructureBoxFilter.this.setView(view); updateSourceDropdownButtonCaption(); } diff --git a/appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java b/appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java index f30c0e721d1..5fdbbbbc34b 100644 --- a/appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java +++ b/appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java @@ -68,14 +68,10 @@ public void onBrowserEvent(Event event) { } } - public SourceStructureExplorer() { - this(true); - } - /** * Creates a new source structure explorer. */ - public SourceStructureExplorer(boolean includeButtonPanel) { + public SourceStructureExplorer() { // Initialize UI elements tree = new EventCaptureTree(Ode.getImageBundle()); tree.setAnimationEnabled(true); @@ -178,12 +174,6 @@ public void onClick(ClickEvent event) { VerticalPanel panel = new VerticalPanel(); panel.add(scrollPanel); - // TODO(diego@kodular.io): With App Inventor's current layout, as of now this is the only place to - // render these buttons... - // if (includeButtonPanel) { - panel.add(new Label()); - panel.add(buttonPanel); - // } panel.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_CENTER); initWidget(panel); }