// </editor-fold> private IntegrationProvider.IntegrationHints getManualRemoteIntegrationStepsInstructions( String targetOS, AttachSettings attachSettings) { IntegrationProvider.IntegrationHints instructions = new IntegrationProvider.IntegrationHints(); // Step 1 instructions.addStep(getManualRemoteStep1(targetOS)); // Step 2 instructions.addStep(getManualRemoteStep2(targetOS)); // Step 3 String pathToJDKDirectory = "<" // NOI18N + Bundle.GenericWebAppServerIntegrationProvider_PathToJdkDirectory( IntegrationUtils.getJavaPlatformName(getTargetJava())) + ">"; // NOI18N instructions.addStep( Bundle.GenericWebAppServerIntegrationProvider_ManualRemoteStep3Message( IntegrationUtils.getJavaPlatformName(getTargetJava()), IntegrationUtils.getExportEnvVariableValueString( targetOS, "JAVA_HOME", // NOI18N pathToJDKDirectory, true))); // Step 4 instructions.addStep( Bundle.GenericWebAppServerIntegrationProvider_ManualRemoteStep4Message( IntegrationUtils.getProfilerAgentCommandLineArgs( targetOS, getTargetJava(), attachSettings.isRemote(), attachSettings.getPort(), false), REMOTE_ABSOLUTE_PATH_HINT)); // Step 5 instructions.addStep(Bundle.GenericWebAppServerIntegrationProvider_ManualRemoteStep5Message()); // Note about spaces in path when starting Profiler agent if (IntegrationUtils.isWindowsPlatform(targetOS)) { instructions.addWarning(SPACES_IN_PATH_WARNING_MSG); } // Note about decreasing CPU profiling overhead instructions.addHint(REDUCE_OVERHEAD_MSG); // Note about export vs. setenv on UNIXes if (!IntegrationUtils.isWindowsPlatform(targetOS)) { instructions.addHint(EXPORT_SETENV_MSG); } return instructions; }
public IntegrationProvider.IntegrationHints getModificationHints(AttachSettings attachSettings) { String targetOS = attachSettings.getHostOS(); // Remote attach instructions if (attachSettings.isRemote()) { return getManualRemoteIntegrationStepsInstructions(targetOS, attachSettings); } // Local direct attach else if (attachSettings.isDirect()) { return getManualLocalDirectIntegrationStepsInstructions(targetOS, attachSettings); } // Local dynamic attach else { return getManualLocalDynamicIntegrationStepsInstructions(targetOS, attachSettings); } }