Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315224 - Stop Running Script button always active
Summary: Stop Running Script button always active
Status: RESOLVED FIXED
Alias: None
Product: Linux Tools
Classification: Tools
Component: Systemtap (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 0.6   Edit
Assignee: anithra CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 10:21 EDT by Andrew Overholt CLA
Modified: 2011-06-06 15:29 EDT (History)
3 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2010-06-02 14:43 EDT, Roland Grunberg CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Overholt CLA 2010-06-01 10:21:42 EDT
... and pressing it seems to have no effect.
Comment 1 Roland Grunberg CLA 2010-06-02 14:43:15 EDT
Created attachment 170857 [details]
Patch

Proposed patch for disabling Stop script, when no script is running.
Comment 2 Andrew Overholt CLA 2010-06-03 15:33:05 EDT
Anithra, please take a look at the patch.  We need a fix ASAP for this.
Comment 3 anithra CLA 2010-06-06 12:45:29 EDT
The Patch works fine,  Thanks!
Comment 4 anithra CLA 2010-06-06 12:46:25 EDT
I havent committed the patch, Not sure if i can do it or if Roland should be doing it ...
Comment 5 Andrew Overholt CLA 2010-06-07 10:02:51 EDT
I still see the button active in the SystemTap IDE and SystemTap Graphing perspectives but not in the SystemTap Dashboard perspective :)
Comment 6 Severin Gehwolf CLA 2010-06-07 14:27:31 EDT
The stop script button still seems to be on when Eclipse starts up into the "SystemTap Graphing" perspective, but it appears to be off when Eclipse boots into "SystemTap IDE" or "SystemTap Dashboard". I don't see why this is the case.
Comment 7 Andrew Overholt CLA 2010-06-07 14:38:22 EDT
With https://build.eclipse.org/hudson/job/cbi-linuxtools-Helios/231/ I actually still see it on in both IDE and Graphing perspectives.
Comment 8 Severin Gehwolf CLA 2010-06-07 14:48:24 EDT
The patch never got committed, I believe. So I'm not really surprised that there's no change apparent ;-)

BTW: the patch should better change to something like:

        public void selectionChanged(IAction a, ISelection s) {
		a.setEnabled(anyRunning());
		if (!anyRunning()) {
                      a.setDisabledImageDescriptor(a.getImageDescriptor());
                }
	}
Comment 9 Charley Wang CLA 2010-06-07 15:31:22 EDT
(In reply to comment #8)
> The patch never got committed, I believe. So I'm not really surprised that
> there's no change apparent ;-)
> 
> BTW: the patch should better change to something like:
> 
>         public void selectionChanged(IAction a, ISelection s) {
>         a.setEnabled(anyRunning());
>         if (!anyRunning()) {
>                       a.setDisabledImageDescriptor(a.getImageDescriptor());
>                 }
>     }

It's not really necessary to call setDisabledImageDescriptor on the same image that is already in use -- Eclipse should automatically gray out the image when it is disabled. I can confirm that this patch will work if applied. :)

The StopScriptAction (and the rest of the ide.FileActionSet action set) don't show up in Dashboard for me, I believe this may be intentional since Dashboard seems to have its own Stop/Run actions...
Comment 10 Severin Gehwolf CLA 2010-06-07 15:48:10 EDT
Ok, cool. Thanks, Charley!
Comment 11 anithra CLA 2010-06-08 10:35:54 EDT
I've committed the code, so it should work with the next build.. The StopScriptAction is not meant/not needed for the Dashboard perspective.
Comment 12 Andrew Overholt CLA 2010-06-08 13:32:34 EDT
I still see it enabled in the Graphing perspective but when I click it it says that the chosen operation is not enabled.  It then remains un-enabled.  I'm willing to accept this for now and we can work on the initial state in bug #316178.
Comment 13 Andrew Overholt CLA 2011-06-06 15:29:33 EDT
Comment on attachment 170857 [details]
Patch

Marking patch obsolete since it was done by a committer.