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:
parent
87a2136876
commit
74251b6f18
3 changed files with 22 additions and 7 deletions
|
@ -72,7 +72,7 @@ public class DStoreShellOutputReader extends AbstractHostShellOutputReader imple
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
waitForResponse();
|
waitForResponse();
|
||||||
return internalReadLine();
|
return internalReadLine();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -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 "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@ public abstract class AbstractHostShellOutputReader extends Thread implements I
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void addLine(Object line)
|
protected void addLine(Object line)
|
||||||
{
|
{
|
||||||
_linesOfOutput.add(line);
|
_linesOfOutput.add(line);
|
||||||
int sizenow = _linesOfOutput.size();
|
int sizenow = _linesOfOutput.size();
|
||||||
int deltaSize = sizenow - _sizeAtLastEvent;
|
int deltaSize = sizenow - _sizeAtLastEvent;
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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());
|
||||||
|
|
Loading…
Add table
Reference in a new issue