本文整理了Java中org.eclipse.core.runtime.Platform.inDevelopmentMode()
方法的一些代码示例,展示了Platform.inDevelopmentMode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Platform.inDevelopmentMode()
方法的具体详情如下:
包路径:org.eclipse.core.runtime.Platform
类名称:Platform
方法名:inDevelopmentMode
[英]Returns true
if the platform is currently running in development mode. That is, if special procedures are to be taken when defining plug-in class paths. The platform is typically put in development mode using the "-dev" command line argument.
Clients are also able to acquire the EnvironmentInfo service and query it to see if they are in development mode.
[中]如果平台当前正在开发模式下运行,则返回true
。也就是说,如果在定义插件类路径时需要执行特殊的过程。通常使用“-dev”命令行参数将平台置于开发模式。
客户还可以获取EnvironmentInfo服务并查询它,以查看他们是否处于开发模式。
代码示例来源:origin: eclipse/buildship
public static <T> BuildAction<Collection<T>> compositeModelQuery(Class<T> model) {
if (Platform.inDevelopmentMode()) {
return ideFriendlyCompositeModelQuery(model);
} else {
return new CompositeModelQuery<>(model);
}
}
代码示例来源:origin: org.eclipse.jdt.junit/core
public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
String[] cp= super.getClasspath(configuration);
ITestKind kind= getTestRunnerKind(configuration);
List junitEntries = new ClasspathLocalizer(Platform.inDevelopmentMode()).localizeClasspath(kind);
String[] classPath= new String[cp.length + junitEntries.size()];
Object[] jea= junitEntries.toArray();
System.arraycopy(cp, 0, classPath, 0, cp.length);
System.arraycopy(jea, 0, classPath, cp.length, jea.length);
return classPath;
}
代码示例来源:origin: org.apache.uima/ruta-ep-ide-ui
private static void extensionToClassPath(RutaIdeUIPlugin d, Collection<String> result,
IExtension[] extensions) throws CoreException {
for (IExtension each : extensions) {
String namespaceIdentifier = each.getNamespaceIdentifier();
try {
if (!Platform.inDevelopmentMode()) {
result.add(d.pluginIdToJarPath(namespaceIdentifier));
} else {
result.add(d.pluginIdToJarPath(namespaceIdentifier) + "target/classes");
result.add(d.pluginIdToJarPath(namespaceIdentifier) + "bin");
}
} catch (IOException e) {
throw new CoreException(new Status(IStatus.ERROR, RutaIdeUIPlugin.PLUGIN_ID, IStatus.OK,
"Failed to extend classpath with " + namespaceIdentifier + "!", e));
}
}
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.junit.core
@Override
public String[][] getClasspathAndModulepath(ILaunchConfiguration configuration) throws CoreException {
String[][] cpmp= super.getClasspathAndModulepath(configuration);
String[] cp= cpmp[0];
ITestKind kind= getTestRunnerKind(configuration);
List<String> junitEntries= new ClasspathLocalizer(Platform.inDevelopmentMode()).localizeClasspath(kind);
String[] classPath= new String[cp.length + junitEntries.size()];
Object[] jea= junitEntries.toArray();
System.arraycopy(cp, 0, classPath, 0, cp.length);
System.arraycopy(jea, 0, classPath, cp.length, jea.length);
cpmp[0]= classPath;
return cpmp;
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench
String property = System.getProperty(PROP_VM);
if (property == null) {
if (!Platform.inDevelopmentMode()) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.junit.core
/**
* @deprecated The call to
* {@link JUnitLaunchConfigurationDelegate#getClasspath(ILaunchConfiguration)
* getClasspath(ILaunchConfiguration)} in
* {@link JUnitLaunchConfigurationDelegate#launch(ILaunchConfiguration, String, ILaunch, IProgressMonitor)
* launch(...)} has been replaced with the call to
* {@link JUnitLaunchConfigurationDelegate#getClasspathAndModulepath(ILaunchConfiguration)
* getClasspathAndModulepath(ILaunchConfiguration)}.
*
*/
@Override
@Deprecated
public String[] getClasspath(ILaunchConfiguration configuration) throws CoreException {
String[] cp= super.getClasspath(configuration);
ITestKind kind= getTestRunnerKind(configuration);
List<String> junitEntries = new ClasspathLocalizer(Platform.inDevelopmentMode()).localizeClasspath(kind);
String[] classPath= new String[cp.length + junitEntries.size()];
Object[] jea= junitEntries.toArray();
System.arraycopy(cp, 0, classPath, 0, cp.length);
System.arraycopy(jea, 0, classPath, cp.length, jea.length);
return classPath;
}
代码示例来源:origin: eclipse/eclipse.jdt.ls
/**
* Has no effect, and always returns with {@code false} if the JDT LS has been
* started from the source either in debug or development mode. If the
* {@code CLIENT_HOST} and {@code CLIENT_PORT} environment variables are set and
* the {@link JDTEnvironmentUtils#SOCKET_STREAM_DEBUG socket.stream.debug} is
* set to {@code true}, the the server will start with plain socket connection
* and will wait until the client connects.
*/
public static boolean inSocketStreamDebugMode() {
return Boolean.parseBoolean(Environment.get(SOCKET_STREAM_DEBUG, "false")) && (Platform.inDebugMode() || Platform.inDevelopmentMode()) && getClientHost() != null && getClientPort() != null;
}
代码示例来源:origin: org.apache.uima/ruta-ep-ide-ui
if (!Platform.inDevelopmentMode()) {
if (!Platform.inDevelopmentMode()) {
if (bundle != null) {
Enumeration<?> jarEnum = bundle.findEntries("/", "uimaj-core*.jar",
Platform.inDevelopmentMode());
while (jarEnum != null && jarEnum.hasMoreElements()) {
URL element = (URL) jarEnum.nextElement();
Enumeration<?> jarEnum = bundle.findEntries("/", "*.jar", Platform.inDevelopmentMode());
while (jarEnum != null && jarEnum.hasMoreElements()) {
URL element = (URL) jarEnum.nextElement();
代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.codegen
public static void addVariable(JETEmitter jetEmitter, String variableName, String pluginID) throws JETException
URL classpathURL = bundle != null && Platform.inDevelopmentMode() ? bundle.getEntry(".classpath") : null;
代码示例来源:origin: org.eclipse/org.eclipse.emf.codegen
public static void addVariable(JETEmitter jetEmitter, String variableName, String pluginID) throws JETException
URL classpathURL = bundle != null && Platform.inDevelopmentMode() ? bundle.getEntry(".classpath") : null;
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui
if (Platform.inDevelopmentMode()) {
File location = new File(model.getInstallLocation());
if (location.isDirectory()) {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.junit.core
try {
JUnitRuntimeClasspathEntry x= new JUnitRuntimeClasspathEntry("org.junit.platform.launcher", null); //$NON-NLS-1$
String entryString= new ClasspathLocalizer(Platform.inDevelopmentMode()).entryString(x);
int length= classpath.length;
System.arraycopy(classpath, 0, classpath= new String[length + 1], 0, length);
内容来源于网络,如有侵权,请联系作者删除!