Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 75334 Details for
Bug 197848
[Shells] After clicking Cancel Shell the action is still enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch for proper event sending when shell terminates
bug197848_shellStatus.diff.txt (text/plain), 4.11 KB, created by
Martin Oberhuber
on 2007-08-03 10:30:04 EDT
(
hide
)
Description:
Patch for proper event sending when shell terminates
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-08-03 10:30:04 EDT
Size:
4.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services >Index: src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services/src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java,v >retrieving revision 1.6 >diff -u -r1.6 AbstractHostShellOutputReader.java >--- src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java 5 Jun 2007 10:37:08 -0000 1.6 >+++ src/org/eclipse/rse/services/shells/AbstractHostShellOutputReader.java 3 Aug 2007 14:30:11 -0000 >@@ -12,7 +12,7 @@ > * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley. > * > * Contributors: >- * {Name} (company) - description of contribution. >+ * Martin Oberhuber (Wind River) - [197848] Fix shell terminated state when remote dies > *******************************************************************************/ > > package org.eclipse.rse.services.shells; >@@ -132,7 +132,6 @@ > } > } > >- > public void fireOutputChanged(IHostShellChangeEvent event) > { > for (int i = 0; i < _listeners.size(); i++) >@@ -158,7 +157,6 @@ > { > if (_keepRunning) > { >- > _waitIncrement = 0; > //dispose(); > } >@@ -172,15 +170,18 @@ > { > Thread.sleep(_waitIncrement); > Thread.yield(); >+ handle(); > } > catch (InterruptedException e) > { >- e.printStackTrace(); > finish(); >- return; >+ _keepRunning = false; > } >- >- handle(); >+ } >+ if (!isErrorReader()) { >+ //Bug 197848: Fire empty event as notification that we are done >+ HostShellChangeEvent event = new HostShellChangeEvent(_hostShell, this, 0, 0); >+ fireOutputChanged(event); > } > } > >#P org.eclipse.rse.subsystems.shells.core >Index: src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.subsystems.shells.core/src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java,v >retrieving revision 1.10 >diff -u -r1.10 OutputRefreshJob.java >--- src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java 14 May 2007 13:03:39 -0000 1.10 >+++ src/org/eclipse/rse/internal/subsystems/shells/servicesubsystem/OutputRefreshJob.java 3 Aug 2007 14:30:13 -0000 >@@ -13,6 +13,7 @@ > * Contributors: > * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core > * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry >+ * Martin Oberhuber (Wind River) - [197848] Fix shell terminated state when remote dies > ********************************************************************************/ > > package org.eclipse.rse.internal.subsystems.shells.servicesubsystem; >@@ -24,6 +25,7 @@ > import org.eclipse.rse.core.events.ISystemResourceChangeEvents; > import org.eclipse.rse.core.events.SystemResourceChangeEvent; > import org.eclipse.rse.core.model.ISystemRegistry; >+import org.eclipse.rse.core.subsystems.ISubSystem; > import org.eclipse.rse.internal.subsystems.shells.core.ShellStrings; > import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell; > import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput; >@@ -87,6 +89,17 @@ > registry.fireEvent( > new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_PROPERTY_CHANGE, _command.getCommandSubSystem())); > } >+ >+ //Bug 197848: Artificial event for shell termination >+ if (_outputs.length == 0 && !_command.isActive()) { >+ ISubSystem subsys = _command.getCommandSubSystem(); >+ //update action states in commands view >+ registry.fireEvent( >+ new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_COMMAND_SHELL_FINISHED, subsys)); >+ //update "connected" overlay in SystemView >+ registry.fireEvent( >+ new SystemResourceChangeEvent(_command, ISystemResourceChangeEvents.EVENT_REFRESH, subsys)); >+ } > } > } > catch (Exception e)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 197848
:
75235
| 75334