mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[208803] add exists() method to ISystemViewElementAdapter
This commit is contained in:
parent
44ee48ce0b
commit
2028bc88ad
3 changed files with 54 additions and 0 deletions
|
@ -34,6 +34,7 @@
|
||||||
* Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
|
* Kevin Doyle (IBM) - [204810] Saving file in Eclipse does not update remote file
|
||||||
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
|
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
|
||||||
* Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
|
* Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
|
||||||
|
* David McKnight (IBM) - [208803] add exists() method
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.view;
|
package org.eclipse.rse.internal.files.ui.view;
|
||||||
|
@ -519,6 +520,26 @@ public class SystemViewRemoteFileAdapter
|
||||||
return getType(element) + ": " + getAbsoluteName(element); //$NON-NLS-1$
|
return getType(element) + ": " + getAbsoluteName(element); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the specified element is represented as existing. Note that
|
||||||
|
* it's possible that the represented element will been seen to exist when on
|
||||||
|
* a remote host it may not - that is because this call does not query the host.
|
||||||
|
* Returns whether the remote file representation exists.
|
||||||
|
*
|
||||||
|
* @param element the element to check
|
||||||
|
* @return true if the element exists
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public boolean exists(Object element)
|
||||||
|
{
|
||||||
|
IRemoteFile file = (IRemoteFile) element;
|
||||||
|
if (file != null)
|
||||||
|
{
|
||||||
|
return file.exists();
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the parent of this object
|
* Return the parent of this object
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [189163] Update IActionFilter constants from subsystemFactory to subsystemConfiguration
|
* Martin Oberhuber (Wind River) - [189163] Update IActionFilter constants from subsystemFactory to subsystemConfiguration
|
||||||
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
* Tobias Schwarz (Wind River) - [173267] "empty list" should not be displayed
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
||||||
|
* David McKnight (IBM) - [208803] add exists() method
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.view;
|
package org.eclipse.rse.ui.view;
|
||||||
|
@ -471,6 +472,23 @@ public abstract class AbstractSystemViewAdapter implements ISystemViewElementAda
|
||||||
return getType(element) + ": " + getName(element); //$NON-NLS-1$
|
return getType(element) + ": " + getName(element); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the specified element is represented as existing. Note that
|
||||||
|
* it's possible that the represented element will been seen to exist when on
|
||||||
|
* a remote host it may not - that is because this call does not query the host.
|
||||||
|
* By default, this method returns true - override this method to customize the
|
||||||
|
* behavior
|
||||||
|
*
|
||||||
|
* @param element the element to check
|
||||||
|
* @return true if the element exists
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public boolean exists(Object element)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
|
* <i><b>Abstract</b>. Must be overridden by subclasses.</i><br>
|
||||||
* Return the parent of this object. This is required by eclipse UI adapters, but
|
* Return the parent of this object. This is required by eclipse UI adapters, but
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
* Martin Oberhuber (Wind River) - [190271] Move ISystemViewInputProvider to Core
|
||||||
|
* David McKnight (IBM) - [208803] add exists() method
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.view;
|
package org.eclipse.rse.ui.view;
|
||||||
|
@ -173,11 +174,25 @@ public interface ISystemViewElementAdapter extends IPropertySource, ISystemDragD
|
||||||
* Return the string to display in the status line when the given object is selected
|
* Return the string to display in the status line when the given object is selected
|
||||||
*/
|
*/
|
||||||
public String getStatusLineText(Object element);
|
public String getStatusLineText(Object element);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether the specified element is represented as existing. Note that
|
||||||
|
* it's possible that the represented element will been seen to exist when on
|
||||||
|
* a remote host it may not - that is because this call does not query the host.
|
||||||
|
*
|
||||||
|
* @param element the element to check
|
||||||
|
* @return true if the element exists
|
||||||
|
*/
|
||||||
|
public boolean exists(Object element);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the parent of this object
|
* Return the parent of this object
|
||||||
*/
|
*/
|
||||||
public Object getParent(Object element);
|
public Object getParent(Object element);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return the children of this model object.
|
* Return the children of this model object.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue