New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Umple // line traceback for State Machine do statements #1134

Closed
JoshuaMcManus opened this Issue Nov 11, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@JoshuaMcManus

JoshuaMcManus commented Nov 11, 2017

Brief Description

When creating a state machine, the generated Java "do" statements do not produce a comment in the form:
// line ## ""

Users who produce invalid Java code will not be able to identify where in the Umple code the issue exists.

Minimum Steps to Reproduce

class LightFixture  
{  
  bulb  
  {  
    On {  
      do { doThisContinuouslyWhileOn(); }  
    }  
    Off {}  
  }  
  
  void doThisContinuouslyWhileOn() {  
    while (true) {  
      System.out.println("Still on");  
      try {  
        Thread.sleep(1000);  
      }  
      catch (InterruptedException e) {}  
    }  
  }  
}

Expected Result

The do statement should look something like this:

private void doActivityBulbOn()
  {
    try
    {
      // line 6 "statemachine.ump"
      doThisContinuouslyWhileOn();
      Thread.sleep(1);
    }
    catch (InterruptedException e)
    {

    }
  }

Actual Result

private void doActivityBulbOn()
  {
    try
    {
      doThisContinuouslyWhileOn();
      Thread.sleep(1);
    }
    catch (InterruptedException e)
    {

    }
  }

This is blocking issue #882

@JoshuaMcManus JoshuaMcManus self-assigned this Nov 11, 2017

@JoshuaMcManus JoshuaMcManus referenced this issue Nov 12, 2017

Merged

Fix 1134 #1135

TimLethbridge added a commit that referenced this issue Nov 14, 2017

Merge pull request #1135 from umple/fix-1134_jmcmanus
Closes #1134 line comments in state machines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment