mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-29 19:23:38 +02:00
[225617] fix: [useraction][api] Remove Team view support inside user action.
This commit is contained in:
parent
b9ec436896
commit
3474322cef
2 changed files with 3 additions and 16 deletions
|
@ -11,12 +11,12 @@ package org.eclipse.rse.internal.useractions.ui.uda.actions;
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
|
* David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
|
||||||
* API to the user actions plugin
|
* API to the user actions plugin
|
||||||
|
* Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
import org.eclipse.jface.dialogs.Dialog;
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
|
|
||||||
import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
|
import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
|
||||||
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;
|
||||||
|
@ -112,11 +112,6 @@ public class SystemWorkWithFileTypesAction extends SystemBaseDialogAction {
|
||||||
protected Dialog createDialog(Shell parent) {
|
protected Dialog createDialog(Shell parent) {
|
||||||
if ((subsystem == null) && (getFirstSelection() instanceof ISubSystem))
|
if ((subsystem == null) && (getFirstSelection() instanceof ISubSystem))
|
||||||
subsystem = (ISubSystem) getFirstSelection();
|
subsystem = (ISubSystem) getFirstSelection();
|
||||||
else if (getFirstSelection() instanceof SystemTeamViewSubSystemConfigurationNode) {
|
|
||||||
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode) getFirstSelection();
|
|
||||||
subsystemFactory = ssfNode.getSubSystemConfiguration();
|
|
||||||
profile = ssfNode.getProfile();
|
|
||||||
}
|
|
||||||
if (subsystem != null)
|
if (subsystem != null)
|
||||||
ourDlg = new SystemWorkWithUDTypeDialog(parent, subsystem, udaActionSubsystem);
|
ourDlg = new SystemWorkWithUDTypeDialog(parent, subsystem, udaActionSubsystem);
|
||||||
else
|
else
|
||||||
|
|
|
@ -11,6 +11,7 @@ package org.eclipse.rse.internal.useractions.ui.uda.actions;
|
||||||
* IBM Corporation - initial API and implementation
|
* IBM Corporation - initial API and implementation
|
||||||
* David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
|
* David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
|
||||||
* API to the user actions plugin
|
* API to the user actions plugin
|
||||||
|
* Xuan Chen (IBM) - [225617] [useraction][api] Remove Team view support inside user action.
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
//import java.util.Iterator;
|
//import java.util.Iterator;
|
||||||
import org.eclipse.jface.dialogs.Dialog;
|
import org.eclipse.jface.dialogs.Dialog;
|
||||||
|
@ -18,7 +19,6 @@ import org.eclipse.jface.viewers.IStructuredSelection;
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
import org.eclipse.rse.internal.ui.view.team.SystemTeamViewSubSystemConfigurationNode;
|
|
||||||
import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
|
import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
|
||||||
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;
|
||||||
|
@ -129,15 +129,7 @@ public class SystemWorkWithUDAsAction extends SystemBaseDialogAction {
|
||||||
* Our opportunity to verify we are allowed for this selected type.
|
* Our opportunity to verify we are allowed for this selected type.
|
||||||
*/
|
*/
|
||||||
public boolean updateSelection(IStructuredSelection selection) {
|
public boolean updateSelection(IStructuredSelection selection) {
|
||||||
boolean enable = true;
|
return true;
|
||||||
Object firstSelection = selection.getFirstElement();
|
|
||||||
if (firstSelection instanceof SystemTeamViewSubSystemConfigurationNode) {
|
|
||||||
SystemTeamViewSubSystemConfigurationNode ssfNode = (SystemTeamViewSubSystemConfigurationNode) firstSelection;
|
|
||||||
subsystemFactory = ssfNode.getSubSystemConfiguration();
|
|
||||||
profile = ssfNode.getProfile();
|
|
||||||
enable = profile.isActive();
|
|
||||||
}
|
|
||||||
return enable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue