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
47310a0f
Unverified
Commit
47310a0f
authored
Oct 24, 2023
by
Diego Barreiro Perez
Committed by
GitHub
Oct 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Tree Structure (#3038)
parent
0c69abc1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
7 deletions
+16
-7
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java
...m/google/appinventor/client/boxes/SourceStructureBox.java
+0
-1
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockContainer.java
...ventor/client/editor/simple/components/MockContainer.java
+10
-5
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java
...appinventor/client/editor/simple/components/MockForm.java
+4
-1
appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java
.../appinventor/client/explorer/SourceStructureExplorer.java
+2
-0
No files found.
appinventor/appengine/src/com/google/appinventor/client/boxes/SourceStructureBox.java
View file @
47310a0f
...
...
@@ -11,7 +11,6 @@ import static com.google.appinventor.client.Ode.MESSAGES;
import
com.google.appinventor.client.editor.simple.components.MockForm
;
import
com.google.appinventor.client.explorer.SourceStructureExplorer
;
import
com.google.appinventor.client.widgets.boxes.Box
;
import
com.google.appinventor.common.version.AppInventorFeatures
;
import
com.google.gwt.user.client.ui.DockPanel
;
/**
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockContainer.java
View file @
47310a0f
...
...
@@ -87,22 +87,27 @@ public abstract class MockContainer extends MockVisibleComponent implements Drop
return
layout
;
}
@Override
protected
TreeItem
buildTree
()
{
return
this
.
buildTree
(
1
);
}
protected
TreeItem
buildTree
(
Integer
view
)
{
TreeItem
itemNode
=
super
.
buildTree
();
//hide all containers except form if only nonvisible components are to be shown
//in such a case, we need only the form's treeItem because all non-visible components are attached to it
if
(
view
==
3
&&
!
isForm
())
{
itemNode
.
setVisible
(
false
);
}
itemNode
.
setVisible
(
view
!=
3
||
isForm
());
// Recursively build the tree for child components
for
(
MockComponent
child
:
children
)
{
TreeItem
childNode
=
child
.
buildTree
();
boolean
isVisible
=
true
;
if
(
view
==
2
&&
child
instanceof
MockNonVisibleComponent
)
{
childNode
.
setVisible
(
false
)
;
isVisible
=
false
;
}
else
if
(
view
==
3
&&
child
instanceof
MockVisibleComponent
)
{
childNode
.
setVisible
(
false
)
;
isVisible
=
false
;
}
childNode
.
setVisible
(
isVisible
);
itemNode
.
addItem
(
childNode
);
}
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java
View file @
47310a0f
...
...
@@ -53,6 +53,8 @@ import java.util.Map;
public
final
class
MockForm
extends
MockContainer
{
private
static
final
Logger
LOG
=
Logger
.
getLogger
(
MockForm
.
class
.
getName
());
private
Integer
view
=
1
;
/*
* Widget for the mock form title bar.
*/
...
...
@@ -1341,7 +1343,7 @@ public final class MockForm extends MockContainer {
* @return tree showing the component hierarchy of the form
*/
public
TreeItem
buildComponentsTree
()
{
return
buildComponentsTree
(
1
);
return
buildComponentsTree
(
view
);
}
/**
...
...
@@ -1351,6 +1353,7 @@ public final class MockForm extends MockContainer {
* @return tree showing the component hierarchy of the form
*/
public
TreeItem
buildComponentsTree
(
Integer
view
)
{
this
.
view
=
view
;
return
buildTree
(
view
);
}
...
...
appinventor/appengine/src/com/google/appinventor/client/explorer/SourceStructureExplorer.java
View file @
47310a0f
...
...
@@ -174,6 +174,8 @@ public class SourceStructureExplorer extends Composite {
VerticalPanel
panel
=
new
VerticalPanel
();
panel
.
add
(
scrollPanel
);
panel
.
add
(
new
Label
());
panel
.
add
(
buttonPanel
);
panel
.
setCellHorizontalAlignment
(
buttonPanel
,
HorizontalPanel
.
ALIGN_CENTER
);
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