Bug 184390 - [Template Engine] Hellow World templates should allow specifying the project source location
Summary: [Template Engine] Hellow World templates should allow specifying the project ...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 4.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.0 RC2   Edit
Assignee: Bala Torati CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-04-27 05:18 EDT by Mikhail Sennikovsky CLA
Modified: 2008-06-20 12:58 EDT (History)
1 user (show)

See Also:


Attachments
fix as specified in comment#3 (1.18 KB, patch)
2007-05-11 06:12 EDT, Bala Torati CLA
bjorn.freeman-benson: iplog+
Details | Diff
fix for the soucre location issue. (3.27 KB, text/plain)
2007-05-25 10:55 EDT, Bala Torati CLA
bjorn.freeman-benson: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Sennikovsky CLA 2007-04-27 05:18:03 EDT
Hi Bala,

I guess it would be better to create separate bugzilla entries for all new TE-related questions/problems, so here it is:

Looks like the current Hellow World templates do not allow to make the project root to be the location for the generated source, i.e. to not create any additional source entries.

Onother issue with this is that currently, although the new source location is added, the project root (default) source location is not removed (see "C/C++ General" -> "Paths and symbols" -> "Source location"). It seems reasonable to remove it in case we are setting some project folder as a source root.

What do you think?

Mikhail
Comment 1 Mikhail Sennikovsky CLA 2007-04-27 11:54:07 EDT
Hi Bala,

I'll assign this bug to you and target it to the M7.
We might want to wait with making anithing about this until we get some feedback on Bug# 184462

Thanks,
Mikhail
Comment 2 Bala Torati CLA 2007-05-10 09:54:00 EDT
>>Looks like the current Hellow World templates do not allow to make the project
root to be the location for the generated source, i.e. to not create any
additional source entries.

This will be fixed as part of refining (fine tuning) the hello world templates (Part of 184462).

>>Onother issue with this is that currently, although the new source location is
added, the project root (default) source location is not removed (see "C/C++
General" -> "Paths and symbols" -> "Source location"). It seems reasonable to
remove it in case we are setting some project folder as a source root.

The project root gets added as one of the source locations, when we create the project. At the moment whenever a new source folder gets created through template engine process, we add that location to the source location list. To implement the above behaviour, I have these questions.

1. Should we always remove the project root folder, when we add a new source folder.
2. Should we keep all other source folders (in case if there are multiple source folders) except the root folder in the list, when we create a new source folder through TE.
or else there should be only one source folder in the source locations list, so the latest source folder that gets created will be this one. I don't see this is a valid case, as the source location is implemented as a list, and not as just one source path entry.

The existing behaviour is always append the new source folder to the existing source locations list.
Comment 3 Mikhail Sennikovsky CLA 2007-05-11 04:56:15 EDT
(In reply to comment #2)
Hi Bala,

> 1. Should we always remove the project root folder, when we add a new source
> folder.
> 2. Should we keep all other source folders (in case if there are multiple
> source folders) except the root folder in the list, when we create a new source
> folder through TE.
> or else there should be only one source folder in the source locations list, so
> the latest source folder that gets created will be this one. I don't see this
> is a valid case, as the source location is implemented as a list, and not as
> just one source path entry.
> 
> The existing behaviour is always append the new source folder to the existing
> source locations list.
I think the behavior should be simmillar to the one used by the New Source Folder wizard, i.e. in case we add a non-project root source folder the project root source folder gents deleted. All other source folders are kept.

Mikhail
Comment 4 Bala Torati CLA 2007-05-11 06:12:50 EDT
Created attachment 66831 [details]
fix as specified in comment#3
Comment 5 Mikhail Sennikovsky CLA 2007-05-11 07:45:34 EDT
The patch is applied. Thanks Bala
Comment 6 Mikhail Sennikovsky CLA 2007-05-11 07:52:26 EDT
Yeah, I guess we have not fixed the bug yet :) the fine-tuning is still needed..

Re-targetting to RC2
Comment 7 Bala Torati CLA 2007-05-11 07:56:54 EDT
(In reply to comment #6)
> Yeah, I guess we have not fixed the bug yet :) the fine-tuning is still
> needed..
> Re-targetting to RC2

As mentioned in my earlier comment, the fine-tuning will be done as part of 184462 as that's the place which defines default set of templates. So instead of having two bugs doing this, I think we should close this and discuss everything related to default set of templates including refining existing ones in there.
Comment 8 Bala Torati CLA 2007-05-24 12:29:22 EDT
>>Looks like the current Hellow World templates do not allow to make the project
>>root to be the location for the generated source, i.e. to not create any
>>additional source entries.

Since there is not much of discussion about what templates must be produced by default with CDT through bug 184462, I think I will provide a fix for the issue that is left as part of this defect and close the defect.
We will discuss more about producing a crisp and most useful templates and fine tuning of existing ones with 184462.

Let me know if this is Ok and I will produce the fix.

Comment 9 Mikhail Sennikovsky CLA 2007-05-24 12:37:38 EDT
(In reply to comment #8)
Hi Bala,

Yeah, there is no much discussion about that :). I any way I'm going to post a comment to the bug 184462 with what I think could be done and re-target the bug to RC3.

> Let me know if this is Ok and I will produce the fix.
Yes, please go ahead and make a fix for this. 

Thanks,
Mikhail
Comment 10 Mikhail Sennikovsky CLA 2007-05-25 10:48:27 EDT
In order not to breack anything with the last-minute fix I propose moving this to the RC3..

Bala, will you be able to provide a patch in the beginning of the RC3 cycle so that it gets properly tested for the RC3?

Thanks,
Mikhail
Comment 11 Bala Torati CLA 2007-05-25 10:55:59 EDT
Created attachment 68780 [details]
fix for the soucre location issue.
Comment 12 Bala Torati CLA 2007-05-25 11:00:11 EDT
(In reply to comment #10)
> In order not to breack anything with the last-minute fix I propose moving this
> to the RC3..
> Bala, will you be able to provide a patch in the beginning of the RC3 cycle so
> that it gets properly tested for the RC3?
> Thanks,
> Mikhail

Mikhail,

The fix is very simple and straight forward one. I tested with all possible project creation cases with different templates.
Sorry ofr sending it late. Morning I was busy with some meetings, afternoon testing this fix with various options took some time than expected.

Cheers..
-Bala
Comment 13 Mikhail Sennikovsky CLA 2007-05-25 12:12:49 EDT
Thanks Bala, the patch is applied.

closing the bug..

Thanks,
Mikhail