Commit 87fb6ad5 authored by SusanRatiLane's avatar SusanRatiLane Committed by Susan Rati Lane

Remove unused logic and feature flag check

parent a6dcc1ab
...@@ -42,9 +42,7 @@ public class SourceStructureBox extends Box implements ISourceStructureBox { ...@@ -42,9 +42,7 @@ public class SourceStructureBox extends Box implements ISourceStructureBox {
false); // removable false); // removable
// Creates the child instance according to the enabled features. // Creates the child instance according to the enabled features.
SUBINSTANCE = AppInventorFeatures.enableFutureFeatures() SUBINSTANCE = new SourceStructureBoxFilter(this);
? new SourceStructureBoxNew(this)
: new SourceStructureBoxClassic();
setContent(SUBINSTANCE.getSourceStructureExplorer()); setContent(SUBINSTANCE.getSourceStructureExplorer());
} }
......
...@@ -23,16 +23,16 @@ import static com.google.appinventor.client.Ode.MESSAGES; ...@@ -23,16 +23,16 @@ import static com.google.appinventor.client.Ode.MESSAGES;
/** /**
* Box implementation for source structure explorer (new style, with filters). * 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 Integer view = 1;
private final DropDownButton dropDownButton; private final DropDownButton dropDownButton;
private final SourceStructureExplorer sourceStructureExplorer = new SourceStructureExplorer(false); private final SourceStructureExplorer sourceStructureExplorer = new SourceStructureExplorer();
/** /**
* Creates new source structure explorer box. * Creates new source structure explorer box.
*/ */
public SourceStructureBoxNew(SourceStructureBox container) { public SourceStructureBoxFilter(SourceStructureBox container) {
super(); super();
List<DropDownItem> items = new ArrayList<>(); List<DropDownItem> items = new ArrayList<>();
...@@ -105,7 +105,7 @@ public final class SourceStructureBoxNew implements ISourceStructureBox { ...@@ -105,7 +105,7 @@ public final class SourceStructureBoxNew implements ISourceStructureBox {
MockForm form = ((YaFormEditor) Ode.getInstance().getCurrentFileEditor()).getForm(); MockForm form = ((YaFormEditor) Ode.getInstance().getCurrentFileEditor()).getForm();
sourceStructureExplorer.updateTree(form.buildComponentsTree(view), sourceStructureExplorer.updateTree(form.buildComponentsTree(view),
form.getForm().getLastSelectedComponent().getSourceStructureExplorerItem()); form.getForm().getLastSelectedComponent().getSourceStructureExplorerItem());
SourceStructureBoxNew.this.setView(view); SourceStructureBoxFilter.this.setView(view);
updateSourceDropdownButtonCaption(); updateSourceDropdownButtonCaption();
} }
......
...@@ -68,14 +68,10 @@ public class SourceStructureExplorer extends Composite { ...@@ -68,14 +68,10 @@ public class SourceStructureExplorer extends Composite {
} }
} }
public SourceStructureExplorer() {
this(true);
}
/** /**
* Creates a new source structure explorer. * Creates a new source structure explorer.
*/ */
public SourceStructureExplorer(boolean includeButtonPanel) { public SourceStructureExplorer() {
// Initialize UI elements // Initialize UI elements
tree = new EventCaptureTree(Ode.getImageBundle()); tree = new EventCaptureTree(Ode.getImageBundle());
tree.setAnimationEnabled(true); tree.setAnimationEnabled(true);
...@@ -178,12 +174,6 @@ public class SourceStructureExplorer extends Composite { ...@@ -178,12 +174,6 @@ public class SourceStructureExplorer extends Composite {
VerticalPanel panel = new VerticalPanel(); VerticalPanel panel = new VerticalPanel();
panel.add(scrollPanel); 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); panel.setCellHorizontalAlignment(buttonPanel, HorizontalPanel.ALIGN_CENTER);
initWidget(panel); initWidget(panel);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment