1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-09 10:05:24 +02:00

fix for Bug 153277 + handling of shell toolbar contributions

This commit is contained in:
David McKnight 2006-10-03 18:43:51 +00:00
parent 87a2136876
commit 74251b6f18
3 changed files with 22 additions and 7 deletions

View file

@ -80,6 +80,18 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
e.printStackTrace(); e.printStackTrace();
} }
} }
if (_status.getValue().equals("done"))
{
if (!_isErrorReader)
{
DataElement dummyLine = _status.getDataStore().createObject(_status, "stdout", "");
return dummyLine;
}
else
{
return null;
}
}
return ""; return "";
} }

View file

@ -146,6 +146,8 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
IHostShellOutputListener listener = (IHostShellOutputListener)_listeners.get(i); IHostShellOutputListener listener = (IHostShellOutputListener)_listeners.get(i);
listener.shellOutputChanged(event); listener.shellOutputChanged(event);
} }
if (!_keepRunning)
dispose();
} }
public void dispose() public void dispose()
@ -165,7 +167,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
_waitIncrement = 0; _waitIncrement = 0;
_keepRunning = false; _keepRunning = false;
dispose(); //dispose();
} }
} }

View file

@ -344,7 +344,7 @@ public class SystemCommandsViewPart
public void updateActionStates() public void updateActionStates()
{ {
if (_shellActions == null) if (_shellActions == null || (_shellActions.size() == 0 && _folder != null && _folder.getInput() != null))
fillLocalToolBar(); fillLocalToolBar();
if (_folder != null && _folder.getInput() != null) if (_folder != null && _folder.getInput() != null)
@ -417,7 +417,7 @@ public class SystemCommandsViewPart
boolean firstCall = false; boolean firstCall = false;
if (_folder != null ) if (_folder != null )
{ {
firstCall = (_shellActions == null); firstCall = (_shellActions == null || _shellActions.size() == 0);
if (firstCall) { if (firstCall) {
updateShellActions(); updateShellActions();
@ -447,7 +447,7 @@ public class SystemCommandsViewPart
{ {
toolBarManager.add(_clearAction); toolBarManager.add(_clearAction);
} }
if (_shellActions != null) if (_shellActions != null && _shellActions.size() > 0)
{ {
for (int i =0; i < _shellActions.size(); i++) for (int i =0; i < _shellActions.size(); i++)
{ {
@ -463,7 +463,6 @@ public class SystemCommandsViewPart
} }
} }
toolBarManager.update(true); toolBarManager.update(true);
} }
private void addMenuItems(IMenuManager menuManager) private void addMenuItems(IMenuManager menuManager)
@ -548,9 +547,11 @@ public class SystemCommandsViewPart
{ {
if (menuManager instanceof CommandMenuManager) if (menuManager instanceof CommandMenuManager)
{ {
/*
ISystemViewElementAdapter va = ISystemViewElementAdapter va =
(ISystemViewElementAdapter) ((IAdaptable) connection).getAdapter( (ISystemViewElementAdapter) ((IAdaptable) connection).getAdapter(
ISystemViewElementAdapter.class); ISystemViewElementAdapter.class);
*/
IMenuManager sublaunchMenu = new CommandSubmenuManager(connection, cmdSubSystems); IMenuManager sublaunchMenu = new CommandSubmenuManager(connection, cmdSubSystems);
sublaunchMenu.add(new SystemBaseDummyAction()); sublaunchMenu.add(new SystemBaseDummyAction());