|
Lines 34-41
Link Here
|
| 34 |
import org.eclipse.core.resources.IContainer; |
34 |
import org.eclipse.core.resources.IContainer; |
| 35 |
import org.eclipse.core.resources.IFile; |
35 |
import org.eclipse.core.resources.IFile; |
| 36 |
import org.eclipse.core.resources.IFolder; |
36 |
import org.eclipse.core.resources.IFolder; |
| 37 |
import org.eclipse.core.resources.IProject; |
|
|
| 38 |
import org.eclipse.core.resources.IProjectDescription; |
| 39 |
import org.eclipse.core.resources.IResource; |
37 |
import org.eclipse.core.resources.IResource; |
| 40 |
import org.eclipse.core.resources.IWorkspaceRoot; |
38 |
import org.eclipse.core.resources.IWorkspaceRoot; |
| 41 |
import org.eclipse.core.resources.ResourcesPlugin; |
39 |
import org.eclipse.core.resources.ResourcesPlugin; |
|
Lines 46-52
Link Here
|
| 46 |
import org.eclipse.core.runtime.Platform; |
44 |
import org.eclipse.core.runtime.Platform; |
| 47 |
import org.eclipse.debug.core.ILaunchConfiguration; |
45 |
import org.eclipse.debug.core.ILaunchConfiguration; |
| 48 |
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
46 |
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; |
| 49 |
import org.eclipse.hyades.trace.internal.ui.TraceConstants; |
|
|
| 50 |
import org.eclipse.hyades.trace.ui.UIPlugin; |
47 |
import org.eclipse.hyades.trace.ui.UIPlugin; |
| 51 |
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; |
48 |
import org.eclipse.hyades.trace.ui.internal.launcher.IProfileLaunchConfigurationConstants; |
| 52 |
import org.eclipse.hyades.trace.ui.internal.util.FilterSetElement; |
49 |
import org.eclipse.hyades.trace.ui.internal.util.FilterSetElement; |
|
Lines 63-76
Link Here
|
| 63 |
import org.eclipse.jdt.core.JavaModelException; |
60 |
import org.eclipse.jdt.core.JavaModelException; |
| 64 |
import org.eclipse.jdt.core.dom.Statement; |
61 |
import org.eclipse.jdt.core.dom.Statement; |
| 65 |
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; |
62 |
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; |
|
|
63 |
import org.eclipse.jdt.launching.IVMInstall2; |
| 64 |
import org.eclipse.jdt.launching.JavaRuntime; |
| 66 |
import org.eclipse.jdt.ui.jarpackager.JarPackageData; |
65 |
import org.eclipse.jdt.ui.jarpackager.JarPackageData; |
| 67 |
import org.eclipse.jface.preference.IPreferenceStore; |
66 |
import org.eclipse.jface.preference.IPreferenceStore; |
| 68 |
import org.eclipse.jface.text.IRegion; |
67 |
import org.eclipse.jface.text.IRegion; |
| 69 |
import org.eclipse.jface.text.Region; |
68 |
import org.eclipse.jface.text.Region; |
| 70 |
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; |
69 |
import org.eclipse.tptp.platform.common.ui.trace.internal.CommonUITraceConstants; |
|
|
70 |
import org.eclipse.tptp.platform.instrumentation.annotation.internal.util.AnnotationUtil; |
| 71 |
import org.eclipse.tptp.platform.instrumentation.annotation.internal.util.BaseFilterTableElement; |
| 71 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.InstrumentConstants; |
72 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.InstrumentConstants; |
| 72 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.InstrumentUIPlugin; |
73 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.InstrumentUIPlugin; |
| 73 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.LogHelper; |
|
|
| 74 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.core.InstrumentPoint; |
74 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.core.InstrumentPoint; |
| 75 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.core.InstrumentSelectManager; |
75 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.core.InstrumentSelectManager; |
| 76 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.deleg.application.InstrumentLaunchConfiguration; |
76 |
import org.eclipse.tptp.platform.instrumentation.ui.internal.launcher.deleg.application.InstrumentLaunchConfiguration; |
|
Lines 206-212
Link Here
|
| 206 |
if (!doesRuleExist(parent.toString())) { |
206 |
if (!doesRuleExist(parent.toString())) { |
| 207 |
parent.append("PROBE" + lineSeparator); //$NON-NLS-1$ |
207 |
parent.append("PROBE" + lineSeparator); //$NON-NLS-1$ |
| 208 |
for (Iterator targetIter = filterElement.getChildren().iterator(); targetIter.hasNext();) { |
208 |
for (Iterator targetIter = filterElement.getChildren().iterator(); targetIter.hasNext();) { |
| 209 |
InstrumentFilterTableElement t = (InstrumentFilterTableElement) targetIter.next(); |
209 |
BaseFilterTableElement t = (BaseFilterTableElement) targetIter.next(); |
| 210 |
String pkg = t.getPackageName(); |
210 |
String pkg = t.getPackageName(); |
| 211 |
if (emptyNullOrStar(pkg)) |
211 |
if (emptyNullOrStar(pkg)) |
| 212 |
pkg = "*"; //$NON-NLS-1$ |
212 |
pkg = "*"; //$NON-NLS-1$ |
|
Lines 871-874
Link Here
|
| 871 |
} |
871 |
} |
| 872 |
return result; |
872 |
return result; |
| 873 |
} |
873 |
} |
|
|
874 |
|
| 875 |
/** |
| 876 |
* @see AnnotationUtil#appendAnnotationToFilterSet(ILaunchConfiguration, FilterSetElement) |
| 877 |
*/ |
| 878 |
public static void appendAnnotationToFilterSet(ILaunchConfiguration configuration,FilterSetElement filterSetElement) throws CoreException { |
| 879 |
if (!isAnnotationSupported(configuration)) |
| 880 |
return; |
| 881 |
//delegate action to AnnotationUtil class |
| 882 |
AnnotationUtil.appendAnnotationToFilterSet(configuration, filterSetElement); |
| 883 |
} |
| 884 |
|
| 885 |
/** |
| 886 |
* |
| 887 |
* @see AnnotationUtil#handleAnnotation(ILaunchConfigurationWorkingCopy) |
| 888 |
*/ |
| 889 |
public static void handleAnnotation( |
| 890 |
ILaunchConfigurationWorkingCopy configuration) throws CoreException { |
| 891 |
if (!isAnnotationSupported(configuration)) |
| 892 |
return; |
| 893 |
|
| 894 |
//delegate action to AnnotationUtil class |
| 895 |
AnnotationUtil.handleAnnotation(configuration); |
| 896 |
} |
| 897 |
|
| 898 |
/** |
| 899 |
* determined whether or not need to handle BtM annotation. If JRE version bundled with user project |
| 900 |
* above Java5, it indicated that BtM runtime don't need to handle BtM annotation information. |
| 901 |
* |
| 902 |
* @param configuration launch configuration |
| 903 |
* @return true if JRE version is newer or above Java5,otherwise false. |
| 904 |
* @throws CoreException |
| 905 |
*/ |
| 906 |
private static boolean isAnnotationSupported(ILaunchConfiguration configuration)throws CoreException{ |
| 907 |
IVMInstall2 vmInstall =(IVMInstall2)JavaRuntime.computeVMInstall(configuration); |
| 908 |
String version = vmInstall.getJavaVersion(); |
| 909 |
return version != null && version.indexOf("1.3") == -1 && version.indexOf("1.4") == -1; |
| 910 |
} |
| 874 |
} |
911 |
} |