diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java index 7776e506f02..05f676f5c53 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/CSourceNotFoundDescriptionFactory.java @@ -100,7 +100,10 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory { String module = (String)properties.get(ILaunchVMConstants.PROP_FRAME_MODULE); if (line != null && line >= 0 && file != null && file.length() > 0) { - formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__text_format; + if (function != null && function.contains(")")) //$NON-NLS-1$ + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__text_format; + else + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__add_parens__text_format; propertyNames = new String[] { ILaunchVMConstants.PROP_FRAME_ADDRESS, ILaunchVMConstants.PROP_FRAME_FUNCTION, @@ -111,7 +114,10 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory { } else if (function != null && function.length() > 0 && module != null && module.length() > 0) { - formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__No_line__text_format; + if (function.contains(")")) //$NON-NLS-1$ + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__No_line__text_format; + else + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__add_parens__text_format; propertyNames = new String[] { ILaunchVMConstants.PROP_FRAME_ADDRESS, ILaunchVMConstants.PROP_FRAME_FUNCTION, @@ -126,7 +132,10 @@ public class CSourceNotFoundDescriptionFactory implements IAdapterFactory { } else if (function != null && function.length() > 0) { - formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__No_module__text_format; + if (function.contains(")")) //$NON-NLS-1$ + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__No_module__text_format; + else + formatString = MessagesForLaunchVM.StackFramesVMNode_No_columns__No_module__add_parens__text_format; propertyNames = new String[] { ILaunchVMConstants.PROP_FRAME_ADDRESS, ILaunchVMConstants.PROP_FRAME_FUNCTION}; diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.java index 3c1902d194c..e70f41fa16a 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.java @@ -19,9 +19,12 @@ import org.eclipse.osgi.util.NLS; public class MessagesForLaunchVM extends NLS { public static String StackFramesVMNode_No_columns__Incomplete_stack_marker__text_format; public static String StackFramesVMNode_No_columns__text_format; + public static String StackFramesVMNode_No_columns__add_parens__text_format; public static String StackFramesVMNode_No_columns__No_line__text_format; + public static String StackFramesVMNode_No_columns__No_line__add_parens__text_format; public static String StackFramesVMNode_No_columns__No_function__text_format; public static String StackFramesVMNode_No_columns__No_module__text_format; + public static String StackFramesVMNode_No_columns__No_module__add_parens__text_format; public static String StackFramesVMNode_No_columns__Address_only__text_format; public static String AbstractContainerVMNode_No_columns__text_format; diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.properties b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.properties index 1617037a8e0..53a708e30a1 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.properties +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/MessagesForLaunchVM.properties @@ -17,12 +17,14 @@ StackFramesVMNode_No_columns__Incomplete_stack_marker__text_format=<...more fram # {3} - line # {4} - column # {5} - module -StackFramesVMNode_No_columns__text_format={1}() at {2}:{3} {0}{4,choice,0#|1# :{4}} +StackFramesVMNode_No_columns__text_format={1} at {2}:{3} {0}{4,choice,0#|1# :{4}} +StackFramesVMNode_No_columns__add_parens__text_format={1}() at {2}:{3} {0}{4,choice,0#|1# :{4}} # {0} - address # {1} - function # {2} - module -StackFramesVMNode_No_columns__No_line__text_format={1}() [{2}] at {0} +StackFramesVMNode_No_columns__No_line__text_format={1} [{2}] at {0} +StackFramesVMNode_No_columns__No_line__add_parens__text_format={1}() [{2}] at {0} # {0} - address # {1} - module @@ -30,7 +32,8 @@ StackFramesVMNode_No_columns__No_function__text_format=[{1}] at {0} # {0} - address # {1} - function -StackFramesVMNode_No_columns__No_module__text_format={1}() at {0} +StackFramesVMNode_No_columns__No_module__text_format={1} at {0} +StackFramesVMNode_No_columns__No_module__add_parens__text_format={1}() at {0} # {0} - address StackFramesVMNode_No_columns__Address_only__text_format={0} diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java index 4ea4aa8a162..31b5235f254 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java +++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/viewmodel/launch/StackFramesVMNode.java @@ -172,9 +172,30 @@ public class StackFramesVMNode extends AbstractDMVMNode public boolean isEnabled(IStatus status, java.util.Map properties) { Integer line = (Integer)properties.get(ILaunchVMConstants.PROP_FRAME_LINE); String file = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FILE); - return line != null && line >= 0 && file != null && file.length() > 0; + String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); + return line != null && line >= 0 && file != null && file.length() > 0 && + function != null && function.contains(")"); //$NON-NLS-1$ }; }, + new LabelText( + MessagesForLaunchVM.StackFramesVMNode_No_columns__add_parens__text_format, + new String[] { + ILaunchVMConstants.PROP_FRAME_ADDRESS, + ILaunchVMConstants.PROP_FRAME_FUNCTION, + ILaunchVMConstants.PROP_FRAME_FILE, + ILaunchVMConstants.PROP_FRAME_LINE, + ILaunchVMConstants.PROP_FRAME_COLUMN, + ILaunchVMConstants.PROP_FRAME_MODULE}) + { + @Override + public boolean isEnabled(IStatus status, java.util.Map properties) { + Integer line = (Integer)properties.get(ILaunchVMConstants.PROP_FRAME_LINE); + String file = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FILE); + String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); + return line != null && line >= 0 && file != null && file.length() > 0 && + (function == null || !function.contains(")")); //$NON-NLS-1$ + }; + }, new LabelText( MessagesForLaunchVM.StackFramesVMNode_No_columns__No_line__text_format, new String[] { @@ -186,9 +207,25 @@ public class StackFramesVMNode extends AbstractDMVMNode public boolean isEnabled(IStatus status, java.util.Map properties) { String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); String module = (String)properties.get(ILaunchVMConstants.PROP_FRAME_MODULE); - return function != null && function.length() > 0 && module != null && module.length() > 0; + return function != null && function.length() > 0 && function.contains(")") && //$NON-NLS-1$ + module != null && module.length() > 0; }; }, + new LabelText( + MessagesForLaunchVM.StackFramesVMNode_No_columns__No_line__add_parens__text_format, + new String[] { + ILaunchVMConstants.PROP_FRAME_ADDRESS, + ILaunchVMConstants.PROP_FRAME_FUNCTION, + ILaunchVMConstants.PROP_FRAME_MODULE}) + { + @Override + public boolean isEnabled(IStatus status, java.util.Map properties) { + String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); + String module = (String)properties.get(ILaunchVMConstants.PROP_FRAME_MODULE); + return function != null && function.length() > 0 && !function.contains(")") && //$NON-NLS-1$ + module != null && module.length() > 0; + }; + }, new LabelText( MessagesForLaunchVM.StackFramesVMNode_No_columns__No_function__text_format, new String[] { @@ -210,7 +247,19 @@ public class StackFramesVMNode extends AbstractDMVMNode @Override public boolean isEnabled(IStatus status, java.util.Map properties) { String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); - return function != null && function.length() > 0; + return function != null && function.length() > 0 && function.contains(")"); //$NON-NLS-1$ + }; + }, + new LabelText( + MessagesForLaunchVM.StackFramesVMNode_No_columns__No_module__add_parens__text_format, + new String[] { + ILaunchVMConstants.PROP_FRAME_ADDRESS, + ILaunchVMConstants.PROP_FRAME_FUNCTION}) + { + @Override + public boolean isEnabled(IStatus status, java.util.Map properties) { + String function = (String)properties.get(ILaunchVMConstants.PROP_FRAME_FUNCTION); + return function != null && function.length() > 0 && !function.contains(")"); //$NON-NLS-1$ }; }, new LabelText(