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


Java StatusManager.getManager方法代碼示例

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


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

示例1: handle

import org.eclipse.ui.statushandlers.StatusManager; //導入方法依賴的package包/類
@Override
public void handle(CoreException e) {
	if(e.getStatus() != null ){
		handle(e.getStatus());
	}else{
		StatusManager platformStatusMgr = StatusManager.getManager();
		platformStatusMgr.handle(e,e.getStatus().getPlugin());
	}
}
 
開發者ID:eclipse,項目名稱:thym,代碼行數:10,代碼來源:DefaultStatusHandler.java

示例2: handleErrors

import org.eclipse.ui.statushandlers.StatusManager; //導入方法依賴的package包/類
/**
 * Handle special error output cases for the compiler.
 * 
 * @return true if no errors are present, false otherwise
 */
private static boolean handleErrors(String line) {
	StatusManager manager = StatusManager.getManager();

	// special case for missing checkers.jar (or processor class)
	Matcher procMatcher = noProcessorPattern.matcher(line);
	if (procMatcher.matches()) {
		CheckerErrorStatus status;

		if (procMatcher.group(1).equals("''")) {
			status = new CheckerErrorStatus(
					"No checkers configured. Use the plugin preferences to configure checkers to use.");
		} else {
			status = new CheckerErrorStatus(
					"Annotation processor "
							+ procMatcher.group(1)
							+ " could not be found. Try adding checkers.jar to your project build path.");
		}
		manager.handle(status, StatusManager.SHOW);
		return false;
	}

	// Misc errors that prevent compiler from running:
	Matcher flagMatcher = invalidFlagPattern.matcher(line);
	if (flagMatcher.matches()) {
		manager.handle(new CheckerErrorStatus("Invalid compiler flag: "
				+ flagMatcher.group(1)
				+ ". Check your preferences for invalid flags."),
				StatusManager.SHOW);
		return false;
	}

	Matcher missingFileMatcher = missingFilePattern.matcher(line);
	if (missingFileMatcher.matches()) {
		manager.handle(new CheckerErrorStatus("Cannot find file: "
				+ missingFileMatcher.group(1)
				+ ". You may have malformed input in your preferences."),
				StatusManager.SHOW);
		return false;
	}

	return true;
}
 
開發者ID:reprogrammer,項目名稱:checker-framework,代碼行數:48,代碼來源:JavacError.java

示例3: reportError

import org.eclipse.ui.statushandlers.StatusManager; //導入方法依賴的package包/類
public static void reportError(String message, Exception cause) {
	IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, cause);
	StatusManager statusManager = StatusManager.getManager();
	statusManager.handle(status, StatusManager.LOG);
	statusManager.handle(status, StatusManager.BLOCK);
}
 
開發者ID:tsvetan-stoyanov,項目名稱:launchpi,代碼行數:7,代碼來源:LaunchPlugin.java


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