當前位置: 首頁>>代碼示例>>Java>>正文


Java MessageConsoleStream.print方法代碼示例

本文整理匯總了Java中org.eclipse.ui.console.MessageConsoleStream.print方法的典型用法代碼示例。如果您正苦於以下問題:Java MessageConsoleStream.print方法的具體用法?Java MessageConsoleStream.print怎麽用?Java MessageConsoleStream.print使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.ui.console.MessageConsoleStream的用法示例。


在下文中一共展示了MessageConsoleStream.print方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeToConsole

import org.eclipse.ui.console.MessageConsoleStream; //導入方法依賴的package包/類
/**
 * Displays the specified text at the console, followed by a line
 * separator string.
 * 
 * @param text message to display
 * @param lineBreak <tt>true</tt> if a linebreak shall be inserted after the message.
 * @return <tt>true</tt> if the message was successfully displayed inside the console.
 */
public boolean writeToConsole(String text, boolean lineBreak) {
    boolean isWritten = false;
    if (this.msgConsole != null) {
        MessageConsoleStream out = this.msgConsole.newMessageStream();
        if (lineBreak) {
            out.println(text);
        } else {
            out.print(text);
        }
        try {
            out.flush();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    return isWritten;
}
 
開發者ID:SSEHUB,項目名稱:EASyProducer,代碼行數:27,代碼來源:EclipseConsole.java

示例2: checkDescParameters

import org.eclipse.ui.console.MessageConsoleStream; //導入方法依賴的package包/類
/**
 * Checks Description string.
 * @param name the node name.
 * @param desc the description.
 */
private void checkDescParameters(String name, String desc) {
	Pattern p = Pattern.compile("\\{([^\\}]+)\\}"); //$NON-NLS-1$
	ArrayList<String> paramList = new ArrayList<String>();
	while (true) {
		Matcher m = p.matcher(desc);
		if (! m.find()) {
			break;
		}
		String parameter = m.group(1);
		paramList.add(parameter);
		desc = desc.replaceAll(String.format(PARAM_ITEM_REGEX_FORMAT, parameter), ""); //$NON-NLS-1$
	}
	// found unknown parameters.
	if (paramList.size() > 0) {
		MessageConsoleStream stream = DcaseNodeEditPart.getMessageConsoleStream();
		stream.print(name + ": cannot found "); //$NON-NLS-1$
		for (int i = 0; i < paramList.size(); i++) {
			stream.print(paramList.get(i) + ((i == paramList.size()-1) ? "":",")); //$NON-NLS-1$
		}
		stream.println();
	}
}
 
開發者ID:d-case,項目名稱:d-case_editor,代碼行數:28,代碼來源:BasicNodeOpenEditPolicy.java

示例3: printHLine

import org.eclipse.ui.console.MessageConsoleStream; //導入方法依賴的package包/類
private void printHLine(MessageConsoleStream out, int nVars) {
    out.print("--------------------------------------------------");
    for (int k = 0; k < nVars; k++) {
        out.print("---------------------");
    }
    out.println();
}
 
開發者ID:smaccm,項目名稱:smaccm,代碼行數:8,代碼來源:TestCaseGeneratorMenuListener.java

示例4: printHLine

import org.eclipse.ui.console.MessageConsoleStream; //導入方法依賴的package包/類
public static void printHLine(MessageConsoleStream out, int nVars) {
    out.print("--------------------------------------------------");
    for (int k = 0; k < nVars; k++) {
        out.print("---------------------");
    }
    out.println();
}
 
開發者ID:smaccm,項目名稱:smaccm,代碼行數:8,代碼來源:AgreeMenuListener.java

示例5: print

import org.eclipse.ui.console.MessageConsoleStream; //導入方法依賴的package包/類
public void print(String line) throws IOException {
	final MessageConsoleStream output = messageConsole.newMessageStream();
	output.print(line);
	output.close();
}
 
開發者ID:kwin,項目名稱:cppcheclipse,代碼行數:6,代碼來源:Console.java


注:本文中的org.eclipse.ui.console.MessageConsoleStream.print方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。