mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-04 23:05:47 +02:00
fix for bug 138892
This commit is contained in:
parent
4ca08f2627
commit
63adc5df50
3 changed files with 22 additions and 3 deletions
|
@ -29,11 +29,13 @@ public class SystemRemoteFileSelectionInputProvider extends
|
||||||
public SystemRemoteFileSelectionInputProvider(IHost connection)
|
public SystemRemoteFileSelectionInputProvider(IHost connection)
|
||||||
{
|
{
|
||||||
super(connection);
|
super(connection);
|
||||||
|
setCategory("files");
|
||||||
}
|
}
|
||||||
|
|
||||||
public SystemRemoteFileSelectionInputProvider()
|
public SystemRemoteFileSelectionInputProvider()
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
setCategory("files");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ISubSystem getSubSystem(IHost selectedConnection)
|
protected ISubSystem getSubSystem(IHost selectedConnection)
|
||||||
|
|
|
@ -157,13 +157,19 @@ public class SystemResourceSelectionForm implements ISelectionChangedListener
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String[] systemTypes = _inputProvider.getSystemTypes();
|
String[] systemTypes = _inputProvider.getSystemTypes();
|
||||||
|
String category = _inputProvider.getCategory();
|
||||||
|
|
||||||
if (systemTypes != null)
|
if (systemTypes != null)
|
||||||
{
|
{
|
||||||
_connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemTypes(), _inputProvider.getSystemConnection(), _inputProvider.allNewConnection());
|
_connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemTypes(), _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection());
|
||||||
|
}
|
||||||
|
else if (category != null)
|
||||||
|
{
|
||||||
|
_connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection(), category);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, "*", _inputProvider.getSystemConnection(), _inputProvider.allNewConnection());
|
_connectionCombo = new SystemHostCombo(composite_prompts, SWT.NULL, "*", _inputProvider.getSystemConnection(), _inputProvider.allowNewConnection());
|
||||||
|
|
||||||
}
|
}
|
||||||
_connectionCombo.addSelectionListener(new SelectionAdapter()
|
_connectionCombo.addSelectionListener(new SelectionAdapter()
|
||||||
|
|
|
@ -27,6 +27,7 @@ public abstract class SystemResourceSelectionInputProvider extends SystemAbstrac
|
||||||
private boolean _onlyConnection = false;
|
private boolean _onlyConnection = false;
|
||||||
private boolean _allowNew = true;
|
private boolean _allowNew = true;
|
||||||
private String[] _systemTypes;
|
private String[] _systemTypes;
|
||||||
|
private String _category = null;
|
||||||
|
|
||||||
public SystemResourceSelectionInputProvider(IHost connection)
|
public SystemResourceSelectionInputProvider(IHost connection)
|
||||||
{
|
{
|
||||||
|
@ -53,7 +54,7 @@ public abstract class SystemResourceSelectionInputProvider extends SystemAbstrac
|
||||||
_allowNew = flag;
|
_allowNew = flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean allNewConnection()
|
public boolean allowNewConnection()
|
||||||
{
|
{
|
||||||
return _allowNew;
|
return _allowNew;
|
||||||
}
|
}
|
||||||
|
@ -111,5 +112,15 @@ public abstract class SystemResourceSelectionInputProvider extends SystemAbstrac
|
||||||
protected abstract ISubSystem getSubSystem(IHost selectedConnection);
|
protected abstract ISubSystem getSubSystem(IHost selectedConnection);
|
||||||
|
|
||||||
|
|
||||||
|
public void setCategory(String category)
|
||||||
|
{
|
||||||
|
_category = category;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCategory()
|
||||||
|
{
|
||||||
|
return _category;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue