This issue tracker is closed. Please visit UPPAAL issue tracker at Github instead.

Bug 373

Summary: contextual popup menu item for quick-fixing syntax errors
Product: UPPAAL Reporter: Marius Mikučionis <marius>
Component: GUIAssignee: Gerd Behrmann <behrmann>
Status: ASSIGNED ---    
Severity: enhancement    
Priority: P4    
Version: 4.0.3   
Hardware: All   
OS: All   
Architecture:

Description Marius Mikučionis 2006-11-21 09:37:09 CET
it would be nice to have a contextual popup menu item for syntax errors like "unknown identifier" with a quick fix.
This feature would help avoiding switching between templates and declarations, and release user from typing text manually for most of modeling time.

Example:
in a new model have an edge with an update "hello=blah()"
press F7 for syntax check
uppaal highlights and shows errors: 
  "unknown identifier: hello"
  "unknown identifier: blah"
when user right-clicks on the red-highlighted update label, the popup menu should have additional items with nested menus:
add variable hello to
   local declarations as
      bool
      int
   parameter declaration as
      bool
      int
      chan
   global declaration as
      bool
      int
      chan
add variable blah to
   local declarations as
      bool
      int
      function
   parameter declaration as
      bool
      int
      chan
   global declaration as
      bool
      int
      chan
      function

If user chooses some leaf in this menu structure, then Uppaal should create a corresponding variable declaration. For global declarations Uppaal could also add a short single line comment to denote where this variable came from.
Comment 1 Gerd Behrmann 2006-11-21 09:45:27 CET
This is not possible without putting knowledge about the modeling language into the Uppaal GUI. It has been a design goal since the conception of the current GUI, that the GUI should have no knowledge about the modeling language.

The alternative is to make the server interaction much more complicated. Although this feature would be nice to have, there are much much more important things to fix in Uppaal, so I lower the priority of this request.
Comment 2 Marius Mikučionis 2006-12-08 15:17:12 CET
some related work..
http://www.jave.de/eclipse/poormansquickfix/index.html