Bug 201605 - "Restore Defaults" in Tool chain editor does not work
Summary: "Restore Defaults" in Tool chain editor does not work
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 4.0.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 4.0.1   Edit
Assignee: Oleg Krasilnikov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-29 12:46 EDT by Miwako Tokugawa CLA
Modified: 2007-09-07 02:49 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miwako Tokugawa CLA 2007-08-29 12:46:54 EDT
The Summary says it all. :-)
Mikhail S. says..

I guess we should implement the “restore defaults” for the tool-chain modification UI, although the restore defaults functionality needs some more discussions. The reason is that there are several levels of the tool-chain modifications “restore defaults” the user might expect/want:

restore the default builder
restore the default set of tools
restore the default tool-chain and all its contents (tools and a builder).

Could you create a bugzilla request about this so that we could consider the details of this functionality in detail?
Comment 1 Oleg Krasilnikov CLA 2007-08-30 05:53:19 EDT
<imho>
  For resource (directory), "restore default toolchain" 
  may mean "discard resource-specific settings (if any), 
  use project settings instead".

  For project, "restore default toolchain" may mean 
  "get settings from parent configuration".

  It would be better to use separate buttons to
  restore (separately) builder or used tools list,
  because existing "Restore..." button normally
  affects whole page contents.  
</imho>
Comment 2 Mikhail Sennikovsky CLA 2007-08-30 06:42:42 EDT
In  the fist approach the "APPLY" button could restore the default tool-chain contents (i.e. option#3 in comment#0).

The proposed logic is:
1.Per-project : change to the "default" tool-chain defined in the extension super-class of the project configuration. NOTE: the makefile project case might need a special handling in this case.
2.per-folder : change to the same tool-chain as the one used by the parent folder.
3.per-file : change to the tool from the parent folder's tool-chain suitable for the given file. NOTE: the custom build step tool should be preserved!

After that we could present some additional controls for resetting tools and a builder.
 
Mikhail
Comment 3 Mikhail Sennikovsky CLA 2007-08-30 08:52:18 EDT
Assigning to investigate/make necessary modifications from the core part
Comment 4 Oleg Krasilnikov CLA 2007-09-04 10:45:19 EDT
Reassigning to me, because it seems to be UI task
(no need to modify cdt.core).
Comment 5 Oleg Krasilnikov CLA 2007-09-05 06:42:03 EDT
There's a problem with default settings for "makefile" projects.

In fact, there's no information about initial toolchain of such
project. User can create "make" project with Cygwin toolchain,
then switch to MinGW toolchain, and there will be no way to
recall initial setting. 

There can be 3 ways for "Restore defaults" implementation:
- do nothing; inform user that "defaults are not defined..."
- restore default settings for _current_ toolchain: if user
  has changed builder and/or tools list, they will be set
  to default for given toolchain; but changes of toolchain
  itself are not rolled back.
- set "Other toolchain" as default for all Makefile projects.

May be it would be better to ask user first, for example:
"Default toolchain is not defined for this project.
 Would you like to restore defaults for current toolchain ?"

Which way is more preferrable ?
Comment 6 Oleg Krasilnikov CLA 2007-09-06 05:11:44 EDT
Changes are made in CVS HEAD.

Defaults are restored as it's possible.

For most projects, toolchain, builder and tools list updated.
For Makefile projects (except NO TOOLCHAIN) only builder and
tools are restored, toolchain remains current since we have 
no info about initial one. No messages displayed in this case.
Settings for NO TOOLCHAIN project are restored fully.

Settings for folders and files are restored like it's 
described by Mikhail S. in Comment #2.

Comment 7 Oleg Krasilnikov CLA 2007-09-07 02:49:46 EDT
Closing this bug since required functionality is implemented now.