本文整理匯總了Java中com.intellij.execution.process.ProcessHandler.notifyTextAvailable方法的典型用法代碼示例。如果您正苦於以下問題:Java ProcessHandler.notifyTextAvailable方法的具體用法?Java ProcessHandler.notifyTextAvailable怎麽用?Java ProcessHandler.notifyTextAvailable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.execution.process.ProcessHandler
的用法示例。
在下文中一共展示了ProcessHandler.notifyTextAvailable方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: isReadyForDebugging
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@SuppressWarnings({"EnumSwitchStatementWhichMissesCases"})
@Override
public boolean isReadyForDebugging(ClientData data, ProcessHandler processHandler) {
final String activityName = getActivityName(processHandler);
if (activityName == null) {
ClientData.DebuggerStatus status = data.getDebuggerConnectionStatus();
switch (status) {
case ERROR:
if (processHandler != null) {
processHandler.notifyTextAvailable("Debug port is busy\n", STDOUT);
}
LOG.info("Debug port is busy");
return false;
case ATTACHED:
if (processHandler != null) {
processHandler.notifyTextAvailable("Debugger already attached\n", STDOUT);
}
LOG.info("Debugger already attached");
return false;
default:
return true;
}
}
return super.isReadyForDebugging(data, processHandler);
}
示例2: getCopyOfCompilerManifestFile
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Nullable
protected static Pair<File, String> getCopyOfCompilerManifestFile(@NotNull AndroidFacet facet, @Nullable ProcessHandler processHandler) {
final VirtualFile manifestFile = AndroidRootUtil.getCustomManifestFileForCompiler(facet);
if (manifestFile == null) {
return null;
}
File tmpDir = null;
try {
tmpDir = FileUtil.createTempDirectory("android_manifest_file_for_execution", "tmp");
final File manifestCopy = new File(tmpDir, manifestFile.getName());
FileUtil.copy(new File(manifestFile.getPath()), manifestCopy);
//noinspection ConstantConditions
return Pair.create(manifestCopy, PathUtil.getLocalPath(manifestFile));
}
catch (IOException e) {
if (processHandler != null) {
processHandler.notifyTextAvailable("I/O error: " + e.getMessage(), ProcessOutputTypes.STDERR);
}
LOG.info(e);
if (tmpDir != null) {
FileUtil.delete(tmpDir);
}
return null;
}
}
示例3: printTo
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
public void printTo(@NotNull ProcessHandler processHandler) {
synchronized (myFragments) {
for (MyFragment fragment : myFragments) {
processHandler.notifyTextAvailable(fragment.getText(), fragment.getOutputType());
}
}
}
示例4: testRunEnded
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Override
public void testRunEnded(long elapsedTime, Map<String, String> runMetrics) {
if (myTestClassName != null) {
testSuiteFinished();
}
final ProcessHandler handler = getProcessHandler();
handler.notifyTextAvailable("Finish\n", ProcessOutputTypes.STDOUT);
handler.destroyProcess();
}
示例5: testRunStarted
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Override
public void testRunStarted(String runName, int testCount) {
ProcessHandler handler = getProcessHandler();
handler.notifyTextAvailable("Test running started\n", ProcessOutputTypes.STDOUT);
final ServiceMessageBuilder builder = new ServiceMessageBuilder("enteredTheMatrix");
handler.notifyTextAvailable(builder.toString() + '\n', ProcessOutputTypes.STDOUT);
}
示例6: getActivityToLaunch
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Nullable
protected String getActivityToLaunch(@NotNull final AndroidFacet facet, @Nullable ProcessHandler processHandler) {
String activityToLaunch = null;
if (MODE.equals(LAUNCH_DEFAULT_ACTIVITY)) {
final String defaultActivityName = computeDefaultActivity(facet, processHandler);
if (defaultActivityName != null) {
activityToLaunch = defaultActivityName;
}
else {
if (processHandler != null) {
processHandler.notifyTextAvailable(AndroidBundle.message("default.activity.not.found.error"), STDERR);
}
return null;
}
}
else if (MODE.equals(LAUNCH_SPECIFIC_ACTIVITY)) {
activityToLaunch = ACTIVITY_CLASS;
}
if (activityToLaunch != null) {
final String finalActivityToLaunch = activityToLaunch;
final String activityRuntimeQName = ApplicationManager.getApplication().runReadAction(new Computable<String>() {
@Override
public String compute() {
final GlobalSearchScope scope = facet.getModule().getModuleWithDependenciesAndLibrariesScope(false);
final PsiClass activityClass = JavaPsiFacade.getInstance(getProject()).findClass(finalActivityToLaunch, scope);
if (activityClass != null) {
return JavaExecutionUtil.getRuntimeQualifiedName(activityClass);
}
return null;
}
});
if (activityRuntimeQName != null) {
return activityRuntimeQName;
}
}
return activityToLaunch;
}
示例7: testRunStopped
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Override
public void testRunStopped(long elapsedTime) {
ProcessHandler handler = getProcessHandler();
handler.notifyTextAvailable("Test running stopped\n", ProcessOutputTypes.STDOUT);
handler.destroyProcess();
}
示例8: testRunFailed
import com.intellij.execution.process.ProcessHandler; //導入方法依賴的package包/類
@Override
public void testRunFailed(String errorMessage) {
ProcessHandler handler = getProcessHandler();
handler.notifyTextAvailable("Test running failed: " + errorMessage + "\n", ProcessOutputTypes.STDERR);
handler.destroyProcess();
}