DESCRIPTION

Fix stop enablement bug

Remove unused code.
Added missing //$NON-NLS-1$.
Remove trailing whitespace.
Create ScriptConsoleManager and move all former static contetn there.
rename getInstance to getConsoleInstance.

Change-Id: I7556b6a5cf540ff392b40e1329336b4b42f8de35


COMMENTS

author: Kamila Nguyen
date: 2013-01-25 21:45:22.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2013-01-25 22:03:38.000000000

Patch Set 4:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/1174/ 

-------------------------------------
author: Erick Ross
date: 2013-01-25 22:13:35.000000000

Patch Set 4: (6 inline comments)

Few small things.

Line:52, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml -> please enable it only for ScriptConsole

Line:111, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java -> Please use {} even for one line if clauses.

Line:128, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java -> Same about {}

Line:43, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java -> We should use console class member not ask for the active.

Line:20, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> Javadoc for the class.

Line:29, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> instanceOf check for the console would be good.

-------------------------------------
author: Brenden Conley
date: 2013-01-25 22:15:51.000000000

Patch Set 4: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/1174/ : SUCCESS

-------------------------------------
author: Erick Ross
date: 2013-01-25 22:27:59.000000000

Patch Set 4: I would prefer that you didn't submit this

(2 inline comments)

One more simplification - there is no need for the observer as we will get notified by the participant when it activates/deactivates.

Line:31, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java -> With the change to the participant you should be able to drop the observer in general.

Line:28, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> You should make the action a member and call it's setEnabled(true/false) in activated/deactivated.

-------------------------------------
author: Kamila Nguyen
date: 2013-01-28 15:24:00.000000000

Patch Set 4: (8 inline comments)



Line:52, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/plugin.xml -> Done

Line:111, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java -> Done

Line:128, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/structures/ScriptConsole.java -> Done

Line:31, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java -> Please see the comment reply in ScriptConsoleParticipant. In short we need to know when the console starts/stops running not so much whether it is active or not.

Line:43, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/actions/StopScriptAction.java -> Done

Line:20, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> Done

Line:28, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> This is not exactly correct; a console could be activated but the script inside it is not necessary running. The reason we cared about this before is because there was one button shared among all consoles now each console has its own button/action so all that matters is whether the script is running or not.

Line:29, systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScriptConsolePageParticipant.java -> Done

-------------------------------------
