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 {
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());
}
......
......@@ -23,16 +23,16 @@ import static com.google.appinventor.client.Ode.MESSAGES;
/**
* 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<DropDownItem> items = new ArrayList<>();
......@@ -105,7 +105,7 @@ public final class SourceStructureBoxNew implements ISourceStructureBox {
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();
}
......
......@@ -68,14 +68,10 @@ public class SourceStructureExplorer extends Composite {
}
}
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 class SourceStructureExplorer extends Composite {
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);
}
......
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