mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
fix for Bug 153277 + handling of shell toolbar contributions
This commit is contained in:
parent
87a2136876
commit
74251b6f18
3 changed files with 22 additions and 7 deletions
|
@ -72,7 +72,7 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
|||
|
||||
try
|
||||
{
|
||||
waitForResponse();
|
||||
waitForResponse();
|
||||
return internalReadLine();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -80,6 +80,18 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
|||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
if (_status.getValue().equals("done"))
|
||||
{
|
||||
if (!_isErrorReader)
|
||||
{
|
||||
DataElement dummyLine = _status.getDataStore().createObject(_status, "stdout", "");
|
||||
return dummyLine;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
|
|||
}
|
||||
|
||||
protected void addLine(Object line)
|
||||
{
|
||||
{
|
||||
_linesOfOutput.add(line);
|
||||
int sizenow = _linesOfOutput.size();
|
||||
int deltaSize = sizenow - _sizeAtLastEvent;
|
||||
|
@ -146,6 +146,8 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
|
|||
IHostShellOutputListener listener = (IHostShellOutputListener)_listeners.get(i);
|
||||
listener.shellOutputChanged(event);
|
||||
}
|
||||
if (!_keepRunning)
|
||||
dispose();
|
||||
}
|
||||
|
||||
public void dispose()
|
||||
|
@ -165,7 +167,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
|
|||
|
||||
_waitIncrement = 0;
|
||||
_keepRunning = false;
|
||||
dispose();
|
||||
//dispose();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ public class SystemCommandsViewPart
|
|||
|
||||
public void updateActionStates()
|
||||
{
|
||||
if (_shellActions == null)
|
||||
if (_shellActions == null || (_shellActions.size() == 0 && _folder != null && _folder.getInput() != null))
|
||||
fillLocalToolBar();
|
||||
|
||||
if (_folder != null && _folder.getInput() != null)
|
||||
|
@ -417,7 +417,7 @@ public class SystemCommandsViewPart
|
|||
boolean firstCall = false;
|
||||
if (_folder != null )
|
||||
{
|
||||
firstCall = (_shellActions == null);
|
||||
firstCall = (_shellActions == null || _shellActions.size() == 0);
|
||||
|
||||
if (firstCall) {
|
||||
updateShellActions();
|
||||
|
@ -447,7 +447,7 @@ public class SystemCommandsViewPart
|
|||
{
|
||||
toolBarManager.add(_clearAction);
|
||||
}
|
||||
if (_shellActions != null)
|
||||
if (_shellActions != null && _shellActions.size() > 0)
|
||||
{
|
||||
for (int i =0; i < _shellActions.size(); i++)
|
||||
{
|
||||
|
@ -463,7 +463,6 @@ public class SystemCommandsViewPart
|
|||
}
|
||||
}
|
||||
toolBarManager.update(true);
|
||||
|
||||
}
|
||||
|
||||
private void addMenuItems(IMenuManager menuManager)
|
||||
|
@ -548,9 +547,11 @@ public class SystemCommandsViewPart
|
|||
{
|
||||
if (menuManager instanceof CommandMenuManager)
|
||||
{
|
||||
/*
|
||||
ISystemViewElementAdapter va =
|
||||
(ISystemViewElementAdapter) ((IAdaptable) connection).getAdapter(
|
||||
ISystemViewElementAdapter.class);
|
||||
*/
|
||||
|
||||
IMenuManager sublaunchMenu = new CommandSubmenuManager(connection, cmdSubSystems);
|
||||
sublaunchMenu.add(new SystemBaseDummyAction());
|
||||
|
|
Loading…
Add table
Reference in a new issue