mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-03 14:25:37 +02:00
[cleanup] Fix compiler warnings
This commit is contained in:
parent
659b31dad8
commit
19c4a999c3
40 changed files with 140 additions and 158 deletions
|
@ -307,8 +307,9 @@ public class StatusMonitor implements IDomainListener, ICommunicationsListener
|
|||
// Current thread is UI thread
|
||||
while (_workingStatuses.contains(status))
|
||||
{
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch()) {}
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((monitor != null) && (monitor.isCanceled()))
|
||||
{
|
||||
|
|
|
@ -27,7 +27,6 @@ import java.io.InputStream;
|
|||
import java.io.OutputStream;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.rmi.RemoteException;
|
||||
|
||||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.filesystem.IFileInfo;
|
||||
|
@ -77,7 +76,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
|
|||
public String[] childNames(int options, IProgressMonitor monitor)
|
||||
{
|
||||
IPreferenceStore prefStore = RSEUIPlugin.getDefault().getPreferenceStore();
|
||||
boolean origShowHidden = prefStore.getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
|
||||
//boolean origShowHidden = prefStore.getBoolean(ISystemPreferencesConstants.SHOWHIDDEN);
|
||||
prefStore.setValue(ISystemPreferencesConstants.SHOWHIDDEN, true);
|
||||
|
||||
String[] names;
|
||||
|
@ -99,7 +98,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
|
|||
names = new String[children.length];
|
||||
for (int i = 0; i < children.length; i++)
|
||||
{
|
||||
names[i] = ((IRemoteFile)children[i]).getName();
|
||||
names[i] = children[i].getName();
|
||||
}
|
||||
}
|
||||
catch (SystemMessageException e)
|
||||
|
@ -194,7 +193,7 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
|
|||
try
|
||||
{
|
||||
int size = stream.available();
|
||||
_subSystem.upload(stream, (long)size, _remoteFile, "utf8", monitor);
|
||||
_subSystem.upload(stream, size, _remoteFile, "utf8", monitor);
|
||||
_remoteFile = _subSystem.getRemoteFileObject(_remoteFile.getAbsolutePath());
|
||||
|
||||
}
|
||||
|
@ -241,13 +240,13 @@ public class RSEFileStoreRemoteFileWrapper extends FileStore implements IFileSto
|
|||
{
|
||||
file = (IFile)UniversalFileTransferUtility.getTempFileFor(_remoteFile);
|
||||
}
|
||||
if (!file.isSynchronized(IFile.DEPTH_ZERO) && !_remoteFile.getName().equals(".project"))
|
||||
if (!file.isSynchronized(IResource.DEPTH_ZERO) && !_remoteFile.getName().equals(".project"))
|
||||
{
|
||||
file.refreshLocal(IFile.DEPTH_ONE, monitor);
|
||||
file.refreshLocal(IResource.DEPTH_ONE, monitor);
|
||||
}
|
||||
if (file != null)
|
||||
{
|
||||
if (file.isSynchronized(IFile.DEPTH_ZERO))
|
||||
if (file.isSynchronized(IResource.DEPTH_ZERO))
|
||||
{
|
||||
return file.getContents();
|
||||
}
|
||||
|
|
|
@ -22,15 +22,14 @@ import java.util.HashMap;
|
|||
import org.eclipse.core.filesystem.EFS;
|
||||
import org.eclipse.core.filesystem.IFileStore;
|
||||
import org.eclipse.core.filesystem.provider.FileSystem;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.model.ISystemRegistry;
|
||||
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEmpty;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
|
@ -146,7 +145,7 @@ public class RSEFileSystem extends FileSystem
|
|||
{
|
||||
//shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
|
||||
|
||||
shell = RSEUIPlugin.getActiveWorkbenchShell();
|
||||
shell = SystemBasePlugin.getActiveWorkbenchShell();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
|
@ -402,7 +402,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
return (Object[])remoteObject;
|
||||
else if (remoteObject instanceof IRemoteFile[])
|
||||
return (Object[])remoteObject;
|
||||
else if (remoteObject instanceof Object)
|
||||
else if (remoteObject != null)
|
||||
return new Object[] {remoteObject};
|
||||
else
|
||||
return null;
|
||||
|
@ -450,7 +450,7 @@ public class SystemSelectRemoteFileAction extends SystemBaseDialogAction
|
|||
if (expandDepth != 0)
|
||||
dlg.setAutoExpandDepth(expandDepth);
|
||||
if (fileTypes != null)
|
||||
dlg.setFileTypes((String)fileTypes); // must be called before setRootFolder!
|
||||
dlg.setFileTypes(fileTypes); // must be called before setRootFolder!
|
||||
if (preSelection != null)
|
||||
dlg.setPreSelection(preSelection);
|
||||
else if (rootFolderConnection != null)
|
||||
|
|
|
@ -412,7 +412,7 @@ public class SystemSelectRemoteFolderAction extends SystemBaseDialogAction
|
|||
return (Object[])remoteObject;
|
||||
else if (remoteObject instanceof IRemoteFile[])
|
||||
return (Object[])remoteObject;
|
||||
else if (remoteObject instanceof Object)
|
||||
else if (remoteObject != null)
|
||||
return new Object[] {remoteObject};
|
||||
else
|
||||
return null;
|
||||
|
|
|
@ -367,7 +367,7 @@ public class SystemSelectRemoteFileOrFolderDialog
|
|||
{
|
||||
if (getOutputObject() instanceof Object[])
|
||||
return (Object[])getOutputObject();
|
||||
else if (getOutputObject() instanceof Object)
|
||||
else if (getOutputObject() != null)
|
||||
return new Object[] {getOutputObject()};
|
||||
else
|
||||
return null;
|
||||
|
|
|
@ -15,12 +15,10 @@
|
|||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.propertypages;
|
||||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
|
||||
import org.eclipse.rse.ui.propertypages.SystemAbstractPropertyPageExtensionAction;
|
||||
import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.ui.IWorkbenchPropertyPage;
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.eclipse.jface.dialogs.IDialogConstants;
|
|||
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
|
||||
import org.eclipse.jface.operation.IRunnableContext;
|
||||
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||
import org.eclipse.jface.preference.FieldEditorPreferencePage;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.jface.preference.PreferencePage;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
|
@ -575,7 +574,7 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
|
|||
protected ISystemEditableRemoteObject getEditableFor(IAdaptable selected)
|
||||
{
|
||||
ISystemRemoteElementAdapter adapter =
|
||||
(ISystemRemoteElementAdapter) ((IAdaptable) selected).getAdapter(ISystemRemoteElementAdapter.class);
|
||||
(ISystemRemoteElementAdapter) selected.getAdapter(ISystemRemoteElementAdapter.class);
|
||||
if (adapter.canEdit(selected))
|
||||
{
|
||||
ISystemEditableRemoteObject editable = adapter.getEditableRemoteObject(selected);
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.eclipse.rse.files.ui.resources;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
|
@ -53,7 +52,6 @@ import org.eclipse.rse.ui.ISystemMessages;
|
|||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
||||
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
|
||||
import org.eclipse.rse.ui.view.SystemDNDTransferRunnable;
|
||||
import org.eclipse.swt.program.Program;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -171,7 +169,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
}
|
||||
return Status.OK_STATUS;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private String _editorId = null;
|
||||
private boolean _isRemoteFileMounted = false;
|
||||
|
@ -455,10 +453,17 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
//pmd.run(false, true, downloadFileRunnable);
|
||||
downloadFileRunnable.setRule(getRemoteFile());
|
||||
downloadFileRunnable.schedule();
|
||||
while (!downloadFileRunnable.didComplete())
|
||||
{
|
||||
Display.getDefault().readAndDispatch();
|
||||
//downloadFileRunnable.wait();
|
||||
Display display = Display.getDefault();
|
||||
try {
|
||||
while (!downloadFileRunnable.didComplete())
|
||||
{
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (!downloadFileRunnable.didComplete()) Thread.sleep(200);
|
||||
}
|
||||
} catch(InterruptedException e) {
|
||||
/*stop waiting*/
|
||||
}
|
||||
|
||||
listener.removeIgnoreFile(localFile);
|
||||
|
@ -1246,7 +1251,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
public void run()
|
||||
{
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(RSEUIPlugin.getActiveWorkbenchShell(), _msg);
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
|
||||
dialog.open();
|
||||
}
|
||||
}
|
||||
|
@ -1267,7 +1272,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
|||
|
||||
public void run()
|
||||
{
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(RSEUIPlugin.getActiveWorkbenchShell(), _msg);
|
||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), _msg);
|
||||
try
|
||||
{
|
||||
_responce = dialog.openQuestion();
|
||||
|
|
|
@ -1257,6 +1257,7 @@ public class UniversalFileTransferUtility
|
|||
boolean isText = currentSource.isText();
|
||||
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
boolean canWrite = true;
|
||||
|
@ -1290,6 +1291,7 @@ public class UniversalFileTransferUtility
|
|||
//return null;
|
||||
}
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.view;
|
||||
import org.eclipse.core.runtime.IAdapterFactory;
|
||||
import org.eclipse.core.runtime.IAdapterManager;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||
|
|
|
@ -407,7 +407,7 @@ public class SystemViewRemoteFileAdapter
|
|||
if (moveAction == null)
|
||||
moveAction = new SystemMoveRemoteFileAction(shell);
|
||||
|
||||
ISubSystem subsys = firstFile.getParentRemoteFileSubSystem();
|
||||
//ISubSystem subsys = firstFile.getParentRemoteFileSubSystem();
|
||||
|
||||
// DKM - clipboard based copy actions
|
||||
ISystemRegistry registry = RSEUIPlugin.getTheSystemRegistry();
|
||||
|
@ -821,7 +821,7 @@ public class SystemViewRemoteFileAdapter
|
|||
int i = -1;
|
||||
|
||||
// add our unique property descriptors...
|
||||
RSEUIPlugin plugin = RSEUIPlugin.getDefault();
|
||||
//RSEUIPlugin plugin = RSEUIPlugin.getDefault();
|
||||
|
||||
// classification
|
||||
if (isRegular) uniquePropertyDescriptorArray[++i] = createSimplePropertyDescriptor(P_FILE_CLASSIFICATION, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_LABEL, SystemViewResources.RESID_PROPERTY_FILE_CLASSIFICATION_TOOLTIP);
|
||||
|
@ -1499,25 +1499,21 @@ public class SystemViewRemoteFileAdapter
|
|||
return totalByteSize;
|
||||
}
|
||||
Display display = Display.getCurrent();
|
||||
if (display != null)
|
||||
{
|
||||
while (display.readAndDispatch()) {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
} catch (InterruptedException e) {
|
||||
//no action
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
} catch (InterruptedException e) {
|
||||
//no action
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1705,7 +1701,7 @@ public class SystemViewRemoteFileAdapter
|
|||
{
|
||||
SystemRemoteResourceSet rmtSet = (SystemRemoteResourceSet)fromSet;
|
||||
|
||||
ISystemDragDropAdapter srcAdapter = rmtSet.getAdapter();
|
||||
//ISystemDragDropAdapter srcAdapter = rmtSet.getAdapter();
|
||||
ISubSystem srcSubSystem = rmtSet.getSubSystem();
|
||||
|
||||
Object first = set.get(0);
|
||||
|
|
|
@ -43,7 +43,6 @@ import org.eclipse.rse.subsystems.processes.core.subsystem.RemoteProcessSubSyste
|
|||
import org.eclipse.rse.ui.ISystemContextMenuConstants;
|
||||
import org.eclipse.rse.ui.ISystemMessages;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseAction;
|
||||
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
|
||||
import org.eclipse.rse.ui.messages.SystemMessageDialog;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
@ -83,7 +82,7 @@ public class SystemKillProcessAction extends SystemBaseDialogAction implements I
|
|||
public boolean updateSelection(IStructuredSelection selection)
|
||||
{
|
||||
boolean enable = true;
|
||||
Iterator e= ((IStructuredSelection) selection).iterator();
|
||||
Iterator e = selection.iterator();
|
||||
while (enable && e.hasNext())
|
||||
{
|
||||
Object selectedObject = e.next();
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.eclipse.rse.processes.ui.dialogs;
|
|||
import java.util.Iterator;
|
||||
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.viewers.ITableLabelProvider;
|
||||
import org.eclipse.rse.ui.dialogs.SystemDeleteTableProvider;
|
||||
|
||||
|
||||
|
|
|
@ -287,8 +287,9 @@ public class DStoreStatusMonitor implements IDomainListener
|
|||
// Current thread is UI thread
|
||||
while (_workingStatuses.contains(status))
|
||||
{
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch()) {}
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((monitor != null) && (monitor.isCanceled()))
|
||||
{
|
||||
|
|
|
@ -67,15 +67,11 @@ public class DownloadListener implements IDomainListener,IUniversalDataStoreCons
|
|||
_localFile = localFile;
|
||||
|
||||
if (monitor != null)
|
||||
{
|
||||
if (_display != null)
|
||||
{
|
||||
while (_display.readAndDispatch())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
while (_display!=null && _display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
}
|
||||
if (_status.getValue().equals("done"))
|
||||
{
|
||||
updateDownloadState();
|
||||
|
@ -162,11 +158,8 @@ public class DownloadListener implements IDomainListener,IUniversalDataStoreCons
|
|||
|
||||
_monitor.subTask(str);
|
||||
|
||||
if (_display != null)
|
||||
{
|
||||
while (_display.readAndDispatch())
|
||||
{
|
||||
}
|
||||
while (_display != null && _display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -246,9 +239,8 @@ public class DownloadListener implements IDomainListener,IUniversalDataStoreCons
|
|||
// Current thread is UI thread
|
||||
while (!_isDone && !_isCancelled && !_networkDown)
|
||||
{
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch())
|
||||
{
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((_monitor != null) && (_monitor.isCanceled()))
|
||||
|
|
|
@ -238,8 +238,8 @@ public class StatusChangeListener implements IDomainListener
|
|||
}
|
||||
// Current thread is UI thread
|
||||
while (!done && !cancelled) {
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((monitor != null) && (monitor.isCanceled())) {
|
||||
|
|
|
@ -286,8 +286,9 @@ public class SystemCommandEditor extends SourceViewer
|
|||
_pasteAction.setText(SystemResources.ACTION_PASTE_LABEL);
|
||||
fGlobalActions.put(ITextEditorActionConstants.PASTE, _pasteAction);
|
||||
_pasteAction.setEnabled(false); // defect 46369
|
||||
if (_pasteAction instanceof IUpdate)
|
||||
((IUpdate) _pasteAction).update();
|
||||
if (_pasteAction != null) {
|
||||
_pasteAction.update();
|
||||
}
|
||||
_selectAllAction = new TextViewerAction(this, SELECT_ALL);
|
||||
_selectAllAction.setText(SystemResources.ACTION_SELECT_ALL_LABEL);
|
||||
fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, _selectAllAction);
|
||||
|
|
|
@ -74,15 +74,11 @@ public class DownloadListener implements IDomainListener, ICommunicationsListene
|
|||
_localFile = localFile;
|
||||
|
||||
if (monitor != null)
|
||||
{
|
||||
if (_display != null)
|
||||
{
|
||||
while (_display.readAndDispatch())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
while (_display!=null && _display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
}
|
||||
if (_status.getValue().equals("done"))
|
||||
{
|
||||
updateDownloadState();
|
||||
|
@ -170,11 +166,8 @@ public class DownloadListener implements IDomainListener, ICommunicationsListene
|
|||
|
||||
_monitor.subTask(_percentMsg.getLevelOneText());
|
||||
|
||||
if (_display != null)
|
||||
{
|
||||
while (_display.readAndDispatch())
|
||||
{
|
||||
}
|
||||
while (_display!=null && _display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -282,9 +275,8 @@ public class DownloadListener implements IDomainListener, ICommunicationsListene
|
|||
// Current thread is UI thread
|
||||
while (!_isDone && !_isCancelled && !_networkDown)
|
||||
{
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch())
|
||||
{
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((_monitor != null) && (_monitor.isCanceled()))
|
||||
|
|
|
@ -274,8 +274,8 @@ public class StatusChangeListener implements IDomainListener, ICommunicationsLis
|
|||
}
|
||||
// Current thread is UI thread
|
||||
while (!done && !cancelled) {
|
||||
// Process everything on event queue
|
||||
while (display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
|
||||
if ((monitor != null) && (monitor.isCanceled())) {
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.eclipse.rse.core.subsystems.IConnectorService;
|
|||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.filters.ISystemFilterPool;
|
||||
import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
||||
import org.eclipse.rse.internal.model.Host;
|
||||
import org.eclipse.rse.internal.subsystems.files.core.ILanguageUtilityFactory;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.services.clientserver.SystemSearchString;
|
||||
|
|
|
@ -93,26 +93,25 @@ public class SimpleCommandOperation
|
|||
{
|
||||
if (!hasMoreOutput() && waitForOutput)
|
||||
{
|
||||
while (!hasMoreOutput())
|
||||
Display display = Display.getCurrent();
|
||||
try
|
||||
{
|
||||
if (!isActive())
|
||||
while (!hasMoreOutput() && isActive())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
try
|
||||
{
|
||||
Display d = Display.getCurrent();
|
||||
if (d != null)
|
||||
{
|
||||
while (d.readAndDispatch());
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
Thread.sleep(100);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
if (!hasMoreOutput() && isActive()) Thread.sleep(100);
|
||||
}
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
//Cancel waiting
|
||||
}
|
||||
if (!isActive())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.rse.connectorservice.dstore.DStoreConnectorService;
|
|||
import org.eclipse.rse.connectorservice.dstore.DStoreConnectorServiceManager;
|
||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.internal.model.Host;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.services.dstore.IDStoreService;
|
||||
import org.eclipse.rse.services.dstore.shells.DStoreShellService;
|
||||
|
|
|
@ -1727,13 +1727,14 @@ public class SystemView extends TreeViewer implements ISystemTree,
|
|||
//job.setUser(true);
|
||||
job.schedule();
|
||||
Display display = Display.getCurrent();
|
||||
try {
|
||||
while (job.getResult() == null) {
|
||||
while (display!=null && display.readAndDispatch()) {}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
} catch(InterruptedException e) {}
|
||||
|
||||
try {
|
||||
while (job.getResult() == null) {
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
} catch(InterruptedException e) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -211,7 +211,7 @@ public abstract class SystemRemoteResourceDialog extends SystemPromptDialog
|
|||
{
|
||||
if (getOutputObject() instanceof Object[])
|
||||
return (Object[])getOutputObject();
|
||||
else if (getOutputObject() instanceof Object)
|
||||
else if (getOutputObject() != null)
|
||||
return new Object[] {getOutputObject()};
|
||||
else
|
||||
return null;
|
||||
|
|
|
@ -44,8 +44,9 @@ public class SystemRenameTableRow extends SystemDeleteTableRow
|
|||
super(element,rowNbr);
|
||||
this.newName = getName();
|
||||
this.inputValidator = getAdapter(element).getNameValidator(element);
|
||||
if ((inputValidator != null) && (inputValidator instanceof ISystemValidator))
|
||||
nameLengthLimit = ((ISystemValidator)inputValidator).getMaximumNameLength();
|
||||
if (inputValidator != null) {
|
||||
nameLengthLimit = inputValidator.getMaximumNameLength();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -124,8 +124,9 @@ public class SystemWizardDialog
|
|||
public void setHelp(String id)
|
||||
{
|
||||
helpId = id;
|
||||
if (wizard instanceof ISystemWizard)
|
||||
((ISystemWizard)wizard).setHelp(id);
|
||||
if (wizard != null) {
|
||||
wizard.setHelp(id);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -71,7 +71,7 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa
|
|||
public SystemConnectionSubSystemsPropertyPage()
|
||||
{
|
||||
super();
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
//RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
parentHelpId = RSEUIPlugin.HELPPREFIX + "pcon0000";
|
||||
}
|
||||
|
||||
|
@ -90,7 +90,7 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa
|
|||
protected Control createContentArea(Composite parent)
|
||||
{
|
||||
// prepare input data
|
||||
IHost conn = (IHost)getElement();
|
||||
//IHost conn = (IHost)getElement();
|
||||
|
||||
// create notebook
|
||||
Composite composite_prompts = new Composite(parent, SWT.NONE);
|
||||
|
@ -150,9 +150,9 @@ public class SystemConnectionSubSystemsPropertyPage extends SystemBasePropertyPa
|
|||
page.setContainer(getContainer());
|
||||
}
|
||||
|
||||
if ((page != null) && (page instanceof IWorkbenchPropertyPage))
|
||||
if (page != null)
|
||||
{
|
||||
((IWorkbenchPropertyPage)page).setElement((IAdaptable)ss);
|
||||
page.setElement((IAdaptable)ss);
|
||||
|
||||
if (page instanceof ISystemMessageLineTarget)
|
||||
((ISystemMessageLineTarget)page).setMessageLine(msgLine);
|
||||
|
|
|
@ -1727,13 +1727,14 @@ public class SystemView extends TreeViewer implements ISystemTree,
|
|||
//job.setUser(true);
|
||||
job.schedule();
|
||||
Display display = Display.getCurrent();
|
||||
try {
|
||||
while (job.getResult() == null) {
|
||||
while (display!=null && display.readAndDispatch()) {}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
} catch(InterruptedException e) {}
|
||||
|
||||
try {
|
||||
while (job.getResult() == null) {
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
} catch(InterruptedException e) {}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.ui.widgets;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.DisposeEvent;
|
||||
import org.eclipse.swt.events.DisposeListener;
|
||||
|
@ -57,7 +56,7 @@ public class InheritControl
|
|||
setLayout(new InheritControlLayout());
|
||||
//Class c = InheritControl.class;
|
||||
//String imagePath = "icons" + java.io.File.separatorChar;
|
||||
RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
//RSEUIPlugin sp = RSEUIPlugin.getDefault();
|
||||
try
|
||||
{
|
||||
//ImageData source = new ImageData(c.getResourceAsStream (imagePath+"local.gif"));
|
||||
|
@ -106,7 +105,7 @@ public class InheritControl
|
|||
{
|
||||
setLocal(!isLocal());
|
||||
notifyListeners(SWT.Selection, new Event());
|
||||
};
|
||||
}
|
||||
};
|
||||
button.addSelectionListener(selectionListener);
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ import org.eclipse.rse.filters.ISystemFilterPool;
|
|||
import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
||||
import org.eclipse.rse.filters.ISystemFilterPoolManagerProvider;
|
||||
import org.eclipse.rse.filters.ISystemFilterString;
|
||||
import org.eclipse.rse.filters.SystemFilterSimple;
|
||||
import org.eclipse.rse.internal.references.SystemReferencedObject;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemResources;
|
||||
|
|
|
@ -26,7 +26,6 @@ import org.eclipse.rse.filters.ISystemFilterPoolManager;
|
|||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.model.ISystemProfile;
|
||||
import org.eclipse.rse.model.ISystemProfileManager;
|
||||
import org.eclipse.rse.model.ISystemRegistry;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemResources;
|
||||
|
||||
|
|
|
@ -45,9 +45,7 @@ import org.eclipse.rse.core.subsystems.util.ISubSystemConfigurationAdapter;
|
|||
import org.eclipse.rse.filters.ISystemFilter;
|
||||
import org.eclipse.rse.filters.ISystemFilterPoolReferenceManager;
|
||||
import org.eclipse.rse.filters.ISystemFilterReference;
|
||||
import org.eclipse.rse.internal.persistence.RSEPersistenceManager;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.model.ISubSystemConfigurationCategories;
|
||||
import org.eclipse.rse.model.ISystemContainer;
|
||||
import org.eclipse.rse.model.ISystemHostPool;
|
||||
import org.eclipse.rse.model.ISystemModelChangeEvent;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
package org.eclipse.rse.persistence.dom;
|
||||
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
import org.eclipse.rse.internal.persistence.SaveRSEDOMJob;
|
||||
import org.eclipse.rse.model.ISystemProfile;
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,8 +22,8 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.resources.IFolder;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject;
|
||||
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
|
||||
package org.eclipse.rse.internal.references;
|
||||
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
|
||||
import org.eclipse.rse.core.references.IRSEBaseReferencedObject;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferenceManager;
|
||||
import org.eclipse.rse.core.references.IRSEBasePersistableReferencedObject;
|
||||
import org.eclipse.rse.core.references.IRSEPersistableReferencingObject;
|
||||
|
||||
/**
|
||||
|
@ -54,7 +53,7 @@ public abstract class SystemPersistableReferencingObject extends SystemReferenci
|
|||
* @see org.eclipse.rse.core.references.IRSEBasePersistableReferencingObject#setReferencedObject(IRSEBasePersistableReferencedObject)
|
||||
*/
|
||||
public void setReferencedObject(IRSEBasePersistableReferencedObject obj) {
|
||||
getHelper().setReferencedObject((IRSEBaseReferencedObject) obj);
|
||||
getHelper().setReferencedObject(obj);
|
||||
setReferencedObjectName(obj.getReferenceName());
|
||||
}
|
||||
|
||||
|
|
|
@ -2097,17 +2097,22 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
|
||||
if (synch)
|
||||
{
|
||||
while (!job.hasStarted())
|
||||
{
|
||||
while (Display.getCurrent().readAndDispatch());
|
||||
if (!job.hasStarted()) Thread.sleep(200);
|
||||
}
|
||||
while (job.getResult() == null)
|
||||
{
|
||||
while (Display.getCurrent().readAndDispatch());
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
return job.getResult();
|
||||
Display display = Display.getCurrent();
|
||||
while (!job.hasStarted())
|
||||
{
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (!job.hasStarted()) Thread.sleep(200);
|
||||
}
|
||||
while (job.getResult() == null)
|
||||
{
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
return job.getResult();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2489,9 +2494,13 @@ public abstract class SubSystem extends RSEModelObject implements IAdaptable, IS
|
|||
//job.setUser(true);
|
||||
job.schedule();
|
||||
|
||||
Display display = Display.getCurrent();
|
||||
while (job.getResult() == null)
|
||||
{
|
||||
Display.getCurrent().readAndDispatch();
|
||||
while (display!=null && display.readAndDispatch()) {
|
||||
//Process everything on event queue
|
||||
}
|
||||
if (job.getResult() == null) Thread.sleep(200);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,6 @@ import org.eclipse.core.runtime.Platform;
|
|||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.jface.viewers.ISelection;
|
||||
import org.eclipse.jface.viewers.IStructuredSelection;
|
||||
import org.eclipse.jface.wizard.IWizard;
|
||||
import org.eclipse.rse.core.IRSESystemType;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.core.SystemPreferencesManager;
|
||||
|
@ -60,7 +59,6 @@ import org.eclipse.rse.model.SystemStartHere;
|
|||
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
|
||||
import org.eclipse.rse.ui.ISystemMessages;
|
||||
import org.eclipse.rse.ui.RSEUIPlugin;
|
||||
import org.eclipse.rse.ui.SystemMenuManager;
|
||||
import org.eclipse.rse.ui.SystemPropertyResources;
|
||||
import org.eclipse.rse.ui.SystemResources;
|
||||
import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
|
||||
|
@ -72,8 +70,8 @@ import org.eclipse.rse.ui.validators.ISystemValidator;
|
|||
import org.eclipse.rse.ui.validators.ValidatorPortInput;
|
||||
import org.eclipse.rse.ui.validators.ValidatorSpecialChar;
|
||||
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
||||
import org.eclipse.rse.ui.widgets.RemoteServerLauncherForm;
|
||||
import org.eclipse.rse.ui.widgets.IServerLauncherForm;
|
||||
import org.eclipse.rse.ui.widgets.RemoteServerLauncherForm;
|
||||
import org.eclipse.rse.ui.wizards.ISubSystemPropertiesWizardPage;
|
||||
import org.eclipse.rse.ui.wizards.ISystemNewConnectionWizardPage;
|
||||
import org.eclipse.swt.graphics.Image;
|
||||
|
|
|
@ -27,7 +27,6 @@ import org.eclipse.rse.filters.ISystemFilterPool;
|
|||
import org.eclipse.rse.filters.ISystemFilterPoolReference;
|
||||
import org.eclipse.rse.filters.ISystemFilterReference;
|
||||
import org.eclipse.rse.filters.ISystemFilterString;
|
||||
import org.eclipse.rse.model.IHost;
|
||||
import org.eclipse.rse.ui.SystemMenuManager;
|
||||
import org.eclipse.rse.ui.filters.actions.SystemNewFilterAction;
|
||||
import org.eclipse.rse.ui.messages.ISystemMessageLine;
|
||||
|
|
|
@ -191,7 +191,7 @@ public class SystemPopupMenuActionContributor extends PluginActionBuilder implem
|
|||
* Contributes actions applicable for the current selection.
|
||||
*/
|
||||
public boolean contributeObjectActions(IWorkbenchPart part, SystemMenuManager menu, ISelectionProvider selProv, List actionIdOverrides) {
|
||||
return contributeObjectActions(part, (IMenuManager) menu.getMenuManager(), selProv, actionIdOverrides);
|
||||
return contributeObjectActions(part, menu.getMenuManager(), selProv, actionIdOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -248,7 +248,7 @@ public class SystemPopupMenuActionContributor extends PluginActionBuilder implem
|
|||
* Contributes menus applicable for the current selection.
|
||||
*/
|
||||
public boolean contributeObjectMenus(SystemMenuManager menu, ISelectionProvider selProv) {
|
||||
return contributeObjectMenus((IMenuManager) menu.getMenuManager(), selProv);
|
||||
return contributeObjectMenus(menu.getMenuManager(), selProv);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue