1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

[239805] User Action/Compile menu's shouldn't be tied to IRemoteFile

This commit is contained in:
Kevin Doyle 2008-07-07 14:21:40 +00:00
parent f567af1815
commit 9afbd5020f
2 changed files with 4 additions and 4 deletions

View file

@ -6,6 +6,7 @@
*
* Contributors:
* Xuan Chen (IBM) - [222470] initial contribution.
* Kevin Doyle (IBM) - [239805] User Action/Compile menu's shouldn't be tied to IRemoteFile
*********************************************************************************/
package org.eclipse.rse.internal.useractions.api.ui.compile;
@ -28,7 +29,6 @@ import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileManager;
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileType;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
@ -73,7 +73,7 @@ public class SystemDynamicCompileMenu extends CompoundContributionItem
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
ISelection selection = window.getSelectionService().getSelection();
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
if (firstSelection == null || (!(firstSelection instanceof IRemoteFile)))
if (firstSelection == null)
{
return new IContributionItem[0];
}

View file

@ -6,6 +6,7 @@
*
* Contributors:
* Xuan Chen (IBM) - [222470] initial contribution.
* Kevin Doyle (IBM) - [239805] User Action/Compile menu's shouldn't be tied to IRemoteFile
*********************************************************************************/
package org.eclipse.rse.internal.useractions.api.ui.uda;
@ -27,7 +28,6 @@ import org.eclipse.rse.internal.useractions.files.uda.UDActionSubsystemUniversal
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
import org.eclipse.rse.internal.useractions.ui.uda.actions.SystemWorkWithUDAsAction;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
@ -72,7 +72,7 @@ public class SystemDynamicUserActionMenu extends CompoundContributionItem
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
ISelection selection = window.getSelectionService().getSelection();
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
if (firstSelection == null || (!(firstSelection instanceof IRemoteFile)))
if (firstSelection == null)
{
return new IContributionItem[0];
}