├── .gitignore ├── .idea ├── compiler.xml ├── copyright │ └── profiles_settings.xml ├── gradle.xml ├── misc.xml ├── modules.xml ├── runConfigurations.xml └── vcs.xml ├── FlycoRoundView_Lib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── flyco │ │ └── roundview │ │ ├── RoundFrameLayout.java │ │ ├── RoundLinearLayout.java │ │ ├── RoundRelativeLayout.java │ │ ├── RoundTextView.java │ │ └── RoundViewDelegate.java │ └── res │ └── values │ └── attrs.xml ├── LICENSE ├── README.md ├── XRunTime ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── mylibrary │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── google │ │ │ └── devtools │ │ │ └── simple │ │ │ └── runtime │ │ │ ├── Application.java │ │ │ ├── ApplicationFunctions.java │ │ │ ├── Arrays.java │ │ │ ├── Assertions.java │ │ │ ├── Conversions.java │ │ │ ├── Dates.java │ │ │ ├── Files.java │ │ │ ├── FilesFunctions.java │ │ │ ├── Log.java │ │ │ ├── LogFunctions.java │ │ │ ├── Math.java │ │ │ ├── Objects.java │ │ │ ├── Strings.java │ │ │ ├── android │ │ │ ├── ApplicationImpl.java │ │ │ ├── FilesImpl.java │ │ │ └── LogImpl.java │ │ │ ├── annotations │ │ │ ├── SimpleComponent.java │ │ │ ├── SimpleDataElement.java │ │ │ ├── SimpleEvent.java │ │ │ ├── SimpleFunction.java │ │ │ ├── SimpleObject.java │ │ │ ├── SimpleProperty.java │ │ │ └── UsesPermissions.java │ │ │ ├── collections │ │ │ └── Collection.java │ │ │ ├── components │ │ │ ├── AccelerometerSensor.java │ │ │ ├── Button.java │ │ │ ├── Canvas.java │ │ │ ├── CheckBox.java │ │ │ ├── Component.java │ │ │ ├── ComponentContainer.java │ │ │ ├── EmailPicker.java │ │ │ ├── Form.java │ │ │ ├── FrameLayout.java │ │ │ ├── Image.java │ │ │ ├── Label.java │ │ │ ├── Layout.java │ │ │ ├── LinearLayout.java │ │ │ ├── LocationSensor.java │ │ │ ├── OrientationSensor.java │ │ │ ├── Panel.java │ │ │ ├── PasswordTextBox.java │ │ │ ├── Phone.java │ │ │ ├── RadioButton.java │ │ │ ├── SensorComponent.java │ │ │ ├── TableLayout.java │ │ │ ├── TextBox.java │ │ │ ├── TextComponent.java │ │ │ ├── Timer.java │ │ │ ├── VisibleComponent.java │ │ │ └── impl │ │ │ │ ├── ComponentImpl.java │ │ │ │ └── android │ │ │ │ ├── AccelerometerSensorImpl.java │ │ │ │ ├── ButtonImpl.java │ │ │ │ ├── CanvasImpl.java │ │ │ │ ├── CheckBoxImpl.java │ │ │ │ ├── EmailPickerImpl.java │ │ │ │ ├── FormImpl.java │ │ │ │ ├── FrameLayoutImpl.java │ │ │ │ ├── ImageImpl.java │ │ │ │ ├── LabelImpl.java │ │ │ │ ├── LayoutImpl.java │ │ │ │ ├── LinearLayoutImpl.java │ │ │ │ ├── LocationSensorImpl.java │ │ │ │ ├── OrientationSensorImpl.java │ │ │ │ ├── PanelImpl.java │ │ │ │ ├── PasswordTextBoxImpl.java │ │ │ │ ├── PhoneImpl.java │ │ │ │ ├── RadioButtonImpl.java │ │ │ │ ├── TableLayoutImpl.java │ │ │ │ ├── TextBoxImpl.java │ │ │ │ ├── TextViewComponent.java │ │ │ │ ├── TimerImpl.java │ │ │ │ ├── ViewComponent.java │ │ │ │ ├── ViewComponentContainer.java │ │ │ │ └── util │ │ │ │ ├── EmailAddressAdapter.java │ │ │ │ ├── ImageUtil.java │ │ │ │ ├── PaintUtil.java │ │ │ │ ├── TextViewUtil.java │ │ │ │ └── ViewUtil.java │ │ │ ├── errors │ │ │ ├── AssertionFailure.java │ │ │ ├── ConversionError.java │ │ │ ├── FileAlreadyExistsError.java │ │ │ ├── FileIOError.java │ │ │ ├── IllegalArgumentError.java │ │ │ ├── IndexOutOfBoundsError.java │ │ │ ├── NoSuchFileError.java │ │ │ ├── PropertyAccessError.java │ │ │ ├── RuntimeError.java │ │ │ ├── UninitializedInstanceError.java │ │ │ ├── UnknownFileHandleError.java │ │ │ └── UnknownIdentifierError.java │ │ │ ├── events │ │ │ └── EventDispatcher.java │ │ │ ├── helpers │ │ │ ├── ConvHelpers.java │ │ │ ├── ExprHelpers.java │ │ │ └── StmtHelpers.java │ │ │ ├── parameters │ │ │ ├── BooleanReferenceParameter.java │ │ │ ├── ByteReferenceParameter.java │ │ │ ├── DateReferenceParameter.java │ │ │ ├── DoubleReferenceParameter.java │ │ │ ├── IntegerReferenceParameter.java │ │ │ ├── LongReferenceParameter.java │ │ │ ├── ObjectReferenceParameter.java │ │ │ ├── ReferenceParameter.java │ │ │ ├── ShortReferenceParameter.java │ │ │ ├── SingleReferenceParameter.java │ │ │ ├── StringReferenceParameter.java │ │ │ └── VariantReferenceParameter.java │ │ │ └── variants │ │ │ ├── ArrayVariant.java │ │ │ ├── BooleanVariant.java │ │ │ ├── ByteVariant.java │ │ │ ├── DateVariant.java │ │ │ ├── DoubleVariant.java │ │ │ ├── IntegerVariant.java │ │ │ ├── LongVariant.java │ │ │ ├── ObjectVariant.java │ │ │ ├── ShortVariant.java │ │ │ ├── SingleVariant.java │ │ │ ├── StringVariant.java │ │ │ ├── UninitializedVariant.java │ │ │ └── Variant.java │ └── res │ │ └── values │ │ └── strings.xml │ └── test │ └── java │ └── com │ └── example │ └── mylibrary │ └── ExampleUnitTest.java ├── app ├── .gitignore ├── build.gradle ├── libs │ ├── YoumiSdk_v6.0.0_2016-02-26.jar │ ├── dx.jar │ └── sdklib.jar ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── wolf │ │ └── xscript │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── assets │ │ ├── Tetris.zip │ │ ├── aapt │ │ ├── android.jar │ │ ├── ic_launcher.png │ │ └── xruntime.jar │ ├── java │ │ ├── apksigner │ │ │ ├── Base64.java │ │ │ ├── Main.java │ │ │ ├── Signature.java │ │ │ └── io │ │ │ │ ├── CentralEnd.java │ │ │ │ ├── ZioEntry.java │ │ │ │ ├── ZioEntryInputStream.java │ │ │ │ ├── ZioEntryOutputStream.java │ │ │ │ ├── ZipInput.java │ │ │ │ └── ZipOutput.java │ │ └── com │ │ │ ├── google │ │ │ └── devtools │ │ │ │ └── simple │ │ │ │ ├── classfiles │ │ │ │ ├── AnnotationsAttribute.java │ │ │ │ ├── Buffer.java │ │ │ │ ├── ClassFile.java │ │ │ │ ├── ConstantPool.java │ │ │ │ ├── ConstantPoolOverflowException.java │ │ │ │ ├── Field.java │ │ │ │ ├── Method.java │ │ │ │ └── MethodTooBigException.java │ │ │ │ ├── compiler │ │ │ │ ├── Compiler.java │ │ │ │ ├── Error.java │ │ │ │ ├── Main.java │ │ │ │ ├── Message.java │ │ │ │ ├── Project.java │ │ │ │ ├── RuntimeLoader.java │ │ │ │ ├── Warning.java │ │ │ │ ├── XInit.java │ │ │ │ ├── expressions │ │ │ │ │ ├── AdditionExpression.java │ │ │ │ │ ├── AliasExpression.java │ │ │ │ │ ├── AndExpression.java │ │ │ │ │ ├── ArithmeticExpression.java │ │ │ │ │ ├── AssignmentExpression.java │ │ │ │ │ ├── BinaryExpression.java │ │ │ │ │ ├── CallExpression.java │ │ │ │ │ ├── ComparisonExpression.java │ │ │ │ │ ├── ConcatenationExpression.java │ │ │ │ │ ├── ConstantBooleanExpression.java │ │ │ │ │ ├── ConstantExpression.java │ │ │ │ │ ├── ConstantNumberExpression.java │ │ │ │ │ ├── ConstantStringExpression.java │ │ │ │ │ ├── DivisionExpression.java │ │ │ │ │ ├── EqualExpression.java │ │ │ │ │ ├── ExponentiationExpression.java │ │ │ │ │ ├── Expression.java │ │ │ │ │ ├── ExpressionValueUnused.java │ │ │ │ │ ├── ExpressionWithScope.java │ │ │ │ │ ├── GreaterExpression.java │ │ │ │ │ ├── GreaterOrEqualExpression.java │ │ │ │ │ ├── IdentifierExpression.java │ │ │ │ │ ├── IdentityExpression.java │ │ │ │ │ ├── IntegerDivisionExpression.java │ │ │ │ │ ├── IsExpression.java │ │ │ │ │ ├── IsNotExpression.java │ │ │ │ │ ├── LessExpression.java │ │ │ │ │ ├── LessOrEqualExpression.java │ │ │ │ │ ├── LikeExpression.java │ │ │ │ │ ├── LogicalOrBitOpExpression.java │ │ │ │ │ ├── MeExpression.java │ │ │ │ │ ├── ModuloExpression.java │ │ │ │ │ ├── MultiplicationExpression.java │ │ │ │ │ ├── NegationExpression.java │ │ │ │ │ ├── NewExpression.java │ │ │ │ │ ├── NotEqualExpression.java │ │ │ │ │ ├── NotExpression.java │ │ │ │ │ ├── NothingExpression.java │ │ │ │ │ ├── OrExpression.java │ │ │ │ │ ├── OrderedComparisonExpression.java │ │ │ │ │ ├── QualifiedIdentifierExpression.java │ │ │ │ │ ├── ShiftExpression.java │ │ │ │ │ ├── ShiftLeftExpression.java │ │ │ │ │ ├── ShiftRightExpression.java │ │ │ │ │ ├── SimpleIdentifierExpression.java │ │ │ │ │ ├── SubtractionExpression.java │ │ │ │ │ ├── TypeOfExpression.java │ │ │ │ │ ├── UnaryExpression.java │ │ │ │ │ ├── XorExpression.java │ │ │ │ │ └── synthetic │ │ │ │ │ │ ├── ConversionExpression.java │ │ │ │ │ │ └── NewComponentExpression.java │ │ │ │ ├── parser │ │ │ │ │ └── Parser.java │ │ │ │ ├── scanner │ │ │ │ │ ├── Keywords.java │ │ │ │ │ ├── Scanner.java │ │ │ │ │ └── TokenKind.java │ │ │ │ ├── scopes │ │ │ │ │ ├── GlobalScope.java │ │ │ │ │ ├── LocalScope.java │ │ │ │ │ ├── NamespaceScope.java │ │ │ │ │ ├── ObjectScope.java │ │ │ │ │ ├── Scope.java │ │ │ │ │ └── synthetic │ │ │ │ │ │ └── ErrorScope.java │ │ │ │ ├── statements │ │ │ │ │ ├── ConditionalLoopStatement.java │ │ │ │ │ ├── DoUntilStatement.java │ │ │ │ │ ├── DoWhileStatement.java │ │ │ │ │ ├── ExitStatement.java │ │ │ │ │ ├── ExpressionStatement.java │ │ │ │ │ ├── ForEachStatement.java │ │ │ │ │ ├── ForNextStatement.java │ │ │ │ │ ├── IfStatement.java │ │ │ │ │ ├── IterativeLoopStatement.java │ │ │ │ │ ├── LoopStatement.java │ │ │ │ │ ├── OnErrorStatement.java │ │ │ │ │ ├── RaiseEventStatement.java │ │ │ │ │ ├── SelectStatement.java │ │ │ │ │ ├── Statement.java │ │ │ │ │ ├── StatementBlock.java │ │ │ │ │ ├── WhileStatement.java │ │ │ │ │ └── synthetic │ │ │ │ │ │ ├── LocalVariableDefinitionStatement.java │ │ │ │ │ │ ├── MarkerStatement.java │ │ │ │ │ │ ├── RaiseInitializeEventStatement.java │ │ │ │ │ │ └── RegisterEventHandlersStatement.java │ │ │ │ ├── symbols │ │ │ │ │ ├── AliasSymbol.java │ │ │ │ │ ├── ConstantDataMemberSymbol.java │ │ │ │ │ ├── DataMemberSymbol.java │ │ │ │ │ ├── EventHandlerSymbol.java │ │ │ │ │ ├── EventSymbol.java │ │ │ │ │ ├── FunctionSymbol.java │ │ │ │ │ ├── InstanceDataMemberSymbol.java │ │ │ │ │ ├── InstanceFunctionSymbol.java │ │ │ │ │ ├── InstanceMember.java │ │ │ │ │ ├── LocalVariableSymbol.java │ │ │ │ │ ├── NamespaceSymbol.java │ │ │ │ │ ├── ObjectDataMemberSymbol.java │ │ │ │ │ ├── ObjectFunctionSymbol.java │ │ │ │ │ ├── ObjectSymbol.java │ │ │ │ │ ├── PropertySymbol.java │ │ │ │ │ ├── Symbol.java │ │ │ │ │ ├── SymbolCanBePartOfQualifiedIdentifier.java │ │ │ │ │ ├── SymbolWithType.java │ │ │ │ │ ├── VariableSymbol.java │ │ │ │ │ └── synthetic │ │ │ │ │ │ ├── ConstructorSymbol.java │ │ │ │ │ │ └── ErrorSymbol.java │ │ │ │ ├── types │ │ │ │ │ ├── ArrayType.java │ │ │ │ │ ├── BooleanType.java │ │ │ │ │ ├── ByteType.java │ │ │ │ │ ├── DateType.java │ │ │ │ │ ├── DoubleType.java │ │ │ │ │ ├── FloatNumberType.java │ │ │ │ │ ├── FunctionType.java │ │ │ │ │ ├── IntegerNumberType.java │ │ │ │ │ ├── IntegerType.java │ │ │ │ │ ├── LongType.java │ │ │ │ │ ├── NumberType.java │ │ │ │ │ ├── ObjectType.java │ │ │ │ │ ├── ShortType.java │ │ │ │ │ ├── SingleType.java │ │ │ │ │ ├── SmallIntegerType.java │ │ │ │ │ ├── StringType.java │ │ │ │ │ ├── Type.java │ │ │ │ │ ├── TypeWithScope.java │ │ │ │ │ ├── UnresolvedType.java │ │ │ │ │ ├── VariantType.java │ │ │ │ │ └── synthetic │ │ │ │ │ │ └── ErrorType.java │ │ │ │ └── util │ │ │ │ │ └── Signatures.java │ │ │ │ ├── tools │ │ │ │ └── ProjectCreator.java │ │ │ │ └── util │ │ │ │ ├── Execution.java │ │ │ │ ├── Files.java │ │ │ │ ├── Preconditions.java │ │ │ │ └── Strings.java │ │ │ └── wolf │ │ │ ├── net │ │ │ └── Downloads.java │ │ │ ├── util │ │ │ ├── UnzipAssets.java │ │ │ ├── Utils.java │ │ │ └── tint │ │ │ │ └── StatusBarUtil.java │ │ │ ├── view │ │ │ └── filedialog │ │ │ │ └── OpenFileDialog.java │ │ │ └── xscript │ │ │ ├── XCompile.java │ │ │ ├── XscriptApplication.java │ │ │ ├── activity │ │ │ ├── AboutActivity.java │ │ │ ├── BaseActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── ProjectActivity.java │ │ │ ├── ProjectListActivity.java │ │ │ └── TestActivity.java │ │ │ ├── adapter │ │ │ ├── ProjectFileListAdapter.java │ │ │ └── ProjectListAdapter.java │ │ │ ├── data │ │ │ └── OneProjectData.java │ │ │ ├── project │ │ │ └── LoadProject.java │ │ │ └── uidesigner │ │ │ ├── MsgBox.java │ │ │ ├── UIDesignerActivity.java │ │ │ ├── UIParse.java │ │ │ └── data │ │ │ ├── ComponentData.java │ │ │ └── ComponentProperty.java │ ├── res │ │ ├── drawable-v21 │ │ │ ├── ic_menu_camera.xml │ │ │ ├── ic_menu_gallery.xml │ │ │ ├── ic_menu_manage.xml │ │ │ ├── ic_menu_send.xml │ │ │ ├── ic_menu_share.xml │ │ │ └── ic_menu_slideshow.xml │ │ ├── drawable │ │ │ ├── codeed.xml │ │ │ ├── custom_img.jpg │ │ │ ├── logo_big.png │ │ │ ├── nav_header_bg.jpg │ │ │ └── side_nav_bar.xml │ │ ├── layout │ │ │ ├── activity_about.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_project.xml │ │ │ ├── activity_project_list.xml │ │ │ ├── activity_test.xml │ │ │ ├── activity_uidesigner.xml │ │ │ ├── app_bar_project.xml │ │ │ ├── content_about.xml │ │ │ ├── content_project.xml │ │ │ ├── content_project_list.xml │ │ │ ├── file_label.xml │ │ │ ├── filedialogitem.xml │ │ │ ├── mycodeeditor.xml │ │ │ ├── nav_header_project.xml │ │ │ ├── newprojectdialog.xml │ │ │ ├── project_file_item.xml │ │ │ └── projectlistitem.xml │ │ ├── menu │ │ │ ├── activity_project_drawer.xml │ │ │ ├── menu_about.xml │ │ │ ├── project.xml │ │ │ └── projectlist.xml │ │ ├── mipmap-hdpi │ │ │ ├── file_modfieid.png │ │ │ ├── file_new.png │ │ │ ├── file_type_c.png │ │ │ ├── file_type_cpp.png │ │ │ ├── file_type_css.png │ │ │ ├── file_type_h.png │ │ │ ├── file_type_html.png │ │ │ ├── file_type_java.png │ │ │ ├── file_type_js.png │ │ │ ├── file_type_txt.png │ │ │ ├── file_type_unknown.png │ │ │ ├── file_type_xml.png │ │ │ ├── filedialog_file.png │ │ │ ├── filedialog_folder.png │ │ │ ├── filedialog_folder_up.png │ │ │ ├── filedialog_root.png │ │ │ ├── filedialog_wavfile.png │ │ │ ├── format_zip.png │ │ │ ├── ic_l_add_dark.png │ │ │ ├── ic_l_help_dark.png │ │ │ ├── ic_l_play_dark.png │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ ├── values-v21 │ │ │ └── styles.xml │ │ ├── values-w820dp │ │ │ └── dimens.xml │ │ └── values │ │ │ ├── colors.xml │ │ │ ├── dimens.xml │ │ │ ├── drawables.xml │ │ │ ├── strings.xml │ │ │ └── styles.xml │ └── resources │ │ └── keys │ │ ├── platform.pk8 │ │ ├── platform.sbt │ │ ├── platform.x509.pem │ │ ├── testkey.pk8 │ │ ├── testkey.sbt │ │ └── testkey.x509.pem │ └── test │ └── java │ └── com │ └── wolf │ └── xscript │ └── ExampleUnitTest.java ├── build.gradle ├── captures ├── 1E6F68A09CB026BC9DF2816BE646F415.png └── 6071CD8CAC6CC4D0B4BDA4B30DCAF3B7.png ├── colorpicker ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── colorpicker │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── github │ │ │ └── danielnilsson9 │ │ │ └── colorpickerview │ │ │ ├── dialog │ │ │ └── ColorPickerDialogFragment.java │ │ │ ├── drawable │ │ │ └── AlphaPatternDrawable.java │ │ │ ├── preference │ │ │ └── ColorPreference.java │ │ │ └── view │ │ │ ├── ColorPanelView.java │ │ │ ├── ColorPickerView.java │ │ │ └── DrawingUtils.java │ └── res │ │ ├── drawable │ │ ├── colorpickerview__btn_background.xml │ │ └── colorpickerview__btn_background_pressed.xml │ │ ├── layout │ │ ├── colorpickerview__dialog_color_picker.xml │ │ └── colorpickerview__preference_preview_layout.xml │ │ ├── values-sw360dp │ │ ├── dimen.xml │ │ └── styles.xml │ │ ├── values-sw400dp │ │ ├── dimen.xml │ │ └── styles.xml │ │ ├── values-sw600dp │ │ └── styles.xml │ │ ├── values-v21 │ │ └── styles.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── dimen.xml │ │ ├── ids.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── colorpicker │ └── ExampleUnitTest.java ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── import-summary.txt ├── settings.gradle ├── sweetdialoglib ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── example │ │ └── sweetdialoglib │ │ └── ApplicationTest.java │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ ├── cn │ │ │ └── pedant │ │ │ │ └── SweetAlert │ │ │ │ ├── OptAnimationLoader.java │ │ │ │ ├── ProgressHelper.java │ │ │ │ ├── Rotate3dAnimation.java │ │ │ │ ├── SuccessTickView.java │ │ │ │ └── SweetAlertDialog.java │ │ └── com │ │ │ └── pnikosis │ │ │ └── materialishprogress │ │ │ └── ProgressWheel.java │ └── res │ │ ├── anim │ │ ├── error_frame_in.xml │ │ ├── error_x_in.xml │ │ ├── modal_in.xml │ │ ├── modal_out.xml │ │ ├── success_bow_roate.xml │ │ └── success_mask_layout.xml │ │ ├── drawable │ │ ├── blue_button_background.xml │ │ ├── dialog_background.xml │ │ ├── error_center_x.xml │ │ ├── error_circle.xml │ │ ├── gray_button_background.xml │ │ ├── red_button_background.xml │ │ ├── success_bow.xml │ │ ├── success_circle.xml │ │ ├── warning_circle.xml │ │ └── warning_sigh.xml │ │ ├── layout │ │ └── alert_dialog.xml │ │ └── values │ │ ├── attrs.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── strings.xml │ │ └── styles.xml │ └── test │ └── java │ └── com │ └── example │ └── sweetdialoglib │ └── ExampleUnitTest.java ├── view ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ └── com │ │ └── flyco │ │ └── RoundViewSample │ │ └── MainActivity.java │ └── res │ ├── layout │ └── activity_main.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ ├── ic_launcher.png │ └── ic_portrait.jpg │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ └── values │ ├── colors.xml │ ├── strings.xml │ └── styles.xml └── xeditor ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src ├── androidTest └── java │ └── com │ └── example │ └── xeditor │ └── ApplicationTest.java ├── main ├── AndroidManifest.xml ├── java │ └── com │ │ ├── editor │ │ ├── CrashHandler.java │ │ ├── MyApplication.java │ │ └── text │ │ │ ├── CodeEditor.java │ │ │ ├── FileThread.java │ │ │ ├── GestureListener.java │ │ │ ├── HorScrollViewText.java │ │ │ ├── MainActivity.java │ │ │ ├── Native.java │ │ │ ├── ScrollViewText.java │ │ │ └── TextEditorView.java │ │ ├── example │ │ └── xeditor │ │ │ └── MainActivity.java │ │ └── select │ │ └── file │ │ ├── FileActivity.java │ │ ├── FileAdapter.java │ │ ├── FileUtils.java │ │ └── ThumbnailUtil.java └── res │ ├── drawable-hdpi │ ├── app_icon.png │ ├── box_blue.png │ ├── box_light_blue.png │ ├── box_light_pink.png │ ├── box_light_red.png │ ├── box_pink.png │ ├── box_red.png │ ├── error.jpg │ ├── file_type_c.png │ ├── file_type_cpp.png │ ├── file_type_css.png │ ├── file_type_h.png │ ├── file_type_html.png │ ├── file_type_java.png │ ├── file_type_js.png │ ├── file_type_txt.png │ ├── file_type_unknown.png │ ├── file_type_xml.png │ ├── format_apk.png │ ├── format_app.png │ ├── format_chm.png │ ├── format_ebook.png │ ├── format_excel.png │ ├── format_flash.png │ ├── format_folder.png │ ├── format_html.png │ ├── format_lock.png │ ├── format_media.png │ ├── format_music.png │ ├── format_pdf.png │ ├── format_picture.png │ ├── format_picture_broken.png │ ├── format_ppt.png │ ├── format_text.png │ ├── format_torrent.png │ ├── format_unknown.png │ ├── format_word.png │ ├── format_zip.png │ ├── ic_launcher.png │ └── toast.9.png │ ├── layout │ ├── activity_main.xml │ ├── create_file.xml │ ├── error.xml │ ├── file_activity.xml │ ├── file_item.xml │ ├── file_label.xml │ └── main.xml │ ├── menu │ ├── file_menu.xml │ └── main_menu.xml │ ├── mipmap-hdpi │ └── ic_launcher.png │ ├── mipmap-mdpi │ └── ic_launcher.png │ ├── mipmap-xhdpi │ └── ic_launcher.png │ ├── mipmap-xxhdpi │ └── ic_launcher.png │ ├── mipmap-xxxhdpi │ └── ic_launcher.png │ ├── values-w820dp │ └── dimens.xml │ └── values │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml └── test └── java └── com └── example └── xeditor └── ExampleUnitTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /FlycoRoundView_Lib/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /FlycoRoundView_Lib/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /Users/lihui/work/AndroidStudio/sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /FlycoRoundView_Lib/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /FlycoRoundView_Lib/src/main/java/com/flyco/roundview/RoundLinearLayout.java: -------------------------------------------------------------------------------- 1 | package com.flyco.roundview; 2 | 3 | import android.content.Context; 4 | import android.graphics.Canvas; 5 | import android.util.AttributeSet; 6 | import android.widget.LinearLayout; 7 | 8 | /** 用于需要圆角矩形框背景的LinearLayout的情况,减少直接使用LinearLayout时引入的shape资源文件 */ 9 | public class RoundLinearLayout extends LinearLayout { 10 | private RoundViewDelegate delegate; 11 | 12 | public RoundLinearLayout(Context context) { 13 | this(context, null); 14 | } 15 | 16 | public RoundLinearLayout(Context context, AttributeSet attrs) { 17 | super(context, attrs); 18 | delegate = new RoundViewDelegate(this, context, attrs); 19 | } 20 | 21 | /** use delegate to set attr */ 22 | public RoundViewDelegate getDelegate() { 23 | return delegate; 24 | } 25 | 26 | @Override 27 | protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { 28 | if (delegate.isWidthHeightEqual() && getWidth() > 0 && getHeight() > 0) { 29 | int max = Math.max(getWidth(), getHeight()); 30 | int measureSpec = MeasureSpec.makeMeasureSpec(max, MeasureSpec.EXACTLY); 31 | super.onMeasure(measureSpec, measureSpec); 32 | return; 33 | } 34 | 35 | super.onMeasure(widthMeasureSpec, heightMeasureSpec); 36 | } 37 | 38 | @Override 39 | protected void onLayout(boolean changed, int left, int top, int right, int bottom) { 40 | super.onLayout(changed, left, top, right, bottom); 41 | if (delegate.isRadiusHalfHeight()) { 42 | delegate.setCornerRadius(getHeight() / 2); 43 | } 44 | delegate.update(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xscript 2 | 将GoogleSimple移植到Android 3 | Xscript让你很简单的创造出自己的App! 4 | 我们的优势 5 | 1.采用扩展库的方式做到可以支持安卓所有API! 6 | 2.支持中英文两种模式编程 7 | 3.编译生成java字节码,运行效率无损 8 | 4.支持第三方加固,代码更安全。 9 | 10 | 本项目由:GreyWolf在2016.5.13日创建 11 | 2016.5.20日发布1.0预览版,后续拖动控件布局,中文编程,语法教程将会不断完善!欢迎提出各种意见。 12 | 13 | -------------------------------------------------------------------------------- /XRunTime/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /XRunTime/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.3' 6 | 7 | defaultConfig { 8 | minSdkVersion 15 9 | targetSdkVersion 23 10 | versionCode 1 11 | versionName "1.0" 12 | } 13 | buildTypes { 14 | release { 15 | minifyEnabled false 16 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 17 | } 18 | } 19 | } 20 | 21 | dependencies { 22 | compile fileTree(include: ['*.jar'], dir: 'libs') 23 | testCompile 'junit:junit:4.12' 24 | } 25 | -------------------------------------------------------------------------------- /XRunTime/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\MyPrograms\Develop\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /XRunTime/src/androidTest/java/com/example/mylibrary/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.example.mylibrary; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /XRunTime/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/FilesFunctions.java: -------------------------------------------------------------------------------- 1 | package com.google.devtools.simple.runtime; 2 | 3 | public class FilesFunctions { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/android/FilesImpl.java: -------------------------------------------------------------------------------- 1 | package com.google.devtools.simple.runtime.android; 2 | 3 | public class FilesImpl { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark components (used by the Simple compiler to identify 26 | * components as well as identifying them for use in a visual designer). 27 | * 28 | * @author Herbert Czymontek 29 | */ 30 | @Retention(RetentionPolicy.RUNTIME) 31 | @Target(ElementType.TYPE) 32 | public @interface SimpleComponent { 33 | } 34 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleDataElement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple data elememts. 26 | * 27 | *

Note that the Simple compiler will only recognize Java fields marked 28 | * with this annotation. All other fields will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.FIELD) 34 | public @interface SimpleDataElement { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple event definitions. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.METHOD) 31 | public @interface SimpleEvent { 32 | } 33 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple functions. 26 | * 27 | *

Note that the Simple compiler will only recognize Java methods marked 28 | * with this annotation. All other methods will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.METHOD) 34 | public @interface SimpleFunction { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple objects. 26 | * 27 | *

Note that the Simple compiler will only recognize Java classes marked 28 | * with this annotation. All other classes will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.TYPE) 34 | public @interface SimpleObject { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/UsesPermissions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to indicate Android permissions required by components. 26 | * 27 | * @author Mark Friedman 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.TYPE) 31 | public @interface UsesPermissions { 32 | 33 | /** 34 | * The names of the permissions separated by commas. 35 | * 36 | * @return the permission name 37 | */ 38 | String permissionNames() default ""; 39 | } 40 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/ComponentContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | /** 20 | * Components that can contain other components need to implement this 21 | * interface. 22 | * 23 | * @author Herbert Czymontek 24 | */ 25 | public interface ComponentContainer { 26 | 27 | /** 28 | * Adds a component to the container. 29 | * 30 | * @param component component to add 31 | */ 32 | void addComponent(Component component); 33 | 34 | /** 35 | * Returns the layout associated with the container. 36 | * 37 | * @return container layout 38 | */ 39 | Layout getLayout(); 40 | } 41 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/FrameLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Frame layout for Simple components. 23 | * 24 | * @author David Foster 25 | */ 26 | @SimpleObject 27 | public interface FrameLayout extends Layout { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Image.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleComponent; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 22 | import com.google.devtools.simple.runtime.annotations.UsesPermissions; 23 | 24 | /** 25 | * Component for displaying images and animations. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @SimpleComponent 30 | @SimpleObject 31 | // This permission needed because the picture URL could reference a contact photo 32 | @UsesPermissions(permissionNames = "android.permission.READ_CONTACTS") 33 | public interface Image extends VisibleComponent { 34 | 35 | /** 36 | * Picture property setter method. 37 | * 38 | * @param imagePath path and name of image 39 | */ 40 | @SimpleProperty(type = SimpleProperty.PROPERTY_TYPE_ASSET, 41 | initializer = "\"\"") 42 | void Picture(String imagePath); 43 | } 44 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleComponent; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | 22 | /** 23 | * Label containing a text string or an image. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleComponent 28 | @SimpleObject 29 | public interface Label extends TextComponent { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Layout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * The Layout interface for Simple components. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SimpleObject 27 | public interface Layout { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/LinearLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 21 | 22 | /** 23 | * Linear layout for placing components horizontally or vertically. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleObject 28 | public interface LinearLayout extends Layout { 29 | 30 | /** 31 | * Orientation property setter method. 32 | * 33 | * @param newOrientation {@link Component#LAYOUT_ORIENTATION_HORIZONTAL} or 34 | * {@link Component#LAYOUT_ORIENTATION_VERTICAL} 35 | */ 36 | @SimpleProperty 37 | void Orientation(int newOrientation); 38 | } 39 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/SensorComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Marker interface for Simple sensor components. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SimpleObject 27 | public interface SensorComponent extends Component { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/TableLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 21 | 22 | /** 23 | * A layout component allowing subcomponents to be placed in tabular form. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleObject 28 | public interface TableLayout extends Layout { 29 | 30 | /** 31 | * Columns property setter method. 32 | * 33 | * @param cols number of columns in this layout 34 | */ 35 | @SimpleProperty 36 | void Columns(int cols); 37 | 38 | /** 39 | * Rows property setter method. 40 | * 41 | * @param rows number of rows in this layout 42 | */ 43 | @SimpleProperty 44 | void Rows(int rows); 45 | } 46 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/FrameLayoutImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.android.ApplicationImpl; 20 | import com.google.devtools.simple.runtime.components.FrameLayout; 21 | 22 | /** 23 | * Frame layout for Simple components. 24 | * 25 | * @author David Foster 26 | */ 27 | public class FrameLayoutImpl extends LayoutImpl implements FrameLayout { 28 | 29 | /** 30 | * Creates a new frame layout. 31 | * 32 | * @param container view container 33 | */ 34 | FrameLayoutImpl(ViewComponentContainer container) { 35 | super(new android.widget.FrameLayout(ApplicationImpl.getContext()), container); 36 | } 37 | 38 | @Override 39 | public void addComponent(ViewComponent component) { 40 | getLayoutManager().addView(component.getView(), new android.widget.FrameLayout.LayoutParams( 41 | android.view.ViewGroup.LayoutParams.FILL_PARENT, 42 | android.view.ViewGroup.LayoutParams.FILL_PARENT)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/LabelImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.android.ApplicationImpl; 20 | import com.google.devtools.simple.runtime.components.ComponentContainer; 21 | import com.google.devtools.simple.runtime.components.Label; 22 | 23 | import android.view.View; 24 | import android.widget.TextView; 25 | 26 | /** 27 | * Label containing a text string or an image. 28 | * 29 | * @author Herbert Czymontek 30 | */ 31 | public final class LabelImpl extends TextViewComponent implements Label { 32 | 33 | /** 34 | * Creates a new Label component. 35 | * 36 | * @param container container which will hold the component (must not be 37 | * {@code null} 38 | */ 39 | public LabelImpl(ComponentContainer container) { 40 | super(container); 41 | } 42 | 43 | @Override 44 | protected View createView() { 45 | return new TextView(ApplicationImpl.getContext()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/ViewComponentContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.components.ComponentContainer; 20 | 21 | import android.view.ViewGroup; 22 | 23 | /** 24 | * Components that can contain other components need to implement this 25 | * interface. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | public interface ViewComponentContainer extends ComponentContainer { 30 | 31 | /** 32 | * Returns the layout manager of the container. 33 | * 34 | * @return layout manager 35 | */ 36 | ViewGroup getLayoutManager(); 37 | } 38 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/AssertionFailure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.Assertions; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | 22 | /** 23 | * Runtime error indicating an assert failure. 24 | * 25 | *

Caused by the functions in {@link Assertions}. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @SuppressWarnings("serial") 30 | @SimpleObject 31 | public final class AssertionFailure extends RuntimeError { 32 | } 33 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/ConversionError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating a failed attempt of converting a value of a type 23 | * into a value of another type, e.g. the String "foo" into an Integer, but 24 | * also converting from a base type to a derived type where there is no 25 | * relationship. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @SuppressWarnings("serial") 30 | @SimpleObject 31 | public final class ConversionError extends RuntimeError { 32 | } 33 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/FileAlreadyExistsError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating that the attempt to create a file failed because 23 | * there is a file already existing with the same name. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SuppressWarnings("serial") 28 | @SimpleObject 29 | public final class FileAlreadyExistsError extends RuntimeError { 30 | 31 | /** 32 | * Creates a new error. 33 | * 34 | * @param message detailed message 35 | */ 36 | public FileAlreadyExistsError(String message) { 37 | super(message); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/FileIOError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating a problem accessing a file. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SuppressWarnings("serial") 27 | @SimpleObject 28 | public final class FileIOError extends RuntimeError { 29 | 30 | /** 31 | * Creates a new File I/O error. 32 | * 33 | * @param message detailed message 34 | */ 35 | public FileIOError(String message) { 36 | super(message); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/IllegalArgumentError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating an illegal value for a function or procedure 23 | * argument. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SuppressWarnings("serial") 28 | @SimpleObject 29 | public final class IllegalArgumentError extends RuntimeError { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/IndexOutOfBoundsError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating an array or collection access with an index that is 23 | * outside of the array or collection bounds. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SuppressWarnings("serial") 28 | @SimpleObject 29 | public final class IndexOutOfBoundsError extends RuntimeError { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/NoSuchFileError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating that no file for the given name could be found. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SuppressWarnings("serial") 27 | @SimpleObject 28 | public final class NoSuchFileError extends RuntimeError { 29 | 30 | /** 31 | * Creates a new error. 32 | * 33 | * @param message detailed message 34 | */ 35 | public NoSuchFileError(String message) { 36 | super(message); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/PropertyAccessError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Indicates write access to a read-only property or read access to a 23 | * write-only property. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SuppressWarnings("serial") 28 | @SimpleObject 29 | public final class PropertyAccessError extends RuntimeError { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UninitializedInstanceError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating an access to an instance or array variable that 23 | * is not properly initialized. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SuppressWarnings("serial") 28 | @SimpleObject 29 | public final class UninitializedInstanceError extends RuntimeError { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UnknownFileHandleError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Runtime error indicating an unknown file handle. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SuppressWarnings("serial") 27 | @SimpleObject 28 | public final class UnknownFileHandleError extends RuntimeError { 29 | } 30 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UnknownIdentifierError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Indicates that an identifier could not be resolved at runtime. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SuppressWarnings("serial") 27 | @SimpleObject 28 | public final class UnknownIdentifierError extends RuntimeError { 29 | } 30 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ByteReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Byte reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class ByteReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private byte value; 28 | 29 | /** 30 | * Creates a new Byte reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public ByteReferenceParameter(byte value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public byte get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(byte value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/DoubleReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Double reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class DoubleReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private double value; 28 | 29 | /** 30 | * Creates a new Double reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public DoubleReferenceParameter(double value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public double get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(double value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/IntegerReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Integer reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class IntegerReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private int value; 28 | 29 | /** 30 | * Creates a new Integer reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public IntegerReferenceParameter(int value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public int get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(int value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/LongReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Long reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class LongReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private long value; 28 | 29 | /** 30 | * Creates a new Long reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public LongReferenceParameter(long value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public long get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(long value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Superclass of all Simple reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public abstract class ReferenceParameter { 25 | } 26 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ShortReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Short reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class ShortReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private short value; 28 | 29 | /** 30 | * Creates a new Short reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public ShortReferenceParameter(short value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public short get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(short value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/SingleReferenceParameter.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.parameters; 18 | 19 | /** 20 | * Implementation of support class for Simple Single reference parameters. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class SingleReferenceParameter extends ReferenceParameter { 25 | 26 | // Value of referenced variable 27 | private float value; 28 | 29 | /** 30 | * Creates a new Single reference parameter. 31 | * 32 | * @param value initial value of reference 33 | */ 34 | public SingleReferenceParameter(float value) { 35 | set(value); 36 | } 37 | 38 | /** 39 | * Returns the current value of the reference. 40 | * 41 | * @return current value of reference parameter 42 | */ 43 | public float get() { 44 | return value; 45 | } 46 | 47 | /** 48 | * Changes the value of the reference. 49 | * 50 | * @param value new value of reference parameter 51 | */ 52 | public void set(float value) { 53 | this.value = value; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/variants/UninitializedVariant.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.variants; 18 | 19 | /** 20 | * Uninitialized variant implementation. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class UninitializedVariant extends Variant { 25 | 26 | private static UninitializedVariant UNINITIALIZED_VARIANT = new UninitializedVariant(); 27 | 28 | /** 29 | * Factory method for creating object variants. 30 | * 31 | * @return new uninitialized variant 32 | */ 33 | public static final UninitializedVariant getUninitializedVariant() { 34 | return UNINITIALIZED_VARIANT; 35 | } 36 | 37 | /* 38 | * Creates a new uninitialized variant. 39 | */ 40 | private UninitializedVariant() { 41 | super(VARIANT_UNINITIALIZED); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /XRunTime/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | My Library 3 | 4 | -------------------------------------------------------------------------------- /XRunTime/src/test/java/com/example/mylibrary/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.mylibrary; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * To work on unit tests, switch the Test Artifact in the Build Variants view. 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void addition_isCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 23 5 | buildToolsVersion '25.0.3' 6 | 7 | defaultConfig { 8 | applicationId "com.wolf.xscript" 9 | minSdkVersion 15 10 | targetSdkVersion 23 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | compileOptions { 21 | sourceCompatibility JavaVersion.VERSION_1_7 22 | targetCompatibility JavaVersion.VERSION_1_7 23 | } 24 | } 25 | 26 | dependencies { 27 | compile fileTree(include: ['*.jar'], dir: 'libs') 28 | testCompile 'junit:junit:4.12' 29 | compile files('libs/dx.jar') 30 | compile files('libs/sdklib.jar') 31 | compile 'com.android.support:appcompat-v7:23.3.0' 32 | compile 'com.android.support:design:23.3.0' 33 | compile project(':FlycoRoundView_Lib') 34 | compile project(':sweetdialoglib') 35 | compile files('libs/YoumiSdk_v6.0.0_2016-02-26.jar') 36 | compile project(':colorpicker') 37 | } 38 | -------------------------------------------------------------------------------- /app/libs/YoumiSdk_v6.0.0_2016-02-26.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/libs/YoumiSdk_v6.0.0_2016-02-26.jar -------------------------------------------------------------------------------- /app/libs/dx.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/libs/dx.jar -------------------------------------------------------------------------------- /app/libs/sdklib.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/libs/sdklib.jar -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in D:\MyPrograms\Develop\Android\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -dontwarn net.youmi.android.** 19 | -keep class net.youmi.android.** { 20 | *; 21 | } 22 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/wolf/xscript/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /app/src/main/assets/Tetris.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/assets/Tetris.zip -------------------------------------------------------------------------------- /app/src/main/assets/aapt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/assets/aapt -------------------------------------------------------------------------------- /app/src/main/assets/android.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/assets/android.jar -------------------------------------------------------------------------------- /app/src/main/assets/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/assets/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/assets/xruntime.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/assets/xruntime.jar -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/classfiles/ConstantPoolOverflowException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.classfiles; 18 | 19 | /** 20 | * Exception indicating an overflow in available constant pool indices or the 21 | * generation of a string exceeding its maximum length. 22 | * 23 | * @author Herbert Czymontek 24 | */ 25 | @SuppressWarnings("serial") 26 | public final class ConstantPoolOverflowException extends RuntimeException { 27 | 28 | ConstantPoolOverflowException(String msg) { 29 | super(msg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/classfiles/MethodTooBigException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.classfiles; 18 | 19 | /** 20 | * Exception indicating that there are either too many local variables in a 21 | * method or that the code segment exceeds is maximum size. 22 | * 23 | * @author Herbert Czymontek 24 | */ 25 | @SuppressWarnings("serial") 26 | public final class MethodTooBigException extends RuntimeException { 27 | 28 | MethodTooBigException(String msg) { 29 | super(msg); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/expressions/ConstantExpression.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.expressions; 18 | 19 | import com.google.devtools.simple.classfiles.Field; 20 | 21 | /** 22 | * This class is the superclass of constant expressions. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | public abstract class ConstantExpression extends Expression { 27 | 28 | /** 29 | * Creates a new constant expression. 30 | * 31 | * @param position source code start position of expression 32 | */ 33 | public ConstantExpression(long position) { 34 | super(position); 35 | } 36 | 37 | /** 38 | * Generates a ConstantValue attribute for the given field. 39 | * 40 | * @param f field to generate the ConstantValue attribute for 41 | */ 42 | public abstract void generate(Field f); 43 | } 44 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/expressions/ExpressionValueUnused.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.expressions; 18 | 19 | import com.google.devtools.simple.compiler.Compiler; 20 | 21 | /** 22 | * Expression subclasses that need to know whether the value that they 23 | * represent is not used, need to implement this interface. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public interface ExpressionValueUnused { 28 | /** 29 | * Will be invoked when analysis determines this expression's value is unused 30 | * (will be discarded). 31 | * 32 | * @param compiler current compiler instance 33 | */ 34 | void valueUnused(Compiler compiler); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/expressions/ExpressionWithScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.expressions; 18 | 19 | import com.google.devtools.simple.compiler.scopes.Scope; 20 | 21 | /** 22 | * Expression subclasses having a scope associated with them need to implement 23 | * this interface. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public interface ExpressionWithScope { 28 | /** 29 | * Returns the scope associated with the expression implementing this 30 | * interface. 31 | * 32 | * @return scope associated with expression 33 | */ 34 | Scope getScope(); 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/scopes/GlobalScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.scopes; 18 | 19 | import com.google.devtools.simple.compiler.symbols.Symbol; 20 | 21 | /** 22 | * Global scope (which is the outermost scope for all other scopes). 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | public final class GlobalScope extends Scope { 27 | 28 | /** 29 | * Creates the global scope. 30 | */ 31 | public GlobalScope() { 32 | super(null); 33 | } 34 | 35 | @Override 36 | public final Symbol lookupShallow(String identifier) { 37 | // Only the global scope can contain Alias symbols. Therefore we need to invoke the 38 | // getActualSymbol() method to only return actual symbols! 39 | Symbol symbol = super.lookupShallow(identifier); 40 | return symbol != null ? symbol.getActualSymbol() : null; 41 | } 42 | 43 | @Override 44 | public Symbol lookupDeep(String identifier) { 45 | return lookupShallow(identifier); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/scopes/NamespaceScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.scopes; 18 | 19 | /** 20 | * Scope for namespaces 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public class NamespaceScope extends Scope { 25 | 26 | /** 27 | * Creates a new namespace scope. 28 | * 29 | * @param outerScope enclosing scope 30 | */ 31 | public NamespaceScope(Scope outerScope) { 32 | super(outerScope); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/scopes/synthetic/ErrorScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.scopes.synthetic; 18 | 19 | import com.google.devtools.simple.compiler.scopes.Scope; 20 | 21 | /** 22 | * Scope for error situations. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | public final class ErrorScope extends Scope { 27 | 28 | public ErrorScope() { 29 | super(null); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/statements/synthetic/LocalVariableDefinitionStatement.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.statements.synthetic; 18 | 19 | import com.google.devtools.simple.compiler.symbols.LocalVariableSymbol; 20 | import com.google.devtools.simple.classfiles.Method; 21 | 22 | /** 23 | * A synthetic statement for marking the definition of a local variable. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public final class LocalVariableDefinitionStatement extends MarkerStatement { 28 | 29 | // Local variable 30 | private final LocalVariableSymbol local; 31 | 32 | /** 33 | * Creates a local variable definition statement. 34 | * 35 | * @param local associated local variable 36 | */ 37 | public LocalVariableDefinitionStatement(LocalVariableSymbol local) { 38 | this.local = local; 39 | } 40 | 41 | @Override 42 | public void generate(Method m) { 43 | local.generateInitializer(m); 44 | 45 | super.generate(m); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/symbols/InstanceFunctionSymbol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.symbols; 18 | 19 | /** 20 | * Symbol used for instance functions and procedures. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public class InstanceFunctionSymbol extends FunctionSymbol implements InstanceMember { 25 | 26 | /** 27 | * Creates a new instance function symbol. 28 | * 29 | * @param position source code start position of symbol 30 | * @param objectSymbol defining object 31 | * @param name function name 32 | */ 33 | public InstanceFunctionSymbol(long position, ObjectSymbol objectSymbol, String name) { 34 | super(position, objectSymbol, name); 35 | } 36 | 37 | @Override 38 | public boolean hasMeArgument() { 39 | return true; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/symbols/InstanceMember.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.symbols; 18 | 19 | /** 20 | * Symbols that are members of an object, need to implement this interface. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public interface InstanceMember { 25 | /** 26 | * Returns the object defining the member. 27 | * 28 | * @return defining object 29 | */ 30 | ObjectSymbol getDefiningObject(); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/symbols/ObjectFunctionSymbol.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.symbols; 18 | 19 | /** 20 | * Symbol used for object functions and procedures (the equivalent of Java 21 | * static methods). 22 | * 23 | * @author Herbert Czymontek 24 | */ 25 | public final class ObjectFunctionSymbol extends FunctionSymbol { 26 | 27 | /** 28 | * Creates a new object function symbol. 29 | * 30 | * @param position source code start position of symbol 31 | * @param objectSymbol defining object 32 | * @param name function name 33 | */ 34 | public ObjectFunctionSymbol(long position, ObjectSymbol objectSymbol, String name) { 35 | super(position, objectSymbol, name); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/symbols/SymbolCanBePartOfQualifiedIdentifier.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.symbols; 18 | 19 | import com.google.devtools.simple.compiler.scopes.Scope; 20 | 21 | /** 22 | * Symbols that can be part of a qualified identifier, need to implement this 23 | * interface. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public interface SymbolCanBePartOfQualifiedIdentifier { 28 | /** 29 | * Returns the scope defined by the symbol. 30 | * 31 | * @return symbol scope 32 | */ 33 | Scope getScope(); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/symbols/SymbolWithType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.symbols; 18 | 19 | import com.google.devtools.simple.compiler.types.Type; 20 | 21 | /** 22 | * Symbols having a type associated with them, need to implement this 23 | * interface. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public interface SymbolWithType { 28 | /** 29 | * Returns the type of the symbol. 30 | * 31 | * @return symbol type 32 | */ 33 | Type getType(); 34 | 35 | /** 36 | * Sets the type for the symbol. 37 | * 38 | * @param type type for symbol 39 | */ 40 | void setType(Type type); 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/types/FloatNumberType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.types; 18 | 19 | /** 20 | * Superclass for all floating point types. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | abstract class FloatNumberType extends NumberType { 25 | 26 | /** 27 | * Creates a new floating point type. 28 | * 29 | * @param kind type kind 30 | */ 31 | protected FloatNumberType(TypeKind kind) { 32 | super(kind); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/types/IntegerNumberType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.types; 18 | 19 | /** 20 | * Superclass for all integer types. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public abstract class IntegerNumberType extends NumberType { 25 | 26 | /** 27 | * Creates a new integer type. 28 | * 29 | * @param kind type kind 30 | */ 31 | protected IntegerNumberType(TypeKind kind) { 32 | super(kind); 33 | } 34 | 35 | /** 36 | * Returns the number of bits used by values of the type. 37 | * 38 | * @return number of bits used by values of type 39 | */ 40 | public abstract int bitsize(); 41 | 42 | @Override 43 | public boolean isScalarIntegerType() { 44 | return true; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/types/NumberType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.types; 18 | 19 | /** 20 | * Superclass for all numerical types. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | abstract class NumberType extends Type { 25 | /** 26 | * Creates a new numerical type. 27 | * 28 | * @param kind type kind 29 | */ 30 | protected NumberType(TypeKind kind) { 31 | super(kind); 32 | } 33 | 34 | @Override 35 | public boolean canConvertTo(Type toType) { 36 | switch (toType.getKind()) { 37 | default: 38 | return false; 39 | 40 | case BOOLEAN: 41 | case BYTE: 42 | case SHORT: 43 | case INTEGER: 44 | case LONG: 45 | case SINGLE: 46 | case DOUBLE: 47 | case STRING: 48 | case VARIANT: 49 | return true; 50 | } 51 | } 52 | 53 | @Override 54 | public boolean isScalarType() { 55 | return true; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/compiler/types/TypeWithScope.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.compiler.types; 18 | 19 | import com.google.devtools.simple.compiler.scopes.Scope; 20 | 21 | /** 22 | * Types that have a scope associated with them, need to implement this 23 | * interface. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | public interface TypeWithScope { 28 | /** 29 | * Returns the scope associated with the type. 30 | * 31 | * @return type scope 32 | */ 33 | Scope getScope(); 34 | } 35 | -------------------------------------------------------------------------------- /app/src/main/java/com/google/devtools/simple/util/Preconditions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.util; 18 | 19 | /** 20 | * Helper class for dealing with assumptions and conditions. 21 | * 22 | * @author Herbert Czymontek 23 | */ 24 | public final class Preconditions { 25 | private Preconditions() { 26 | } 27 | 28 | public static void checkArgument(boolean condition) { 29 | if (!condition) { 30 | throw new IllegalArgumentException(); 31 | } 32 | } 33 | 34 | public static void checkState(boolean state) { 35 | if (!state) { 36 | throw new IllegalStateException(); 37 | } 38 | } 39 | 40 | public static T checkNotNull(T obj) { 41 | if (obj == null) { 42 | throw new NullPointerException(); 43 | } 44 | return obj; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/util/Utils.java: -------------------------------------------------------------------------------- 1 | package com.wolf.util; 2 | 3 | import android.content.Context; 4 | import android.util.Log; 5 | 6 | import java.io.File; 7 | 8 | import cn.pedant.SweetAlert.SweetAlertDialog; 9 | 10 | /** 11 | * Created by GreyWolf on 2016/5/14. 12 | */ 13 | public class Utils { 14 | public static final String XTAG = "xcompile"; 15 | 16 | public static void log(String str) { 17 | Log.i(XTAG, str); 18 | } 19 | 20 | public static void deleteFile(File f) { 21 | if (f.isDirectory()) { 22 | for (File sub : f.listFiles()) { 23 | deleteFile(sub); 24 | } 25 | } 26 | f.delete(); 27 | } 28 | 29 | public static void showMsg(Context context, String title, String content) { 30 | 31 | SweetAlertDialog dialog = new SweetAlertDialog(context).setTitleText(title).setContentText(content); 32 | dialog.setCanceledOnTouchOutside(true); 33 | dialog.show(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/xscript/XscriptApplication.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript; 2 | 3 | import android.app.Application; 4 | 5 | import com.google.devtools.simple.compiler.XInit; 6 | import com.wolf.util.UnzipAssets; 7 | 8 | import java.io.IOException; 9 | 10 | 11 | /** 12 | * Created by GreyWolf on 2016/5/14. 13 | */ 14 | public class XscriptApplication extends Application { 15 | @Override 16 | public void onCreate() { 17 | super.onCreate(); 18 | XInit.init(getApplicationContext()); 19 | //初始化文件 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/xscript/activity/BaseActivity.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript.activity; 2 | 3 | import android.support.v7.app.AppCompatActivity; 4 | 5 | import com.wolf.util.tint.StatusBarUtil; 6 | import com.wolf.xscript.R; 7 | 8 | /** 9 | * Created by GreyWolf on 2016/5/18. 10 | */ 11 | public class BaseActivity extends AppCompatActivity { 12 | @Override 13 | public void setContentView(int layoutResID) { 14 | super.setContentView(layoutResID); 15 | setStatusBar(); 16 | } 17 | 18 | protected void setStatusBar() { 19 | StatusBarUtil.setColor(this, getResources().getColor(R.color.colorPrimary)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/xscript/data/OneProjectData.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript.data; 2 | 3 | import android.graphics.Bitmap; 4 | 5 | /** 6 | * Created by GreyWolf on 2016/5/17. 7 | */ 8 | public class OneProjectData { 9 | public Bitmap icon;//图标 10 | public String name;//名字 11 | public String packagename;//包名 12 | public String versionname; 13 | public String versioncode; 14 | public String createdate;//创建时间 15 | public String propertiespath;//项目根目录 16 | public String main;//入口 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/xscript/uidesigner/MsgBox.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript.uidesigner; 2 | 3 | import com.wolf.util.Utils; 4 | 5 | /** 6 | * Created by GreyWolf on 2016/5/24. 7 | */ 8 | public class MsgBox { 9 | public static void err(String str) { 10 | Utils.log(str); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/wolf/xscript/uidesigner/UIDesignerActivity.java: -------------------------------------------------------------------------------- 1 | package com.wolf.xscript.uidesigner; 2 | 3 | import android.content.Intent; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.os.Bundle; 6 | import android.view.View; 7 | 8 | import com.google.devtools.simple.util.Files; 9 | import com.wolf.xscript.R; 10 | 11 | import java.io.File; 12 | import java.io.IOException; 13 | 14 | public class UIDesignerActivity extends AppCompatActivity { 15 | String xfilepath;//要编辑的.x文件路径 16 | 17 | 18 | @Override 19 | protected void onCreate(Bundle savedInstanceState) { 20 | super.onCreate(savedInstanceState); 21 | xfilepath = getIntent().getStringExtra("xfile"); 22 | setContentView(R.layout.activity_uidesigner); 23 | try { 24 | UIParse parser = new UIParse(Files.read(new File(xfilepath), "UTF-8")); 25 | } catch (IOException e) { 26 | e.printStackTrace(); 27 | } 28 | } 29 | 30 | public void result(View v) { 31 | back(); 32 | } 33 | 34 | @Override 35 | public void onBackPressed() { 36 | back(); 37 | } 38 | 39 | private void back() { 40 | Intent intt = new Intent(); 41 | intt.putExtra("xfile", xfilepath); 42 | setResult(0, intt); 43 | finish(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_manage.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_send.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v21/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/codeed.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/custom_img.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/res/drawable/custom_img.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo_big.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/res/drawable/logo_big.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/nav_header_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Open12138/Xscript/bc82dfe2872ce8fb33cd2269c9d244dfaac92180/app/src/main/res/drawable/nav_header_bg.jpg -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_project.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 15 | 16 | 24 | 30 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_project_list.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_uidesigner.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 |