mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 22:35:43 +02:00
[releng][cleanup] Fix @since tags according to API Tooling
This commit is contained in:
parent
ea0adaea28
commit
e13dc52133
12 changed files with 415 additions and 363 deletions
|
@ -10,7 +10,7 @@
|
|||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [183165] Do not implement constant interfaces
|
||||
* David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
|
||||
|
@ -35,28 +35,28 @@ public interface IUniversalDataStoreConstants
|
|||
/**
|
||||
* Universal Filesystem miner ID. Value =
|
||||
* "org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner".
|
||||
*
|
||||
*
|
||||
* @since org.eclipse.rse.services.dstore 3.0
|
||||
*/
|
||||
public static final String UNIVERSAL_FILESYSTEM_MINER_ID = "org.eclipse.rse.dstore.universal.miners.UniversalFileSystemMiner"; //$NON-NLS-1$
|
||||
/**
|
||||
* Universal Command miner ID. Value =
|
||||
* "org.eclipse.rse.dstore.universal.miners.CommandMiner".
|
||||
*
|
||||
*
|
||||
* @since org.eclipse.rse.services.dstore 3.0
|
||||
*/
|
||||
public static final String UNIVERSAL_COMMAND_MINER_ID = "org.eclipse.rse.dstore.universal.miners.CommandMiner"; //$NON-NLS-1$
|
||||
/**
|
||||
* Universal Environment miner ID. Value =
|
||||
* "org.eclipse.rse.dstore.universal.miners.EnvironmentMiner".
|
||||
*
|
||||
*
|
||||
* @since org.eclipse.rse.services.dstore 3.0
|
||||
*/
|
||||
public static final String UNIVERSAL_ENVIRONMENT_MINER_ID = "org.eclipse.rse.dstore.universal.miners.EnvironmentMiner"; //$NON-NLS-1$
|
||||
/**
|
||||
* Universal Process miner ID. Value =
|
||||
* "org.eclipse.rse.dstore.universal.miners.UniversalProcessMiner".
|
||||
*
|
||||
*
|
||||
* @since org.eclipse.rse.services.dstore 3.0
|
||||
*/
|
||||
public static final String UNIVERSAL_PROCESS_MINER_ID = "org.eclipse.rse.dstore.universal.miners.UniversalProcessMiner"; //$NON-NLS-1$
|
||||
|
@ -123,6 +123,7 @@ public interface IUniversalDataStoreConstants
|
|||
public static final String TYPE_QUALIFIED_CLASSNAME = "fullClassName"; //$NON-NLS-1$
|
||||
|
||||
// permissions commands
|
||||
/** @since org.eclipse.rse.services.dstore 3.0 */
|
||||
public static final String C_QUERY_FILE_PERMISSIONS = "C_QUERY_FILE_PERMISSIONS"; //$NON-NLS-1$
|
||||
/** @since org.eclipse.rse.services.dstore 3.0 */
|
||||
public static final String C_SET_FILE_PERMISSIONS = "C_SET_FILE_PERMISSIONS"; //$NON-NLS-1$
|
||||
|
|
|
@ -1601,6 +1601,9 @@ public class UniversalFileSystemMiner extends Miner {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.0 made private method public
|
||||
*/
|
||||
public AbsoluteVirtualPath getAbsoluteVirtualPath(DataElement subject) {
|
||||
StringBuffer path = new StringBuffer(subject.getAttribute(DE.A_VALUE));
|
||||
if (ArchiveHandlerManager.getInstance().isArchive(
|
||||
|
|
|
@ -44,6 +44,10 @@ public abstract class AbstractDStoreService extends AbstractService implements I
|
|||
protected Map _cmdDescriptorMap;
|
||||
protected DataElement _initializeStatus;
|
||||
|
||||
/**
|
||||
* @since 3.0 got rid of ISystemMessageProvider argument
|
||||
* @param dataStoreProvider
|
||||
*/
|
||||
public AbstractDStoreService(IDataStoreProvider dataStoreProvider)
|
||||
{
|
||||
_dataStoreProvider = dataStoreProvider;
|
||||
|
@ -148,6 +152,7 @@ public abstract class AbstractDStoreService extends AbstractService implements I
|
|||
return new DataElement[0];
|
||||
}
|
||||
|
||||
/** @since 3.0 */
|
||||
protected List dsQueryCommandMulti(DataElement[] subjects, String[] commands, IProgressMonitor monitor)
|
||||
{
|
||||
return dsQueryCommandMulti(subjects, null, commands, monitor);
|
||||
|
@ -155,11 +160,13 @@ public abstract class AbstractDStoreService extends AbstractService implements I
|
|||
|
||||
/**
|
||||
* Query multiple subjects in one shot
|
||||
*
|
||||
* @param subjects the subjects to query
|
||||
* @param commands the query commands
|
||||
* @param argses arguments for the command - may be null
|
||||
* @param monitor the progress monitor
|
||||
* @return a list of DataElement[]s containing the results of each query
|
||||
* @since 3.0
|
||||
*/
|
||||
protected List dsQueryCommandMulti(DataElement[] subjects, ArrayList[] argses, String[] commands, IProgressMonitor monitor)
|
||||
{
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
|
||||
* David McKnight (IBM) - [190803] Canceling a long-running dstore job prints "InterruptedException" to stdout
|
||||
* David McKnight (IBM) - [190010] When status is "cancelled" the wait should complete
|
||||
* David McKnight (IBM) - [197480] eliminating UI dependencies
|
||||
* David McKnight (IBM) - [209593] [api] check for existing query to avoid duplicates
|
||||
|
@ -39,7 +39,7 @@ import org.eclipse.dstore.extra.IDomainNotifier;
|
|||
* This utility class can be used to monitor the status of one more more status DataElements.
|
||||
* Only one instanceof of this class is required per DataStore for use in monitoring statuses.
|
||||
* This is intended to be used in place of StatusChangeListeners
|
||||
*
|
||||
*
|
||||
* * <p>
|
||||
* The following is one example of the use of the StatusMonitor. The code:
|
||||
* <blockquote><pre>
|
||||
|
@ -53,31 +53,31 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
{
|
||||
|
||||
protected boolean _networkDown = false;
|
||||
|
||||
|
||||
protected List _workingStatuses;
|
||||
protected List _cancelledStatuses;
|
||||
protected List _doneStatuses;
|
||||
|
||||
|
||||
protected DataStore _dataStore;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Construct a StatusChangeListener
|
||||
*
|
||||
* @param dataStore the dataStore associated with this monitor
|
||||
*/
|
||||
public DStoreStatusMonitor(DataStore dataStore)
|
||||
*/
|
||||
public DStoreStatusMonitor(DataStore dataStore)
|
||||
{
|
||||
_dataStore = dataStore;
|
||||
reInit();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public void reInit()
|
||||
{
|
||||
_networkDown = false;
|
||||
_networkDown = false;
|
||||
_workingStatuses = new ArrayList();
|
||||
_doneStatuses = new ArrayList();
|
||||
_cancelledStatuses = new ArrayList();
|
||||
|
@ -89,12 +89,12 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
notifier.addDomainListener(this);
|
||||
}}
|
||||
}
|
||||
|
||||
|
||||
public DataStore getDataStore()
|
||||
{
|
||||
return _dataStore;
|
||||
}
|
||||
|
||||
|
||||
public void dispose()
|
||||
{
|
||||
_workingStatuses.clear();
|
||||
|
@ -102,11 +102,11 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
_cancelledStatuses.clear();
|
||||
_dataStore.getDomainNotifier().removeDomainListener(this);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @see IDomainListener#listeningTo(DomainEvent)
|
||||
*/
|
||||
public boolean listeningTo(DomainEvent event)
|
||||
public boolean listeningTo(DomainEvent event)
|
||||
{
|
||||
if (_workingStatuses.size() == 0)
|
||||
{
|
||||
|
@ -118,16 +118,16 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
{
|
||||
return determineStatusDone(parent);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @see IDomainListener#domainChanged(DomainEvent)
|
||||
*/
|
||||
public void domainChanged(DomainEvent event)
|
||||
public void domainChanged(DomainEvent event)
|
||||
{
|
||||
if (_workingStatuses.size() == 0)
|
||||
{
|
||||
|
@ -145,23 +145,23 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Determines whether the status is done.
|
||||
* @return <code>true</code> if status done, <code>false</code> otherwise.
|
||||
*/
|
||||
public boolean determineStatusDone(DataElement status)
|
||||
{
|
||||
public boolean determineStatusDone(DataElement status)
|
||||
{
|
||||
return status.getAttribute(DE.A_VALUE).equals("done") || //$NON-NLS-1$
|
||||
status.getAttribute(DE.A_NAME).equals("done") ||//$NON-NLS-1$
|
||||
status.getAttribute(DE.A_NAME).equals("cancelled"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return true if the the monitor is passive. In this case it is false.
|
||||
*/
|
||||
public boolean isPassiveCommunicationsListener()
|
||||
public boolean isPassiveCommunicationsListener()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -170,17 +170,17 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
* setDone(boolean)
|
||||
*/
|
||||
public synchronized void setDone(DataElement status)
|
||||
{
|
||||
{
|
||||
_workingStatuses.remove(status);
|
||||
_doneStatuses.add(status);
|
||||
_doneStatuses.add(status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public synchronized void setCancelled(DataElement status)
|
||||
{
|
||||
_workingStatuses.remove(status);
|
||||
_cancelledStatuses.add(status);
|
||||
|
||||
|
||||
// send a cancel command if possible
|
||||
if (status != null)
|
||||
{
|
||||
|
@ -195,14 +195,14 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized void setWorking(DataElement status)
|
||||
{
|
||||
_workingStatuses.add(status);
|
||||
}
|
||||
|
||||
|
||||
public boolean wasCancelled(DataElement status)
|
||||
|
||||
|
||||
public boolean wasCancelled(DataElement status)
|
||||
{
|
||||
if (_cancelledStatuses.contains(status))
|
||||
{
|
||||
|
@ -210,37 +210,37 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Test if the StatusChangeListener returned because the network connection to the
|
||||
* Test if the StatusChangeListener returned because the network connection to the
|
||||
* remote system was broken.
|
||||
*/
|
||||
public boolean isNetworkDown()
|
||||
public boolean isNetworkDown()
|
||||
{
|
||||
return _networkDown;
|
||||
}
|
||||
|
||||
|
||||
public DataElement waitForUpdate(DataElement status) throws InterruptedException
|
||||
{
|
||||
{
|
||||
return waitForUpdate(status, null, 0);
|
||||
}
|
||||
|
||||
|
||||
public DataElement waitForUpdate(DataElement status, IProgressMonitor monitor) throws InterruptedException
|
||||
{
|
||||
{
|
||||
return waitForUpdate(status, monitor, 0);
|
||||
}
|
||||
|
||||
|
||||
public DataElement waitForUpdate(DataElement status, int wait) throws InterruptedException
|
||||
{
|
||||
{
|
||||
return waitForUpdate(status, null, wait);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public synchronized DataElement waitForUpdate(DataElement status, IProgressMonitor monitor, int wait) throws InterruptedException
|
||||
{
|
||||
{
|
||||
if (_networkDown && status.getDataStore().isConnected())
|
||||
{
|
||||
reInit();
|
||||
|
@ -250,41 +250,41 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
setDone(status);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
setWorking(status);
|
||||
|
||||
|
||||
// Prevent infinite looping by introducing a threshold for wait
|
||||
int WaitThreshold = 50;
|
||||
|
||||
// Prevent infinite looping by introducing a threshold for wait
|
||||
int WaitThreshold = 50;
|
||||
if ( wait > 0 )
|
||||
WaitThreshold = wait*10; // 1 second means 10 sleep(100ms)
|
||||
else if ( wait == -1 ) // force a diagnostic
|
||||
WaitThreshold = -1;
|
||||
|
||||
|
||||
int initialWaitThreshold = WaitThreshold;
|
||||
int nudges = 0; // nudges used for waking up server with slow connections
|
||||
// nudge up to 12 times before giving up
|
||||
|
||||
|
||||
{
|
||||
// Current thread is not UI thread
|
||||
while (_workingStatuses.contains(status))
|
||||
{
|
||||
boolean statusDone = determineStatusDone(status);
|
||||
if (statusDone)
|
||||
if (statusDone)
|
||||
{
|
||||
setDone(status);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if ((monitor != null) && (monitor.isCanceled()))
|
||||
{
|
||||
setCancelled(status);
|
||||
throw new InterruptedException();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
waitForUpdate();
|
||||
//Thread.sleep(200);
|
||||
|
||||
|
||||
if (WaitThreshold > 0) // update timer count if
|
||||
// threshold not reached
|
||||
--WaitThreshold; // decrement the timer count
|
||||
|
@ -292,11 +292,11 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
if (WaitThreshold == 0)
|
||||
{
|
||||
wakeupServer(status);
|
||||
|
||||
|
||||
// no diagnostic factory but there is a timeout
|
||||
if (nudges >= 12)
|
||||
return status; // returning the undone status object
|
||||
|
||||
|
||||
nudges++;
|
||||
WaitThreshold = initialWaitThreshold;
|
||||
}
|
||||
|
@ -306,21 +306,23 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
throw new InterruptedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the status of a running command for the specified cmd desciptor and subject.
|
||||
* If there is no such command running, then null is returned.
|
||||
*
|
||||
* @param cmdDescriptor
|
||||
* @param subject
|
||||
* @return the status of the command.
|
||||
*/
|
||||
/**
|
||||
* Returns the status of a running command for the specified cmd desciptor
|
||||
* and subject. If there is no such command running, then null is returned.
|
||||
*
|
||||
* @param cmdDescriptor
|
||||
* @param subject
|
||||
* @return the status of the command.
|
||||
* @since 3.0
|
||||
*/
|
||||
public DataElement getCommandStatus(DataElement cmdDescriptor, DataElement subject)
|
||||
{
|
||||
synchronized (_workingStatuses){
|
||||
|
@ -343,7 +345,7 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
if (status != null)
|
||||
{
|
||||
// token command to wake up update handler
|
||||
DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
|
||||
DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
|
||||
DataElement subject = status.getParent().get(0);
|
||||
if (cmdDescriptor != null)
|
||||
{
|
||||
|
@ -360,7 +362,7 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
{
|
||||
try
|
||||
{
|
||||
wait(200);
|
||||
wait(200);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
|
@ -370,7 +372,7 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Causes all threads waiting for this class request to be filled
|
||||
* to wake up.
|
||||
|
@ -379,6 +381,6 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
{
|
||||
notifyAll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2006, 2008 IBM Corporation and others. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes
|
||||
* David McKnight (IBM) - [162195] new APIs for upload multi and download multi
|
||||
* David McKnight (IBM) - [162195] new APIs for upload multi and download multi
|
||||
* David McKnight (IBM) - [197480] eliminating UI dependencies
|
||||
* David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
|
||||
* Martin Oberhuber (Wind River) - [219952] Use MessageFormat for download progress message
|
||||
|
@ -61,10 +61,10 @@ public class DownloadListener implements IDomainListener
|
|||
{
|
||||
System.out.println("Status is null!"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
_dataStore = _status.getDataStore();
|
||||
_dataStore.getDomainNotifier().addDomainListener(this);
|
||||
|
||||
|
||||
_localFile = localFile;
|
||||
|
||||
if (monitor != null)
|
||||
|
@ -79,19 +79,21 @@ public class DownloadListener implements IDomainListener
|
|||
{
|
||||
updateDownloadState();
|
||||
setDone(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** @since 3.0 */
|
||||
public long getTotalLength()
|
||||
{
|
||||
return _totalLength;
|
||||
}
|
||||
|
||||
|
||||
public boolean isCancelled()
|
||||
{
|
||||
return _isCancelled;
|
||||
}
|
||||
|
||||
|
||||
/** @since 3.0 */
|
||||
public boolean isDone()
|
||||
{
|
||||
return _isDone;
|
||||
|
@ -149,20 +151,20 @@ public class DownloadListener implements IDomainListener
|
|||
{
|
||||
//System.out.println(_status.getAttribute(DE.A_SOURCE));
|
||||
_monitor.worked((int)delta);
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
double percent = (currentLength * 1.0) / _totalLength;
|
||||
String str = MessageFormat.format(
|
||||
ServiceResources.DStore_Service_Percent_Complete_Message,
|
||||
new Object[] {
|
||||
new Long(currentLength/1024),
|
||||
new Long(currentLength/1024),
|
||||
new Long(_totalLength/1024),
|
||||
new Double(percent)
|
||||
});
|
||||
|
||||
|
||||
_monitor.subTask(str);
|
||||
|
||||
|
||||
/* DKM - DO WE NEED THIS?!!
|
||||
while (_display != null && _display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
|
@ -175,7 +177,7 @@ public class DownloadListener implements IDomainListener
|
|||
_totalBytesNotified = currentLength;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!_status.getDataStore().getStatus().getName().equals("okay")) //$NON-NLS-1$
|
||||
{
|
||||
_networkDown = true;
|
||||
|
@ -199,7 +201,7 @@ public class DownloadListener implements IDomainListener
|
|||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
public boolean wasCancelled()
|
||||
{
|
||||
|
@ -225,7 +227,7 @@ public class DownloadListener implements IDomainListener
|
|||
* Wait for the the status DataElement to be refreshed
|
||||
*
|
||||
* @param wait threshold for starting diagnostic. Default is 60 seconds; a zero means to use the default.
|
||||
* -1 means to force a timeout; mainly for testing purpose.
|
||||
* -1 means to force a timeout; mainly for testing purpose.
|
||||
*
|
||||
* @return The status DataElement after it has been updated, or the user
|
||||
* has pressed cancel
|
||||
|
@ -234,15 +236,15 @@ public class DownloadListener implements IDomainListener
|
|||
*/
|
||||
public DataElement waitForUpdate(int wait) throws InterruptedException
|
||||
{
|
||||
// Prevent infinite looping by introducing a threshold for wait
|
||||
|
||||
int WaitThreshold = 50;
|
||||
|
||||
// Prevent infinite looping by introducing a threshold for wait
|
||||
|
||||
int WaitThreshold = 50;
|
||||
|
||||
if (wait > 0)
|
||||
WaitThreshold = wait * 10; // 1 second means 10 sleep(100ms)
|
||||
else if (wait == -1) // force a diagnostic
|
||||
WaitThreshold = -1;
|
||||
|
||||
|
||||
int initialWaitTheshold = WaitThreshold;
|
||||
{
|
||||
// Current thread is not UI thread
|
||||
|
@ -262,13 +264,13 @@ public class DownloadListener implements IDomainListener
|
|||
}
|
||||
if (getStatus().getAttribute(DE.A_NAME).equals("done")) //$NON-NLS-1$
|
||||
{
|
||||
setDone(true);
|
||||
setDone(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Thread.sleep(100);
|
||||
updateDownloadState();
|
||||
|
||||
|
||||
if (WaitThreshold > 0) // update timer count if
|
||||
{
|
||||
// threshold not reached
|
||||
|
@ -285,14 +287,14 @@ public class DownloadListener implements IDomainListener
|
|||
}
|
||||
return _status;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void wakeupServer(DataElement status)
|
||||
{
|
||||
if (status != null)
|
||||
{
|
||||
{
|
||||
// token command to wake up update handler
|
||||
DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
|
||||
DataElement cmdDescriptor = _dataStore.findCommandDescriptor(DataStoreSchema.C_NOTIFICATION);
|
||||
DataElement subject = status.getParent().get(0);
|
||||
if (cmdDescriptor != null)
|
||||
{
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 IBM Corporation. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* David McKnight (IBM) - [207100] decorated input stream
|
||||
********************************************************************************/
|
||||
|
@ -23,8 +23,10 @@ import org.eclipse.rse.core.model.ISystemRegistry;
|
|||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
|
||||
/**
|
||||
* Decorates an input stream that was created in the service layer.
|
||||
* The purpose of this class is to notify download after the stream is closed.
|
||||
* Decorates an input stream that was created in the service layer. The purpose
|
||||
* of this class is to notify download after the stream is closed.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class FileSubSystemInputStream extends InputStream {
|
||||
|
||||
|
@ -32,7 +34,7 @@ public class FileSubSystemInputStream extends InputStream {
|
|||
private String _remoteParent;
|
||||
private String _remoteFile;
|
||||
private IRemoteFileSubSystem _fs;
|
||||
|
||||
|
||||
public FileSubSystemInputStream(InputStream inStream, String remoteParent, String remoteFile, IRemoteFileSubSystem fs)
|
||||
{
|
||||
_inStream = inStream;
|
||||
|
@ -40,18 +42,18 @@ public class FileSubSystemInputStream extends InputStream {
|
|||
_remoteFile = remoteFile;
|
||||
_fs = fs;
|
||||
}
|
||||
|
||||
|
||||
public int available() throws IOException {
|
||||
return _inStream.available();
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
_inStream.close();
|
||||
|
||||
|
||||
// notify that the file was uploaded
|
||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
|
||||
sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
|
||||
|
||||
sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
|
||||
}
|
||||
|
||||
public synchronized void mark(int readlimit) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/********************************************************************************
|
||||
* Copyright (c) 2007 IBM Corporation. All rights reserved.
|
||||
* This program and the accompanying materials are made available under the terms
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
|
||||
* available at http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* David McKnight (IBM) - [207100] decorated output stream
|
||||
********************************************************************************/
|
||||
|
@ -23,9 +23,10 @@ import org.eclipse.rse.core.model.ISystemRegistry;
|
|||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
|
||||
/**
|
||||
* Decorates an output stream that was created in the service layer.
|
||||
* The purpose of this class is to notify upload after the stream is closed.
|
||||
*
|
||||
* Decorates an output stream that was created in the service layer. The purpose
|
||||
* of this class is to notify upload after the stream is closed.
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public class FileSubSystemOutputStream extends OutputStream {
|
||||
|
||||
|
@ -33,8 +34,8 @@ public class FileSubSystemOutputStream extends OutputStream {
|
|||
private String _remoteParent;
|
||||
private String _remoteFile;
|
||||
private IRemoteFileSubSystem _fs;
|
||||
|
||||
|
||||
|
||||
|
||||
public FileSubSystemOutputStream(OutputStream outStream, String remoteParent, String remoteFile, IRemoteFileSubSystem fs)
|
||||
{
|
||||
_outStream = outStream;
|
||||
|
@ -42,14 +43,14 @@ public class FileSubSystemOutputStream extends OutputStream {
|
|||
_remoteFile = remoteFile;
|
||||
_fs = fs;
|
||||
}
|
||||
|
||||
|
||||
public void close() throws IOException {
|
||||
_outStream.close();
|
||||
|
||||
|
||||
// notify that the file was uploaded
|
||||
ISystemRegistry sr = RSECorePlugin.getTheSystemRegistry();
|
||||
|
||||
sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
|
||||
|
||||
sr.fireEvent(new SystemRemoteChangeEvent(ISystemRemoteChangeEvents.SYSTEM_REMOTE_RESOURCE_UPLOADED, _remoteParent, _remoteFile, _fs));
|
||||
}
|
||||
|
||||
public void flush() throws IOException {
|
||||
|
|
|
@ -108,6 +108,7 @@ public interface IRemoteFile extends IRemoteContainer, IRemotePropertyHolder, IS
|
|||
|
||||
/**
|
||||
* Return the connection this remote file is from.
|
||||
* @since 3.0 renamed getSystemConnection() to getHost()
|
||||
*/
|
||||
public IHost getHost();
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -7,10 +7,10 @@
|
|||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
|
||||
*******************************************************************************/
|
||||
|
@ -24,22 +24,25 @@ import org.eclipse.rse.services.files.IHostFilePermissions;
|
|||
/**
|
||||
* A "dummy" node to use as a place holder
|
||||
*/
|
||||
public class RemoteFileEmpty extends RemoteFile
|
||||
public class RemoteFileEmpty extends RemoteFile
|
||||
{
|
||||
/**
|
||||
* Constructor for RemoteFileEmpty
|
||||
*/
|
||||
public RemoteFileEmpty()
|
||||
public RemoteFileEmpty()
|
||||
{
|
||||
super(new RemoteFileContext(null,null,null));
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public String getAbsolutePath()
|
||||
{
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return "dummy"; //$NON-NLS-1$
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
*
|
||||
* Initial Contributors:
|
||||
* The following IBM employees contributed to the Remote System Explorer
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* component that contains this file: David McKnight, Kushal Munir,
|
||||
* Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
|
||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
|
||||
*******************************************************************************/
|
||||
|
@ -25,7 +25,7 @@ import org.eclipse.rse.services.files.IHostFilePermissions;
|
|||
* takes a root which should return a single IRemoteFile object in the initial
|
||||
* getChildren query.
|
||||
*/
|
||||
public class RemoteFileRoot extends RemoteFile
|
||||
public class RemoteFileRoot extends RemoteFile
|
||||
{
|
||||
private IRemoteFile rootFile;
|
||||
private IRemoteFile[] rootFiles;
|
||||
|
@ -33,18 +33,18 @@ public class RemoteFileRoot extends RemoteFile
|
|||
/**
|
||||
* Constructor when root is known
|
||||
*/
|
||||
public RemoteFileRoot(IRemoteFile rootFile)
|
||||
public RemoteFileRoot(IRemoteFile rootFile)
|
||||
{
|
||||
super(new RemoteFileContext(null,null,null));
|
||||
setRootFile(rootFile);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor when root is not known.
|
||||
* Client must call {@link #setRootFile(IRemoteFile)} before any
|
||||
* get.. calls in this class are actually used.
|
||||
*/
|
||||
public RemoteFileRoot()
|
||||
public RemoteFileRoot()
|
||||
{
|
||||
super(new RemoteFileContext(null,null,null));
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ public class RemoteFileRoot extends RemoteFile
|
|||
{
|
||||
return rootFile;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reset the root file node
|
||||
*/
|
||||
|
@ -74,12 +74,12 @@ public class RemoteFileRoot extends RemoteFile
|
|||
{
|
||||
return rootFiles;
|
||||
}
|
||||
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return "dummy"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
||||
public int compareTo(Object o)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
@ -126,57 +126,60 @@ public class RemoteFileRoot extends RemoteFile
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean isHidden()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean canRead()
|
||||
{
|
||||
return rootFile.canRead();
|
||||
}
|
||||
|
||||
|
||||
public boolean canWrite()
|
||||
{
|
||||
return rootFile.canWrite();
|
||||
}
|
||||
|
||||
|
||||
public boolean exists()
|
||||
{
|
||||
return rootFile.exists();
|
||||
}
|
||||
|
||||
|
||||
public long getLastModified()
|
||||
{
|
||||
return rootFile.getLastModified();
|
||||
}
|
||||
|
||||
|
||||
public long getLength()
|
||||
{
|
||||
return rootFile.getLength();
|
||||
}
|
||||
|
||||
|
||||
public boolean showReadOnlyProperty()
|
||||
{
|
||||
return rootFile.showReadOnlyProperty();
|
||||
}
|
||||
|
||||
|
||||
public String getClassification()
|
||||
{
|
||||
return rootFile.getClassification();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @since 3.0
|
||||
*/
|
||||
public String getAbsolutePath()
|
||||
{
|
||||
return rootFile.getAbsolutePath();
|
||||
}
|
||||
|
||||
|
||||
public String getCanonicalPath()
|
||||
{
|
||||
return rootFile.getCanonicalPath();
|
||||
}
|
||||
|
||||
|
||||
public IHostFile getHostFile()
|
||||
{
|
||||
return rootFile.getHostFile();
|
||||
|
|
|
@ -881,11 +881,15 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||
/**
|
||||
* Return a list of all remote folders and files in the given folder. The
|
||||
* list is not subsetted.
|
||||
*
|
||||
* @param parents The parent folders to list folders and files in
|
||||
* @param fileTypes - indicates whether to query files, folders, both or some other type
|
||||
* @param fileTypes - indicates whether to query files, folders, both or
|
||||
* some other type
|
||||
* @param monitor the progress monitor
|
||||
* @since 3.0
|
||||
*/
|
||||
public IRemoteFile[] listMultiple(IRemoteFile[] parents, int[] fileTypes, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -899,10 +903,14 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||
* Return a list of all remote folders and files in the given folder. The
|
||||
* list is not subsetted.
|
||||
*
|
||||
* @param parents The parent folders to list folders and files in
|
||||
* @param fileType - indicates whether to query files, folders, both or some other type
|
||||
* @param fileType - indicates whether to query files, folders, both or some
|
||||
* other type
|
||||
* @param monitor the progress monitor
|
||||
* @since 3.0
|
||||
*/
|
||||
public IRemoteFile[] listMultiple(IRemoteFile[] parents, int fileType, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -916,9 +924,12 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||
* Return a list of all remote folders and files in the given folder. The
|
||||
* list is not subsetted.
|
||||
*
|
||||
* @param parent The parent folder to list folders and files in
|
||||
* @param monitor the progress monitor
|
||||
* @since 3.0 renamed from listFoldersAndFiles()
|
||||
*/
|
||||
public IRemoteFile[] list(IRemoteFile parent, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -926,10 +937,13 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
}
|
||||
|
||||
/**
|
||||
* Return a list of all remote folders and files in the given folder. The list is not subsetted.
|
||||
* Return a list of all remote folders and files in the given folder. The
|
||||
* list is not subsetted.
|
||||
*
|
||||
* @param parent The parent folder to list folders and files in
|
||||
* @param fileType the type of file
|
||||
* @param monitor the monitor
|
||||
* @since 3.0 using int fileType parameter
|
||||
*/
|
||||
public IRemoteFile[] list(IRemoteFile parent, int fileType, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -939,12 +953,15 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
/**
|
||||
* Return a list of remote folders and files in the given folder.
|
||||
* <p>
|
||||
* The files part of the list is subsetted by the given file name filter. It can be null for no subsetting.
|
||||
* The files part of the list is subsetted by the given file name filter. It
|
||||
* can be null for no subsetting.
|
||||
*
|
||||
* @param parent The parent folder to list folders and files in
|
||||
* @param fileNameFilter The name pattern to subset the file list by, or null to return all files.
|
||||
* @param fileNameFilter The name pattern to subset the file list by, or
|
||||
* null to return all files.
|
||||
* @param fileType the type of file
|
||||
* @param monitor the monitor
|
||||
* @since 3.0 using int fileType parameter
|
||||
*/
|
||||
public IRemoteFile[] list(IRemoteFile parent, String fileNameFilter, int fileType, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
@ -1018,9 +1035,12 @@ public abstract class RemoteFileSubSystem extends SubSystem implements IRemoteFi
|
|||
}
|
||||
|
||||
/**
|
||||
* <b>Overrideable</b> Override this method to provide optimized implementation
|
||||
* Given a set of fully qualified file or folder names, return an ISystemResourceSet object for it.
|
||||
* Given a set of fully qualified file or folder names, return an
|
||||
* ISystemResourceSet object for it. <b>Overrideable</b> Override this
|
||||
* method to provide optimized implementation
|
||||
*
|
||||
* @param folderOrFileNames Fully qualified folder or file names
|
||||
* @since 3.0
|
||||
*/
|
||||
public IRemoteFile[] getRemoteFileObjects(String[] folderOrFileNames, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue