Book a Demo

Author Topic: option: add "TODO" as PROJECT TASK  (Read 7197 times)

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
option: add "TODO" as PROJECT TASK
« on: July 01, 2007, 11:37:40 am »
Hi sparx-people,

before importing source code, I would like to trigger the option to import all "TODO" marks inside my sources as PROJECT TASKS.

Fictive example:


[...]
class MyClass:
  def max(self, a, b):
      # TODO: should calculate maximum of a and b
      return 0
[...]

Regards
Bernd
« Last Edit: July 01, 2007, 11:44:02 am by BerndWill »

thomaskilian

  • Guest
Re: option: add "TODO" as PROJECT TASK
« Reply #1 on: July 01, 2007, 12:26:54 pm »
Nice idea. But I guess it is hard to implement. The project tasks need then somehow to be related to the class - else a synch would import them again.

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #2 on: July 02, 2007, 12:56:00 am »
Why so complicated ?

Look at those two examples:

A) # TODO: should calculate maximum of a and b
B) # TODO: calculate maximum of a and b

These two examples are different and should be regarded as two different project tasks. There should be a synchronizing option to prompt the user for action (delete old TODO, keep old TODO, add new TODO etc.)

There is already a algorithm that loads comments into EA's class notes. So I guess, TODO's could be identified as well (class comment, method comment).

Regards
bernd

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #3 on: July 02, 2007, 03:24:34 am »
Quote
Why so complicated ?
Perhaps, because EA uses the word "project" to mean at least 3 conflicting things.  So it's not clear what exactly you meant Bernd.  This is NOT your fault - I have repeatedly warned Sparx that they need to resolve this confusion.  Your later clarification suggests that you may have meant [X]Import TODO's as element task.  That's a lot easier to implement.

HTH,
Paolo
BTW, I also misunderstood your meaning as Thomas did.
« Last Edit: July 02, 2007, 03:25:27 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #4 on: July 02, 2007, 12:54:49 pm »
Hi,

thanks a lot for clearing this up !
By the way: Are there different locations to pin TODO's ? I always thought, that there is only the project issue panel to place TODO's ... !?

Regards
Bernd
« Last Edit: July 02, 2007, 12:58:19 pm by BerndWill »

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #5 on: July 02, 2007, 01:54:53 pm »
Quote
Hi,

thanks a lot for clearing this up !
By the way: Are there different locations to pin TODO's ? I always thought, that there is only the project issue panel to place TODO's ... !?

Regards
Bernd
This is related to my original posting above...  EA's UI (Unique Interface) often make different things have the same name (above) and provides different names for the same thing.  Because of EA's internal representation, the repository (AKA the project) is not a container element.  So you find Project-Wide level tasks (which is what a "TODO" is) using the System Windows [Alt+2] - thus sometimes the project is a system and sometimes it's not...  All other container elements {Models, Views, Packages) don't appear to have element level tasks (but each one behaves subtly differently if you open the maintenance window -see below).

Element level tasks are found in the Maintenance Window [Alt+4] when you select an element (shape).

One would have thought that everything would have had a maintenance window. Containers and non-containers...

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

danielku15

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
  • Nobody is perfect and I'm a nobody :D
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #6 on: August 06, 2007, 04:28:10 am »
Sure, this would be a very nice feature. I don't think it's hard to implement. They could add a new section in their parser. The Syntax would be like a C-Style single line comment only with TODO: at the beginning instead of //. It also would be possible to realize this trough the Automation-Interface. Make a form where the user can add files/directories. Iterate this Files and use regex or a parser to get the the TODO: lines. Then add the Text after Todo to a new task.

CoderLine.net - The Online Coder Resource (comming soon)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: option: add "TODO" as PROJECT TASK
« Reply #7 on: August 06, 2007, 06:14:44 am »
Daniel has it almost correct.

In .Net at least, the correct syntax is <comment marker>TODO:<white space>. There might be optional white space between the comment marker and TODO, I cannot remember off hand.

There are several other common markers that use the same convention, including HACK and UNDONE. Users can add their own custom tags.

[SUGGESTION: Allow EA users to customize the tag list for this feature - subject to whether the feature is added to EA.]

Of course, this would require sort of a 'double whammy' as far as input parsing is concerned. Perhaps that is a show-stopper, depending on how Sparx has implemented the engine.

This is (somewhat) related to XML-style comments, which are becoming more popular with both .Net and Java. Perhaps these too could be added at the same time.

David
No, you can't have it!