mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-09 18:15:23 +02:00
[cleanup] format and javadoc
This commit is contained in:
parent
0038d5ee15
commit
e8c6ee58df
1 changed files with 41 additions and 46 deletions
|
@ -15,6 +15,7 @@
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.ui.actions;
|
package org.eclipse.rse.ui.actions;
|
||||||
|
|
||||||
import org.eclipse.jface.wizard.IWizard;
|
import org.eclipse.jface.wizard.IWizard;
|
||||||
import org.eclipse.rse.core.model.ISystemProfile;
|
import org.eclipse.rse.core.model.ISystemProfile;
|
||||||
import org.eclipse.rse.model.SystemStartHere;
|
import org.eclipse.rse.model.SystemStartHere;
|
||||||
|
@ -26,54 +27,51 @@ import org.eclipse.rse.ui.view.team.SystemTeamView;
|
||||||
import org.eclipse.rse.ui.wizards.SystemNewProfileWizard;
|
import org.eclipse.rse.ui.wizards.SystemNewProfileWizard;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The action that displays the New Profile wizard
|
* The action that displays the New Profile wizard
|
||||||
*/
|
*/
|
||||||
public class SystemNewProfileAction extends SystemBaseWizardAction
|
public class SystemNewProfileAction extends SystemBaseWizardAction {
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for SystemNewProfileAction for "New -> Profile..."
|
* Constructor for SystemNewProfileAction for "New -> Profile..."
|
||||||
|
* @param parent the parent shell in which this action executes
|
||||||
*/
|
*/
|
||||||
public SystemNewProfileAction(Shell parent)
|
public SystemNewProfileAction(Shell parent) {
|
||||||
{
|
|
||||||
super(SystemResources.ACTION_NEWPROFILE_LABEL, SystemResources.ACTION_NEWPROFILE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
|
super(SystemResources.ACTION_NEWPROFILE_LABEL, SystemResources.ACTION_NEWPROFILE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
|
||||||
setSelectionSensitive(false);
|
setSelectionSensitive(false);
|
||||||
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
|
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
|
||||||
setHelp(RSEUIPlugin.HELPPREFIX+"actn0003"); //$NON-NLS-1$
|
setHelp(RSEUIPlugin.HELPPREFIX + "actn0003"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for SystemNewProfileAction where you can choose between "New profile..." and "New -> Profile"
|
* Constructor for SystemNewProfileAction where you can choose between "New profile..." and "New -> Profile"
|
||||||
|
* @param parent the parent shell in which this action executes
|
||||||
|
* @param cascading if true then use the "New -> Profile" style, else use the "New profile..." style.
|
||||||
*/
|
*/
|
||||||
public SystemNewProfileAction(Shell parent, boolean cascading)
|
public SystemNewProfileAction(Shell parent, boolean cascading) {
|
||||||
{
|
super(cascading ? SystemResources.ACTION_NEWPROFILE_LABEL : SystemResources.ACTION_NEW_PROFILE_LABEL, cascading ? SystemResources.ACTION_NEWPROFILE_TOOLTIP
|
||||||
super(cascading ? SystemResources.ACTION_NEWPROFILE_LABEL : SystemResources.ACTION_NEW_PROFILE_LABEL,
|
: SystemResources.ACTION_NEW_PROFILE_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
|
||||||
cascading ? SystemResources.ACTION_NEWPROFILE_TOOLTIP : SystemResources.ACTION_NEW_PROFILE_TOOLTIP,
|
|
||||||
RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_NEWPROFILE_ID), parent);
|
|
||||||
setSelectionSensitive(false);
|
setSelectionSensitive(false);
|
||||||
if (cascading)
|
if (cascading)
|
||||||
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
|
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW);
|
||||||
else
|
else
|
||||||
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING);
|
setContextMenuGroup(ISystemContextMenuConstants.GROUP_NEW_NONCASCADING);
|
||||||
setHelp(RSEUIPlugin.HELPPREFIX+"actn0003"); //$NON-NLS-1$
|
setHelp(RSEUIPlugin.HELPPREFIX + "actn0003"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Refresh the enabled state
|
* Refresh the enabled state
|
||||||
*/
|
*/
|
||||||
public void refreshEnablement()
|
public void refreshEnablement() {
|
||||||
{
|
|
||||||
setEnabled(isEnabled());
|
setEnabled(isEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* We disable this action if it is a new workspace and the user has yet to create
|
* We disable this action if it is a new workspace and the user has yet to create
|
||||||
* their first connection, and hence rename their default profile.
|
* their first connection, and hence rename their default profile.
|
||||||
|
* @return true if the action is enabled
|
||||||
*/
|
*/
|
||||||
public boolean isEnabled()
|
public boolean isEnabled() {
|
||||||
{
|
|
||||||
// defect 43428...
|
// defect 43428...
|
||||||
ISystemProfile defaultProfile = SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
|
ISystemProfile defaultProfile = SystemStartHere.getSystemProfileManager().getDefaultPrivateSystemProfile();
|
||||||
if (defaultProfile != null)
|
if (defaultProfile != null)
|
||||||
|
@ -81,14 +79,11 @@ public class SystemNewProfileAction extends SystemBaseWizardAction
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The default processing for the run method calls createDialog, which
|
* @return a new Wizard object for creating a profile.
|
||||||
* in turn calls this method to return an instance of our wizard.
|
|
||||||
* <p>
|
|
||||||
* Our default implementation is to call SystemNewProfileWizard.
|
|
||||||
*/
|
*/
|
||||||
protected IWizard createWizard()
|
protected IWizard createWizard() {
|
||||||
{
|
|
||||||
return new SystemNewProfileWizard();
|
return new SystemNewProfileWizard();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,12 +95,12 @@ public class SystemNewProfileAction extends SystemBaseWizardAction
|
||||||
* output instance variables from the completed wizard, which is passed
|
* output instance variables from the completed wizard, which is passed
|
||||||
* as a parameter. This is only called after successful completion of the
|
* as a parameter. This is only called after successful completion of the
|
||||||
* wizard.
|
* wizard.
|
||||||
|
* @param wizard the wizard that was just completed
|
||||||
*/
|
*/
|
||||||
protected void postProcessWizard(IWizard wizard)
|
protected void postProcessWizard(IWizard wizard) {
|
||||||
{
|
if (getViewer() instanceof SystemTeamView) {
|
||||||
if (getViewer() instanceof SystemTeamView)
|
|
||||||
{
|
|
||||||
getViewer().refresh();
|
getViewer().refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue