org.eclipse.core.runtime.Platform.getApplicationArgs()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(203)

本文整理了Java中org.eclipse.core.runtime.Platform.getApplicationArgs()方法的一些代码示例,展示了Platform.getApplicationArgs()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Platform.getApplicationArgs()方法的具体详情如下:
包路径:org.eclipse.core.runtime.Platform
类名称:Platform
方法名:getApplicationArgs

Platform.getApplicationArgs介绍

[英]Returns the arguments not consumed by the framework implementation itself. Which arguments are consumed is implementation specific. These arguments are available for use by the application.
[中]返回框架实现本身未使用的参数。使用哪些参数是特定于实现的。这些参数可供应用程序使用。

代码示例

代码示例来源:origin: org.eclipse/org.eclipse.pde.core

public static boolean isDevLaunchMode() {
  if (Boolean.getBoolean("eclipse.pde.launch")) //$NON-NLS-1$
    return true;
  String[] args = Platform.getApplicationArgs();
  for (int i = 0; i < args.length; i++) {
    if (args[i].equals("-pdelaunch")) //$NON-NLS-1$
      return true;		
  }
  return false;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.pde.core

public static boolean isDevLaunchMode() {
  if (Boolean.getBoolean("eclipse.pde.launch")) //$NON-NLS-1$
    return true;
  String[] args = Platform.getApplicationArgs();
  for (int i = 0; i < args.length; i++) {
    if (args[i].equals("-pdelaunch")) //$NON-NLS-1$
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.tycho.surefire.osgibooter

public Object start(IApplicationContext context) throws Exception {
  this.fContext = context;
  return run(Platform.getApplicationArgs());
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.tycho.surefire.osgibooter

public Object run(Object args) throws Exception {
  return run(Platform.getApplicationArgs());
}

相关文章