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
73d1e23e
Unverified
Commit
73d1e23e
authored
Oct 11, 2023
by
Arya Anand
Committed by
GitHub
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide error message regarding extensions for the gallery (#2864)
parent
001fa913
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
3 deletions
+31
-3
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
...engine/src/com/google/appinventor/client/OdeMessages.java
+4
-0
appinventor/appengine/src/com/google/appinventor/client/actions/SendToGalleryAction.java
...oogle/appinventor/client/actions/SendToGalleryAction.java
+4
-0
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaProjectEditor.java
...pinventor/client/editor/youngandroid/YaProjectEditor.java
+1
-1
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/actions/SendToGalleryAction.java
...ient/editor/youngandroid/actions/SendToGalleryAction.java
+4
-0
appinventor/appengine/src/com/google/appinventor/shared/rpc/project/ProjectNode.java
...om/google/appinventor/shared/rpc/project/ProjectNode.java
+10
-1
appinventor/appengine/src/com/google/appinventor/shared/rpc/project/youngandroid/YoungAndroidProjectNode.java
...red/rpc/project/youngandroid/YoungAndroidProjectNode.java
+8
-1
No files found.
appinventor/appengine/src/com/google/appinventor/client/OdeMessages.java
View file @
73d1e23e
...
@@ -97,6 +97,10 @@ public interface OdeMessages extends Messages, AutogeneratedOdeMessages {
...
@@ -97,6 +97,10 @@ public interface OdeMessages extends Messages, AutogeneratedOdeMessages {
@Description
(
"Error given if login fails for some reason"
)
@Description
(
"Error given if login fails for some reason"
)
String
GalleryLoginError
();
String
GalleryLoginError
();
@DefaultMessage
(
"Projects with extensions cannot be published to the gallery."
)
@Description
(
"Error given if project contains extensions"
)
String
HasExtensionError
();
@DefaultMessage
(
"Show Warnings"
)
@DefaultMessage
(
"Show Warnings"
)
@Description
(
"Text on Toggle Warning Button"
)
@Description
(
"Text on Toggle Warning Button"
)
String
showWarnings
();
String
showWarnings
();
...
...
appinventor/appengine/src/com/google/appinventor/client/actions/SendToGalleryAction.java
View file @
73d1e23e
...
@@ -32,6 +32,10 @@ public class SendToGalleryAction implements Command {
...
@@ -32,6 +32,10 @@ public class SendToGalleryAction implements Command {
ErrorReporter
.
reportInfo
(
MESSAGES
.
selectOnlyOneProject
());
ErrorReporter
.
reportInfo
(
MESSAGES
.
selectOnlyOneProject
());
}
else
{
}
else
{
if
(!
lockPublishButton
)
{
if
(!
lockPublishButton
)
{
if
(
Ode
.
getInstance
().
getCurrentYoungAndroidProjectRootNode
().
hasExtensions
())
{
ErrorReporter
.
reportError
(
MESSAGES
.
HasExtensionError
());
return
;
}
lockPublishButton
=
true
;
lockPublishButton
=
true
;
Project
project
=
selectedProjects
.
get
(
0
);
Project
project
=
selectedProjects
.
get
(
0
);
Ode
.
getInstance
().
getProjectService
().
sendToGallery
(
project
.
getProjectId
(),
Ode
.
getInstance
().
getProjectService
().
sendToGallery
(
project
.
getProjectId
(),
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/YaProjectEditor.java
View file @
73d1e23e
...
@@ -625,7 +625,7 @@ public final class YaProjectEditor extends ProjectEditor implements ProjectChang
...
@@ -625,7 +625,7 @@ public final class YaProjectEditor extends ProjectEditor implements ProjectChang
* To remove Component Files from the Project!
* To remove Component Files from the Project!
* @param componentTypes
* @param componentTypes
*/
*/
public
void
removeComponent
(
Map
<
String
,
String
>
componentTypes
)
{
public
void
removeComponent
(
Map
<
String
,
String
>
componentTypes
)
{
final
Ode
ode
=
Ode
.
getInstance
();
final
Ode
ode
=
Ode
.
getInstance
();
final
YoungAndroidComponentsFolder
componentsFolder
=
((
YoungAndroidProjectNode
)
project
.
getRootNode
()).
getComponentsFolder
();
final
YoungAndroidComponentsFolder
componentsFolder
=
((
YoungAndroidProjectNode
)
project
.
getRootNode
()).
getComponentsFolder
();
Set
<
String
>
externalCompFolders
=
new
HashSet
<
String
>();
Set
<
String
>
externalCompFolders
=
new
HashSet
<
String
>();
...
...
appinventor/appengine/src/com/google/appinventor/client/editor/youngandroid/actions/SendToGalleryAction.java
View file @
73d1e23e
...
@@ -35,6 +35,10 @@ public class SendToGalleryAction implements Command {
...
@@ -35,6 +35,10 @@ public class SendToGalleryAction implements Command {
+
"Ignoring SendToGalleryAction.execute()."
);
+
"Ignoring SendToGalleryAction.execute()."
);
return
;
return
;
}
}
if
(
Ode
.
getInstance
().
getCurrentYoungAndroidProjectRootNode
().
hasExtensions
())
{
ErrorReporter
.
reportError
(
MESSAGES
.
HasExtensionError
());
return
;
}
boolean
shouldRun
;
boolean
shouldRun
;
try
{
try
{
shouldRun
=
before
.
call
();
shouldRun
=
before
.
call
();
...
...
appinventor/appengine/src/com/google/appinventor/shared/rpc/project/ProjectNode.java
View file @
73d1e23e
...
@@ -175,7 +175,7 @@ public abstract class ProjectNode implements Serializable, IsSerializable {
...
@@ -175,7 +175,7 @@ public abstract class ProjectNode implements Serializable, IsSerializable {
*
*
* @return iterable
* @return iterable
*/
*/
public
Iterable
<
ProjectNode
>
getChildren
()
{
public
List
<
ProjectNode
>
getChildren
()
{
List
<
ProjectNode
>
result
=
children
;
List
<
ProjectNode
>
result
=
children
;
if
(
result
==
null
)
{
if
(
result
==
null
)
{
result
=
Collections
.
emptyList
();
result
=
Collections
.
emptyList
();
...
@@ -264,4 +264,13 @@ public abstract class ProjectNode implements Serializable, IsSerializable {
...
@@ -264,4 +264,13 @@ public abstract class ProjectNode implements Serializable, IsSerializable {
public
void
setName
(
String
newName
)
{
public
void
setName
(
String
newName
)
{
name
=
newName
;
name
=
newName
;
}
}
/**
* Checks if project has extension or not.
*
* @return boolean;
*/
public
boolean
hasExtensions
()
{
return
false
;
}
}
}
appinventor/appengine/src/com/google/appinventor/shared/rpc/project/youngandroid/YoungAndroidProjectNode.java
View file @
73d1e23e
...
@@ -100,5 +100,12 @@ public final class YoungAndroidProjectNode extends ProjectRootNode
...
@@ -100,5 +100,12 @@ public final class YoungAndroidProjectNode extends ProjectRootNode
// Should never happen!
// Should never happen!
throw
new
IllegalStateException
(
"Couldn't find component folder"
);
throw
new
IllegalStateException
(
"Couldn't find component folder"
);
}
}
@Override
public
boolean
hasExtensions
()
{
if
(
getComponentsFolder
().
getChildren
().
size
()
>
0
)
{
return
true
;
}
return
false
;
}
}
}
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