Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'target_explorer/plugins/org.eclipse.tcf.te.launch.core')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java9
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java18
2 files changed, 14 insertions, 13 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java
index 20eeabd3f..245676960 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/lm/LaunchConfigHelper.java
@@ -38,18 +38,19 @@ public class LaunchConfigHelper {
return DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name);
}
- public static void addLaunchConfigAttribute(ILaunchConfigurationWorkingCopy wc, String key, Object value) {
+ @SuppressWarnings("unchecked")
+ public static void addLaunchConfigAttribute(ILaunchConfigurationWorkingCopy wc, String key, Object value) {
if (value instanceof String) {
DefaultPersistenceDelegate.setAttribute(wc, key, (String)value);
}
else if (value instanceof List) {
- DefaultPersistenceDelegate.setAttribute(wc, key, (List<?>)value);
+ DefaultPersistenceDelegate.setAttribute(wc, key, (List<String>)value);
}
else if (value instanceof Map) {
- DefaultPersistenceDelegate.setAttribute(wc, key, (Map<?,?>)value);
+ DefaultPersistenceDelegate.setAttribute(wc, key, (Map<String, String>)value);
}
else if (value instanceof Set) {
- DefaultPersistenceDelegate.setAttribute(wc, key, (Set<?>)value);
+ DefaultPersistenceDelegate.setAttribute(wc, key, (Set<String>)value);
}
else if (value instanceof Boolean) {
DefaultPersistenceDelegate.setAttribute(wc, key, ((Boolean)value).booleanValue());
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java
index 8b5454801..d0b522649 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.launch.core/src/org/eclipse/tcf/te/launch/core/persistence/DefaultPersistenceDelegate.java
@@ -168,7 +168,7 @@ public class DefaultPersistenceDelegate {
* @param attributeId The attribute id to store the attribute value under. Must not be <code>null</code>.
* @param attributeValue The attribute value to store under the given attribute id.
*/
- public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, List<?> attributeValue) {
+ public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, List<String> attributeValue) {
if (wc == null || attributeId == null) return;
if (isAttributeChanged(wc, attributeId, attributeValue)) {
// Determine the old attribute value
@@ -193,7 +193,7 @@ public class DefaultPersistenceDelegate {
* @param attributeId The attribute id to store the attribute value under. Must not be <code>null</code>.
* @param attributeValue The attribute value to store under the given attribute id.
*/
- public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, Map<?, ?> attributeValue) {
+ public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, Map<String, String> attributeValue) {
if (wc == null || attributeId == null) return;
if (isAttributeChanged(wc, attributeId, attributeValue)) {
// Determine the old attribute value
@@ -218,7 +218,7 @@ public class DefaultPersistenceDelegate {
* @param attributeId The attribute id to store the attribute value under. Must not be <code>null</code>.
* @param attributeValue The attribute value to store under the given attribute id.
*/
- public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, Set<?> attributeValue) {
+ public final static void setAttribute(ILaunchConfigurationWorkingCopy wc, String attributeId, Set<String> attributeValue) {
if (wc == null || attributeId == null) return;
if (isAttributeChanged(wc, attributeId, attributeValue)) {
// Determine the old attribute value
@@ -281,11 +281,11 @@ public class DefaultPersistenceDelegate {
*
* @return The list attribute or the default value.
*/
- public final static List<?> getAttribute(ILaunchConfiguration lc, String attributeName, List<?> defaultValue) {
+ public final static List<String> getAttribute(ILaunchConfiguration lc, String attributeName, List<String> defaultValue) {
Assert.isNotNull(lc);
Assert.isNotNull(attributeName);
- List<?> value = defaultValue;
+ List<String> value = defaultValue;
try { value = lc.getAttribute(attributeName, defaultValue); } catch (CoreException e) { /* ignored on purpose */ }
return value;
}
@@ -300,11 +300,11 @@ public class DefaultPersistenceDelegate {
*
* @return The set attribute or the default value.
*/
- public final static Set<?> getAttribute(ILaunchConfiguration lc, String attributeName, Set<?> defaultValue) {
+ public final static Set<String> getAttribute(ILaunchConfiguration lc, String attributeName, Set<String> defaultValue) {
Assert.isNotNull(lc);
Assert.isNotNull(attributeName);
- Set<?> value = defaultValue;
+ Set<String> value = defaultValue;
try { value = lc.getAttribute(attributeName, defaultValue); } catch (CoreException e) { /* ignored on purpose */ }
return value;
}
@@ -320,11 +320,11 @@ public class DefaultPersistenceDelegate {
*
* @return The map attribute or the default value.
*/
- public final static Map<?,?> getAttribute(ILaunchConfiguration lc, String attributeName, Map<?,?> defaultValue) {
+ public final static Map<String, String> getAttribute(ILaunchConfiguration lc, String attributeName, Map<String, String> defaultValue) {
Assert.isNotNull(lc);
Assert.isNotNull(attributeName);
- Map<?,?> value = defaultValue;
+ Map<String, String> value = defaultValue;
try { value = lc.getAttribute(attributeName, defaultValue); } catch (CoreException e) { /* ignored on purpose */ }
return value;
}

Back to the top