This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 267606

Summary: Introduce the "Clean cache and restart IDE" action
Product: platform Reporter: ilia
Component: -- Other --Assignee: ilia
Status: NEW ---    
Severity: normal CC: issues
Priority: P3    
Version: 8.2   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 268018    
Attachments: proposed patch

Description ilia 2016-08-16 17:38:11 UTC
Enhancement:
  Introduce a way for easy cleaning cache directory and (maybe) user directory from UI.

Justification [cachedir]:
  * An noticeable amount of issues which are not product bugs (e.g. broken cache 
  state after some external modifications) can be solved with cleaning an IDE's 
  cache directory.
  * A developer usually asks a user to try to reproduce his/her problem with 
  clean cache dir when investigating a bug. It helps to understand how the cache 
  state is affecting the problem.

Justification [userdir]:
  * User can use an old userdir for the new versions of IDE (There is a modal 
  window which suggests to use old userdir when starting NetBeans for the first 
  time). In most cases that's fine, but sometimes re-creating a userdir is 
  needed. For example a clean IDE often suggests me to use a userdir of NetBeans 
  7.4 :-)
  * There are some settings in the IDE which cannot be changed from GUI. 
  Introducing this action may help users to restore the IDE to it's default state.

Why it's better than manual erasing:
  Both of this paths can be cleaned up manually via command line / file explorer.
  Paths are different for Windows/Unix, Dev/Release build, NetBeans 
  IDE/NetBeans-based IDE... 
  Despite the fact that cleaning up these dirs is not daily process it has no 
  convenient way to be done from IDE. Moreover on Unix you can't paste userdir 
  path (which is usually copied from Help->About) after the IDE was closed.
Comment 1 Alexander Simon 2016-09-14 11:14:12 UTC
Created attachment 162045 [details]
proposed patch
Comment 2 Vladimir Kvashin 2016-09-14 12:39:56 UTC
Generally, the patch looks good. Although it does less than requested in this IZ - it cleans only C/C++ caches. So I would propose not to close this IZ, but to create another one against cnd. This one still makes sense and hopefully will be fixed later.

Minor notes concerning the proposed fix:
1) There is a typo: the class name is "CeanupCache", sure you meant CleanupCache
2) I propose to rename it to more descriptive CleanupCachePseudoOptionProcessor 3) I propose to rename a "cleanup"flag file to "cnd-cleanup" to avoid possible future name clashes.
Comment 3 Alexander Simon 2016-09-14 13:00:22 UTC
(In reply to Vladimir Kvashin from comment #2)
> Generally, the patch looks good. Although it does less than requested in
> this IZ - it cleans only C/C++ caches. So I would propose not to close this
> IZ, but to create another one against cnd. This one still makes sense and
> hopefully will be fixed later.
> 
> Minor notes concerning the proposed fix:
> 1) There is a typo: the class name is "CeanupCache", sure you meant
> CleanupCache
> 2) I propose to rename it to more descriptive
> CleanupCachePseudoOptionProcessor 3) I propose to rename a "cleanup"flag
> file to "cnd-cleanup" to avoid possible future name clashes.

Action "Clean C/C++ cache and restart IDE" implemented in CND side.
See bug #268018

Clean whole cache dir and user dir still actual.