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