mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 04:55:22 +02:00
[239805] User Action/Compile menu's shouldn't be tied to IRemoteFile
This commit is contained in:
parent
f567af1815
commit
9afbd5020f
2 changed files with 4 additions and 4 deletions
|
@ -6,6 +6,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Xuan Chen (IBM) - [222470] initial contribution.
|
* 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;
|
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.SystemCompileManager;
|
||||||
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
|
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileProfile;
|
||||||
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileType;
|
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.SystemBasePlugin;
|
||||||
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
||||||
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
||||||
|
@ -73,7 +73,7 @@ public class SystemDynamicCompileMenu extends CompoundContributionItem
|
||||||
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
ISelection selection = window.getSelectionService().getSelection();
|
ISelection selection = window.getSelectionService().getSelection();
|
||||||
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
|
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
|
||||||
if (firstSelection == null || (!(firstSelection instanceof IRemoteFile)))
|
if (firstSelection == null)
|
||||||
{
|
{
|
||||||
return new IContributionItem[0];
|
return new IContributionItem[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Xuan Chen (IBM) - [222470] initial contribution.
|
* 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;
|
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.SystemUDAResources;
|
||||||
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
|
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionSubsystem;
|
||||||
import org.eclipse.rse.internal.useractions.ui.uda.actions.SystemWorkWithUDAsAction;
|
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.SystemBasePlugin;
|
||||||
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
|
||||||
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
import org.eclipse.rse.ui.view.SystemAdapterHelpers;
|
||||||
|
@ -72,7 +72,7 @@ public class SystemDynamicUserActionMenu extends CompoundContributionItem
|
||||||
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
|
||||||
ISelection selection = window.getSelectionService().getSelection();
|
ISelection selection = window.getSelectionService().getSelection();
|
||||||
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
|
Object firstSelection = ((IStructuredSelection) selection).getFirstElement();
|
||||||
if (firstSelection == null || (!(firstSelection instanceof IRemoteFile)))
|
if (firstSelection == null)
|
||||||
{
|
{
|
||||||
return new IContributionItem[0];
|
return new IContributionItem[0];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue