Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
appinventor-sources
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
appinventor-sources
Commits
87fb6ad5
Commit
87fb6ad5
authored
Oct 17, 2023
by
SusanRatiLane
Committed by
Susan Rati Lane
Oct 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused logic and feature flag check
parent
a6dcc1ab
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
18 deletions
+6
-18
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java
...m/google/appinventor/client/boxes/SourceStructureBox.java
+1
-3
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBoxFilter.java
...le/appinventor/client/boxes/SourceStructureBoxFilter.java
+4
-4
appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java
.../appinventor/client/explorer/SourceStructureExplorer.java
+1
-11
No files found.
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java
View file @
87fb6ad5
...
@@ -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
());
}
}
...
...
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox
New
.java
→
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox
Filter
.java
View file @
87fb6ad5
...
@@ -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
SourceStructureBox
New
implements
ISourceStructureBox
{
public
final
class
SourceStructureBox
Filter
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
SourceStructureBox
New
(
SourceStructureBox
container
)
{
public
SourceStructureBox
Filter
(
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
());
SourceStructureBox
New
.
this
.
setView
(
view
);
SourceStructureBox
Filter
.
this
.
setView
(
view
);
updateSourceDropdownButtonCaption
();
updateSourceDropdownButtonCaption
();
}
}
...
...
appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java
View file @
87fb6ad5
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment