source-academy / frontend

Frontend of Source Academy, an online experiential environment for computational thinking (React, Redux, Saga, Blueprint)
https://sourceacademy.org
Apache License 2.0
101 stars 164 forks source link

Implement and Integrate `java-slang` CSEC Visualizer #2926

Closed xyliew25 closed 2 months ago

xyliew25 commented 2 months ago

P.s., This PR to be ready for review after #2925 merged as there will be foreseeable merge conflicts in JavaHelper.ts.

Description

Implement and integrate the concomitant CSEC Visualizer of the CSEC Machine from java-slang.

image

Type of change

How to test

  1. Select the Java language.
  2. Input syntactically valid and well-typed Java programs into the code editor - a simple one like the one below or more interesting ones from java-slang/src/ec-evaluator/__tests__

    class Test {
        public static void main(String[] args) {
            int x = 1;
        }
    }
  3. Head over to the CSE Machine tab.
  4. Click on the Run button.

Checklist

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 8673214781

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/commons/sagas/PlaygroundSaga.ts 0 3 0.0%
src/features/cseMachine/java/components/Text.tsx 0 9 0.0%
src/features/cseMachine/java/components/Object.tsx 0 10 0.0%
src/features/cseMachine/java/components/StashItem.tsx 0 11 0.0%
src/features/cseMachine/java/components/Arrow.tsx 1 13 7.69%
src/features/cseMachine/java/components/Line.tsx 1 13 7.69%
src/commons/sagas/WorkspaceSaga/helpers/updateInspector.ts 3 16 18.75%
src/commons/utils/JavaHelper.ts 0 15 0.0%
src/features/cseMachine/java/components/Binding.tsx 0 17 0.0%
src/features/cseMachine/java/components/Variable.tsx 1 18 5.56%
<!-- Total: 17 478 3.56% -->
Files with Coverage Reduction New Missed Lines %
src/commons/utils/JavaHelper.ts 1 0.0%
src/commons/sagas/PlaygroundSaga.ts 1 24.79%
<!-- Total: 2 -->
Totals Coverage Status
Change from base Build 8672720989: -1.0%
Covered Lines: 5239
Relevant Lines: 14290

💛 - Coveralls