mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
[cleanup] fix 'local variable/field is never read' compiler warnings
This commit is contained in:
parent
7db84e1549
commit
6b26a0a792
21 changed files with 171 additions and 181 deletions
|
@ -35,7 +35,7 @@ public interface ISystemRemoteResource {
|
|||
|
||||
/**
|
||||
* Creates and returns the marker of the specified type on this resource.
|
||||
* @param the marker type
|
||||
* @param type the marker type
|
||||
* @return the created marker
|
||||
*/
|
||||
public ISystemRemoteMarker createMarker(String type);
|
||||
|
@ -43,15 +43,15 @@ public interface ISystemRemoteResource {
|
|||
/**
|
||||
* Deletes all markers on this resource of the given type, and optionally deletes
|
||||
* such markers from its children. Deletion of markers with subtypes is also possible.
|
||||
* @param the marker type, or <code>null</code> to indicate all types.
|
||||
* @param whether or not to consider the subtypes of the given type
|
||||
* @param type the marker type, or <code>null</code> to indicate all types.
|
||||
* @param includeSubtypes whether or not to consider the subtypes of the given type
|
||||
*/
|
||||
public void deleteMarkers(String type, boolean includeSubtypes);
|
||||
|
||||
/**
|
||||
* Returns the marker with the specified id on this resource, or null if there
|
||||
* is no such marker.
|
||||
* @param the id of the marker to find
|
||||
* @param id the id of the marker to find
|
||||
* @return a marker if found, or <code>null</code>
|
||||
*/
|
||||
public ISystemRemoteMarker findMarker(long id);
|
||||
|
@ -61,15 +61,15 @@ public interface ISystemRemoteResource {
|
|||
* optionally, on its children. Markers with subtypes of the given type
|
||||
* can also be found optionally. Returns an empty array if there are
|
||||
* no matching markers.
|
||||
* @param the marker type, or <code>null</code> to indicate all types.
|
||||
* @param whether or not to consider the subtypes of the given type
|
||||
* @param type the marker type, or <code>null</code> to indicate all types.
|
||||
* @param includeSubtypes whether or not to consider the subtypes of the given type
|
||||
* @return an array of markers, or an empty array if no markers are found
|
||||
*/
|
||||
public ISystemRemoteMarker[] findMarkers(String type, boolean includeSubtypes);
|
||||
|
||||
/**
|
||||
* Gets the marker with the given id. The marker is not guaranteed to exist.
|
||||
* @param the marker id.
|
||||
* @param id the marker id.
|
||||
*/
|
||||
public ISystemRemoteMarker getMarker(long id);
|
||||
|
||||
|
@ -156,20 +156,20 @@ public interface ISystemRemoteResource {
|
|||
|
||||
/**
|
||||
* Returns the last modified time on the server.
|
||||
* @param the last modified time on the server
|
||||
* @return the last modified time on the server
|
||||
*/
|
||||
public boolean getRemoteLastModifiedTime();
|
||||
|
||||
/**
|
||||
* Returns the last modified time on the client.
|
||||
* @param the last modified time on the client.
|
||||
* @return the last modified time on the client.
|
||||
*/
|
||||
public boolean getLocalLastModifiedTime();
|
||||
|
||||
/**
|
||||
* Returns whether the local copy, if there is one, is in sync with the
|
||||
* remote copy.
|
||||
* @param true if the local copy is in sync, false otherwise, or if the
|
||||
* @return true if the local copy is in sync, false otherwise, or if the
|
||||
* local copy does not exist.
|
||||
*/
|
||||
public boolean isSynchronized();
|
||||
|
|
|
@ -83,7 +83,7 @@ public class Logger implements IPropertyChangeListener {
|
|||
* @param systemPlugin The preferences for this plugin will determine the detail
|
||||
* logged by this logger. This allows different levels of detail to be logged in the
|
||||
* workbench.
|
||||
* @see LoggerFactory#getInst(Plugin);
|
||||
* @see LoggerFactory#getLogger(Plugin)
|
||||
*/
|
||||
Logger(Plugin systemPlugin) {
|
||||
this.systemPlugin = systemPlugin;
|
||||
|
|
|
@ -145,11 +145,9 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static void enablePerformanceLogging(boolean enable) : enable performance logging
|
||||
* @param
|
||||
* enable : true or false
|
||||
* @return
|
||||
* The flag ENABLE_PERFORMANCE_LOGGING is enable(true or false)
|
||||
* Enable performance logging
|
||||
* The flag ENABLE_PERFORMANCE_LOGGING is enabled(true or false)
|
||||
* @param enable : true or false
|
||||
*/
|
||||
public static void enablePerformanceLogging(boolean enable) {
|
||||
if (enable)
|
||||
|
@ -159,9 +157,8 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static boolean isPerformanceLoggingEnabled() : check if logging enabled
|
||||
* @return
|
||||
* boolean ENABLE_PERFORMANCE_LOGGING
|
||||
* Check if logging enabled.
|
||||
* @return boolean ENABLE_PERFORMANCE_LOGGING
|
||||
*/
|
||||
public static boolean isPerformanceLoggingEnabled() {
|
||||
return ENABLE_PERFORMANCE_LOGGING;
|
||||
|
@ -191,14 +188,12 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static String register(String comp_id, String feature, String version) : Registering a component
|
||||
* @param
|
||||
* - comp_id: Component to be registered
|
||||
* - feature: Identifier for Product Feature attribute in XML
|
||||
* - version: Identifier for Product Version attribute in XML
|
||||
* @return
|
||||
* - comp_id as the registered key
|
||||
* - An XML file is created by concatenating comp_id, feature and version with time stamp appended
|
||||
* Registering a component.
|
||||
* An XML file is created by concatenating comp_id, feature and version with time stamp appended
|
||||
* @param comp_id Component to be registered
|
||||
* @param feature Identifier for Product Feature attribute in XML
|
||||
* @param version Identifier for Product Version attribute in XML
|
||||
* @return comp_id as the registered key
|
||||
*/
|
||||
public static String register(String comp_id, String feature, String version) {
|
||||
|
||||
|
@ -230,10 +225,9 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static void deRegister(): De-register the default component
|
||||
* @return
|
||||
* Default component "_PERFORMANCELOGGER_" removed
|
||||
* start() will be disabled
|
||||
* De-register the default component.
|
||||
* Default component "_PERFORMANCELOGGER_" removed,
|
||||
* start() will be disabled.
|
||||
*/
|
||||
public static void deRegister() {
|
||||
perfLogRegistry.remove(DEFAULT_COMPONENT);
|
||||
|
@ -241,12 +235,10 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static void deRegister(String key): De-register a component
|
||||
* @param
|
||||
* key : component to be removed
|
||||
* @return
|
||||
* component identified by key removed
|
||||
* start(comp_id) will be disabled
|
||||
* De-register a component.
|
||||
* component identified by key removed,
|
||||
* start(comp_id) will be disabled.
|
||||
* @param key component to be removed
|
||||
*/
|
||||
public static void deRegister(String key) {
|
||||
perfLogRegistry.remove(key);
|
||||
|
@ -296,10 +288,8 @@ public class PerformanceLogger {
|
|||
|
||||
/**
|
||||
* public static long start(String comp_id): start timer for component comp_id using default TaskID
|
||||
* @param :
|
||||
* comp_id : component registered previously by register(comp_id,..)
|
||||
* @return
|
||||
* - started time in milliseconds.
|
||||
* @param comp_id : component registered previously by register(comp_id,..)
|
||||
* @return started time in milliseconds.
|
||||
*/
|
||||
public static long start(String comp_id) {
|
||||
String methodPath = getMethodName(true);
|
||||
|
@ -399,11 +389,8 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* private void generateXMLFile(ComponentData cd): create XML file
|
||||
* @param
|
||||
* cd is the component data for creating the XML
|
||||
* @return
|
||||
* - An XML file is created with "Product" and "System" tags.
|
||||
* Create an XML file with "Product" and "System" tags.
|
||||
* @param cd component data for creating the XML
|
||||
*/
|
||||
private static void generateXMLFile(ComponentData cd) {
|
||||
try {
|
||||
|
@ -479,8 +466,7 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* private void updateXMLFileAtStop(ComponentData cd, StartData td): update XML file with performance measurement info
|
||||
* @return
|
||||
* Update XML file with performance measurement info
|
||||
* - A "Task" tag is created in the XML file with the current start and stop timer information.
|
||||
*/
|
||||
private static void updateXMLFileAtStop(ComponentData cd, StartData td) {
|
||||
|
@ -623,16 +609,17 @@ public class PerformanceLogger {
|
|||
}
|
||||
|
||||
/**
|
||||
* public static void listSystemProfile(): retrieve the system information.
|
||||
* @return
|
||||
* These values will be retrieved and printed in stdout:
|
||||
* java.version
|
||||
* java.vm.version
|
||||
* java.class.version
|
||||
* java.class.path
|
||||
* java.library.path
|
||||
* os.name
|
||||
* os.version
|
||||
* Retrieve the system information.
|
||||
* These values will be retrieved and printed in stdout:
|
||||
* <ul>
|
||||
* <li>java.version</li>
|
||||
* <li>java.vm.version</li>
|
||||
* <li>java.class.version</li>
|
||||
* <li>java.class.path</li>
|
||||
* <li>java.library.path</li>
|
||||
* <li>os.name</li>
|
||||
* <li>os.version</li>
|
||||
* </ul>
|
||||
*/
|
||||
public static void listSystemProfile() {
|
||||
System.out.println("java version : " + System.getProperty("java.version"));
|
||||
|
|
|
@ -87,9 +87,9 @@ public class SystemNonRegexMatcher {
|
|||
/**
|
||||
* Find the first occurrence of the pattern between <code>start</code)(inclusive)
|
||||
* and <code>end</code>(exclusive).
|
||||
* @param <code>text</code>, the String object to search in
|
||||
* @param <code>start</code>, the starting index of the search range, inclusive
|
||||
* @param <code>end</code>, the ending index of the search range, exclusive
|
||||
* @param text the String object to search in
|
||||
* @param start the starting index of the search range, inclusive
|
||||
* @param end the ending index of the search range, exclusive
|
||||
* @return an <code>StringMatcher.Position</code> object that keeps the starting
|
||||
* (inclusive) and ending positions (exclusive) of the first occurrence of the
|
||||
* pattern in the specified range of the text; return null if not found or subtext
|
||||
|
@ -140,7 +140,7 @@ public class SystemNonRegexMatcher {
|
|||
/**
|
||||
* match the given <code>text</code> with the pattern
|
||||
* @return true if matched eitherwise false
|
||||
* @param <code>text</code>, a String object
|
||||
* @param text a String object
|
||||
*/
|
||||
public boolean match(String text) {
|
||||
return match(text, 0, text.length());
|
||||
|
@ -149,9 +149,9 @@ public class SystemNonRegexMatcher {
|
|||
* Given the starting (inclusive) and the ending (exclusive) positions in the
|
||||
* <code>text</code>, determine if the given substring matches with aPattern
|
||||
* @return true if the specified portion of the text matches the pattern
|
||||
* @param String <code>text</code>, a String object that contains the substring to match
|
||||
* @param int <code>start<code> marks the starting position (inclusive) of the substring
|
||||
* @param int <code>end<code> marks the ending index (exclusive) of the substring
|
||||
* @param text a String object that contains the substring to match
|
||||
* @param start marks the starting position (inclusive) of the substring
|
||||
* @param end marks the ending index (exclusive) of the substring
|
||||
*/
|
||||
public boolean match(String text, int start, int end) {
|
||||
if (null == text)
|
||||
|
@ -234,7 +234,6 @@ public class SystemNonRegexMatcher {
|
|||
}
|
||||
/**
|
||||
* Parses the given pattern into segments separated by wildcard '*' characters.
|
||||
* @param p, a String object that is a simple regular expression with '*' and/or '?'
|
||||
*/
|
||||
private void parseWildCards() {
|
||||
if(fPattern.startsWith("*"))//$NON-NLS-1$
|
||||
|
@ -295,9 +294,9 @@ public class SystemNonRegexMatcher {
|
|||
temp.copyInto(fSegments);
|
||||
}
|
||||
/**
|
||||
* @param <code>text</code>, a string which contains no wildcard
|
||||
* @param <code>start</code>, the starting index in the text for search, inclusive
|
||||
* @param <code>end</code>, the stopping point of search, exclusive
|
||||
* @param text a string which contains no wildcard
|
||||
* @param start the starting index in the text for search, inclusive
|
||||
* @param end the stopping point of search, exclusive
|
||||
* @return the starting index in the text of the pattern , or -1 if not found
|
||||
*/
|
||||
protected int posIn(String text, int start, int end) {//no wild card in pattern
|
||||
|
@ -318,11 +317,11 @@ public class SystemNonRegexMatcher {
|
|||
return -1;
|
||||
}
|
||||
/**
|
||||
* @param <code>text</code>, a simple regular expression that may only contain '?'(s)
|
||||
* @param <code>start</code>, the starting index in the text for search, inclusive
|
||||
* @param <code>end</code>, the stopping point of search, exclusive
|
||||
* @param <code>p</code>, a simple regular expression that may contains '?'
|
||||
* @param <code>caseIgnored</code>, wether the pattern is not casesensitive
|
||||
* @param text a simple regular expression that may only contain '?'(s)
|
||||
* @param start the starting index in the text for search, inclusive
|
||||
* @param end the stopping point of search, exclusive
|
||||
* @param p a simple regular expression that may contains '?'
|
||||
* @param caseIgnored wether the pattern is not casesensitive
|
||||
* @return the starting index in the text of the pattern , or -1 if not found
|
||||
*/
|
||||
protected int regExpPosIn(String text, int start, int end, String p) {
|
||||
|
@ -338,11 +337,11 @@ public class SystemNonRegexMatcher {
|
|||
/**
|
||||
*
|
||||
* @return boolean
|
||||
* @param <code>text</code>, a String to match
|
||||
* @param <code>start</code>, int that indicates the starting index of match, inclusive
|
||||
* @param <code>end</code> int that indicates the ending index of match, exclusive
|
||||
* @param <code>p</code>, String, String, a simple regular expression that may contain '?'
|
||||
* @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
|
||||
* @param text a String to match
|
||||
* @param start int that indicates the starting index of match, inclusive
|
||||
* @param end int that indicates the ending index of match, exclusive
|
||||
* @param p a simple regular expression that may contain '?'
|
||||
* @param ignoreCase boolean indicating wether <code>p</code> is case sensitive
|
||||
*/
|
||||
protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) {
|
||||
while (plen-- > 0) {
|
||||
|
@ -371,11 +370,11 @@ public class SystemNonRegexMatcher {
|
|||
return true;
|
||||
}
|
||||
/**
|
||||
* @param <code>text</code>, the string to match
|
||||
* @param <code>start</code>, the starting index in the text for search, inclusive
|
||||
* @param <code>end</code>, the stopping point of search, exclusive
|
||||
* @param code>p</code>, a string that has no wildcard
|
||||
* @param <code>ignoreCase</code>, boolean indicating wether code>p</code> is case sensitive
|
||||
* @param text the string to match
|
||||
* @param start the starting index in the text for search, inclusive
|
||||
* @param end the stopping point of search, exclusive
|
||||
* @param p a string that has no wildcard
|
||||
* @param ignoreCase boolean indicating wether <code>p</code> is case sensitive
|
||||
* @return the starting index in the text of the pattern , or -1 if not found
|
||||
*/
|
||||
protected int textPosIn(String text, int start, int end, String p) {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ValidatorFileUniqueName
|
|||
/**
|
||||
* Constructor
|
||||
* @param parentFolder the folder within which the name must be unique.
|
||||
* @param true if validating a folder name versus a file name
|
||||
* @param isFolder true if validating a folder name versus a file name
|
||||
*/
|
||||
public ValidatorFileUniqueName(Shell shell, IRemoteFile parentFolder, boolean isFolder)
|
||||
{
|
||||
|
@ -101,9 +101,9 @@ public class ValidatorFileUniqueName
|
|||
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -64,9 +64,9 @@ public class SystemProfileForm
|
|||
/**
|
||||
* Constructor.
|
||||
* @param msgLine A GUI widget capable of writing error messages to.
|
||||
* @param caller. The wizardpage or dialog hosting this form.
|
||||
* @param profile. The existing profile being updated, or null for New action.
|
||||
* @param showVerbage. Specify true to show first-time-user verbage.
|
||||
* @param caller The wizardpage or dialog hosting this form.
|
||||
* @param profile The existing profile being updated, or null for New action.
|
||||
* @param showVerbage Specify true to show first-time-user verbage.
|
||||
*/
|
||||
public SystemProfileForm(ISystemMessageLine msgLine, Object caller, ISystemProfile profile, boolean showVerbage)
|
||||
{
|
||||
|
@ -172,18 +172,16 @@ public class SystemProfileForm
|
|||
SystemMessage errMsg = null;
|
||||
Control controlInError = null;
|
||||
if (msgLine != null)
|
||||
msgLine.clearErrorMessage();
|
||||
{
|
||||
msgLine.clearErrorMessage();
|
||||
}
|
||||
errMsg = validateNameInput();
|
||||
if (errMsg != null)
|
||||
controlInError = profileName;
|
||||
else
|
||||
{
|
||||
}
|
||||
if (errMsg != null)
|
||||
{
|
||||
controlInError = profileName;
|
||||
controlInError.setFocus();
|
||||
showErrorMessage(errMsg);
|
||||
}
|
||||
}
|
||||
return (errMsg == null);
|
||||
}
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ public interface ISignonValidator
|
|||
/**
|
||||
* Verify if persisted userid and password are still valid
|
||||
*
|
||||
* @param Shell, if null the validator will run headless, if not null then the validator
|
||||
* @param shell Shell: if null the validator will run headless, if not null then the validator
|
||||
* may use the shell to prompt the user (for example, if the password has expired.)
|
||||
*
|
||||
* @return true if signonInfo contains a valid signon, false otherwise.
|
||||
|
|
|
@ -46,24 +46,27 @@ public class SystemSimpleContentProvider extends LabelProvider
|
|||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ITreeContentProvider#getChildren(Object)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.ITreeContentProvider#getChildren(Object)
|
||||
*/
|
||||
public Object[] getChildren(Object element)
|
||||
{
|
||||
return getElement(element).getChildren();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ITreeContentProvider#getParent(Object)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(Object)
|
||||
*/
|
||||
public Object getParent(Object element)
|
||||
{
|
||||
return getElement(element).getParent();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see ITreeContentProvider#hasChildren(Object)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
|
||||
*/
|
||||
public boolean hasChildren(Object element)
|
||||
{
|
||||
|
@ -74,24 +77,27 @@ public class SystemSimpleContentProvider extends LabelProvider
|
|||
return children.length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IStructuredContentProvider#getElements(Object)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(Object)
|
||||
*/
|
||||
public Object[] getElements(Object element)
|
||||
{
|
||||
return getChildren(element);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IContentProvider#dispose()
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
|
||||
*/
|
||||
public void dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @see IContentProvider#inputChanged(Viewer, Object, Object)
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(Viewer, Object, Object)
|
||||
*/
|
||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput)
|
||||
{
|
||||
|
|
|
@ -72,9 +72,9 @@ public class ValidatorCompileCommandLabel extends ValidatorUniqueString
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -81,9 +81,9 @@ public class ValidatorFileName
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -110,9 +110,9 @@ public class ValidatorFilterString
|
|||
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -81,9 +81,9 @@ public class ValidatorFolderName
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -79,9 +79,9 @@ public class ValidatorPathName
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -52,9 +52,9 @@ public class ValidatorSourceType extends ValidatorUniqueString
|
|||
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ public class ValidatorSpecialChar
|
|||
* Constructor
|
||||
* @param specialChars String containing special characters to test for.
|
||||
* @param isEmptyAllowed true if an empty string is valid
|
||||
* @param error message when invalid characters entered
|
||||
* @param msg_Invalid error message when invalid characters entered
|
||||
*/
|
||||
public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed, SystemMessage msg_Invalid)
|
||||
{
|
||||
|
@ -63,8 +63,8 @@ public class ValidatorSpecialChar
|
|||
* Constructor
|
||||
* @param specialChars String containing special characters to test for.
|
||||
* @param isEmptyAllowed true if an empty string is valid
|
||||
* @param error message when invalid characters entered
|
||||
* @param error message when empty string
|
||||
* @param msg_Invalid error message when invalid characters entered
|
||||
* @param msg_Empty error message when empty string
|
||||
*/
|
||||
public ValidatorSpecialChar(String specialChars, boolean isEmptyAllowed, SystemMessage msg_Invalid, SystemMessage msg_Empty)
|
||||
{
|
||||
|
@ -75,8 +75,8 @@ public class ValidatorSpecialChar
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty or null if to keep the default
|
||||
* @param error message when value entered is not valid, or null if to keep the default
|
||||
* @param msg_Empty error message when entry field is empty or null if to keep the default
|
||||
* @param msg_Invalid error message when value entered is not valid, or null if to keep the default
|
||||
*/
|
||||
public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_Invalid)
|
||||
{
|
||||
|
|
|
@ -79,9 +79,9 @@ public class ValidatorSystemName
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -50,9 +50,9 @@ public class ValidatorUniqueString
|
|||
|
||||
/**
|
||||
* Constructor accepting a Vector.
|
||||
* @param A vector containing list of existing strings to compare against.
|
||||
* @param existingList A vector containing list of existing strings to compare against.
|
||||
* Note that toString() is used to get the string from each item.
|
||||
* @param true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
|
||||
*/
|
||||
public ValidatorUniqueString(Vector existingList, boolean caseSensitive)
|
||||
{
|
||||
|
@ -64,8 +64,8 @@ public class ValidatorUniqueString
|
|||
}
|
||||
/**
|
||||
* Constructor accepting an Array.
|
||||
* @param An array containing list of existing strings to compare against.
|
||||
* @param true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param existingList An array containing list of existing strings to compare against.
|
||||
* @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
|
||||
*/
|
||||
public ValidatorUniqueString(String existingList[], boolean caseSensitive)
|
||||
{
|
||||
|
@ -77,10 +77,10 @@ public class ValidatorUniqueString
|
|||
}
|
||||
/**
|
||||
* Constructor accepting a Vector and another validator to use for the syntax checking.
|
||||
* @param A vector containing list of existing strings to compare against.
|
||||
* @param existingList A vector containing list of existing strings to compare against.
|
||||
* Note that toString() is used to get the string from each item.
|
||||
* @param true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param Another IInputValidator who does the job of checking the syntax. After
|
||||
* @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param syntaxValidator Another IInputValidator who does the job of checking the syntax. After
|
||||
* checking for non-nullness and uniqueness, this validator is used to
|
||||
* check for syntax.
|
||||
*/
|
||||
|
@ -92,9 +92,9 @@ public class ValidatorUniqueString
|
|||
}
|
||||
/**
|
||||
* Constructor accepting an Array and another validator to use for the syntax checking.
|
||||
* @param An array containing list of existing strings to compare against.
|
||||
* @param true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param Another IInputValidator who does the job of checking the syntax. After
|
||||
* @param existingList An array containing list of existing strings to compare against.
|
||||
* @param caseSensitive true if comparisons are to be case sensitive, false if case insensitive.
|
||||
* @param syntaxValidator Another IInputValidator who does the job of checking the syntax. After
|
||||
* checking for non-nullness and uniqueness, this validator is used to
|
||||
* check for syntax.
|
||||
*/
|
||||
|
@ -209,8 +209,8 @@ public class ValidatorUniqueString
|
|||
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty or null if to keep the default
|
||||
* @param error message when value entered is not unique or null if to keep the default
|
||||
* @param msg_Empty error message when entry field is empty or null if to keep the default
|
||||
* @param msg_NonUnique error message when value entered is not unique or null if to keep the default
|
||||
*/
|
||||
public void setErrorMessages(SystemMessage msg_Empty, SystemMessage msg_NonUnique)
|
||||
{
|
||||
|
|
|
@ -74,9 +74,9 @@ public class ValidatorUserActionName extends ValidatorUniqueString
|
|||
}
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -48,9 +48,9 @@ public class ValidatorUserTypeName extends ValidatorUniqueString
|
|||
|
||||
/**
|
||||
* Supply your own error message text. By default, messages from RSEUIPlugin resource bundle are used.
|
||||
* @param error message when entry field is empty
|
||||
* @param error message when value entered is not unique
|
||||
* @param error message when syntax is not valid
|
||||
* @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)
|
||||
{
|
||||
|
|
|
@ -333,9 +333,9 @@ public abstract class AbstractSystemViewAdapter
|
|||
/**
|
||||
* This is your opportunity to add actions to the popup menu for the given selection.
|
||||
* <p>
|
||||
* To put your action into the given menu, use the menu's {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method.
|
||||
* To put your action into the given menu, use the menu's {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method.
|
||||
* If you don't care where it goes within the popup, just pass the given <samp>menuGroup</samp> location id,
|
||||
* otherwise pass one of the GROUP_XXX values from {@link ISystemContextMenuConstants}. If you pass one that
|
||||
* otherwise pass one of the GROUP_XXX values from {@link org.eclipse.rse.ui.ISystemContextMenuConstants}. If you pass one that
|
||||
* identifies a pre-defined cascading menu, such as GROUP_OPENWITH, your action will magically appear in that
|
||||
* cascading menu, even if it was otherwise empty.
|
||||
* <p>
|
||||
|
@ -350,7 +350,7 @@ public abstract class AbstractSystemViewAdapter
|
|||
* @param menu the popup menu you can contribute to
|
||||
* @param selection the current selection in the calling tree or table view
|
||||
* @param parent the shell of the calling tree or table view
|
||||
* @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,IAction) add} method.
|
||||
* @param menuGroup the default menu group to place actions into if you don't care where they. Pass this to the SystemMenuManager {@link org.eclipse.rse.ui.SystemMenuManager#add(String,org.eclipse.jface.action.IAction) add} method.
|
||||
*
|
||||
* @see org.eclipse.rse.ui.view.ISystemViewElementAdapter#addActions(SystemMenuManager, IStructuredSelection, Shell, String)
|
||||
*/
|
||||
|
@ -642,7 +642,7 @@ public abstract class AbstractSystemViewAdapter
|
|||
* user clicks on the column heading. To support this for a numeric property say, return
|
||||
* a Long/Integer object if false, versus returning string.
|
||||
*
|
||||
* @param property the name or key of the property as named by its property descriptor
|
||||
* @param key the name or key of the property as named by its property descriptor
|
||||
* @param formatted indication of whether to return the value in formatted or raw form
|
||||
* @return the current value of the given property
|
||||
*/
|
||||
|
@ -1123,7 +1123,7 @@ public abstract class AbstractSystemViewAdapter
|
|||
/**
|
||||
* <i><b>Overridable</b> by subclasses, and is iff drag and drop supported.</i><br>
|
||||
* Perform drop from the "fromSet" of objects to the "to" object
|
||||
* @param from the source objects for the drop
|
||||
* @param fromSet the source objects for the drop
|
||||
* @param to the target object for the drop
|
||||
* @param sameSystemType indication of whether the source and target reside of the same type of system
|
||||
* @param sameSystem indication of whether the source and target are on the same system
|
||||
|
@ -1550,9 +1550,9 @@ public abstract class AbstractSystemViewAdapter
|
|||
* <i>Callable by subclasses.</i><br>
|
||||
* Do message variable substitution. Using you are replacing &1 (say) with
|
||||
* a string.
|
||||
* @param message containing substitution variable. Eg "Connect failed with return code &1"
|
||||
* @param substitution variable. Eg "%1"
|
||||
* @param substitution data. Eg "001"
|
||||
* @param msg message containing substitution variable. Eg "Connect failed with return code &1"
|
||||
* @param subOld substitution variable. Eg "%1"
|
||||
* @param subNew substitution data. Eg "001"
|
||||
* @return message with all occurrences of variable substituted with data.
|
||||
*/
|
||||
public static String sub(String msg, String subOld, String subNew)
|
||||
|
|
|
@ -142,17 +142,17 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
* Constructor for SystemConnectionCombo when there is a subsystem factory to restrict the list to.
|
||||
* @param parent Parent composite
|
||||
* @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
|
||||
* @param subsystemFactory. Only connections with subsystems owned by this factory are returned.
|
||||
* @param ssConfig Only connections with subsystems owned by this factory are returned.
|
||||
* @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
|
||||
* @param showNewButton true if a New... button is to be included in this composite
|
||||
*/
|
||||
public SystemHostCombo(Composite parent, int style, ISubSystemConfiguration ssFactory, IHost defaultConnection, boolean showNewButton)
|
||||
public SystemHostCombo(Composite parent, int style, ISubSystemConfiguration ssConfig, IHost defaultConnection, boolean showNewButton)
|
||||
{
|
||||
super(parent, style);
|
||||
restrictSystemTypesTo = ssFactory.getSystemTypes();
|
||||
restrictSystemTypesTo = ssConfig.getSystemTypes();
|
||||
init(parent, showNewButton);
|
||||
populateSSFactory = ssFactory;
|
||||
populateConnectionCombo(connectionCombo, ssFactory, defaultConnection);
|
||||
populateSSFactory = ssConfig;
|
||||
populateConnectionCombo(connectionCombo, ssConfig, defaultConnection);
|
||||
setConnectionToolTipText();
|
||||
addOurConnectionSelectionListener();
|
||||
}
|
||||
|
@ -163,16 +163,16 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
* @param parent Parent composite
|
||||
* @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
|
||||
* @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
|
||||
* @param subsystemFactoryId. Only connections with subsystems owned by this factory are returned.
|
||||
* @param ssConfigId Only connections with subsystems owned by this configuration are returned.
|
||||
* @param showNewButton true if a New... button is to be included in this composite
|
||||
*/
|
||||
public SystemHostCombo(Composite parent, int style, IHost defaultConnection, String ssFactoryId, boolean showNewButton)
|
||||
public SystemHostCombo(Composite parent, int style, IHost defaultConnection, String ssConfigId, boolean showNewButton)
|
||||
{
|
||||
super(parent, style);
|
||||
restrictSystemTypesTo = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(ssFactoryId).getSystemTypes();
|
||||
restrictSystemTypesTo = RSEUIPlugin.getTheSystemRegistry().getSubSystemConfiguration(ssConfigId).getSystemTypes();
|
||||
init(parent, showNewButton);
|
||||
populateSSFactoryId = ssFactoryId;
|
||||
populateConnectionCombo(connectionCombo, ssFactoryId, defaultConnection);
|
||||
populateSSFactoryId = ssConfigId;
|
||||
populateConnectionCombo(connectionCombo, ssConfigId, defaultConnection);
|
||||
setConnectionToolTipText();
|
||||
addOurConnectionSelectionListener();
|
||||
}
|
||||
|
@ -185,11 +185,11 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
* @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
|
||||
* @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
|
||||
* @param showNewButton true if a New... button is to be included in this composite
|
||||
* @param subsystemFactoryCategory. Only connections with subsystems owned by factories of this category are returned.
|
||||
* @param ssConfigCategory Only connections with subsystems owned by configurations of this category are returned.
|
||||
*/
|
||||
public SystemHostCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssFactoryCategory)
|
||||
public SystemHostCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssConfigCategory)
|
||||
{
|
||||
this(parent, style, defaultConnection, showNewButton, ssFactoryCategory, true);
|
||||
this(parent, style, defaultConnection, showNewButton, ssConfigCategory, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -200,8 +200,8 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
* @param style SWT style flags for overall composite widget. Typically just pass SWT.NULL
|
||||
* @param defaultConnection the system connection to preselect. Pass null to preselect first connection.
|
||||
* @param showNewButton true if a New... button is to be included in this composite
|
||||
* @param subsystemFactoryCategory. Only connections with subsystems owned by factories of this category are returned.
|
||||
* @param showLabel. true if a 'Connection' label is to be included in this composite
|
||||
* @param ssFactoryCategory Only connections with subsystems owned by factories of this category are returned.
|
||||
* @param showLabel true if a 'Connection' label is to be included in this composite
|
||||
*/
|
||||
public SystemHostCombo(Composite parent, int style, IHost defaultConnection, boolean showNewButton, String ssFactoryCategory, boolean showLabel)
|
||||
{
|
||||
|
@ -912,7 +912,7 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
{
|
||||
int type = event.getType();
|
||||
Object src = event.getSource();
|
||||
Object parent = event.getParent();
|
||||
//Object parent = event.getParent();
|
||||
switch ( type )
|
||||
{
|
||||
case EVENT_ADD:
|
||||
|
@ -1009,7 +1009,7 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
newButton.addSelectionListener(selectionListener);
|
||||
}
|
||||
|
@ -1022,7 +1022,7 @@ public class SystemHostCombo extends Composite implements ISelectionProvider, IS
|
|||
public void widgetSelected(SelectionEvent event)
|
||||
{
|
||||
setConnectionToolTipText();
|
||||
};
|
||||
}
|
||||
};
|
||||
connectionCombo.addSelectionListener(selectionListener);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue