1 11 package org.eclipse.jdt.internal.debug.ui.console; 12 13 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.core.runtime.IStatus; 16 import org.eclipse.core.runtime.Status; 17 import org.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin; 18 import org.eclipse.ui.console.TextConsole; 19 20 23 public class JavaNativeStackTraceHyperlink extends JavaStackTraceHyperlink { 24 25 public JavaNativeStackTraceHyperlink(TextConsole console) { 26 super(console); 27 } 28 29 32 protected int getLineNumber(String linkText) { 33 return -1; 34 } 35 36 protected String getTypeName(String linkText) throws CoreException { 37 String typeName; 38 int index = linkText.indexOf('('); 39 if (index >= 0) { 40 typeName = linkText.substring(0, index); 41 index = typeName.lastIndexOf('.'); 43 int innerClassIndex = typeName.lastIndexOf('$', index); 44 if (innerClassIndex != -1) 45 index = innerClassIndex; 46 if (index >= 0) { 47 typeName = typeName.substring(0, index); 48 } 49 return typeName; 50 } 51 52 IStatus status = new Status(IStatus.ERROR, JDIDebugUIPlugin.getUniqueIdentifier(), 0, ConsoleMessages.JavaStackTraceHyperlink_Unable_to_parse_type_name_from_hyperlink__5, null); 53 throw new CoreException(status); 54 } 55 } 56 | Popular Tags |