-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
1,880 additions
and
362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
387 changes: 387 additions & 0 deletions
387
Native/Android/LunarConsole/app/src/main/assets/input.txt
Large diffs are not rendered by default.
Oops, something went wrong.
160 changes: 92 additions & 68 deletions
160
...Android/LunarConsole/app/src/main/java/spacemadness/com/lunarconsoleapp/MainActivity.java
Large diffs are not rendered by default.
Oops, something went wrong.
73 changes: 42 additions & 31 deletions
73
Native/Android/LunarConsole/app/src/main/res/layout/activity_main.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,103 @@ | ||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
tools:context=".MainActivity"> | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
android:paddingBottom="@dimen/activity_vertical_margin" | ||
android:paddingLeft="@dimen/activity_horizontal_margin" | ||
android:paddingRight="@dimen/activity_horizontal_margin" | ||
android:paddingTop="@dimen/activity_vertical_margin" | ||
tools:context=".MainActivity"> | ||
|
||
<LinearLayout | ||
android:orientation="horizontal" | ||
android:id="@+id/linearLayout" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/linearLayout"> | ||
android:orientation="horizontal"> | ||
|
||
<EditText | ||
style="@style/IntEditText" | ||
android:id="@+id/edit_text_delay" | ||
style="@style/IntEditText" | ||
android:layout_width="0dp" | ||
android:layout_height="wrap_content" | ||
android:layout_weight="1" | ||
android:text="1000"/> | ||
|
||
<Button | ||
android:id="@+id/button_start_logger" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/button_logger_start" | ||
android:id="@+id/button_start_logger"/> | ||
android:text="@string/button_logger_start"/> | ||
|
||
</LinearLayout> | ||
|
||
<Button | ||
android:id="@+id/button_log_exception" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/button_log_error" | ||
android:id="@+id/button_log_exception" | ||
android:layout_above="@+id/button_show_console" | ||
android:layout_alignEnd="@+id/button_show_console" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignRight="@+id/button_show_console" | ||
android:layout_alignEnd="@+id/button_show_console"/> | ||
android:text="@string/button_log_error"/> | ||
|
||
<Button | ||
android:id="@+id/button_show_console" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Show Console" | ||
android:id="@+id/button_show_console" | ||
android:layout_alignEnd="@+id/linearLayout" | ||
android:layout_alignParentBottom="true" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignRight="@+id/linearLayout" | ||
android:layout_alignEnd="@+id/linearLayout"/> | ||
android:text="Show Console"/> | ||
|
||
<EditText | ||
android:id="@+id/edit_text_capacity" | ||
style="@style/IntEditText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/edit_text_capacity" | ||
android:layout_below="@+id/linearLayout" | ||
android:layout_alignEnd="@+id/linearLayout" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignRight="@+id/linearLayout" | ||
android:layout_alignEnd="@+id/linearLayout" | ||
android:layout_below="@+id/linearLayout" | ||
android:text="1024"/> | ||
|
||
<EditText | ||
android:id="@+id/edit_text_trim" | ||
style="@style/IntEditText" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:id="@+id/edit_text_trim" | ||
android:layout_below="@+id/edit_text_capacity" | ||
android:layout_alignEnd="@+id/linearLayout" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignRight="@+id/linearLayout" | ||
android:layout_alignEnd="@+id/linearLayout" | ||
android:layout_below="@+id/edit_text_capacity" | ||
android:text="128"/> | ||
|
||
<CheckBox | ||
android:id="@+id/checkbox_use_main_thread" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="Use main thread" | ||
android:checked="true" | ||
android:id="@+id/checkbox_use_main_thread" | ||
android:layout_below="@+id/edit_text_trim" | ||
android:layout_alignEnd="@+id/edit_text_capacity" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_alignRight="@+id/edit_text_capacity" | ||
android:layout_alignEnd="@+id/edit_text_capacity"/> | ||
android:layout_below="@+id/edit_text_trim" | ||
android:checked="true" | ||
android:text="Use main thread"/> | ||
|
||
<CheckBox | ||
android:id="@+id/checkbox_enable_stack_trace" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:layout_alignParentLeft="true" | ||
android:layout_alignParentStart="true" | ||
android:layout_below="@+id/checkbox_use_main_thread" | ||
android:checked="true" | ||
android:text="Enable stack trace"/> | ||
|
||
|
||
</RelativeLayout> |
26 changes: 26 additions & 0 deletions
26
...lunarConsole/src/androidTest/java/spacemadness/com/lunarconsole/utils/StackTraceTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package spacemadness.com.lunarconsole.utils; | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class StackTraceTest extends TestCase | ||
{ | ||
public void testOptimize() throws Exception | ||
{ | ||
String stackTrace = "UnityEngine.Debug:LogError(Object)\n" + | ||
"Test:Method(String) (at /Users/lunar-unity-console/Project/Assets/Scripts/Test.cs:30)\n" + | ||
"<LogMessages>c__Iterator0:MoveNext() (at /Users/lunar-unity-console/Project/Assets/Logger.cs:85)\n" + | ||
"UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)\n" + | ||
"Logger:LogMessages() (at /Users/lunar-unity-console/Project/Assets/Logger.cs:66)\n" + | ||
"UnityEngine.EventSystems.EventSystem:Update()"; | ||
|
||
String expected = "UnityEngine.Debug:LogError(Object)\n" + | ||
"Test:Method(String) (at Assets/Scripts/Test.cs:30)\n" + | ||
"<LogMessages>c__Iterator0:MoveNext() (at Assets/Logger.cs:85)\n" + | ||
"UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)\n" + | ||
"Logger:LogMessages() (at Assets/Logger.cs:66)\n" + | ||
"UnityEngine.EventSystems.EventSystem:Update()"; | ||
|
||
String actual = StackTrace.optimize(stackTrace); | ||
assertEquals(expected, actual); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.