Project

General

Profile

Feature #1326

Comments in code specification

Added by Anonymous over 7 years ago. Updated 5 months ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Start date:
03/25/2013
Due date:
% Done:

70%

Estimated time:

Description

Please add the possibility to have comments in code specification. This would increase the understanding of the model.

CodeSpecificationComments.af3_23 (8.72 KB) CodeSpecificationComments.af3_23 Anonymous, 07/31/2018 03:58 PM

History

#1 Updated by Anonymous about 7 years ago

  • Target version changed from ECBS'13 Tutorial to Phoenix - BACKLOG

#2 Updated by Johannes Eder almost 3 years ago

  • Target version changed from Phoenix - BACKLOG to AF3 2.12 Post-release

Practical course (rover) asked for the issue.

#3 Updated by Anonymous over 2 years ago

  • Assignee set to Anonymous

#4 Updated by Anonymous over 2 years ago

  • Target version changed from AF3 2.12 Post-release to AF3 2.13 RC1 (Feature Freeze)

#5 Updated by Anonymous over 2 years ago

  • Assignee changed from Anonymous to Anonymous

@Filip: another issue to get involved in developing issues.
As far as I can see, in order to implement this you only need to modify the parser for code specification.
Sudeep might be helpful if you have doubts

#6 Updated by Anonymous over 2 years ago

  • Target version changed from AF3 2.13 RC1 (Feature Freeze) to AF3 2.14 RC1 (Feature Freeze)

#7 Updated by Anonymous about 2 years ago

  • Status changed from New to In Progress
  • Assignee changed from Anonymous to Anonymous

There are two pushes 1326_Comments_in_code_specification: on Af3 and on Kernel. One must pull both of them.

To test, create a project -> Component Architecture -> add a component with Output and Input and add Code Specification to the component.

1. Add some code as: Input = Output;. Save it. Close the window and reopen it. One must see the code.

2. Add a comment to the code: Input = Output; // comments. Save it, close the window and reopen it. The code and the comments should be seen.

3. Remove the comments and save the code. Close and reopen the window. The code should be seen without comments. No exceptions.

4. Open Af3 example ACC. Go to the component Speed Control and open some components with Code Specification. There should be messages on console as:

"line 1:0 no viable alternative at input '<EOF>'"

After saving and reopening the window with code there should not be more such messages.

5. Add comments to code, save, close and reopen the window. The comments should be present.

#8 Updated by Anonymous about 2 years ago

  • Assignee changed from Anonymous to Anonymous

#9 Updated by Anonymous about 2 years ago

To test use the attached project and remove a comment from a line of code
and start the simulator, then remove the comment from another and start again
the simulator and so on. If one click on Component one can see different values.

Commenting all the lines of code there will be seen the last value.

If the line with //Input = 1; is uncommented should be seen ERROR on ModelMarkers screen.

#10 Updated by Anonymous about 2 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Anonymous to Anonymous

#11 Updated by Alexander Diewald about 2 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Anonymous to Anonymous
  • Target version changed from AF3 2.14 RC1 (Feature Freeze) to AF3 2.15 RC1 (Feature Freeze)
  • % Done changed from 0 to 100

The tip of the 1326* branch now seems to show the correct behaviour after the merge of the port renaming and code spec string representation change.

  • The number of notifications sent around are OK now.
  • Comments are saved.
  • Unparsable code specs are retained if the code spec editor is closed.
  • Renaming of ports works as intended.

Also, I've done some cleanup.

#12 Updated by Anonymous about 2 years ago

  • Assignee changed from Anonymous to Anonymous

The functionality is not working.
Also, there are some conflicts in the rating files

#13 Updated by Johannes Eder over 1 year ago

  • Target version changed from AF3 2.15 RC1 (Feature Freeze) to AF3 2.16 RC1 (Feature Freeze)

#14 Updated by Johannes Eder over 1 year ago

  • Assignee changed from Anonymous to Anonymous

@Hernan: Do you know if the comments are working?

#15 Updated by Anonymous over 1 year ago

  • Assignee changed from Anonymous to Alexander Diewald

I know Filip had implemented it, but at some points this was causing problems with the binding.
Maybe Alex can comment what was the last status

#16 Updated by Alexander Diewald over 1 year ago

  • % Done changed from 100 to 70

A short summary of the current status:

  • The parser is able to extract comment strings from the editor's input string.
  • The approach is missing an "ITerm" that captures comments: This way, the editor content (text string) can be reconstructed from the ITerms.
  • A previous approach only seemed to work due to a (now resolved) race condition between the update code of the editor and the reconstruction from the saved ITerm. This was discovered when implementing the port renaming.

Essentially, only point 2 is missing to resolve the ticket, which should be doable with reasonable effort.

#17 Updated by Simon Barner 12 months ago

  • Status changed from Resolved to In Progress
  • Target version changed from AF3 2.16 RC1 (Feature Freeze) to AF3 2.17 (Feature Freeze)

#18 Updated by Alexander Diewald 5 months ago

  • Status changed from In Progress to Feedback
  • Assignee changed from Alexander Diewald to Johannes Eder

I guess we can reject this. Too little value considering that a reimplementation would be needed. Also, the CodeSpec editor may soon be replaced with the SF version.

#19 Updated by Johannes Eder 5 months ago

  • Status changed from Feedback to Rejected
  • Assignee deleted (Johannes Eder)

This feature will be considered when implementing the SF Code editor. #3919

Also available in: Atom PDF