mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 18:05:33 +02:00
[222386]fix: [regression] Properties of connection or subsystem are no longer available due to unhandled Event loop exception in user actions
This commit is contained in:
parent
10409b3467
commit
ba4ddf9e43
5 changed files with 13 additions and 34 deletions
|
@ -21,6 +21,7 @@ Require-Bundle: org.eclipse.core.resources,
|
||||||
Bundle-ActivationPolicy: lazy
|
Bundle-ActivationPolicy: lazy
|
||||||
Eclipse-LazyStart: true
|
Eclipse-LazyStart: true
|
||||||
Export-Package: org.eclipse.rse.useractions.ui.compile,
|
Export-Package: org.eclipse.rse.useractions.ui.compile,
|
||||||
|
org.eclipse.rse.useractions.ui.uda,
|
||||||
org.eclipse.rse.useractions.files.compile,
|
org.eclipse.rse.useractions.files.compile,
|
||||||
org.eclipse.rse.useractions.files.uda,
|
org.eclipse.rse.useractions.files.uda,
|
||||||
org.eclipse.rse.internal.useractions.ui.compile,
|
org.eclipse.rse.internal.useractions.ui.compile,
|
||||||
|
|
|
@ -20,6 +20,3 @@ providerName = Eclipse.org
|
||||||
PropertyPage.TeamViewUserActionNode = User Action Information
|
PropertyPage.TeamViewUserActionNode = User Action Information
|
||||||
PropertyPage.TeamViewCompileTypeNode = Compile Type Information
|
PropertyPage.TeamViewCompileTypeNode = Compile Type Information
|
||||||
PropertyPage.TeamViewCompileCommandNode = Compile Command Information
|
PropertyPage.TeamViewCompileCommandNode = Compile Command Information
|
||||||
|
|
||||||
DynamicLabel.CompileActionNode = Compile
|
|
||||||
DynamicLabel.UserActionNode = User Action
|
|
||||||
|
|
|
@ -39,31 +39,5 @@
|
||||||
</page>
|
</page>
|
||||||
</extension>
|
</extension>
|
||||||
|
|
||||||
<extension point="org.eclipse.ui.menus">
|
|
||||||
<menuContribution locationURI="popup:org.eclipse.rse.ui.view.systemView">
|
|
||||||
<menu id="org.eclipse.rse.ui.useractions.compile.menu"
|
|
||||||
label="%DynamicLabel.CompileActionNode"
|
|
||||||
mnemonic="useractions.dynamiccompilemenu.mnemonic">
|
|
||||||
<dynamic class="org.eclipse.rse.internal.useractions.ui.SystemDynamicCompileMenu"
|
|
||||||
id="org.eclipse.ui.rse.ui.views.dynamiccompilemenu">
|
|
||||||
</dynamic>
|
|
||||||
<!--
|
|
||||||
<visibleWhen>
|
|
||||||
<instanceof
|
|
||||||
value="org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile"/>
|
|
||||||
</visibleWhen>
|
|
||||||
-->
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
<menu id="org.eclipse.rse.ui.useractions.useraction.menu"
|
|
||||||
label="%DynamicLabel.UserActionNode"
|
|
||||||
mnemonic="useractions.dynamicuseractionmenu.mnemonic">
|
|
||||||
<dynamic class="org.eclipse.rse.internal.useractions.ui.SystemDynamicUserActionMenu"
|
|
||||||
id="org.eclipse.ui.rse.ui.views.dynamicuseractionmenu">
|
|
||||||
</dynamic>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
</menuContribution>
|
|
||||||
</extension>
|
|
||||||
|
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.rse.internal.useractions.ui;
|
package org.eclipse.rse.useractions.ui.compile;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -16,12 +16,11 @@ 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;
|
||||||
import org.eclipse.rse.useractions.files.compile.ISystemCompileManagerAdapter;
|
import org.eclipse.rse.useractions.files.compile.ISystemCompileManagerAdapter;
|
||||||
import org.eclipse.rse.useractions.ui.compile.SystemCompileAction;
|
|
||||||
import org.eclipse.rse.useractions.ui.compile.SystemWorkWithCompileCommandsAction;
|
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.IWorkbenchWindow;
|
import org.eclipse.ui.IWorkbenchWindow;
|
||||||
import org.eclipse.ui.PlatformUI;
|
import org.eclipse.ui.PlatformUI;
|
||||||
|
@ -54,7 +53,10 @@ 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)))
|
||||||
|
{
|
||||||
|
return new IContributionItem[0];
|
||||||
|
}
|
||||||
Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
|
Shell shell = SystemBasePlugin.getActiveWorkbenchShell();
|
||||||
|
|
||||||
for (int idx = 0; idx < activeProfiles.length; idx++)
|
for (int idx = 0; idx < activeProfiles.length; idx++)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.eclipse.rse.internal.useractions.ui;
|
package org.eclipse.rse.useractions.ui.uda;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
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;
|
||||||
|
@ -51,6 +52,10 @@ 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)))
|
||||||
|
{
|
||||||
|
return new IContributionItem[0];
|
||||||
|
}
|
||||||
ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
|
ISystemRemoteElementAdapter rmtAdapter = SystemAdapterHelpers.getRemoteAdapter(firstSelection);
|
||||||
|
|
||||||
ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
|
ISubSystem subsystem = rmtAdapter.getSubSystem(firstSelection);
|
Loading…
Add table
Reference in a new issue