Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 70011 Details for
Bug 186589
[api][breaking] Icons, SystemMessages and HelpContexts for User Actions only should be removed from RSEUIPlugin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
patch that removes the user defined actions API from core and ui plugins
186589.patch (text/plain), 140.97 KB, created by
David Dykstal
on 2007-06-04 14:50:15 EDT
(
hide
)
Description:
patch that removes the user defined actions API from core and ui plugins
Filename:
MIME Type:
Creator:
David Dykstal
Created:
2007-06-04 14:50:15 EDT
Size:
140.97 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.ui >Index: UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java >--- UI/org/eclipse/rse/ui/validators/ValidatorUserTypeTypes.java 25 Aug 2006 11:45:34 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -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: >- * <pre><code> >- * if (isValid(text) != null) >- * msg = getSystemMessage(); >- * </code></pre> >- */ >- public SystemMessage validate(String text) >- { >- if (isValid(text) != null) >- return currentMessage; >- else >- return null; >- } >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java >--- UI/org/eclipse/rse/ui/validators/ValidatorUserTypeName.java 5 Dec 2006 00:20:13 -0000 1.5 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,106 +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 type's name. >- */ >-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; >- >- /** >- * Use this constructor when the name need not be unique, and you just want the syntax checking. >- */ >- 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); >- } >- >- /** >- * 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) >- { >- super.setErrorMessages(msg_Empty, msg_NonUnique); >- 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) >- { >- return true; >- } >- >- public String toString() >- { >- return "UserTypeNameValidator class"; //$NON-NLS-1$ >- } >- >- // --------------------------- >- // 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; >- } >- >- >- // --------------------------- >- // ISystemValidator methods... >- // --------------------------- >- >- /** >- * Return the max length for folder names: 50 >- */ >- public int getMaximumNameLength() >- { >- return MAX_UDTNAME_LENGTH; >- } >- >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java >--- UI/org/eclipse/rse/ui/validators/ValidatorUserActionCommand.java 25 Aug 2006 11:45:34 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -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: >- * <pre><code> >- * if (isValid(text) != null) >- * msg = getSystemMessage(); >- * </code></pre> >- */ >- public SystemMessage validate(String text) >- { >- if (isValid(text) != null) >- return currentMessage; >- else >- return null; >- } >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java >--- UI/org/eclipse/rse/ui/validators/ValidatorCompileCommandLabel.java 30 May 2007 15:53:22 -0000 1.6 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,132 +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 java.util.Collection; >- >-import org.eclipse.core.resources.IWorkspace; >-import org.eclipse.core.resources.ResourcesPlugin; >-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 compile command's label >- */ >-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 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) >- { >- super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness >- init(); >- } >- /** >- * Use this constructor when you have an array of existing labels. >- */ >- public ValidatorCompileCommandLabel(String existingLabelList[]) >- { >- super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness >- 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() >- { >- 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); >- } >- /** >- * 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) >- { >- super.setErrorMessages(msg_Empty, msg_NonUnique); >- 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) >- { >- return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character. >- (newText.indexOf('@') == -1)); // defect 43950 >- } >- >- public String toString() >- { >- return getClass().getName(); >- } >- >- // --------------------------- >- // 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; >- } >- >- >- // --------------------------- >- // ISystemValidator methods... >- // --------------------------- >- >- /** >- * Return the max length for compile commands: 50 >- */ >- public int getMaximumNameLength() >- { >- return MAX_CMDLABEL_LENGTH; >- } >- >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java >--- UI/org/eclipse/rse/ui/validators/ValidatorUserActionComment.java 25 Aug 2006 11:45:34 -0000 1.3 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -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: >- * <pre><code> >- * if (isValid(text) != null) >- * msg = getSystemMessage(); >- * </code></pre> >- */ >- public SystemMessage validate(String text) >- { >- if (isValid(text) != null) >- return currentMessage; >- else >- return null; >- } >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java >=================================================================== >RCS file: UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java >diff -N UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java >--- UI/org/eclipse/rse/ui/validators/ValidatorUserActionName.java 30 May 2007 15:53:22 -0000 1.7 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,134 +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 java.util.Collection; >- >-import org.eclipse.core.resources.IWorkspace; >-import org.eclipse.core.resources.ResourcesPlugin; >-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 name. >- */ >-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 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) >- { >- super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness >- 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[]) >- { >- super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness >- init(); >- } >- >- /** >- * Use this constructor when the name need not be unique, and you just want >- * the syntax checking. >- */ >- 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); >- } >- /** >- * 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) >- { >- super.setErrorMessages(msg_Empty, msg_NonUnique); >- 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) >- { >- return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character >- (newText.indexOf('@') == -1)); // defect 43950 >- } >- >- public String toString() >- { >- return "UserActionNameValidator class"; //$NON-NLS-1$ >- } >- >- // --------------------------- >- // 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; >- } >- >- >- // --------------------------- >- // ISystemValidator methods... >- // --------------------------- >- >- /** >- * Return the max length for folder names: 256 >- */ >- public int getMaximumNameLength() >- { >- return MAX_UDANAME_LENGTH; >- } >- >- >-} >\ No newline at end of file >Index: UI/org/eclipse/rse/ui/ISystemIconConstants.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemIconConstants.java,v >retrieving revision 1.11 >diff -u -r1.11 ISystemIconConstants.java >--- UI/org/eclipse/rse/ui/ISystemIconConstants.java 31 May 2007 18:59:49 -0000 1.11 >+++ UI/org/eclipse/rse/ui/ISystemIconConstants.java 4 Jun 2007 18:41:34 -0000 >@@ -148,10 +148,6 @@ > // 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 +221,6 @@ > 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; >Index: UI/org/eclipse/rse/ui/ISystemMessages.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/ISystemMessages.java,v >retrieving revision 1.10 >diff -u -r1.10 ISystemMessages.java >--- UI/org/eclipse/rse/ui/ISystemMessages.java 1 Jun 2007 11:40:35 -0000 1.10 >+++ UI/org/eclipse/rse/ui/ISystemMessages.java 4 Jun 2007 18:41:35 -0000 >@@ -195,33 +195,10 @@ > > 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 +219,9 @@ > 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 >Index: UI/org/eclipse/rse/ui/RSEUIPlugin.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/RSEUIPlugin.java,v >retrieving revision 1.60 >diff -u -r1.60 RSEUIPlugin.java >--- UI/org/eclipse/rse/ui/RSEUIPlugin.java 4 Jun 2007 16:29:25 -0000 1.60 >+++ UI/org/eclipse/rse/ui/RSEUIPlugin.java 4 Jun 2007 18:41:35 -0000 >@@ -313,8 +313,8 @@ > 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 +330,12 @@ > 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); >Index: UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java,v >retrieving revision 1.11 >diff -u -r1.11 SystemTeamViewPart.java >--- UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java 4 Jun 2007 16:29:24 -0000 1.11 >+++ UI/org/eclipse/rse/internal/ui/view/team/SystemTeamViewPart.java 4 Jun 2007 18:41:33 -0000 >@@ -932,11 +932,11 @@ > // 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) >#P org.eclipse.rse.shells.ui >Index: src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.shells.ui/src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java,v >retrieving revision 1.7 >diff -u -r1.7 SystemCommandEditor.java >--- src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java 29 Mar 2007 18:56:15 -0000 1.7 >+++ src/org/eclipse/rse/shells/ui/view/SystemCommandEditor.java 4 Jun 2007 18:41:37 -0000 >@@ -44,7 +44,6 @@ > 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 +104,11 @@ > } > 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); >#P org.eclipse.rse.useractions >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemCompileAction.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java 15 May 2007 23:54:14 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileAction.java 4 Jun 2007 18:41:40 -0000 >@@ -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.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 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(); >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemCompileCascadeByProfileAction.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java 15 May 2007 23:54:14 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCascadeByProfileAction.java 4 Jun 2007 18:41:40 -0000 >@@ -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; > >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemCompileCommandLabelProvider.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java 11 Apr 2007 19:51:39 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandLabelProvider.java 4 Jun 2007 18:41:41 -0000 >@@ -10,9 +10,10 @@ > * Contributors: > * IBM Corporation - initial API and implementation > *******************************************************************************/ >+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 +21,9 @@ > * dialog. > */ > public class SystemCompileCommandLabelProvider extends LabelProvider { >+ >+ Image _compileCommandImage = null; >+ > /** > * Constructor > */ >@@ -27,8 +31,8 @@ > 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 +43,19 @@ > 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; > } >+ > } >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java,v >retrieving revision 1.4 >diff -u -r1.4 SystemWorkWithCompileCommandsDialog.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java 15 May 2007 23:54:14 -0000 1.4 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsDialog.java 4 Jun 2007 18:41:43 -0000 >@@ -28,6 +28,7 @@ > 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 +586,10 @@ > 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 +928,7 @@ > 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 +965,7 @@ > 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 +999,7 @@ > 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 +1061,7 @@ > 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); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java,v >retrieving revision 1.4 >diff -u -r1.4 SystemCompileManager.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java 15 May 2007 23:54:14 -0000 1.4 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileManager.java 4 Jun 2007 18:41:41 -0000 >@@ -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 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 @@ > } > //System.out.println("systemProfile = " + systemProfile); > //System.out.println("subsystemFactory = " + subsystemFactory); >- IFolder folder = SystemResourceManager.getCompileCommandsFolder(systemProfile, subsystemFactory); >+ IFolder folder = UserActionsPersistenceUtil.getCompileCommandsFolder(systemProfile, subsystemFactory); > return folder; > } > >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemCompileCommandEditPane.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java 11 Apr 2007 19:51:39 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemCompileCommandEditPane.java 4 Jun 2007 18:41:41 -0000 >@@ -18,13 +18,13 @@ > 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; >Index: src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemWorkWithCompileCommandsAction.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java 15 May 2007 23:54:14 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/SystemWorkWithCompileCommandsAction.java 4 Jun 2007 18:41:41 -0000 >@@ -17,10 +17,10 @@ > 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 +39,7 @@ > 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); >Index: plugin.properties >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/plugin.properties,v >retrieving revision 1.2 >diff -u -r1.2 plugin.properties >--- plugin.properties 22 Mar 2007 15:50:53 -0000 1.2 >+++ plugin.properties 4 Jun 2007 18:41:39 -0000 >@@ -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 >Index: plugin.xml >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/plugin.xml,v >retrieving revision 1.2 >diff -u -r1.2 plugin.xml >--- plugin.xml 11 Apr 2007 19:51:44 -0000 1.2 >+++ plugin.xml 4 Jun 2007 18:41:39 -0000 >@@ -8,25 +8,34 @@ > <extension > point="org.eclipse.ui.propertyPages"> > <page >- objectClass="org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionElement" > name="%PropertyPage.TeamViewUserActionNode" > class="org.eclipse.rse.internal.useractions.ui.propertypages.SystemTeamViewUserActionPropertyPage" > id="org.eclipse.rse.ui.SystemTeamViewUserActionPropertyPage"> >+ <enabledWhen> >+ <instanceof >+ value="org.eclipse.rse.internal.useractions.ui.uda.SystemUDActionElement"> >+ </instanceof> >+ </enabledWhen> > </page> > <page >- objectClass="org.eclipse.rse.internal.useractions.ui.compile.teamview.SystemTeamViewCompileTypeNode" > name="%PropertyPage.TeamViewCompileTypeNode" > class="org.eclipse.rse.internal.useractions.ui.propertypages.SystemTeamViewCompileTypePropertyPage" > id="org.eclipse.rse.ui.SystemTeamViewCompileTypePropertyPage"> >+ <enabledWhen> >+ <instanceof >+ value="org.eclipse.rse.internal.useractions.ui.compile.teamview.SystemTeamViewCompileTypeNode"> >+ </instanceof> >+ </enabledWhen> > </page> > <page >- objectClass="org.eclipse.rse.internal.useractions.ui.compile.teamview.SystemTeamViewCompileCommandNode" > name="%PropertyPage.TeamViewCompileCommandNode" > class="org.eclipse.rse.internal.useractions.ui.propertypages.SystemTeamViewCompileCommandPropertyPage" > id="com.ibm.etools.systems.SystemTeamViewCompileCommandPropertyPage"> >+ <enabledWhen> >+ <instanceof >+ value="org.eclipse.rse.internal.useractions.ui.compile.teamview.SystemTeamViewCompileCommandNode"> >+ </instanceof> >+ </enabledWhen> > </page> >- >- >- > </extension> > </plugin> >Index: src/org/eclipse/rse/internal/useractions/UserActionsIcon.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/UserActionsIcon.java,v >retrieving revision 1.1 >diff -u -r1.1 UserActionsIcon.java >--- src/org/eclipse/rse/internal/useractions/UserActionsIcon.java 11 Apr 2007 19:51:43 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/UserActionsIcon.java 4 Jun 2007 18:41:39 -0000 >@@ -103,7 +103,7 @@ > * @return the image descriptor > */ > public ImageDescriptor getImageDescriptor() { >- ImageDescriptor descriptor = Activator.getImageDescriptor(location); >+ ImageDescriptor descriptor = Activator.getDefault().getImageDescriptor(location); > return descriptor; > } > >Index: src/org/eclipse/rse/internal/useractions/Activator.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/Activator.java,v >retrieving revision 1.1 >diff -u -r1.1 Activator.java >--- src/org/eclipse/rse/internal/useractions/Activator.java 11 Apr 2007 19:51:43 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/Activator.java 4 Jun 2007 18:41:39 -0000 >@@ -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 @@ > 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; > } >+ > } >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java,v >retrieving revision 1.3 >diff -u -r1.3 SystemUDBaseManager.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java 15 May 2007 23:54:14 -0000 1.3 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseManager.java 4 Jun 2007 18:41:48 -0000 >@@ -50,6 +50,7 @@ > 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 +423,7 @@ > // 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 +445,7 @@ > 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; > } >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemUDActionTreeView.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java 23 Apr 2007 13:40:45 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionTreeView.java 4 Jun 2007 18:41:45 -0000 >@@ -12,10 +12,10 @@ > 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 +46,7 @@ > * This is a parent class override. > */ > protected int getResourceType() { >- return ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION; >+ return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_USERACTION; > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemUDActionManager.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java 11 Apr 2007 19:51:42 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionManager.java 4 Jun 2007 18:41:45 -0000 >@@ -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 @@ > * 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 @@ > * 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 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) { >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemUDTypeManager.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java 15 May 2007 23:54:14 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeManager.java 4 Jun 2007 18:41:50 -0000 >@@ -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.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 @@ > */ > 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 @@ > //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 void setFolder(String profileName, String factoryId) { > //importCaseFolder = SystemResourceManager.getUserActionsFolder(profileName, factoryId); >- importCaseFolder = SystemResourceManager.getTypeFiltersFolder(factoryId); >+ importCaseFolder = UserActionsPersistenceUtil.getTypeFiltersFolder(factoryId); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java,v >retrieving revision 1.3 >diff -u -r1.3 SystemUDActionEditPane.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java 14 May 2007 13:03:53 -0000 1.3 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDActionEditPane.java 4 Jun 2007 18:41:45 -0000 >@@ -24,18 +24,19 @@ > 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 +1098,9 @@ > 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); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemUDSimpleTypesListEditor.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java 11 Apr 2007 19:51:42 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDSimpleTypesListEditor.java 4 Jun 2007 18:41:49 -0000 >@@ -8,13 +8,14 @@ > * 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 @@ > 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; >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java,v >retrieving revision 1.2 >diff -u -r1.2 SystemUDTypeTreeView.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java 23 Apr 2007 13:40:45 -0000 1.2 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeTreeView.java 4 Jun 2007 18:41:50 -0000 >@@ -12,12 +12,12 @@ > 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 +72,7 @@ > * 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 +80,7 @@ > * This is a parent class override. > */ > protected int getResourceType() { >- return ISystemModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE; >+ return IUserActionsModelChangeEvents.SYSTEM_RESOURCETYPE_NAMEDTYPE; > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java,v >retrieving revision 1.4 >diff -u -r1.4 SystemUDBaseTreeView.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java 15 May 2007 23:54:14 -0000 1.4 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDBaseTreeView.java 4 Jun 2007 18:41:48 -0000 >@@ -29,9 +29,9 @@ > 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 +398,7 @@ > * Return message for delete confirmation > */ > protected SystemMessage getDeleteConfirmationMessage() { >- return RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONFIRM_DELETE_USERACTION); >+ return RSEUIPlugin.getPluginMessage(IUserActionsMessageIds.MSG_CONFIRM_DELETE_USERACTION); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java,v >retrieving revision 1.3 >diff -u -r1.3 SystemUDTypeEditPane.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java 14 May 2007 13:03:53 -0000 1.3 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/SystemUDTypeEditPane.java 4 Jun 2007 18:41:49 -0000 >@@ -24,9 +24,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.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 +473,9 @@ > 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); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemWorkWithFileTypesAction.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java 11 Apr 2007 19:51:44 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithFileTypesAction.java 4 Jun 2007 18:41:50 -0000 >@@ -15,10 +15,10 @@ > 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 +70,7 @@ > */ > 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$ >Index: src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemWorkWithUDAsAction.java >--- src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java 11 Apr 2007 19:51:44 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/uda/actions/SystemWorkWithUDAsAction.java 4 Jun 2007 18:41:50 -0000 >@@ -17,10 +17,10 @@ > 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 +61,7 @@ > */ > 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 +76,7 @@ > 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); >Index: src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java,v >retrieving revision 1.1 >diff -u -r1.1 SystemTeamViewCompileCommandNode.java >--- src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java 11 Apr 2007 19:51:45 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/ui/compile/teamview/SystemTeamViewCompileCommandNode.java 4 Jun 2007 18:41:43 -0000 >@@ -14,8 +14,8 @@ > 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 +49,7 @@ > * @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); > } > > /** >Index: src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java,v >retrieving revision 1.3 >diff -u -r1.3 SystemTeamViewCompileCommandPropertyPage.java >--- src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java 14 May 2007 13:03:53 -0000 1.3 >+++ src/org/eclipse/rse/internal/useractions/ui/propertypages/SystemTeamViewCompileCommandPropertyPage.java 4 Jun 2007 18:41:43 -0000 >@@ -17,6 +17,7 @@ > 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 +167,7 @@ > 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; > } > >Index: src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.useractions/src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java,v >retrieving revision 1.1 >diff -u -r1.1 UDTypesEditorFiles.java >--- src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java 11 Apr 2007 19:51:42 -0000 1.1 >+++ src/org/eclipse/rse/internal/useractions/files/uda/UDTypesEditorFiles.java 4 Jun 2007 18:41:39 -0000 >@@ -19,11 +19,11 @@ > 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 +244,7 @@ > */ > 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 +262,7 @@ > 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 +275,11 @@ > 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; >Index: src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java >diff -N src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/IUserActionsMessageIds.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,37 @@ >+/******************************************************************************* >+ * 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 >+ *******************************************************************************/ >+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$ >+ >+} >Index: src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java >diff -N src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/UserActionsPersistenceUtil.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,210 @@ >+/******************************************************************************* >+ * 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 >+ *******************************************************************************/ >+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. >+ } >+} >Index: src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java >diff -N src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/IUserActionsModelChangeEvents.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,31 @@ >+/******************************************************************************* >+ * 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 >+ *******************************************************************************/ >+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; >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeName.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,96 @@ >+/******************************************************************************** >+ * 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.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 static final int MAX_UDTNAME_LENGTH = 50; // max name for a file type >+ >+ protected SystemMessage msg_Invalid; >+ >+ /** >+ * Use this constructor when the name need not be unique, and you just want the syntax checking. >+ */ >+ public ValidatorUserTypeName() { >+ super(new String[0], CASE_INSENSITIVE); >+ 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) { >+ super.setErrorMessages(msg_Empty, msg_NonUnique); >+ 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) { >+ return true; >+ } >+ >+ public String toString() { >+ return "UserTypeNameValidator class"; //$NON-NLS-1$ >+ } >+ >+ // --------------------------- >+ // 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; >+ } >+ >+ // --------------------------- >+ // ISystemValidator methods... >+ // --------------------------- >+ >+ /** >+ * Return the max length for folder names: 50 >+ */ >+ public int getMaximumNameLength() { >+ return MAX_UDTNAME_LENGTH; >+ } >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionCommand.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,106 @@ >+/******************************************************************************** >+ * 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.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: >+ * <pre><code> >+ * if (isValid(text) != null) >+ * msg = getSystemMessage(); >+ * </code></pre> >+ */ >+ public SystemMessage validate(String text) { >+ if (isValid(text) != null) >+ return currentMessage; >+ else >+ return null; >+ } >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserTypeTypes.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,106 @@ >+/******************************************************************************** >+ * 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.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: >+ * <pre><code> >+ * if (isValid(text) != null) >+ * msg = getSystemMessage(); >+ * </code></pre> >+ */ >+ public SystemMessage validate(String text) { >+ if (isValid(text) != null) >+ return currentMessage; >+ else >+ return null; >+ } >+ >+} >Index: src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java >diff -N src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/IUserActionsImageIds.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,24 @@ >+/******************************************************************************* >+ * 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 >+ *******************************************************************************/ >+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$ >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionName.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,124 @@ >+/******************************************************************************** >+ * 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.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.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 static final int MAX_UDANAME_LENGTH = 256; // max name for an action >+ >+ 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) { >+ super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness >+ 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[]) { >+ super(existingNameList, CASE_SENSITIVE); // case sensitive uniqueness >+ init(); >+ } >+ >+ /** >+ * Use this constructor when the name need not be unique, and you just want >+ * the syntax checking. >+ */ >+ public ValidatorUserActionName() { >+ super(new String[0], CASE_SENSITIVE); >+ 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) { >+ super.setErrorMessages(msg_Empty, msg_NonUnique); >+ 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) { >+ return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character >+ (newText.indexOf('@') == -1)); // defect 43950 >+ } >+ >+ public String toString() { >+ return "UserActionNameValidator class"; //$NON-NLS-1$ >+ } >+ >+ // --------------------------- >+ // 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; >+ } >+ >+ // --------------------------- >+ // ISystemValidator methods... >+ // --------------------------- >+ >+ /** >+ * Return the max length for folder names: 256 >+ */ >+ public int getMaximumNameLength() { >+ return MAX_UDANAME_LENGTH; >+ } >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorUserActionComment.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,106 @@ >+/******************************************************************************** >+ * 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.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: >+ * <pre><code> >+ * if (isValid(text) != null) >+ * msg = getSystemMessage(); >+ * </code></pre> >+ */ >+ public SystemMessage validate(String text) { >+ if (isValid(text) != null) >+ return currentMessage; >+ else >+ return null; >+ } >+ >+} >Index: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java >=================================================================== >RCS file: src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java >diff -N src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/rse/internal/useractions/ui/validators/ValidatorCompileCommandLabel.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,123 @@ >+/******************************************************************************** >+ * 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.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.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 static final int MAX_CMDLABEL_LENGTH = 50; // max name for a compile command name >+ >+ 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) { >+ super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness >+ init(); >+ } >+ >+ /** >+ * Use this constructor when you have an array of existing labels. >+ */ >+ public ValidatorCompileCommandLabel(String existingLabelList[]) { >+ super(existingLabelList, CASE_INSENSITIVE); // case insensitive uniqueness >+ 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() { >+ super(new String[0], CASE_INSENSITIVE); >+ 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) { >+ super.setErrorMessages(msg_Empty, msg_NonUnique); >+ 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) { >+ return ((newText.indexOf('&') == -1) && // causes problems in menu popup as its a mnemonic character. >+ (newText.indexOf('@') == -1)); // defect 43950 >+ } >+ >+ public String toString() { >+ return getClass().getName(); >+ } >+ >+ // --------------------------- >+ // 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; >+ } >+ >+ // --------------------------- >+ // ISystemValidator methods... >+ // --------------------------- >+ >+ /** >+ * Return the max length for compile commands: 50 >+ */ >+ public int getMaximumNameLength() { >+ return MAX_CMDLABEL_LENGTH; >+ } >+ >+} >#P org.eclipse.rse.core >Index: src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java,v >retrieving revision 1.1 >diff -u -r1.1 ISystemModelChangeEvents.java >--- src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java 23 Apr 2007 13:41:53 -0000 1.1 >+++ src/org/eclipse/rse/core/events/ISystemModelChangeEvents.java 4 Jun 2007 18:41:51 -0000 >@@ -12,6 +12,7 @@ > * > * Contributors: > * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core >+ * David Dykstal (IBM) - Move User Actions events to the user actions plugin > ********************************************************************************/ > > package org.eclipse.rse.core.events; >@@ -84,18 +85,18 @@ > * 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 > */ >Index: src/org/eclipse/rse/core/SystemResourceManager.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.core/src/org/eclipse/rse/core/SystemResourceManager.java,v >retrieving revision 1.6 >diff -u -r1.6 SystemResourceManager.java >--- src/org/eclipse/rse/core/SystemResourceManager.java 4 Jun 2007 16:29:15 -0000 1.6 >+++ src/org/eclipse/rse/core/SystemResourceManager.java 4 Jun 2007 18:41:51 -0000 >@@ -277,120 +277,6 @@ > 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 +420,4 @@ > 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 186589
:
70011
|
70021