diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java
index ce30809d38e..e9c11ab00fd 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java
@@ -17,6 +17,8 @@
* removed unneeded first time logic and flags
* renamed createRemoteSystemsProjectInternal to ensureRemoteSystemsProject
* made ensureRemoteSystemsProject private instead of protected
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.core;
@@ -36,7 +38,6 @@ import org.eclipse.rse.core.filters.ISystemFilterPool;
import org.eclipse.rse.core.filters.ISystemFilterPoolManager;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemHostPool;
-import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.core.RemoteSystemsProject;
import org.eclipse.rse.internal.core.SystemResourceConstants;
@@ -277,120 +278,6 @@ public class SystemResourceManager implements SystemResourceConstants
return getResourceHelpers().getOrCreateFolder(getRemoteSystemsProject(),profileName);
}
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * USER ACTIONS SUBTREE FOLDER METHODS...
- * ======================================
- * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
- * | |
- * | |
- * | .--- UserActions (folder) - getUserActionsFolder(SystemProfile/"team")
- * | |
- * | .--- SubSystemConfigurationID1 (folder) - getUserActionsFolder(SystemProfile/"team", SubSystemConfiguration)
- * | | .--- actions.xml (file)
- * | .--- SubSystemConfigurationID2 (folder)
- * | .--- actions.xml (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
- // ---------------------------------------------------
- // GET USER DEFINED ACTIONS ROOT FOLDER PER PROFILE...
- // ---------------------------------------------------
- /**
- * Get user defined actions root folder given a system profile name
- */
- protected static IFolder getUserActionsFolder(String profileName)
- {
- return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_USERACTIONS_FOLDER_NAME);
- }
- /**
- * Get user defined actions root folder given a system profile object and subsystem factory
- */
- public static IFolder getUserActionsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
- {
- return getUserActionsFolder(profile.getName(),ssFactory);
- }
- /**
- * Get user defined actions root folder given a system profile name and subsystem factory
- */
- public static IFolder getUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
- }
- /**
- * Test for existence of user defined actions root folder given a system profile name and subsystem factory
- */
- public static boolean testUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return (getResourceHelpers().getFolder(parentFolder, folderName).exists()); // Do NOT create it.
- }
-
- /**
- * Get user defined actions root folder given a system profile name and subsystem factory Id.
- * This is a special-needs method provided for the Import action processing,
- * when a subsystem instance is not available.
- */
- public static IFolder getUserActionsFolder( String profileName, String factoryId)
- {
- IFolder parentFolder = getUserActionsFolder(profileName);
- return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
- }
-
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * COMPILE COMMAND SUBTREE FOLDER METHODS...
- * ======================================
- * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
- * | |
- * | |
- * | .--- CompileCommands (folder) - getCompileCommandsFolder(SystemProfile/"team")
- * | |
- * | .--- SubSystemConfigurationID1 (folder) - getCompileCommandsFolder(SystemProfile/"team", SubSystemConfiguration)
- * | | .--- compileCommands.xml (file)
- * | .--- SubSystemConfigurationID2 (folder)
- * | .--- compileCommands.xml (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
- // ---------------------------------------------------
- // GET COMPILE COMMANDS ROOT FOLDER PER PROFILE...
- // ---------------------------------------------------
- /**
- * Get compile commands root folder given a system profile name
- */
- protected static IFolder getCompileCommandsFolder(String profileName)
- {
- return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_COMPILECOMMANDS_FOLDER_NAME);
- }
- /**
- * Get compile commands root folder given a system profile object and subsystem factory
- */
- public static IFolder getCompileCommandsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
- {
- return getCompileCommandsFolder(profile.getName(),ssFactory);
- }
- /**
- * Get compile commands root folder given a system profile name and subsystem factory
- */
- public static IFolder getCompileCommandsFolder(String profileName, ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getCompileCommandsFolder(profileName);
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
- }
-
- /**
- * Get compile commands root folder given a system profile name and subsystem factory Id.
- * This is a special-needs method provided for the Import action processing,
- * when a subsystem instance is not available.
- */
- public static IFolder getCompileCommandsFolder( String profileName, String factoryId)
- {
- IFolder parentFolder = getCompileCommandsFolder(profileName);
- return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
- }
// -------------------
// FOLDER ACTIONS...
@@ -534,38 +421,4 @@ public class SystemResourceManager implements SystemResourceConstants
return SystemResourceHelpers.testIfResourceInUse(resource);
}
- /*
- * --------------------------------------------------------------------------------------------------------------------------------
- * TYPE FILTERS SUBTREE FOLDER METHODS...
- * ======================================
- * .--- TypeFilters (folder) - getTypeFiltersFolder()
- * .--- SubSystemConfigurationID1 (folder) - getTypeFiltersFolder(SubSystemConfiguration)
- * | .--- typefilters.xmi (file)
- * --------------------------------------------------------------------------------------------------------------------------------
- */
-
- /**
- * Get the typeFilters root folder
- */
- public static IFolder getTypeFiltersFolder()
- {
- return getResourceHelpers().getFolder(getRemoteSystemsProject(),RESOURCE_TYPE_FILTERS_FOLDER_NAME);
- }
- /**
- * Get the typeFilters sub-folder per subsystem factory object
- */
- public static IFolder getTypeFiltersFolder(ISubSystemConfiguration ssFactory)
- {
- IFolder parentFolder = getTypeFiltersFolder();
- String folderName = getFolderName(ssFactory);
- return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // DO create it.
- }
- /**
- * Get the typeFilters sub-folder per subsystem factory id
- */
- public static IFolder getTypeFiltersFolder(String ssFactoryId)
- {
- IFolder parentFolder = getTypeFiltersFolder();
- return getResourceHelpers().getOrCreateFolder(parentFolder, ssFactoryId); // DO create it.
- }
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java
index 60baff8cf67..5b5a79421a3 100644
--- a/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java
+++ b/rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java
@@ -12,6 +12,7 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * David Dykstal (IBM) - [186589] Move User Actions events to the user actions plugin
********************************************************************************/
package org.eclipse.rse.core.events;
@@ -84,18 +85,18 @@ public interface ISystemModelChangeEvents {
* Resource Type: filter
*/
public static final int SYSTEM_RESOURCETYPE_FILTER = 32;
- /**
- * Resource Type: user action
- */
- public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
- /**
- * Resource Type: named type, which are used in user actions
- */
- public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
- /**
- * Resource Type: compile command
- */
- public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
+// /**
+// * Resource Type: user action
+// */
+// public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
+// /**
+// * Resource Type: named type, which are used in user actions
+// */
+// public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
+// /**
+// * Resource Type: compile command
+// */
+// public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
/**
* Resource Type: ALL. Used with SYSTEM_RESOURCE_ALL_RELOADED
*/
diff --git a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
index de834d8eccf..8edbbf9c877 100644
--- a/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
+++ b/rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation and others. All rights reserved.
+ * Copyright (c) 2002, 2007 IBM Corporation and others. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -12,6 +12,8 @@
*
* Contributors:
* Martin Oberhuber (Wind River) - fix 158765: content assist miss disables enter
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.shells.ui.view;
@@ -44,7 +46,6 @@ import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUserActionCommand;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.custom.VerifyKeyListener;
@@ -105,10 +106,11 @@ public class SystemCommandEditor extends SourceViewer
}
private void init(int columnSpan, SourceViewerConfiguration sourceViewerConfiguration, String cmd)
{
- if (cmdValidator == null)
- {
- setCommandValidator(new ValidatorUserActionCommand());
- }
+ // TODO (dwd) will need to have an editor callback on instantiation to add validators instead of assuming one
+// if (cmdValidator == null)
+// {
+// setCommandValidator(new ValidatorUserActionCommand());
+// }
IDocument document = new Document();
configure(sourceViewerConfiguration);
setEditable(true);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java
index f7ecd0c9b58..10a7008d3b0 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java
@@ -14,6 +14,8 @@
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* David Dykstal (IBM) - [189858] Removed the remote systems project in the team view
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.internal.ui.view.team;
@@ -932,11 +934,11 @@ public class SystemTeamViewPart
// treeViewer.setSelection(new StructuredSelection(action));
// }
// }
- else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE)
- {
- if (testMode)
- System.out.println("Named Type change event of type: " + event.getEventType()); //$NON-NLS-1$
- }
+// else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE)
+// {
+// if (testMode)
+// System.out.println("Named Type change event of type: " + event.getEventType()); //$NON-NLS-1$
+// }
// compile actions separate now
// else if (resourceType == ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD)
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
index 8aea4922fea..9dd6314ac37 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java
@@ -14,6 +14,8 @@
* Michael Berger (IBM) - 146339 Added refresh action graphic.
* Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
* Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.ui;
@@ -148,10 +150,6 @@ public interface ISystemIconConstants
// OTHER ACTION ICONS...
public static final String ICON_ACTIONS_DIR = "full/elcl16/"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_COMPILE_ROOT = "compile"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_COMPILE = ICON_ACTIONS_DIR + ICON_SYSTEM_COMPILE_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_COMPILE_ID = PREFIX+ICON_SYSTEM_COMPILE_ROOT+ICON_SUFFIX;
-
public static final String ICON_SYSTEM_LOCK_ROOT = "lock"; //$NON-NLS-1$
public static final String ICON_SYSTEM_LOCK = ICON_ACTIONS_DIR + ICON_SYSTEM_LOCK_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_LOCK_ID = PREFIX+ICON_SYSTEM_LOCK_ROOT+ICON_SUFFIX;
@@ -225,18 +223,6 @@ public interface ISystemIconConstants
public static final String ICON_SYSTEM_WORKWITHFILTERPOOLS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHFILTERPOOLS_ROOT+ICON_EXT;
public static final String ICON_SYSTEM_WORKWITHFILTERPOOLS_ID = PREFIX+ICON_SYSTEM_WORKWITHFILTERPOOLS_ROOT+ICON_SUFFIX;
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT = "workwithuseractions"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHUSERACTIONS_ID = PREFIX+ICON_SYSTEM_WORKWITHUSERACTIONS_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT = "workwithnamedtypes"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHNAMEDTYPES_ID = PREFIX+ICON_SYSTEM_WORKWITHNAMEDTYPES_ROOT+ICON_SUFFIX;
-
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT = "workwithcompilecmds"; //$NON-NLS-1$
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS = ICON_ACTIONS_DIR + ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT+ICON_EXT;
- public static final String ICON_SYSTEM_WORKWITHCOMPILECMDS_ID = PREFIX+ICON_SYSTEM_WORKWITHCOMPILECMDS_ROOT+ICON_SUFFIX;
-
public static final String ICON_SYSTEM_SHOW_TABLE_ROOT = "systemshowintable"; //$NON-NLS-1$
public static final String ICON_SYSTEM_SHOW_TABLE = ICON_ACTIONS_DIR + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_EXT;
public static final String ICON_SYSTEM_SHOW_TABLE_ID = PREFIX + ICON_SYSTEM_SHOW_TABLE_ROOT + ICON_SUFFIX;
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java
index 3af2c37809c..1cc63bf1c8a 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2000, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2000, 2007 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -11,7 +11,8 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.ui;
@@ -195,33 +196,10 @@ public interface ISystemMessages
public static final String MSG_SAVING_PROGRESS = "RSEG1119"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDANAME_EMPTY = "RSEG1180"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDANAME_NOTUNIQUE= "RSEG1181"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDANAME_NOTVALID = "RSEG1182"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDACMT_EMPTY = "RSEG1183"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDACMT_NOTVALID = "RSEG1184"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDACMD_EMPTY = "RSEG1185"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDACMD_NOTVALID = "RSEG1186"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDTNAME_EMPTY = "RSEG1187"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTNAME_NOTUNIQUE= "RSEG1188"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTNAME_NOTVALID = "RSEG1189"; //$NON-NLS-1$
-
- public static final String MSG_VALIDATE_UDTTYPES_EMPTY = "RSEG1190"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_UDTTYPES_NOTVALID = "RSEG1191"; //$NON-NLS-1$
-
public static final String MSG_VALIDATE_SRCTYPE_EMPTY = "RSEG1192"; //$NON-NLS-1$
public static final String MSG_VALIDATE_SRCTYPE_NOTVALID = "RSEG1193"; //$NON-NLS-1$
public static final String MSG_VALIDATE_SRCTYPE_NOTUNIQUE= "RSEG1194"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILELABEL_EMPTY = "RSEG1195"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILELABEL_NOTUNIQUE= "RSEG1196"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILELABEL_NOTVALID = "RSEG1197"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILESTRING_EMPTY = "RSEG1198"; //$NON-NLS-1$
- public static final String MSG_VALIDATE_COMPILESTRING_NOTVALID = "RSEG1199"; //$NON-NLS-1$
-
public static final String MSG_VALIDATE_ARCHIVE_NAME = "RSEG1120"; //$NON-NLS-1$
@@ -242,15 +220,9 @@ public interface ISystemMessages
public static final String MSG_LOADING_PROFILE_SHOULDBE_ACTIVATED = "RSEG1068"; //$NON-NLS-1$
public static final String MSG_LOADING_PROFILE_SHOULDNOTBE_DEACTIVATED = "RSEG1069"; //$NON-NLS-1$
- public static final String MSG_UDA_LOAD_ERROR = "RSEG1140"; //$NON-NLS-1$
- public static final String MSG_UDA_ROOTTAG_ERROR = "RSEG1141"; //$NON-NLS-1$
-
public static final String MSG_HOSTNAME_NOTFOUND = "RSEG1220"; //$NON-NLS-1$
public static final String MSG_HOSTNAME_VERIFYING = "RSEG1221"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_DELETE_USERACTION = "RSEG1230"; //$NON-NLS-1$
- public static final String MSG_CONFIRM_DELETE_USERTYPE = "RSEG1231"; //$NON-NLS-1$
-
public static final String MSG_WIZARD_PAGE_ERROR = "RSEG1240"; //$NON-NLS-1$
// universal find files
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
index 1d5aaeb22fd..d85ee99374b 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
+++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java
@@ -24,6 +24,8 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [186779] Fix IRSESystemType.getAdapter()
* David Dykstal (IBM) - [189858] Delay the creation of the remote systems project
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
package org.eclipse.rse.ui;
@@ -313,8 +315,8 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
path+ISystemIconConstants.ICON_SYSTEM_RUN);
putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_STOP_ID,
path+ISystemIconConstants.ICON_SYSTEM_STOP);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID,
- path+ISystemIconConstants.ICON_SYSTEM_COMPILE);
+// putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID,
+// path+ISystemIconConstants.ICON_SYSTEM_COMPILE);
putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE_ID,
path+ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEACTIVE);
putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_MAKEPROFILEINACTIVE_ID,
@@ -330,12 +332,12 @@ public class RSEUIPlugin extends SystemBasePlugin implements ISystemMessageProvi
path+ISystemIconConstants.ICON_SYSTEM_SELECTFILTERPOOLS);
putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS_ID,
path+ISystemIconConstants.ICON_SYSTEM_WORKWITHFILTERPOOLS);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES);
- putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS_ID,
- path+ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS);
+// putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS_ID,
+// path+ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS);
+// putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES_ID,
+// path+ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES);
+// putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS_ID,
+// path+ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS);
putImageInRegistry(ISystemIconConstants.ICON_SYSTEM_REFRESH_ID,
path+ISystemIconConstants.ICON_SYSTEM_REFRESH);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java
deleted file mode 100644
index 787e88ed4dc..00000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's command
- */
-public class ValidatorUserActionCommand
- implements ISystemValidator
-{
- public static final int MAX_UDACMD_LENGTH = 512; // max command for an action
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserActionCommand()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMD_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDACMD_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDACMD_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- *
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- *
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java
deleted file mode 100644
index aaf335aeb2e..00000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's comment
- */
-public class ValidatorUserActionComment
- implements ISystemValidator
-{
- public static final int MAX_UDACMT_LENGTH = 256; // max comment for an action
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserActionComment()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDACMT_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- //currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDACMT_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDACMT_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- *
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- *
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java
deleted file mode 100644
index 89873b932b5..00000000000
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.ui.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
-
-
-/**
- * This class is used to verify a user defined action's comment
- */
-public class ValidatorUserTypeTypes
- implements ISystemValidator
-{
- public static final int MAX_UDTTYPES_LENGTH = 512;
-
- protected SystemMessage emptyMsg, invalidMsg, currentMessage;
-
- /**
- * Constructor to use when wanting to specify the "value required" error message,
- * but use the default for the "Value not valid" error message
- */
- public ValidatorUserTypeTypes()
- {
- setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID));
- }
-
- /**
- * Set the error messages, overriding the defaults
- */
- public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg)
- {
- this.emptyMsg = emptyMsg;
- this.invalidMsg = invalidMsg;
- }
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
- */
- public String isValid(Object input)
- {
- currentMessage = null;
- if (!(input instanceof String))
- {
- return null;
- }
- else
- return isValid((String)input);
- }
- /**
- * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
- * @see #getSystemMessage()
- */
- public String isValid(String input)
- {
- currentMessage = null;
- if ((input==null)||(input.length()==0))
- {
- currentMessage = emptyMsg;
- }
- else
- {
- if (input.length() > MAX_UDTTYPES_LENGTH)
- currentMessage = invalidMsg;
- }
- return (currentMessage==null) ? null : currentMessage.getLevelOneText();
- }
-
- /**
- * When isValid returns non-null, call this to get the SystemMessage object for the error
- * versus the simple string message.
- */
- public SystemMessage getSystemMessage()
- {
- return currentMessage;
- }
-
- /**
- * Return the max length for comments
- */
- public int getMaximumNameLength()
- {
- return MAX_UDTTYPES_LENGTH;
- }
-
- /**
- * For convenience, this is a shortcut to calling:
- *
- * if (isValid(text) != null)
- * msg = getSystemMessage();
- *
- */
- public SystemMessage validate(String text)
- {
- if (isValid(text) != null)
- return currentMessage;
- else
- return null;
- }
-
-}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/compile.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/compile.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithcompilecmds.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithcompilecmds.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithnamedtypes.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithnamedtypes.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/dlcl16/workwithuseractions.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/dlcl16/workwithuseractions.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/compile.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/compile.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithcompilecmds.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithcompilecmds.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithnamedtypes.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithnamedtypes.gif
diff --git a/rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gif b/rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif
similarity index 100%
rename from rse/plugins/org.eclipse.rse.ui/icons/full/elcl16/workwithuseractions.gif
rename to rse/plugins/org.eclipse.rse.useractions/icons/full/elcl16/workwithuseractions.gif
diff --git a/rse/plugins/org.eclipse.rse.useractions/plugin.properties b/rse/plugins/org.eclipse.rse.useractions/plugin.properties
index f8ce3a3dde7..7990f1fce06 100644
--- a/rse/plugins/org.eclipse.rse.useractions/plugin.properties
+++ b/rse/plugins/org.eclipse.rse.useractions/plugin.properties
@@ -8,6 +8,7 @@
# Contributors:
# IBM Corporation - initial API and implementation
# Martin Oberhuber (Wind River) - add providerName
+# David Dykstal (IBM) - [186589] move properties from org.eclipse.rse.ui
###############################################################################
# NLS_MESSAGEFORMAT_NONE
@@ -15,3 +16,7 @@
pluginName = RSE User Actions
providerName = Eclipse.org
+
+PropertyPage.TeamViewUserActionNode = User Action Information
+PropertyPage.TeamViewCompileTypeNode = Compile Type Information
+PropertyPage.TeamViewCompileCommandNode = Compile Command Information
diff --git a/rse/plugins/org.eclipse.rse.useractions/plugin.xml b/rse/plugins/org.eclipse.rse.useractions/plugin.xml
index 8b7af01f61f..03b3e837292 100644
--- a/rse/plugins/org.eclipse.rse.useractions/plugin.xml
+++ b/rse/plugins/org.eclipse.rse.useractions/plugin.xml
@@ -8,25 +8,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java
index 01cc24659f9..8ac8f71f518 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java
@@ -6,11 +6,15 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
package org.eclipse.rse.internal.useractions;
+import java.net.URL;
+
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -42,22 +46,41 @@ public class Activator extends AbstractUIPlugin {
super.stop(context);
plugin = null;
}
-
+
/**
* Returns the shared instance.
*/
public static Activator getDefault() {
return plugin;
}
-
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ protected void initializeImageRegistry(ImageRegistry registry) {
+ super.initializeImageRegistry(registry);
+ registry.put(IUserActionsImageIds.COMPILE_0, getImageDescriptor("icons/full/dlcl16/compile.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.COMPILE_1, getImageDescriptor("icons/full/elcl16/compile.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_0, getImageDescriptor("icons/full/dlcl16/workwithcompilecmds.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_1, getImageDescriptor("icons/full/elcl16/workwithcompilecmds.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_NAMED_TYPES_0, getImageDescriptor("icons/full/dlcl16/workwithnamedtypes.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_NAMED_TYPES_1, getImageDescriptor("icons/full/elcl16/workwithnamedtypes.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_USER_ACTIONS_0, getImageDescriptor("icons/full/dlcl16/workwithuseractions.gif")); //$NON-NLS-1$
+ registry.put(IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1, getImageDescriptor("icons/full/elcl16/workwithuseractions.gif")); //$NON-NLS-1$
+ }
+
/**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
+ * Gets the image descriptor for images in the plugin bundle.
+ * @param path the plugin relative path of the image
* @return the image descriptor
*/
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.useractions", path); //$NON-NLS-1$
+ public ImageDescriptor getImageDescriptor(String path) {
+ ImageDescriptor descriptor = null;
+ URL url = getBundle().getResource(path);
+ if (url != null) {
+ descriptor = ImageDescriptor.createFromURL(url);
+ }
+ return descriptor;
}
+
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java
new file mode 100644
index 00000000000..85b3178fd44
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ *******************************************************************************/
+package org.eclipse.rse.internal.useractions;
+
+public interface IUserActionsImageIds {
+
+ public static final String COMPILE_0 = "COMPILE_0"; //$NON-NLS-1$
+ public static final String COMPILE_1 = "COMPILE_1"; //$NON-NLS-1$
+ public static final String WORK_WITH_USER_ACTIONS_0 = "WORK_WITH_USER_ACTIONS_0"; //$NON-NLS-1$
+ public static final String WORK_WITH_USER_ACTIONS_1 = "WORK_WITH_USER_ACTIONS_1"; //$NON-NLS-1$
+ public static final String WORK_WITH_NAMED_TYPES_0 = "WORK_WITH_NAMED_TYPES_0"; //$NON-NLS-1$
+ public static final String WORK_WITH_NAMED_TYPES_1 = "WORK_WITH_NAMED_TYPES_1"; //$NON-NLS-1$
+ public static final String WORK_WITH_COMPILE_COMMANDS_0 = "WORK_WITH_COMPILE_COMMANDS_0"; //$NON-NLS-1$
+ public static final String WORK_WITH_COMPILE_COMMANDS_1 = "WORK_WITH_COMPILE_COMMANDS_1"; //$NON-NLS-1$
+
+}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java
new file mode 100644
index 00000000000..3858ccabeaa
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ *******************************************************************************/
+package org.eclipse.rse.internal.useractions;
+
+public interface IUserActionsMessageIds {
+
+ public static final String MSG_VALIDATE_UDANAME_EMPTY = "RSEG1180"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDANAME_NOTUNIQUE= "RSEG1181"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDANAME_NOTVALID = "RSEG1182"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDACMT_EMPTY = "RSEG1183"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDACMT_NOTVALID = "RSEG1184"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDACMD_EMPTY = "RSEG1185"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDACMD_NOTVALID = "RSEG1186"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDTNAME_EMPTY = "RSEG1187"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDTNAME_NOTUNIQUE= "RSEG1188"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDTNAME_NOTVALID = "RSEG1189"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDTTYPES_EMPTY = "RSEG1190"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_UDTTYPES_NOTVALID = "RSEG1191"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_COMPILELABEL_EMPTY = "RSEG1195"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_COMPILELABEL_NOTUNIQUE= "RSEG1196"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_COMPILELABEL_NOTVALID = "RSEG1197"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_COMPILESTRING_EMPTY = "RSEG1198"; //$NON-NLS-1$
+ public static final String MSG_VALIDATE_COMPILESTRING_NOTVALID = "RSEG1199"; //$NON-NLS-1$
+ public static final String MSG_UDA_LOAD_ERROR = "RSEG1140"; //$NON-NLS-1$
+ public static final String MSG_UDA_ROOTTAG_ERROR = "RSEG1141"; //$NON-NLS-1$
+ public static final String MSG_CONFIRM_DELETE_USERACTION = "RSEG1230"; //$NON-NLS-1$
+ public static final String MSG_CONFIRM_DELETE_USERTYPE = "RSEG1231"; //$NON-NLS-1$
+
+}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java
new file mode 100644
index 00000000000..eaf46a26ae9
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ *******************************************************************************/
+package org.eclipse.rse.internal.useractions;
+
+/*
+ * These constants for model change events were taken from ISystemModelChangeEvents.
+ */
+public interface IUserActionsModelChangeEvents {
+
+ /**
+ * Resource Type: user action
+ */
+ public static final int SYSTEM_RESOURCETYPE_USERACTION = 128;
+ /**
+ * Resource Type: named type, which are used in user actions
+ */
+ public static final int SYSTEM_RESOURCETYPE_NAMEDTYPE = 256;
+ /**
+ * Resource Type: compile command
+ */
+ public static final int SYSTEM_RESOURCETYPE_COMPILECMD = 512;
+
+}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java
index b1c58af39c5..85afae2c2f6 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java
@@ -6,7 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions;
@@ -103,7 +105,7 @@ public class UserActionsIcon {
* @return the image descriptor
*/
public ImageDescriptor getImageDescriptor() {
- ImageDescriptor descriptor = Activator.getImageDescriptor(location);
+ ImageDescriptor descriptor = Activator.getDefault().getImageDescriptor(location);
return descriptor;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java
new file mode 100644
index 00000000000..b5ac28fcf3d
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2007 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ *******************************************************************************/
+package org.eclipse.rse.internal.useractions;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+
+/**
+ * This class is a placeholder documenting the old persistence API and structure for
+ * user actions, user type filters, and compile commands.
+ * The class is not functional.
+ * TODO: (dwd) this needs to be replaced with the new persistence provider scheme.
+ */
+public class UserActionsPersistenceUtil {
+
+
+ /*
+ * Bogus infrastructure to make this compile
+ */
+
+ private static class ResourceHelpers {
+ IFolder getOrCreateFolder(IFolder parent, String folderName) {
+ return null;
+ }
+ IFolder getFolder(IContainer parent, String folderName) {
+ return null;
+ }
+ }
+
+ private static ResourceHelpers getResourceHelpers() {
+ return new ResourceHelpers();
+ }
+
+ private static IFolder getProfileFolder(String profileName) {
+ return null;
+ }
+
+ private static String getFolderName(ISubSystemConfiguration subystemConfiguration) {
+ return null;
+ }
+
+ private static IProject getRemoteSystemsProject() {
+ return null;
+ }
+
+ private static final String RESOURCE_USERACTIONS_FOLDER_NAME = null;
+ private static final String RESOURCE_COMPILECOMMANDS_FOLDER_NAME = null;
+ private static final String RESOURCE_TYPE_FILTERS_FOLDER_NAME = null;
+
+ /*
+ * --------------------------------------------------------------------------------------------------------------------------------
+ * USER ACTIONS SUBTREE FOLDER METHODS...
+ * ======================================
+ * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
+ * | |
+ * | |
+ * | .--- UserActions (folder) - getUserActionsFolder(SystemProfile/"team")
+ * | |
+ * | .--- SubSystemConfigurationID1 (folder) - getUserActionsFolder(SystemProfile/"team", SubSystemConfiguration)
+ * | | .--- actions.xml (file)
+ * | .--- SubSystemConfigurationID2 (folder)
+ * | .--- actions.xml (file)
+ * --------------------------------------------------------------------------------------------------------------------------------
+ */
+ // ---------------------------------------------------
+ // GET USER DEFINED ACTIONS ROOT FOLDER PER PROFILE...
+ // ---------------------------------------------------
+ /**
+ * Get user defined actions root folder given a system profile name
+ */
+ protected static IFolder getUserActionsFolder(String profileName)
+ {
+ return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_USERACTIONS_FOLDER_NAME);
+ }
+ /**
+ * Get user defined actions root folder given a system profile object and subsystem factory
+ */
+ public static IFolder getUserActionsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
+ {
+ return getUserActionsFolder(profile.getName(),ssFactory);
+ }
+ /**
+ * Get user defined actions root folder given a system profile name and subsystem factory
+ */
+ public static IFolder getUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
+ {
+ IFolder parentFolder = getUserActionsFolder(profileName);
+ String folderName = getFolderName(ssFactory);
+ return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
+ }
+ /**
+ * Test for existence of user defined actions root folder given a system profile name and subsystem factory
+ */
+ public static boolean testUserActionsFolder(String profileName, ISubSystemConfiguration ssFactory)
+ {
+ IFolder parentFolder = getUserActionsFolder(profileName);
+ String folderName = getFolderName(ssFactory);
+ return (getResourceHelpers().getFolder(parentFolder, folderName).exists()); // Do NOT create it.
+ }
+
+ /**
+ * Get user defined actions root folder given a system profile name and subsystem factory Id.
+ * This is a special-needs method provided for the Import action processing,
+ * when a subsystem instance is not available.
+ */
+ public static IFolder getUserActionsFolder( String profileName, String factoryId)
+ {
+ IFolder parentFolder = getUserActionsFolder(profileName);
+ return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
+ }
+
+ /*
+ * --------------------------------------------------------------------------------------------------------------------------------
+ * COMPILE COMMAND SUBTREE FOLDER METHODS...
+ * ======================================
+ * .--- Team (folder) - getProfileFolder(SystemProfile/"team")
+ * | |
+ * | |
+ * | .--- CompileCommands (folder) - getCompileCommandsFolder(SystemProfile/"team")
+ * | |
+ * | .--- SubSystemConfigurationID1 (folder) - getCompileCommandsFolder(SystemProfile/"team", SubSystemConfiguration)
+ * | | .--- compileCommands.xml (file)
+ * | .--- SubSystemConfigurationID2 (folder)
+ * | .--- compileCommands.xml (file)
+ * --------------------------------------------------------------------------------------------------------------------------------
+ */
+ // ---------------------------------------------------
+ // GET COMPILE COMMANDS ROOT FOLDER PER PROFILE...
+ // ---------------------------------------------------
+ /**
+ * Get compile commands root folder given a system profile name
+ */
+ protected static IFolder getCompileCommandsFolder(String profileName)
+ {
+ return getResourceHelpers().getOrCreateFolder(getProfileFolder(profileName),RESOURCE_COMPILECOMMANDS_FOLDER_NAME);
+ }
+ /**
+ * Get compile commands root folder given a system profile object and subsystem factory
+ */
+ public static IFolder getCompileCommandsFolder(ISystemProfile profile, ISubSystemConfiguration ssFactory)
+ {
+ return getCompileCommandsFolder(profile.getName(),ssFactory);
+ }
+ /**
+ * Get compile commands root folder given a system profile name and subsystem factory
+ */
+ public static IFolder getCompileCommandsFolder(String profileName, ISubSystemConfiguration ssFactory)
+ {
+ IFolder parentFolder = getCompileCommandsFolder(profileName);
+ String folderName = getFolderName(ssFactory);
+ return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // Do create it.
+ }
+
+ /**
+ * Get compile commands root folder given a system profile name and subsystem factory Id.
+ * This is a special-needs method provided for the Import action processing,
+ * when a subsystem instance is not available.
+ */
+ public static IFolder getCompileCommandsFolder( String profileName, String factoryId)
+ {
+ IFolder parentFolder = getCompileCommandsFolder(profileName);
+ return getResourceHelpers().getOrCreateFolder(parentFolder, factoryId); // Do create it.
+ }
+
+ /*
+ * --------------------------------------------------------------------------------------------------------------------------------
+ * TYPE FILTERS SUBTREE FOLDER METHODS...
+ * ======================================
+ * .--- TypeFilters (folder) - getTypeFiltersFolder()
+ * .--- SubSystemConfigurationID1 (folder) - getTypeFiltersFolder(SubSystemConfiguration)
+ * | .--- typefilters.xmi (file)
+ * --------------------------------------------------------------------------------------------------------------------------------
+ */
+
+ /**
+ * Get the typeFilters root folder
+ */
+ public static IFolder getTypeFiltersFolder()
+ {
+ return getResourceHelpers().getFolder(getRemoteSystemsProject(),RESOURCE_TYPE_FILTERS_FOLDER_NAME);
+ }
+ /**
+ * Get the typeFilters sub-folder per subsystem factory object
+ */
+ public static IFolder getTypeFiltersFolder(ISubSystemConfiguration ssFactory)
+ {
+ IFolder parentFolder = getTypeFiltersFolder();
+ String folderName = getFolderName(ssFactory);
+ return getResourceHelpers().getOrCreateFolder(parentFolder, folderName); // DO create it.
+ }
+ /**
+ * Get the typeFilters sub-folder per subsystem factory id
+ */
+ public static IFolder getTypeFiltersFolder(String ssFactoryId)
+ {
+ IFolder parentFolder = getTypeFiltersFolder();
+ return getResourceHelpers().getOrCreateFolder(parentFolder, ssFactoryId); // DO create it.
+ }
+}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java
index 854952e18a4..bdd076335e2 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java
@@ -1,5 +1,3 @@
-package org.eclipse.rse.internal.useractions.files.uda;
-
/*******************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
@@ -8,8 +6,12 @@ package org.eclipse.rse.internal.useractions.files.uda;
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
+package org.eclipse.rse.internal.useractions.files.uda;
+
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -19,11 +21,11 @@ import java.util.Vector;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxTableViewer;
import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
import org.eclipse.rse.internal.useractions.ui.uda.ISystemUDTypeEditPaneTypesSelector;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
-import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
@@ -244,7 +246,7 @@ public class UDTypesEditorFiles implements ISystemUDTypeEditPaneTypesSelector, I
*/
public SystemMessage validate() {
if (typesSelectionList == null) return null;
- if (!areTypesSelected()) return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_EMPTY);
+ if (!areTypesSelected()) return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_EMPTY);
// validate that user-defined entry field!
return validateUserDefinedTypes();
}
@@ -262,7 +264,7 @@ public class UDTypesEditorFiles implements ISystemUDTypeEditPaneTypesSelector, I
if (index == filename.length() - 1) {
if (index == 0 || (index == 1 && filename.charAt(0) == '*')) {
//setErrorMessage(GenericMessages.getString("FileExtension.extensionEmptyMessage")); //$NON-NLS-1$
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID);
+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID);
}
}
int startScan = 0;
@@ -275,11 +277,11 @@ public class UDTypesEditorFiles implements ISystemUDTypeEditPaneTypesSelector, I
if (index > -1) {
if (filename.length() == 1) {
//setErrorMessage(GenericMessages.getString("FileExtension.extensionEmptyMessage")); //$NON-NLS-1$
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID);
+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID);
}
if (index != 0 || filename.charAt(1) != '.') {
//setErrorMessage(GenericMessages.getString("FileExtension.fileNameInvalidMessage")); //$NON-NLS-1$
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTTYPES_NOTVALID);
+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID);
}
}
return null;
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java
index ea0ebe0b1b5..f7214d0c779 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java
@@ -6,8 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
@@ -19,7 +20,8 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.internal.ui.GenericMessages;
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
-import org.eclipse.rse.ui.ISystemIconConstants;
+import org.eclipse.rse.internal.useractions.Activator;
+import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseAction;
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
@@ -43,7 +45,7 @@ public class SystemCompileAction extends SystemBaseAction {
*/
public SystemCompileAction(Shell shell, SystemCompileCommand compileCommand, boolean isPrompt) {
super(
- isPrompt ? compileCommand.getLabel() + "..." : compileCommand.getLabel(), compileCommand.getLabel(), RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID), shell); // null == image //$NON-NLS-1$
+ isPrompt ? compileCommand.getLabel() + "..." : compileCommand.getLabel(), compileCommand.getLabel(), Activator.getDefault().getImageDescriptor(IUserActionsImageIds.COMPILE_1), shell); // null == image //$NON-NLS-1$
this.compileCmd = compileCommand;
this.isPrompt = isPrompt;
SystemCompileManager mgr = compileCommand.getParentType().getParentProfile().getParentManager();
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java
index 3879381dd6e..2bc4ea557ba 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java
@@ -6,8 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java
index 2d73aec6fd9..1bd9180fcc2 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java
@@ -8,7 +8,9 @@ package org.eclipse.rse.internal.useractions.ui.compile;
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
import java.util.Vector;
@@ -18,13 +20,13 @@ import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
import org.eclipse.rse.internal.useractions.ui.SystemCommandTextField;
import org.eclipse.rse.internal.useractions.ui.SystemCommandViewerConfiguration;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
+import org.eclipse.rse.internal.useractions.ui.validators.ValidatorCompileCommandLabel;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.shells.ui.view.ISystemCommandTextModifyListener;
import org.eclipse.rse.ui.ISystemMassager;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorCompileCommandLabel;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java
index 99e757ca893..e44b52c3020 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java
@@ -8,11 +8,14 @@ package org.eclipse.rse.internal.useractions.ui.compile;
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.rse.ui.ISystemIconConstants;
-import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.internal.useractions.Activator;
+import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
import org.eclipse.swt.graphics.Image;
/**
@@ -20,6 +23,9 @@ import org.eclipse.swt.graphics.Image;
* dialog.
*/
public class SystemCompileCommandLabelProvider extends LabelProvider {
+
+ Image _compileCommandImage = null;
+
/**
* Constructor
*/
@@ -27,8 +33,8 @@ public class SystemCompileCommandLabelProvider extends LabelProvider {
super();
}
- /**
- * Override of parent to return the visual label for the given compile command
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
*/
public String getText(Object element) {
if (element instanceof SystemCompileCommand)
@@ -39,11 +45,19 @@ public class SystemCompileCommandLabelProvider extends LabelProvider {
return null;
}
- /**
- * Override of parent so we can supply an image, if we desire.
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
*/
public Image getImage(Object element) {
- if (element instanceof SystemCompileCommand) return RSEUIPlugin.getDefault().getImage(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID);
- return null;
+ Image result = null;
+ if (element instanceof SystemCompileCommand) {
+ if (_compileCommandImage == null || _compileCommandImage.isDisposed()) {
+ ImageDescriptor id = Activator.getDefault().getImageDescriptor(IUserActionsImageIds.COMPILE_1);
+ _compileCommandImage = id.createImage();
+ }
+ result = _compileCommandImage;
+ }
+ return result;
}
+
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java
index a7e018de0c9..f092e6b5a5d 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java
@@ -6,9 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
@@ -18,11 +19,11 @@ import java.util.Hashtable;
import org.eclipse.core.resources.IFolder;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.SystemResourceManager;
import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.model.SystemStartHere;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
@@ -210,7 +211,7 @@ public abstract class SystemCompileManager {
}
//System.out.println("systemProfile = " + systemProfile);
//System.out.println("subsystemFactory = " + subsystemFactory);
- IFolder folder = SystemResourceManager.getCompileCommandsFolder(systemProfile, subsystemFactory);
+ IFolder folder = UserActionsPersistenceUtil.getCompileCommandsFolder(systemProfile, subsystemFactory);
return folder;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java
index d8d0a31cfa9..24b40863459 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java
@@ -8,6 +8,8 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
@@ -17,10 +19,10 @@ import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
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.ui.compile.teamview.SystemTeamViewCompileTypeNode;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
import org.eclipse.rse.ui.view.ISystemRemoteElementAdapter;
@@ -39,7 +41,7 @@ public class SystemWorkWithCompileCommandsAction extends SystemBaseDialogAction
public SystemWorkWithCompileCommandsAction(Shell shell, boolean fromCascadingCompileAction) {
super(fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWCOMPILE_CMDS_LABEL : SystemUDAResources.ACTION_WORKWITH_COMPILE_CMDS_LABEL,
fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWCOMPILE_CMDS_TOOLTIP : SystemUDAResources.ACTION_WORKWITH_COMPILE_CMDS_TOOLTIP, RSEUIPlugin.getDefault()
- .getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_WORKWITHCOMPILECMDS_ID), shell);
+ .getImageDescriptor(IUserActionsImageIds.WORK_WITH_COMPILE_COMMANDS_1), shell);
allowOnMultipleSelection(false);
if (!fromCascadingCompileAction)
setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java
index d3ce7255cf9..999c36106fe 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile;
@@ -28,6 +30,7 @@ import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
import org.eclipse.rse.internal.useractions.ui.uda.SystemUDAResources;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
@@ -585,10 +588,10 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
saveCompileCommand(editedCompileCmd, newMode, prevListSelection);
processCommandsListSelected();
if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, editedCompileCmd,
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, editedCompileCmd,
null);
else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD,
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD,
editedCompileCmd, null);
}
}
@@ -927,7 +930,7 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
rmvSrcTypeButton.setEnabled(true);
//traceTest = false;
// fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, deletedCmd, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, deletedCmd, null);
}
} catch (Exception exc) {
}
@@ -964,7 +967,7 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
listView.showSelection();
processCommandsListSelected();
// fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
}
/**
@@ -998,7 +1001,7 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
listView.showSelection();
processCommandsListSelected();
// fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REORDERED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, currCmd, null);
}
/**
@@ -1060,7 +1063,7 @@ public class SystemWorkWithCompileCommandsDialog extends SystemPromptDialog impl
clipboard.dispose();
clipboard = null;
// fire model change event in case any BP code is listening...
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, oldCmd, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_REMOVED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, oldCmd, null);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java
index 9c04124f593..32f76132458 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java
@@ -6,7 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.compile.teamview;
@@ -14,8 +16,8 @@ import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.internal.useractions.IUserActionsImageIds;
import org.eclipse.rse.internal.useractions.ui.compile.SystemCompileCommand;
-import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
/**
@@ -49,7 +51,7 @@ public class SystemTeamViewCompileCommandNode implements IAdaptable {
* @return the image to show in the tree, for this node
*/
public ImageDescriptor getImageDescriptor() {
- return RSEUIPlugin.getDefault().getImageDescriptor(ISystemIconConstants.ICON_SYSTEM_COMPILE_ID);
+ return RSEUIPlugin.getDefault().getImageDescriptor(IUserActionsImageIds.COMPILE_1);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java
index 6d69b39e5ab..92f748b26ac 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.propertypages;
@@ -17,6 +19,7 @@ import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.ui.SystemResources;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
import org.eclipse.rse.internal.useractions.UserActionsResources;
import org.eclipse.rse.internal.useractions.ui.compile.ISystemCompileCommandEditPaneHoster;
import org.eclipse.rse.internal.useractions.ui.compile.ISystemCompileCommandEditPaneListener;
@@ -166,7 +169,7 @@ public class SystemTeamViewCompileCommandPropertyPage extends SystemBaseProperty
ok = (editedCompileCmd != null);
if (!ok) return false;
getCompileCommand().getCompileCommand().getParentType().getParentProfile().writeToDisk();
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, editedCompileCmd, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_COMPILECMD, editedCompileCmd, null);
return ok;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java
index 064c7d1038f..ee8b9de7a2b 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -24,18 +26,19 @@ import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
import org.eclipse.rse.internal.useractions.ui.ISystemCommandTextAdditionalGUIProvider;
import org.eclipse.rse.internal.useractions.ui.SystemCmdSubstVarList;
import org.eclipse.rse.internal.useractions.ui.SystemCommandTextField;
import org.eclipse.rse.internal.useractions.ui.SystemCommandViewerConfiguration;
+import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionComment;
+import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserActionName;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.shells.ui.view.ISystemCommandTextModifyListener;
import org.eclipse.rse.ui.ISystemMassager;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.validators.ISystemValidator;
import org.eclipse.rse.ui.validators.ISystemValidatorUniqueString;
-import org.eclipse.rse.ui.validators.ValidatorUserActionComment;
-import org.eclipse.rse.ui.validators.ValidatorUserActionName;
import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusEvent;
@@ -1097,9 +1100,9 @@ public class SystemUDActionEditPane implements SelectionListener, // for the che
udam.saveUserData(currentProfile);
// inform anybody registered as listeners that we have created/changed model object...
if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION, currentAction, null);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java
index 6dcafdf8647..f957ad4b9aa 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java
@@ -1,5 +1,3 @@
-package org.eclipse.rse.internal.useractions.ui.uda;
-
/*******************************************************************************
* Copyright (c) 2002, 2007 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
@@ -8,17 +6,20 @@ package org.eclipse.rse.internal.useractions.ui.uda;
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
+package org.eclipse.rse.internal.useractions.ui.uda;
+
import java.io.File;
import java.util.Vector;
import org.eclipse.core.resources.IFolder;
import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.rse.core.SystemResourceManager;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.useractions.UserActionsIcon;
+import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Element;
@@ -130,14 +131,14 @@ public class SystemUDActionManager extends SystemUDBaseManager
* for the given profile
*/
protected IFolder getDocumentFolder(ISubSystemConfiguration subsystemFactory, ISystemProfile profile) {
- return SystemResourceManager.getUserActionsFolder(profile.getName(), subsystemFactory);
+ return UserActionsPersistenceUtil.getUserActionsFolder(profile.getName(), subsystemFactory);
}
/**
* Intended for IMPORT actions only, where no Subsystem instance available:
*/
public void setFolder(String profileName, String factoryId) {
- importCaseFolder = SystemResourceManager.getUserActionsFolder(profileName, factoryId);
+ importCaseFolder = UserActionsPersistenceUtil.getUserActionsFolder(profileName, factoryId);
}
/**
@@ -152,7 +153,7 @@ public class SystemUDActionManager extends SystemUDBaseManager
*/
public boolean hasActions(ISystemProfile profile, ISubSystemConfiguration ssFactory) {
boolean hasActions = false;
- boolean folderExists = SystemResourceManager.testUserActionsFolder(profile.getName(), ssFactory);
+ boolean folderExists = UserActionsPersistenceUtil.testUserActionsFolder(profile.getName(), ssFactory);
if (folderExists) {
String fileName = getFilePath(profile);
if (fileName != null) {
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java
index f24d3191eca..c7b2477b6e7 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java
@@ -8,14 +8,16 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
import org.eclipse.swt.widgets.Composite;
/**
@@ -46,7 +48,7 @@ public class SystemUDActionTreeView extends SystemUDBaseTreeView {
* This is a parent class override.
*/
protected int getResourceType() {
- return ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION;
+ return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION;
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java
index 5131ba38240..f513a6428b0 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [180562][api] dont implement ISystemUDAConstants
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -50,6 +52,7 @@ import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.ui.SystemResources;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.ISystemMessages;
@@ -422,7 +425,7 @@ public abstract class SystemUDBaseManager implements ErrorHandler, IResourceChan
// Phil. 08/2002
if ((null == docroot) || !docroot.getTagName().equals(getDocumentRootTagName())) {
Shell activeShell = getActiveShell();
- SystemMessage docRootMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UDA_ROOTTAG_ERROR);
+ SystemMessage docRootMsg = RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_UDA_ROOTTAG_ERROR);
String oldFileName = getFilePath(profile);
String newFileName = getFileName() + ".bad"; //$NON-NLS-1$
IFile file = getFolder(profile).getFile(getFileName());
@@ -444,7 +447,7 @@ public abstract class SystemUDBaseManager implements ErrorHandler, IResourceChan
Document doc = initializeDocument();
SystemMessageDialog msgdlg = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), RSEUIPlugin.getPluginMessage(
// ISystemMessages.MSG_RESTORE_FAILED).makeSubstitution(exc));
- ISystemMessages.MSG_UDA_LOAD_ERROR).makeSubstitution(fileName, exc));
+ IUserActionsMessageIds.MSG_UDA_LOAD_ERROR).makeSubstitution(fileName, exc));
msgdlg.open();
return doc;
}
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java
index 7be95dc601a..602f6ba3b07 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -29,9 +31,9 @@ import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.ui.view.SystemViewMenuListener;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.rse.ui.actions.ISystemAction;
@@ -398,7 +400,7 @@ public class SystemUDBaseTreeView extends TreeViewer implements IMenuListener, I
* Return message for delete confirmation
*/
protected SystemMessage getDeleteConfirmationMessage() {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE_USERACTION);
+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_CONFIRM_DELETE_USERACTION);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java
index 275cbcc3e74..bc2ebcf99a3 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java
@@ -8,13 +8,14 @@ package org.eclipse.rse.internal.useractions.ui.uda;
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
+import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserTypeTypes;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.SystemWidgetHelpers;
import org.eclipse.rse.ui.messages.ISystemMessageLine;
import org.eclipse.rse.ui.validators.ISystemValidator;
-import org.eclipse.rse.ui.validators.ValidatorUserTypeTypes;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
@@ -171,7 +172,7 @@ public class SystemUDSimpleTypesListEditor implements ISystemUDTypeEditPaneTypes
nonEditableVerbage.setVisible(false);
else {
nonEditableVerbage.setVisible(true);
- if (vendor.equals("IBM"))
+ if (vendor.equals("IBM")) //$NON-NLS-1$
nonEditableVerbage.setText(SystemUDAResources.RESID_UDT_IBM_VERBAGE);
else {
String verbage = SystemUDAResources.RESID_UDT_VENDOR_VERBAGE;
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java
index 44ce0a43c7f..d7869faf9f6 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java
@@ -9,6 +9,8 @@
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -24,9 +26,10 @@ import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
+import org.eclipse.rse.internal.useractions.ui.validators.ValidatorUserTypeName;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.ui.SystemWidgetHelpers;
-import org.eclipse.rse.ui.validators.ValidatorUserTypeName;
import org.eclipse.rse.ui.widgets.SystemEditPaneStateMachine;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -472,9 +475,9 @@ public class SystemUDTypeEditPane implements ISelectionChangedListener {
udtm.saveUserData();
// inform anybody registered as listeners that we have created/changed model object...
if (newMode)
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_ADDED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
else
- RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
+ RSECorePlugin.getTheSystemRegistry().fireModelChangeEvent(ISystemModelChangeEvents.SYSTEM_RESOURCE_CHANGED, IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE, currentType, null);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java
index bc2510648fe..2658e373082 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java
@@ -6,8 +6,9 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM Corporation - initial API and implementation
+ * IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
+ * David Dykstal (IBM) - [186589] move user actions API out of org.eclipse.rse.ui
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
@@ -19,10 +20,10 @@ import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.rse.core.SystemResourceHelpers;
-import org.eclipse.rse.core.SystemResourceManager;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.useractions.UserActionsIcon;
+import org.eclipse.rse.internal.useractions.UserActionsPersistenceUtil;
import org.eclipse.rse.ui.SystemBasePlugin;
import org.eclipse.swt.graphics.Image;
import org.w3c.dom.Element;
@@ -159,7 +160,7 @@ public class SystemUDTypeManager extends SystemUDBaseManager {
*/
protected IFolder getDocumentFolder(ISubSystemConfiguration subsystemFactory, ISystemProfile profile) {
// return new location, as of R2
- IFolder typesFolder = SystemResourceManager.getTypeFiltersFolder(subsystemFactory);
+ IFolder typesFolder = UserActionsPersistenceUtil.getTypeFiltersFolder(subsystemFactory);
// we check here for any residual old types files from R1. If found, we move it
// to the new location right away!
// TODO: DELETE THIS EXPENSIVE LOGIC AFTER A FEW RELEASES.
@@ -167,7 +168,7 @@ public class SystemUDTypeManager extends SystemUDBaseManager {
//if (profile == null)
// profile = subsystem.getSystemProfile();
//System.out.println("Is profile null? " + (profile==null));
- IFolder oldFolder = SystemResourceManager.getUserActionsFolder(profile.getName(), subsystemFactory);
+ IFolder oldFolder = UserActionsPersistenceUtil.getUserActionsFolder(profile.getName(), subsystemFactory);
IFile oldFile = oldFolder.getFile(getFileName());
if (exists(oldFile)) {
//System.out.println("Attempt to move old types folder...");
@@ -209,7 +210,7 @@ public class SystemUDTypeManager extends SystemUDBaseManager {
*/
public void setFolder(String profileName, String factoryId) {
//importCaseFolder = SystemResourceManager.getUserActionsFolder(profileName, factoryId);
- importCaseFolder = SystemResourceManager.getTypeFiltersFolder(factoryId);
+ importCaseFolder = UserActionsPersistenceUtil.getTypeFiltersFolder(factoryId);
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java
index 9c1dd8d0783..ead465e2c3d 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java
@@ -8,16 +8,18 @@
* Contributors:
* IBM Corporation - initial API and implementation
* Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
package org.eclipse.rse.internal.useractions.ui.uda;
import org.eclipse.jface.viewers.IBasicPropertyConstants;
-import org.eclipse.rse.core.events.ISystemModelChangeEvents;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
+import org.eclipse.rse.internal.useractions.IUserActionsModelChangeEvents;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.swt.widgets.Composite;
@@ -72,7 +74,7 @@ public class SystemUDTypeTreeView extends SystemUDBaseTreeView {
* Return message for delete confirmation
*/
protected SystemMessage getDeleteConfirmationMessage() {
- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE_USERTYPE);
+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_CONFIRM_DELETE_USERTYPE);
}
/**
@@ -80,7 +82,7 @@ public class SystemUDTypeTreeView extends SystemUDBaseTreeView {
* This is a parent class override.
*/
protected int getResourceType() {
- return ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE;
+ return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE;
}
/**
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java
index 85394310cd2..689379df872 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java
@@ -9,16 +9,18 @@ package org.eclipse.rse.internal.useractions.ui.uda.actions;
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
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.ui.uda.SystemUDAResources;
import org.eclipse.rse.internal.useractions.ui.uda.SystemWorkWithUDTypeDialog;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
import org.eclipse.swt.widgets.Shell;
@@ -70,7 +72,7 @@ public class SystemWorkWithFileTypesAction extends SystemBaseDialogAction {
*/
public SystemWorkWithFileTypesAction(Shell parent) {
super(SystemUDAResources.ACTION_WORKWITH_NAMEDTYPES_LABEL, SystemUDAResources.ACTION_WORKWITH_NAMEDTYPES_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_WORKWITHNAMEDTYPES_ID), parent);
+ IUserActionsImageIds.WORK_WITH_NAMED_TYPES_1), parent);
allowOnMultipleSelection(false);
setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
setHelp(RSEUIPlugin.HELPPREFIX + "actn0046"); //$NON-NLS-1$
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java
index 3620b73f964..549b7554d08 100644
--- a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java
@@ -9,6 +9,8 @@ package org.eclipse.rse.internal.useractions.ui.uda.actions;
*
* Contributors:
* IBM Corporation - initial API and implementation
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
*******************************************************************************/
//import java.util.Iterator;
import org.eclipse.jface.dialogs.Dialog;
@@ -17,10 +19,10 @@ import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.subsystems.ISubSystem;
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.ui.uda.SystemUDAResources;
import org.eclipse.rse.internal.useractions.ui.uda.SystemWorkWithUDAsDialog;
import org.eclipse.rse.ui.ISystemContextMenuConstants;
-import org.eclipse.rse.ui.ISystemIconConstants;
import org.eclipse.rse.ui.RSEUIPlugin;
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
import org.eclipse.swt.widgets.Shell;
@@ -61,7 +63,7 @@ public class SystemWorkWithUDAsAction extends SystemBaseDialogAction {
*/
public SystemWorkWithUDAsAction(Shell parent) {
super(SystemUDAResources.ACTION_WORKWITH_UDAS_LABEL, SystemUDAResources.ACTION_WORKWITH_UDAS_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS_ID), parent);
+ IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1), parent);
allowOnMultipleSelection(false);
setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
setHelp(RSEUIPlugin.HELPPREFIX + "actn0045"); //$NON-NLS-1$
@@ -76,7 +78,7 @@ public class SystemWorkWithUDAsAction extends SystemBaseDialogAction {
public SystemWorkWithUDAsAction(Shell parent, boolean fromCascadingCompileAction) {
super(fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWUDAS_LABEL : SystemUDAResources.ACTION_WORKWITH_UDAS_LABEL,
fromCascadingCompileAction ? SystemUDAResources.ACTION_WORKWITH_WWUDAS_TOOLTIP : SystemUDAResources.ACTION_WORKWITH_UDAS_TOOLTIP, RSEUIPlugin.getDefault().getImageDescriptor(
- ISystemIconConstants.ICON_SYSTEM_WORKWITHUSERACTIONS_ID), parent);
+ IUserActionsImageIds.WORK_WITH_USER_ACTIONS_1), parent);
allowOnMultipleSelection(false);
if (!fromCascadingCompileAction)
setContextMenuGroup(ISystemContextMenuConstants.GROUP_WORKWITH);
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java
similarity index 61%
rename from rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java
rename to rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java
index c80613d09d1..292dd2faa79 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -11,122 +11,114 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
-package org.eclipse.rse.ui.validators;
+package org.eclipse.rse.internal.useractions.ui.validators;
+
import java.util.Collection;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
-
+import org.eclipse.rse.ui.validators.ISystemValidator;
+import org.eclipse.rse.ui.validators.ValidatorUniqueString;
/**
* This class is used to verify a user defined compile command's label
*/
-public class ValidatorCompileCommandLabel extends ValidatorUniqueString
- implements ISystemValidator
-{
+public class ValidatorCompileCommandLabel extends ValidatorUniqueString implements ISystemValidator {
public static final int MAX_CMDLABEL_LENGTH = 50; // max name for a compile command name
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
+
+ protected boolean fUnique;
+ protected SystemMessage msg_Invalid;
protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
+
/**
* Use this constructor when you have a list of existing labels.
* The collection will not be modified by the validator.
*/
- public ValidatorCompileCommandLabel(Collection existingLabelList)
- {
+ public ValidatorCompileCommandLabel(Collection existingLabelList) {
super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
+ init();
}
+
/**
* Use this constructor when you have an array of existing labels.
*/
- public ValidatorCompileCommandLabel(String existingLabelList[])
- {
+ public ValidatorCompileCommandLabel(String existingLabelList[]) {
super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness
- init();
+ init();
}
-
+
/**
* Use this constructor when the name need not be unique, and you just want
* the syntax checking. Or if you will call setExistingNamesList later.
*/
- public ValidatorCompileCommandLabel()
- {
+ public ValidatorCompileCommandLabel() {
super(new String[0], CASE_INSENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_COMPILELABEL_NOTVALID);
+ init();
}
+
+ private void init() {
+ super.setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_EMPTY), RSEUIPlugin
+ .getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_NOTUNIQUE));
+ fUnique = true;
+ msg_Invalid = RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_COMPILELABEL_NOTVALID);
+ }
+
/**
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
* @param msg_Empty error message when entry field is empty
* @param msg_NonUnique error message when value entered is not unique
* @param msg_Invalid error message when syntax is not valid
*/
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
+ public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid) {
super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
+ this.msg_Invalid = msg_Invalid;
}
/**
* Overridable method for invalidate character check, beyond what this class offers
* @return true if valid, false if not
*/
- protected boolean checkForBadCharacters(String newText)
- {
+ protected boolean checkForBadCharacters(String newText) {
return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character.
- (newText.indexOf('@') == -1)); // defect 43950
+ (newText.indexOf('@') == -1)); // defect 43950
}
-
- public String toString()
- {
+
+ public String toString() {
return getClass().getName();
}
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
+ // ---------------------------
+ // Parent Overrides...
+ // ---------------------------
/**
* Validate each character.
* Override of parent method.
* Override yourself to refine the error checking.
*/
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
+ public SystemMessage isSyntaxOk(String newText) {
+ if (newText.length() > getMaximumNameLength())
+ currentMessage = msg_Invalid;
+ else
+ currentMessage = checkForBadCharacters(newText) ? null : msg_Invalid;
+ return currentMessage;
}
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for compile commands: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_CMDLABEL_LENGTH;
- }
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * Return the max length for compile commands: 50
+ */
+ public int getMaximumNameLength() {
+ return MAX_CMDLABEL_LENGTH;
+ }
-
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java
new file mode 100644
index 00000000000..f763b69b69c
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java
@@ -0,0 +1,107 @@
+/********************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ ********************************************************************************/
+
+package org.eclipse.rse.internal.useractions.ui.validators;
+
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.ui.validators.ISystemValidator;
+
+/**
+ * This class is used to verify a user defined action's command
+ */
+public class ValidatorUserActionCommand implements ISystemValidator {
+ public static final int MAX_UDACMD_LENGTH = 512; // max command for an action
+
+ protected SystemMessage emptyMsg, invalidMsg, currentMessage;
+
+ /**
+ * Constructor to use when wanting to specify the "value required" error message,
+ * but use the default for the "Value not valid" error message
+ */
+ public ValidatorUserActionCommand() {
+ setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDACMD_EMPTY), RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDACMD_NOTVALID));
+ }
+
+ /**
+ * Set the error messages, overriding the defaults
+ */
+ public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg) {
+ this.emptyMsg = emptyMsg;
+ this.invalidMsg = invalidMsg;
+ }
+
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
+ */
+ public String isValid(Object input) {
+ currentMessage = null;
+ if (!(input instanceof String)) {
+ return null;
+ } else
+ return isValid((String) input);
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
+ * @see #getSystemMessage()
+ */
+ public String isValid(String input) {
+ currentMessage = null;
+ if ((input == null) || (input.length() == 0)) {
+ currentMessage = emptyMsg;
+ } else {
+ if (input.length() > MAX_UDACMD_LENGTH) currentMessage = invalidMsg;
+ }
+ return (currentMessage == null) ? null : currentMessage.getLevelOneText();
+ }
+
+ /**
+ * When isValid returns non-null, call this to get the SystemMessage object for the error
+ * versus the simple string message.
+ */
+ public SystemMessage getSystemMessage() {
+ return currentMessage;
+ }
+
+ /**
+ * Return the max length for comments
+ */
+ public int getMaximumNameLength() {
+ return MAX_UDACMD_LENGTH;
+ }
+
+ /**
+ * For convenience, this is a shortcut to calling:
+ *
+ * if (isValid(text) != null)
+ * msg = getSystemMessage();
+ *
+ */
+ public SystemMessage validate(String text) {
+ if (isValid(text) != null)
+ return currentMessage;
+ else
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java
new file mode 100644
index 00000000000..c710f481c40
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java
@@ -0,0 +1,107 @@
+/********************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ ********************************************************************************/
+
+package org.eclipse.rse.internal.useractions.ui.validators;
+
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.ui.validators.ISystemValidator;
+
+/**
+ * This class is used to verify a user defined action's comment
+ */
+public class ValidatorUserActionComment implements ISystemValidator {
+ public static final int MAX_UDACMT_LENGTH = 256; // max comment for an action
+
+ protected SystemMessage emptyMsg, invalidMsg, currentMessage;
+
+ /**
+ * Constructor to use when wanting to specify the "value required" error message,
+ * but use the default for the "Value not valid" error message
+ */
+ public ValidatorUserActionComment() {
+ setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDACMT_EMPTY), RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDACMT_NOTVALID));
+ }
+
+ /**
+ * Set the error messages, overriding the defaults
+ */
+ public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg) {
+ this.emptyMsg = emptyMsg;
+ this.invalidMsg = invalidMsg;
+ }
+
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
+ */
+ public String isValid(Object input) {
+ currentMessage = null;
+ if (!(input instanceof String)) {
+ return null;
+ } else
+ return isValid((String) input);
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
+ * @see #getSystemMessage()
+ */
+ public String isValid(String input) {
+ currentMessage = null;
+ if ((input == null) || (input.length() == 0)) {
+ //currentMessage = emptyMsg;
+ } else {
+ if (input.length() > MAX_UDACMT_LENGTH) currentMessage = invalidMsg;
+ }
+ return (currentMessage == null) ? null : currentMessage.getLevelOneText();
+ }
+
+ /**
+ * When isValid returns non-null, call this to get the SystemMessage object for the error
+ * versus the simple string message.
+ */
+ public SystemMessage getSystemMessage() {
+ return currentMessage;
+ }
+
+ /**
+ * Return the max length for comments
+ */
+ public int getMaximumNameLength() {
+ return MAX_UDACMT_LENGTH;
+ }
+
+ /**
+ * For convenience, this is a shortcut to calling:
+ *
+ * if (isValid(text) != null)
+ * msg = getSystemMessage();
+ *
+ */
+ public SystemMessage validate(String text) {
+ if (isValid(text) != null)
+ return currentMessage;
+ else
+ return null;
+ }
+
+}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java
similarity index 60%
rename from rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java
rename to rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java
index 460dcef72a8..105bb89180c 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -11,124 +11,115 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
-package org.eclipse.rse.ui.validators;
+package org.eclipse.rse.internal.useractions.ui.validators;
+
import java.util.Collection;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
import org.eclipse.rse.ui.RSEUIPlugin;
-
+import org.eclipse.rse.ui.validators.ISystemValidator;
+import org.eclipse.rse.ui.validators.ValidatorUniqueString;
/**
* This class is used to verify a user defined action's name.
*/
-public class ValidatorUserActionName extends ValidatorUniqueString
- implements ISystemValidator
-{
+public class ValidatorUserActionName extends ValidatorUniqueString implements ISystemValidator {
public static final int MAX_UDANAME_LENGTH = 256; // max name for an action
-
- protected boolean fUnique;
- protected SystemMessage msg_Invalid;
+
+ protected boolean fUnique;
+ protected SystemMessage msg_Invalid;
protected IWorkspace workspace = ResourcesPlugin.getWorkspace();
-
+
/**
* Use this constructor when the name must be unique.
* @param existingNameList a collection of existing names to compare against.
* The collection will not be modified by the validator.
*/
- public ValidatorUserActionName(Collection existingNameList)
- {
+ public ValidatorUserActionName(Collection existingNameList) {
super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness
- init();
+ init();
}
+
/**
* Use this constructor when the name must be unique. Give the
* ctor a string array of existing names to compare against.
*/
- public ValidatorUserActionName(String existingNameList[])
- {
+ public ValidatorUserActionName(String existingNameList[]) {
super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness
- init();
+ init();
}
-
+
/**
* Use this constructor when the name need not be unique, and you just want
* the syntax checking.
*/
- public ValidatorUserActionName()
- {
+ public ValidatorUserActionName() {
super(new String[0], CASE_SENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_NOTUNIQUE));
- fUnique = true;
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDANAME_NOTVALID);
+ init();
}
+
+ private void init() {
+ super.setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDANAME_EMPTY), RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDANAME_NOTUNIQUE));
+ fUnique = true;
+ msg_Invalid = RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDANAME_NOTVALID);
+ }
+
/**
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
* @param msg_Empty error message when entry field is empty
* @param msg_NonUnique error message when value entered is not unique
* @param msg_Invalid error message when syntax is not valid
*/
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
+ public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid) {
super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
+ this.msg_Invalid = msg_Invalid;
}
/**
* Overridable method for invalidate character check, beyond what this class offers
* @return true if valid, false if not
*/
- protected boolean checkForBadCharacters(String newText)
- {
+ protected boolean checkForBadCharacters(String newText) {
return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character
- (newText.indexOf('@') == -1)); // defect 43950
+ (newText.indexOf('@') == -1)); // defect 43950
}
-
- public String toString()
- {
+
+ public String toString() {
return "UserActionNameValidator class"; //$NON-NLS-1$
}
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
+ // ---------------------------
+ // Parent Overrides...
+ // ---------------------------
/**
* Validate each character.
* Override of parent method.
* Override yourself to refine the error checking.
*/
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
+ public SystemMessage isSyntaxOk(String newText) {
+ if (newText.length() > getMaximumNameLength())
+ currentMessage = msg_Invalid;
+ else
+ currentMessage = checkForBadCharacters(newText) ? null : msg_Invalid;
+ return currentMessage;
}
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 256
- */
- public int getMaximumNameLength()
- {
- return MAX_UDANAME_LENGTH;
- }
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * Return the max length for folder names: 256
+ */
+ public int getMaximumNameLength() {
+ return MAX_UDANAME_LENGTH;
+ }
-
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java
similarity index 55%
rename from rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java
rename to rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java
index bfdd1b833da..15565c23381 100644
--- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java
@@ -1,5 +1,5 @@
/********************************************************************************
- * Copyright (c) 2002, 2006 IBM Corporation. All rights reserved.
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
* This program and the accompanying materials are made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -11,96 +11,87 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
- * {Name} (company) - description of contribution.
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
********************************************************************************/
-package org.eclipse.rse.ui.validators;
-import org.eclipse.rse.services.clientserver.messages.SystemMessage;
-import org.eclipse.rse.ui.ISystemMessages;
-import org.eclipse.rse.ui.RSEUIPlugin;
+package org.eclipse.rse.internal.useractions.ui.validators;
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.ui.validators.ISystemValidator;
+import org.eclipse.rse.ui.validators.ValidatorUniqueString;
/**
* This class is used to verify a user defined type's name.
*/
-public class ValidatorUserTypeName extends ValidatorUniqueString
- implements ISystemValidator
-{
+public class ValidatorUserTypeName extends ValidatorUniqueString implements ISystemValidator {
public static final int MAX_UDTNAME_LENGTH = 50; // max name for a file type
-
- protected SystemMessage msg_Invalid;
-
+
+ protected SystemMessage msg_Invalid;
+
/**
* Use this constructor when the name need not be unique, and you just want the syntax checking.
*/
- public ValidatorUserTypeName()
- {
+ public ValidatorUserTypeName() {
super(new String[0], CASE_INSENSITIVE);
- init();
- }
-
- private void init()
- {
- super.setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_EMPTY),
- RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_NOTUNIQUE));
- msg_Invalid = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_UDTNAME_NOTVALID);
+ init();
}
-
+
+ private void init() {
+ super.setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_EMPTY), RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_NOTUNIQUE));
+ msg_Invalid = RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTNAME_NOTVALID);
+ }
+
/**
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
* @param msg_Empty error message when entry field is empty
* @param msg_NonUnique error message when value entered is not unique
* @param msg_Invalid error message when syntax is not valid
*/
- public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid)
- {
+ public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique, SystemMessage msg_Invalid) {
super.setErrorMessages(msg_Empty, msg_NonUnique);
- this.msg_Invalid = msg_Invalid;
+ this.msg_Invalid = msg_Invalid;
}
/**
* Overridable method for invalidate character check, beyond what this class offers
* @return true if valid, false if not
*/
- protected boolean checkForBadCharacters(String newText)
- {
+ protected boolean checkForBadCharacters(String newText) {
return true;
}
-
- public String toString()
- {
+
+ public String toString() {
return "UserTypeNameValidator class"; //$NON-NLS-1$
}
- // ---------------------------
- // Parent Overrides...
- // ---------------------------
+ // ---------------------------
+ // Parent Overrides...
+ // ---------------------------
/**
* Validate each character.
* Override of parent method.
* Override yourself to refine the error checking.
*/
- public SystemMessage isSyntaxOk(String newText)
- {
- if (newText.length() > getMaximumNameLength())
- currentMessage = msg_Invalid;
- else
- currentMessage = checkForBadCharacters(newText) ? null: msg_Invalid;
- return currentMessage;
+ public SystemMessage isSyntaxOk(String newText) {
+ if (newText.length() > getMaximumNameLength())
+ currentMessage = msg_Invalid;
+ else
+ currentMessage = checkForBadCharacters(newText) ? null : msg_Invalid;
+ return currentMessage;
}
-
- // ---------------------------
- // ISystemValidator methods...
- // ---------------------------
-
- /**
- * Return the max length for folder names: 50
- */
- public int getMaximumNameLength()
- {
- return MAX_UDTNAME_LENGTH;
- }
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * Return the max length for folder names: 50
+ */
+ public int getMaximumNameLength() {
+ return MAX_UDTNAME_LENGTH;
+ }
-
}
\ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java
new file mode 100644
index 00000000000..ba883f4fa40
--- /dev/null
+++ b/rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java
@@ -0,0 +1,107 @@
+/********************************************************************************
+ * Copyright (c) 2002, 2007 IBM Corporation. All rights reserved.
+ * This program and the accompanying materials are made available under the terms
+ * of the Eclipse Public License v1.0 which accompanies this distribution, and is
+ * available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Initial Contributors:
+ * The following IBM employees contributed to the Remote System Explorer
+ * component that contains this file: David McKnight, Kushal Munir,
+ * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
+ * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
+ *
+ * Contributors:
+ * David Dykstal (IBM) - [186589] move user types, user actions, and compile commands
+ * API to the user actions plugin
+ ********************************************************************************/
+
+package org.eclipse.rse.internal.useractions.ui.validators;
+
+import org.eclipse.rse.internal.useractions.IUserActionsMessageIds;
+import org.eclipse.rse.services.clientserver.messages.SystemMessage;
+import org.eclipse.rse.ui.RSEUIPlugin;
+import org.eclipse.rse.ui.validators.ISystemValidator;
+
+/**
+ * This class is used to verify a user defined action's comment
+ */
+public class ValidatorUserTypeTypes implements ISystemValidator {
+ public static final int MAX_UDTTYPES_LENGTH = 512;
+
+ protected SystemMessage emptyMsg, invalidMsg, currentMessage;
+
+ /**
+ * Constructor to use when wanting to specify the "value required" error message,
+ * but use the default for the "Value not valid" error message
+ */
+ public ValidatorUserTypeTypes() {
+ setErrorMessages(RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_EMPTY), RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_VALIDATE_UDTTYPES_NOTVALID));
+ }
+
+ /**
+ * Set the error messages, overriding the defaults
+ */
+ public void setErrorMessages(SystemMessage emptyMsg, SystemMessage invalidMsg) {
+ this.emptyMsg = emptyMsg;
+ this.invalidMsg = invalidMsg;
+ }
+
+ // ---------------------------
+ // ISystemValidator methods...
+ // ---------------------------
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellEditorValidator#isValid(java.lang.Object)
+ */
+ public String isValid(Object input) {
+ currentMessage = null;
+ if (!(input instanceof String)) {
+ return null;
+ } else
+ return isValid((String) input);
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.IInputValidator#isValid(java.lang.String)
+ * @see #getSystemMessage()
+ */
+ public String isValid(String input) {
+ currentMessage = null;
+ if ((input == null) || (input.length() == 0)) {
+ currentMessage = emptyMsg;
+ } else {
+ if (input.length() > MAX_UDTTYPES_LENGTH) currentMessage = invalidMsg;
+ }
+ return (currentMessage == null) ? null : currentMessage.getLevelOneText();
+ }
+
+ /**
+ * When isValid returns non-null, call this to get the SystemMessage object for the error
+ * versus the simple string message.
+ */
+ public SystemMessage getSystemMessage() {
+ return currentMessage;
+ }
+
+ /**
+ * Return the max length for comments
+ */
+ public int getMaximumNameLength() {
+ return MAX_UDTTYPES_LENGTH;
+ }
+
+ /**
+ * For convenience, this is a shortcut to calling:
+ *
+ * if (isValid(text) != null)
+ * msg = getSystemMessage();
+ *
+ */
+ public SystemMessage validate(String text) {
+ if (isValid(text) != null)
+ return currentMessage;
+ else
+ return null;
+ }
+
+}
\ No newline at end of file