AndroidIDE icon indicating copy to clipboard operation
AndroidIDE copied to clipboard

build.gradle editing issues

Open dhaigit opened this issue 3 years ago • 3 comments

With latest commit:

  1. Let's say we have this:

allprojects { ... }

If we position the cursor right after the first "{" then tap "Enter" key, it would start a new line but without aligning correctly with the line below.

  1. Tab characters are not being converted into spaces

dhaigit avatar Feb 03 '22 18:02 dhaigit

I'm trying out this latest commit and it has too many little issues that weren't there before. Some of which I think are caused by the new updated Editor version. Too many to report them one by one.

dhaigit avatar Feb 03 '22 18:02 dhaigit

...latest commit and it has too many little issues that weren't there before

Agreed with @dhaigit, here are the issues I met using last update of an editor:

  1. When IDE suggests you keywords and stuff, suggestion box blinks sometimes and in IDE logs you can see this:
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 at java.util.ArrayList.get(ArrayList.java:437)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.createSignatureText(SignatureHelpWindow.java:105)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.setupAndDisplay(SignatureHelpWindow.java:67)
 at com.itsaky.androidide.views.editor.IDEEditor.showSignatureHelp(IDEEditor.java:452)
 at com.itsaky.androidide.views.editor.IDEEditor.lambda$signatureHelp$11$com-itsaky-androidide-views-editor-IDEEditor(IDEEditor.java:446)
 at com.itsaky.androidide.views.editor.IDEEditor$$ExternalSyntheticLambda13.run(Unknown Source:4)
 at android.os.Handler.handleCallback(Handler.java:938)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:236)
 at android.app.ActivityThread.main(ActivityThread.java:8056)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

IDE even crashes sometimes, trying to autocomplete. Logs I got when crash:

AndroidIDE crash report
App version: 2.0-beta (200)

 Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 at java.util.ArrayList.get(ArrayList.java:437)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.createSignatureText(SignatureHelpWindow.java:105)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.setupAndDisplay(SignatureHelpWindow.java:67)
 at com.itsaky.androidide.views.editor.IDEEditor.showSignatureHelp(IDEEditor.java:452)
 at com.itsaky.androidide.views.editor.IDEEditor.lambda$signatureHelp$11$com-itsaky-androidide-views-editor-IDEEditor(IDEEditor.java:446)
 at com.itsaky.androidide.views.editor.IDEEditor$$ExternalSyntheticLambda13.run(Unknown Source:4)
 at android.os.Handler.handleCallback(Handler.java:938)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:236)
 at android.app.ActivityThread.main(ActivityThread.java:8056)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)
  1. When typing one of following characters: ( [ < ", IDE will add a closing character for them as well (and it is good), but in previous versions when you type closing characters manually, they will type "on top of" characters, inserted by IDE. This scenario will exclude cases of duplicated closing characters, as they appear now.
  2. When pressing new line or another words enter key between curly brackets, IDE will no longer nove closing barcket to another new line, to make editing more convinient (this was described by @dhaigit in his comment as well).

These are all issues I experienced so far. Hope this comment will help to fix them.

Smooth-E avatar Feb 04 '22 04:02 Smooth-E

Found out how to reproduce an autocompletion issue:

  1. Create a new project from libgdx project template.
  2. In the create() method's body (or anywhere else will do the thing too I guess, since this issue happened to me several times) type this: new Image().addListener(new Clicklistener(), )) After you type the comma character and then press space, app will crach with following logs:
AndroidIDE crash report
App version: 2.0-beta (200)

 Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
 at java.util.ArrayList.get(ArrayList.java:437)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.createSignatureText(SignatureHelpWindow.java:105)
 at com.itsaky.androidide.views.editor.SignatureHelpWindow.setupAndDisplay(SignatureHelpWindow.java:67)
 at com.itsaky.androidide.views.editor.IDEEditor.showSignatureHelp(IDEEditor.java:479)
 at com.itsaky.androidide.views.editor.IDEEditor.lambda$signatureHelp$11$com-itsaky-androidide-views-editor-IDEEditor(IDEEditor.java:473)
 at com.itsaky.androidide.views.editor.IDEEditor$$ExternalSyntheticLambda15.run(Unknown Source:4)
 at android.os.Handler.handleCallback(Handler.java:938)
 at android.os.Handler.dispatchMessage(Handler.java:99)
 at android.os.Looper.loop(Looper.java:236)
 at android.app.ActivityThread.main(ActivityThread.java:8056)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:656)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

Smooth-E avatar Feb 04 '22 10:02 Smooth-E