diff --git a/org.erlide.backend/src/org/erlide/backend/internal/Backend.java b/org.erlide.backend/src/org/erlide/backend/internal/Backend.java index 73b57ed968..d2d2a67438 100644 --- a/org.erlide.backend/src/org/erlide/backend/internal/Backend.java +++ b/org.erlide.backend/src/org/erlide/backend/internal/Backend.java @@ -1,12 +1,10 @@ /******************************************************************************* - * Copyright (c) 2009 Vlad Dumitrescu and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available - * at http://www.eclipse.org/legal/epl-v10.html + * Copyright (c) 2009 Vlad Dumitrescu and others. All rights reserved. This program and + * the accompanying materials are made available under the terms of the Eclipse Public + * License v1.0 which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html * - * Contributors: - * Vlad Dumitrescu + * Contributors: Vlad Dumitrescu *******************************************************************************/ package org.erlide.backend.internal; @@ -103,7 +101,9 @@ protected boolean startErlideApps(final OtpErlangPid jRex, final boolean watch) switch (data.getContext()) { case IDE: site.call("erlide_builder_app", "init", ""); - site.call("erlide_ide_app", "init", ""); + if (!SystemConfiguration.isHeadless()) { + site.call("erlide_ide_app", "init", ""); + } break; default: } diff --git a/org.erlide.core/src/org/erlide/core/ErlangCore.java b/org.erlide.core/src/org/erlide/core/ErlangCore.java index 16512a707b..8356c8ae21 100644 --- a/org.erlide.core/src/org/erlide/core/ErlangCore.java +++ b/org.erlide.core/src/org/erlide/core/ErlangCore.java @@ -1,12 +1,10 @@ /******************************************************************************* - * Copyright (c) 2000, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at + * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved. This program + * and the accompanying materials are made available under the terms of the Eclipse Public + * License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * - * Contributors: - * IBM Corporation + * Contributors: IBM Corporation *******************************************************************************/ package org.erlide.core; @@ -64,13 +62,19 @@ public void start() throws CoreException { final String version = retrieveFeatureVersion(); ErlLogger.info("Starting CORE " + Thread.currentThread()); - String dev = "(" + EncodingUtils.getEncoding() + ") "; + String dev = "(" + EncodingUtils.getEncoding() + ")"; if (SystemConfiguration.getInstance().isDeveloper()) { dev += " developer version ***"; } if (SystemConfiguration.getInstance().isTest()) { dev += " test ***"; } + if (SystemConfiguration.isHeadless()) { + dev += " headless"; + } else { + dev += " ui"; + } + final String versionBanner = "*** starting Erlide v" + version + " *** " + dev; logger.log(Level.INFO, versionBanner); featureVersion = version; diff --git a/org.erlide.util/src/org/erlide/util/SystemConfiguration.java b/org.erlide.util/src/org/erlide/util/SystemConfiguration.java index f703805968..c60b186d2d 100644 --- a/org.erlide.util/src/org/erlide/util/SystemConfiguration.java +++ b/org.erlide.util/src/org/erlide/util/SystemConfiguration.java @@ -1,5 +1,7 @@ package org.erlide.util; +import org.eclipse.core.runtime.Platform; + public final class SystemConfiguration { private static SystemConfiguration instance = new SystemConfiguration(); @@ -134,4 +136,8 @@ private void setMaxParallelBuilds(final String text) { public int getMaxParallelBuilds() { return maxParallelBuilds; } + + public static boolean isHeadless() { + return Platform.getBundle("org.erlide.ui") == null; + } }