index: update all.json
This commit is contained in:
@@ -51,7 +51,8 @@ public class AutoCompletion {
|
||||
|
||||
private void buildDictionaryTree(List<Module> modules) {
|
||||
for (Module module : modules) {
|
||||
mGlobalPropertyTree.putWord(module.getName(), module.asGlobalProperty());
|
||||
if (!module.getName().equals("globals"))
|
||||
mGlobalPropertyTree.putWord(module.getName(), module.asGlobalProperty());
|
||||
for (Property property : module.getProperties()) {
|
||||
if (property.isGlobal())
|
||||
mGlobalPropertyTree.putWord(property.getKey(), property);
|
||||
|
||||
@@ -20,6 +20,9 @@ public class Property {
|
||||
@SerializedName("global")
|
||||
private boolean mGlobal;
|
||||
|
||||
@SerializedName("variable")
|
||||
private boolean mVariable = false;
|
||||
|
||||
public Property() {
|
||||
}
|
||||
|
||||
@@ -61,4 +64,12 @@ public class Property {
|
||||
public void setGlobal(boolean global) {
|
||||
mGlobal = global;
|
||||
}
|
||||
|
||||
public boolean isVariable() {
|
||||
return mVariable;
|
||||
}
|
||||
|
||||
public void setVariable(boolean variable) {
|
||||
mVariable = variable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -428,12 +428,18 @@ public class EditorView extends FrameLayout implements CodeCompletionBar.OnHintC
|
||||
|
||||
@Override
|
||||
public void onPropertyClick(Module m, Property property) {
|
||||
if (property.isGlobal()) {
|
||||
mEditor.insert(property.getKey() + "()");
|
||||
} else {
|
||||
mEditor.insert(m.getName() + "." + property.getKey() + "()");
|
||||
String p = property.getKey();
|
||||
if (!property.isVariable()) {
|
||||
p = p + "()";
|
||||
}
|
||||
if (property.isGlobal()) {
|
||||
mEditor.insert(p);
|
||||
} else {
|
||||
mEditor.insert(m.getName() + "." + p);
|
||||
}
|
||||
if (!property.isVariable()) {
|
||||
mEditor.moveCursor(0, -1);
|
||||
}
|
||||
mEditor.moveCursor(0, -1);
|
||||
mFunctionsKeyboardHelper.hideFunctionsLayout(true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user