• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java IStatusHandler类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.debug.core.IStatusHandler的典型用法代码示例。如果您正苦于以下问题:Java IStatusHandler类的具体用法?Java IStatusHandler怎么用?Java IStatusHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IStatusHandler类属于org.eclipse.debug.core包,在下文中一共展示了IStatusHandler类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

import org.eclipse.debug.core.IStatusHandler; //导入依赖的package包/类
@Override
public void init() {
	try {
		ListBasedValidationIssueAcceptor acceptor = new ListBasedValidationIssueAcceptor();
		ExecutionFlow flow = sequencer.transform(statechart, acceptor);
		if (acceptor.getTraces(Severity.ERROR).size() > 0) {
			Status errorStatus = new Status(Status.ERROR, SimulationCoreActivator.PLUGIN_ID,
					ERROR_DURING_SIMULATION, acceptor.getTraces(Severity.ERROR).iterator().next().toString(), null);
			IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(errorStatus);
			try {
				statusHandler.handleStatus(errorStatus, getDebugTarget());
			} catch (CoreException e) {
				e.printStackTrace();
			}
		}

		if (!context.isSnapshot()) {
			contextInitializer.initialize(context, flow);
		}
		interpreter.initialize(flow, context, useInternalEventQueue());
	} catch (Exception ex) {
		handleException(ex);
		throw new InitializationException(ex.getMessage());
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:26,代码来源:AbstractExecutionFlowSimulationEngine.java


示例2: handleException

import org.eclipse.debug.core.IStatusHandler; //导入依赖的package包/类
protected void handleException(Throwable t) {
	if (t instanceof WrappedException) {
		t = ((WrappedException) t).getCause();
	}
	String statusMessage = t.getMessage() == null ? ERROR_MSG : t.getMessage();
	Status errorStatus = new Status(Status.ERROR, SimulationCoreActivator.PLUGIN_ID, ERROR_DURING_SIMULATION,
			statusMessage, t);
	SimulationCoreActivator.getDefault().getLog().log(errorStatus);
	IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(errorStatus);
	try {
		statusHandler.handleStatus(errorStatus, getDebugTarget());
	} catch (CoreException e) {
		e.printStackTrace();
	} finally {
		terminate();
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:18,代码来源:AbstractSimulationEngine.java


示例3: showPrompt

import org.eclipse.debug.core.IStatusHandler; //导入依赖的package包/类
/**
 * Issues an user prompt using the status handler registered for the given
 * status.
 *
 * @param status
 *          IStatus object to find prompter for
 * @param info
 *          additional information passed to the handler
 * @return boolean result returned by the status handler
 * @throws CoreException
 *           if the status has severity error and no handler is available
 */
private boolean showPrompt(IStatus status, Object info) throws CoreException {
  IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(
      PROMPT_STATUS);
  if (prompter == null) {
    if (status.getSeverity() == IStatus.ERROR) {
      throw new CoreException(status);
    } else {
      return true;
    }
  } else {
    return ((Boolean) prompter.handleStatus(status, info)).booleanValue();
  }
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:26,代码来源:EclEmmaCorePlugin.java


示例4: finalLaunchCheck

import org.eclipse.debug.core.IStatusHandler; //导入依赖的package包/类
@Override
public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode,
    IProgressMonitor monitor) throws CoreException {
  SubMonitor progress = SubMonitor.convert(monitor, 40);
  if (!super.finalLaunchCheck(configuration, mode, progress.newChild(20))) {
    return false;
  }

  // If we're auto-publishing before launch, check if there may be stale
  // resources not yet published. See
  // https://github.com/GoogleCloudPlatform/google-cloud-eclipse/issues/1832
  if (ServerCore.isAutoPublishing() && ResourcesPlugin.getWorkspace().isAutoBuilding()) {
    // Must wait for any current autobuild to complete so resource changes are triggered
    // and WTP will kick off ResourceChangeJobs. Note that there may be builds
    // pending that are unrelated to our resource changes, so simply checking
    // <code>JobManager.find(FAMILY_AUTO_BUILD).length > 0</code> produces too many
    // false positives.
    try {
      Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, progress.newChild(20));
    } catch (InterruptedException ex) {
      /* ignore */
    }
    IServer server = ServerUtil.getServer(configuration);
    if (server.shouldPublish() || hasPendingChangesToPublish()) {
      IStatusHandler prompter = DebugPlugin.getDefault().getStatusHandler(promptStatus);
      if (prompter != null) {
        Object continueLaunch = prompter
            .handleStatus(StaleResourcesStatusHandler.CONTINUE_LAUNCH_REQUEST, configuration);
        if (!(Boolean) continueLaunch) {
          // cancel the launch so Server.StartJob won't raise an error dialog, since the
          // server won't have been started
          monitor.setCanceled(true);
          return false;
        }
        return true;
      }
    }
  }
  return true;
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-eclipse,代码行数:41,代码来源:LocalAppEngineServerLaunchConfigurationDelegate.java



注:本文中的org.eclipse.debug.core.IStatusHandler类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DOMBuilder类代码示例发布时间:2022-05-23
下一篇:
Java ArcProgress类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap