you could also check swt plugin's state:
bundle swtbunble = platform.getbundle("org.eclipse.swt"); boolean isheadless = (swtbunble==null || swtbunble.getstate() != bundle.active);
update: this code works properly only if a corresponding system property is set.
boolean isheadless = system.getproperty("eclipse.application") .equals("org.eclipse.cdt.managedbuilder.core.headlessbuild");
this code checks an argument passed as an "application", it is "org.eclipse.cdt.managedbuilder.core.headlessbuild" in case of a headless eclipse launch.
- How to programmatically check whether eclipse console build or GUI build is launched?
- How I can build Eclipse C++ project with CMake from the Linux console ( no GUI is available )
- Build with Maven in Eclipse Photon - How to get console colours?
- How to automatically change Eclipse build path when I check out Git branches
- How do I detect whether an Eclipse build failed?
- Eclipse API: How to check whether an IFile is a .project or .classpath file?
- How to check in Eclipse if a particular library is in Java build path?
- How do you programmatically remove a file from eclipse build path?
- How can I use eclipse to build a GUI in C ? (I want to use only C and not JAVA)
- How to redirect the console output into the GUI console view using eclipse plugin?
- How to check if a build is required in Eclipse pre-build script?
- How to check whether the cursor is in an eclipse editor part?
- how to check whether a plugin is already installed on eclipse before installing another plugin
- How to output messages to the Eclipse console when developing for Android
- How to configure Eclipse build path to use Maven dependencies?
- How do you stop Console from popping up automatically in Eclipse
- How to achieve that Eclipse clean and build (aka rebuild)?
- How to build and run Maven projects after importing into Eclipse IDE
- How to set eclipse console locale/language
- How do I check out an SVN project into Eclipse as a Java project?
- How to use the GDB console in Eclipse CDT?
- How to check the icon meaning in the eclipse (project explorer)?
- How can I go to the next Eclipse marker (e.g. build error) using the keyboard?
- Eclipse 3.4.1 - how to view compiler output in Console while building a project
- How can I redirect JNI console output to Eclipse Console view, when Eclipse plugin uses JNI?
- How can I add build path items to Eclipse 3.5 using relative paths?
- How to build SCons projects with Eclipse CDT?
- How to build an Eclipse plugin with maven?
- How to use Eclipse interactive console in debug
- How do I add a shortcut key to Eclipse 3.2 Java plug-in to build the current project?
More Query from same tag
- Hibernate query last to long
- Unicode characters not rendered when running jar file in terminal ( Eclipse / MacOS )
- New maven project
- Why is maven dependency being added automatically to pom when using Eclipse (STS 3.5.1)?
- Eclipse: Relocating a git repo from project to workspace
- How do I change the background color of the column with the expanders in Eclipse?
- why is this array showing and error message(Eclipse)
- updating database in background
- Eclipse: Program "/xlC" not found in PATH
- "Hide" a maven artifact from the eclipse autocomplete
- Hibernate code generation: org.hibernate.HibernateException: 'hibernate.dialect' must be set when no Connection available
- error installing eclipse enterprise edition on windows 7 64bit
- GLSL shaders won't compile and no error message on windows vista with an NVIDIA Geforce 9800 graphics card
- why i got this message[“Variable name” cannot be resolved to a variable]?
- JSP Tag Spacing Regex
- Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized
- Error occurred during initialization of VM (java/lang/NoClassDefFoundError: java/lang/Object)
- How do I make a file template for PyDev?
- psql: command not found when running bash script in eclipse
- Can't open Project in Eclipse
- Compile external Java file during runtime using Eclipse
- Change apk made with app inventor using Eclipse (SDK)
- Error while installing Egit in eclipse
- Uploading an Existing Maven Eclipse Project into GitHub
- How to Format Text in Eclipse with cfeclipse plug-in
- Eclipse and PyDev
- How to use decoration in RCP editor tab
- android app crashing and list view not showing
- popup:org.eclipse.jdt.ui.PackageExplorer not visible
- Using the Eclipse Marketplace Client within Red Hat JBoss Developer Studio (Devstudio)