From ae657b4f53c4abfebc201a40370cc3f548c7e292 Mon Sep 17 00:00:00 2001 From: David Festal Date: Thu, 21 Jun 2018 17:43:01 +0200 Subject: [PATCH] Basic support of the Eclipse Ceylon language (#10096) Basic support of the Eclipse Ceylon language support, with the following features: - language description, - syntax highlighting, - project creation. Signed-off-by: David Festal --- assembly/assembly-wsagent-war/pom.xml | 4 + ide/che-ide-full/pom.xml | 5 + .../che-plugin-ceylon-lang-ide/pom.xml | 113 ++ .../plugin/ceylon/ide/CeylonExtension.java | 61 + .../CeylonLanguageDescriptionProvider.java | 33 + .../ide/CeylonLocalizationConstant.java | 30 + .../plugin/ceylon/ide/CeylonResources.java | 30 + .../ide/action/CreateCeylonFileAction.java | 72 + .../ceylon/ide/inject/CeylonGinModule.java | 50 + .../project/CeylonProjectWizardRegistrar.java | 50 + .../src/main/module.gwt.xml | 25 + .../plugin/ceylon/ide/json/highlighting.json | 25 + .../che/plugin/ceylon/ide/svg/ceylon.svg | 1439 +++++++++++++++++ .../che-plugin-ceylon-lang-server/pom.xml | 79 + .../plugin/ceylon/inject/CeylonModule.java | 35 + .../ceylon/projecttype/CeylonProjectType.java | 28 + .../CreateCeylonProjectHandler.java | 87 + .../bootstrap/ceylon-bootstrap.properties | 2 + .../src/main/resources/project/.ceylon/config | 11 + .../main/resources/project/.ceylon/ide-config | 4 + .../src/main/resources/project/ceylonb | 81 + .../src/main/resources/project/ceylonb.bat | 132 ++ .../main/resources/project/source/run.ceylon | 5 + .../che-plugin-ceylon-lang-shared/pom.xml | 30 + .../che/plugin/ceylon/shared/Constants.java | 31 + plugins/plugin-ceylon/pom.xml | 41 + plugins/pom.xml | 1 + pom.xml | 22 + 28 files changed, 2526 insertions(+) create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/pom.xml create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonExtension.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLanguageDescriptionProvider.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLocalizationConstant.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonResources.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/action/CreateCeylonFileAction.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/inject/CeylonGinModule.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/project/CeylonProjectWizardRegistrar.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/module.gwt.xml create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/json/highlighting.json create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/svg/ceylon.svg create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/pom.xml create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/inject/CeylonModule.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CeylonProjectType.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CreateCeylonProjectHandler.java create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.properties create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/config create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/ide-config create mode 100755 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb create mode 100755 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb.bat create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/source/run.ceylon create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/pom.xml create mode 100644 plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/src/main/java/org/eclipse/che/plugin/ceylon/shared/Constants.java create mode 100644 plugins/plugin-ceylon/pom.xml diff --git a/assembly/assembly-wsagent-war/pom.xml b/assembly/assembly-wsagent-war/pom.xml index a168d7e5f4..0732e2b9fd 100644 --- a/assembly/assembly-wsagent-war/pom.xml +++ b/assembly/assembly-wsagent-war/pom.xml @@ -39,6 +39,10 @@ org.eclipse.che.plugin che-plugin-camel-server + + org.eclipse.che.plugin + che-plugin-ceylon-lang-server + org.eclipse.che.plugin che-plugin-clangd-lang-server diff --git a/ide/che-ide-full/pom.xml b/ide/che-ide-full/pom.xml index 861ca5cf40..1e97235dfe 100644 --- a/ide/che-ide-full/pom.xml +++ b/ide/che-ide-full/pom.xml @@ -30,6 +30,11 @@ che-ide-core gwt-lib + + org.eclipse.che.plugin + che-plugin-ceylon-lang-ide + gwt-lib + org.eclipse.che.plugin che-plugin-composer-ide diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/pom.xml b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/pom.xml new file mode 100644 index 0000000000..d6ca654582 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/pom.xml @@ -0,0 +1,113 @@ + + + + 4.0.0 + + che-plugin-ceylon-parent + org.eclipse.che.plugin + 6.8.0-SNAPSHOT + + che-plugin-ceylon-lang-ide + gwt-lib + Che Plugin :: Ceylon :: IDE + + + com.google.gwt.inject + gin + + + com.google.inject + guice + + + javax.inject + javax.inject + + + javax.validation + validation-api + + + org.eclipse.che.core + che-core-api-languageserver-shared + + + org.eclipse.che.core + che-core-ide-api + + + org.eclipse.che.core + che-core-ide-app + + + org.eclipse.che.core + che-core-ide-ui + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-shared + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-shared + sources + + + org.vectomatic + lib-gwt-svg + + + com.google.gwt + gwt-user + provided + + + + + + net.ltgt.gwt.maven + gwt-maven-plugin + true + + org.eclipse.che.plugin.ceylon.Ceylon + + + + com.mycila + license-maven-plugin + + + **/ceylon.svg + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + analyze + + + + org.eclipse.che.plugin:che-plugin-ceylon-lang-shared + + + + + + + + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonExtension.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonExtension.java new file mode 100644 index 0000000000..80cca0028e --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonExtension.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide; + +import static org.eclipse.che.ide.api.action.IdeActions.GROUP_FILE_NEW; + +import com.google.inject.Inject; +import com.google.inject.name.Named; +import org.eclipse.che.ide.api.action.ActionManager; +import org.eclipse.che.ide.api.action.DefaultActionGroup; +import org.eclipse.che.ide.api.extension.Extension; +import org.eclipse.che.ide.api.filetypes.FileType; +import org.eclipse.che.ide.api.filetypes.FileTypeRegistry; +import org.eclipse.che.ide.api.icon.Icon; +import org.eclipse.che.ide.api.icon.IconRegistry; +import org.eclipse.che.plugin.ceylon.ide.action.CreateCeylonFileAction; + +/** + * Python extension entry point. + * + * @author David Festal + */ +@Extension(title = "Ceylon") +public class CeylonExtension { + + public static String CEYLON_CATEGORY = "Ceylon"; + + @Inject + public CeylonExtension( + FileTypeRegistry fileTypeRegistry, + CreateCeylonFileAction createCeylonFileAction, + ActionManager actionManager, + CeylonResources ceylonResources, + IconRegistry iconRegistry, + @Named("CeylonFileType") FileType ceylonFile) { + fileTypeRegistry.registerFileType(ceylonFile); + } + + @Inject + private void prepareActions( + CreateCeylonFileAction createCeylonFileAction, + ActionManager actionManager, + CeylonResources resources, + IconRegistry iconRegistry) { + + DefaultActionGroup newGroup = (DefaultActionGroup) actionManager.getAction(GROUP_FILE_NEW); + + actionManager.registerAction("newCeylonFile", createCeylonFileAction); + newGroup.add(createCeylonFileAction); + iconRegistry.registerIcon( + new Icon(CEYLON_CATEGORY + ".samples.category.icon", resources.category())); + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLanguageDescriptionProvider.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLanguageDescriptionProvider.java new file mode 100644 index 0000000000..1fd923bab0 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLanguageDescriptionProvider.java @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide; + +import static java.util.Arrays.asList; + +import javax.inject.Provider; +import org.eclipse.che.api.languageserver.shared.model.LanguageDescription; +import org.eclipse.che.plugin.ceylon.shared.Constants; + +public class CeylonLanguageDescriptionProvider implements Provider { + private static final String[] EXTENSIONS = new String[] {Constants.CEYLON_EXT}; + private static final String MIME_TYPE = "text/x-ceylon"; + + @Override + public LanguageDescription get() { + LanguageDescription description = new LanguageDescription(); + description.setFileExtensions(asList(EXTENSIONS)); + description.setLanguageId(Constants.LANGUAGE_ID); + description.setMimeType(MIME_TYPE); + description.setHighlightingConfiguration(CeylonResources.INSTANCE.syntax().getText()); + + return description; + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLocalizationConstant.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLocalizationConstant.java new file mode 100644 index 0000000000..8cf168c6e1 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonLocalizationConstant.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide; + +import com.google.gwt.i18n.client.Messages; +import com.google.gwt.i18n.client.Messages.DefaultMessage; + +/** + * Localization constants. Interface to represent the constants defined in resource bundle: + * 'CeylonLocalizationConstant.properties'. + * + * @author David Festal + */ +public interface CeylonLocalizationConstant extends Messages { + @Key("ceylon.action.create.file.title") + @DefaultMessage("New Ceylon File") + String createCeylonFileActionTitle(); + + @Key("ceylon.action.create.file.description") + @DefaultMessage("Create a Ceylon file") + String createCeylonFileActionDescription(); +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonResources.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonResources.java new file mode 100644 index 0000000000..cfdb301bfb --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/CeylonResources.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide; + +import com.google.gwt.core.client.GWT; +import com.google.gwt.resources.client.ClientBundle; +import com.google.gwt.resources.client.TextResource; +import org.vectomatic.dom.svg.ui.SVGResource; + +/** @author David Festal */ +public interface CeylonResources extends ClientBundle { + CeylonResources INSTANCE = GWT.create(CeylonResources.class); + + @Source("svg/ceylon.svg") + SVGResource ceylonFile(); + + @Source("svg/ceylon.svg") + SVGResource category(); + + @Source("json/highlighting.json") + TextResource syntax(); +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/action/CreateCeylonFileAction.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/action/CreateCeylonFileAction.java new file mode 100644 index 0000000000..8ef485108f --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/action/CreateCeylonFileAction.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide.action; + +import com.google.inject.Inject; +import com.google.inject.Provider; +import com.google.inject.Singleton; +import com.google.web.bindery.event.shared.EventBus; +import org.eclipse.che.ide.CoreLocalizationConstant; +import org.eclipse.che.ide.api.app.AppContext; +import org.eclipse.che.ide.api.editor.EditorAgent; +import org.eclipse.che.ide.api.notification.NotificationManager; +import org.eclipse.che.ide.newresource.AbstractNewResourceAction; +import org.eclipse.che.ide.ui.dialogs.DialogFactory; +import org.eclipse.che.plugin.ceylon.ide.CeylonLocalizationConstant; +import org.eclipse.che.plugin.ceylon.ide.CeylonResources; +import org.eclipse.che.plugin.ceylon.shared.Constants; + +/** + * Action to create new Ceylon source file. + * + * @author David Festal + */ +@Singleton +public class CreateCeylonFileAction extends AbstractNewResourceAction { + + private static final String DEFAULT_CONTENT = + "\"A Hello World! program in Ceylon.\"" + + "shared void run() {\n" + + " print(\"Hello World!\");\n" + + "}"; + + @Inject + public CreateCeylonFileAction( + CeylonLocalizationConstant localizationConstant, + CeylonResources resources, + DialogFactory dialogFactory, + CoreLocalizationConstant coreLocalizationConstant, + EventBus eventBus, + AppContext appContext, + NotificationManager notificationManager, + Provider editorAgentProvider) { + super( + localizationConstant.createCeylonFileActionTitle(), + localizationConstant.createCeylonFileActionDescription(), + resources.ceylonFile(), + dialogFactory, + coreLocalizationConstant, + eventBus, + appContext, + notificationManager, + editorAgentProvider); + } + + @Override + protected String getExtension() { + return Constants.CEYLON_EXT; + } + + @Override + protected String getDefaultContent() { + return DEFAULT_CONTENT; + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/inject/CeylonGinModule.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/inject/CeylonGinModule.java new file mode 100644 index 0000000000..c7598b1a3a --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/inject/CeylonGinModule.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide.inject; + +import static com.google.gwt.inject.client.multibindings.GinMultibinder.newSetBinder; + +import com.google.gwt.inject.client.AbstractGinModule; +import com.google.inject.Provides; +import com.google.inject.Singleton; +import com.google.inject.name.Named; +import org.eclipse.che.api.languageserver.shared.model.LanguageDescription; +import org.eclipse.che.ide.api.extension.ExtensionGinModule; +import org.eclipse.che.ide.api.filetypes.FileType; +import org.eclipse.che.ide.api.project.type.wizard.ProjectWizardRegistrar; +import org.eclipse.che.plugin.ceylon.ide.CeylonLanguageDescriptionProvider; +import org.eclipse.che.plugin.ceylon.ide.CeylonResources; +import org.eclipse.che.plugin.ceylon.ide.project.CeylonProjectWizardRegistrar; +import org.eclipse.che.plugin.ceylon.shared.Constants; + +/** @author David Festal */ +@ExtensionGinModule +public class CeylonGinModule extends AbstractGinModule { + + /** {@inheritDoc} */ + @Override + protected void configure() { + newSetBinder(binder(), ProjectWizardRegistrar.class) + .addBinding() + .to(CeylonProjectWizardRegistrar.class); + + newSetBinder(binder(), LanguageDescription.class) + .addBinding() + .toProvider(CeylonLanguageDescriptionProvider.class); + } + + @Provides + @Singleton + @Named("CeylonFileType") + protected FileType provideCeylonFile() { + return new FileType(CeylonResources.INSTANCE.ceylonFile(), Constants.CEYLON_EXT); + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/project/CeylonProjectWizardRegistrar.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/project/CeylonProjectWizardRegistrar.java new file mode 100644 index 0000000000..f10249714f --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/java/org/eclipse/che/plugin/ceylon/ide/project/CeylonProjectWizardRegistrar.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.ide.project; + +import com.google.inject.Provider; +import java.util.ArrayList; +import java.util.List; +import javax.validation.constraints.NotNull; +import org.eclipse.che.ide.api.project.MutableProjectConfig; +import org.eclipse.che.ide.api.project.type.wizard.ProjectWizardRegistrar; +import org.eclipse.che.ide.api.wizard.WizardPage; +import org.eclipse.che.plugin.ceylon.ide.CeylonExtension; +import org.eclipse.che.plugin.ceylon.shared.Constants; + +/** + * Provides information for registering CEYLON_PROJECT_TYPE_ID project type into project wizard. + * + * @author David festal + */ +public class CeylonProjectWizardRegistrar implements ProjectWizardRegistrar { + + private final List>> wizardPages; + + public CeylonProjectWizardRegistrar() { + wizardPages = new ArrayList<>(); + } + + @NotNull + public String getProjectTypeId() { + return Constants.CEYLON_PROJECT_TYPE_ID; + } + + @NotNull + public String getCategory() { + return CeylonExtension.CEYLON_CATEGORY; + } + + @NotNull + public List>> getWizardPages() { + return wizardPages; + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/module.gwt.xml b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/module.gwt.xml new file mode 100644 index 0000000000..6941e04387 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/module.gwt.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/json/highlighting.json b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/json/highlighting.json new file mode 100644 index 0000000000..6dc6e6b63b --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/json/highlighting.json @@ -0,0 +1,25 @@ +[ + { include: "orion.lib#string_singleQuote"}, + { include: "orion.c-like#comment_singleLine"}, + { include: "orion.c-like#comment_block"}, + { include: "orion.lib#brace_open"}, + { include: "orion.lib#brace_close"}, + { include: "orion.lib#bracket_open"}, + { include: "orion.lib#bracket_close"}, + { include: "orion.lib#parenthesis_open"}, + { include: "orion.lib#parenthesis_close"}, + { include: "orion.lib#operator"}, + { match: "^#!/.*$", name: "comment.shebang.ceylon"}, + { match: "\\b(assembly|module|package|import|alias|class|interface|object|given|value|assign|void|function|new|of|extends|satisfies|adapts|abstracts|in|out|return|break|continue|throw|assert|dynamic|if|else|switch|case|for|while|try|catch|finally|then|let|this|outer|super|is|exists|nonempty)\\b", name: "keyword.control.ceylon"}, + { match: "\\b(doc|by|license|see|throws|tagged|shared|abstract|formal|default|actual|variable|late|native|deprecated|final|sealed|annotation|suppressWarnings|static)\\b", name: "keyword.annotations.ceylon" }, + { match: "([A-Z][a-zA-Z0-9_]*|\\\\I[a-zA-Z0-9_]+)", name: "entity.name.class.ceylon" }, + { match: "([a-z][a-zA-Z0-9_]*|\\\\i[a-zA-Z0-9_]+)", name: "variable.other.ceylon"}, + { begin: "\"\"\"", end: "\"\"\"", name: "string.verbatim.ceylon"}, + { begin: "\"", end: "\"|(``)", name: "string.template.head.ceylon", patterns: [{ match: "\\\\.", name: "constant.character.escape.ceylon"}]}, + { begin: "``", end: "\"|``", name: "string.template.midOrtail.ceylon" }, + { match: "`[a-zA-Z][^`]*`", name: "metamodel.ceylon"}, + { match: "\\$(([01]+(_[01]+)+)|[01]+)", name: "constant.numeric.binary.ceylon"}, + { match: "#(([0-9ABCDEF]+(_[0-9ABCDEF]+)+)|[0-9ABCDEF]+)", name: "constant.numeric.hexa.ceylon"}, + { match: "-?(([0-9]+(_[0-9]+)+)|[0-9]+)\\\\.(([0-9]+(_[0-9]+)+)|[0-9]+)(([eE]-?(([0-9]+(_[0-9]+)+)|[0-9]+))|[kmgtpKMGTP])?", name: "constant.numeric.floating.ceylon"}, + { match: "-?(([0-9]+(_[0-9]+)+)|[0-9]+)[kmgtpKMGTP]?", name: "constant.numeric.decimal.ceylon"} +] \ No newline at end of file diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/svg/ceylon.svg b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/svg/ceylon.svg new file mode 100644 index 0000000000..c89ca8f581 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-ide/src/main/resources/org/eclipse/che/plugin/ceylon/ide/svg/ceylon.svg @@ -0,0 +1,1439 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/pom.xml b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/pom.xml new file mode 100644 index 0000000000..8b3e4aa1eb --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/pom.xml @@ -0,0 +1,79 @@ + + + + 4.0.0 + + che-plugin-ceylon-parent + org.eclipse.che.plugin + 6.8.0-SNAPSHOT + + che-plugin-ceylon-lang-server + Che Plugin :: Ceylon :: Extension Server + + false + + + + com.google.guava + guava + + + com.google.inject + guice + + + com.google.inject.extensions + guice-multibindings + + + javax.inject + javax.inject + + + org.eclipse.che.core + che-core-api-core + + + org.eclipse.che.core + che-core-api-project + + + org.eclipse.che.core + che-core-commons-inject + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-shared + + + org.slf4j + slf4j-api + + + + + + com.mycila + license-maven-plugin + + + + src/main/resources/project/** + + + + + + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/inject/CeylonModule.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/inject/CeylonModule.java new file mode 100644 index 0000000000..1f1fbf0ade --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/inject/CeylonModule.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.inject; + +import com.google.inject.AbstractModule; +import com.google.inject.multibindings.Multibinder; +import org.eclipse.che.api.project.server.handlers.ProjectHandler; +import org.eclipse.che.api.project.server.type.ProjectTypeDef; +import org.eclipse.che.inject.DynaModule; +import org.eclipse.che.plugin.ceylon.projecttype.CeylonProjectType; +import org.eclipse.che.plugin.ceylon.projecttype.CreateCeylonProjectHandler; + +/** @author David Festal */ +@DynaModule +public class CeylonModule extends AbstractModule { + + @Override + protected void configure() { + Multibinder projectTypeMultibinder = + Multibinder.newSetBinder(binder(), ProjectTypeDef.class); + projectTypeMultibinder.addBinding().to(CeylonProjectType.class); + + Multibinder projectHandlersMultibinder = + Multibinder.newSetBinder(binder(), ProjectHandler.class); + projectHandlersMultibinder.addBinding().to(CreateCeylonProjectHandler.class); + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CeylonProjectType.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CeylonProjectType.java new file mode 100644 index 0000000000..269aed3753 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CeylonProjectType.java @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.projecttype; + +import com.google.inject.Inject; +import org.eclipse.che.api.project.server.type.ProjectTypeDef; +import org.eclipse.che.plugin.ceylon.shared.Constants; + +/** + * Ceylon project type + * + * @author David Festal + */ +public class CeylonProjectType extends ProjectTypeDef { + @Inject + public CeylonProjectType() { + super(Constants.CEYLON_PROJECT_TYPE_ID, "Ceylon", true, false, true); + addConstantDefinition(Constants.LANGUAGE, "language", Constants.CEYLON_LANG); + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CreateCeylonProjectHandler.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CreateCeylonProjectHandler.java new file mode 100644 index 0000000000..a473cfbb51 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/java/org/eclipse/che/plugin/ceylon/projecttype/CreateCeylonProjectHandler.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.projecttype; + +import static com.google.common.io.Resources.getResource; +import static com.google.common.io.Resources.toByteArray; +import static org.eclipse.che.api.fs.server.WsPathUtils.resolve; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import javax.inject.Inject; +import org.eclipse.che.api.core.ConflictException; +import org.eclipse.che.api.core.ForbiddenException; +import org.eclipse.che.api.core.NotFoundException; +import org.eclipse.che.api.core.ServerException; +import org.eclipse.che.api.fs.server.FsManager; +import org.eclipse.che.api.project.server.handlers.CreateProjectHandler; +import org.eclipse.che.api.project.server.type.AttributeValue; +import org.eclipse.che.plugin.ceylon.shared.Constants; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** @author David Festal */ +public class CreateCeylonProjectHandler implements CreateProjectHandler { + + private static final Logger LOG = LoggerFactory.getLogger(CreateCeylonProjectHandler.class); + + private static final String[] PROJECT_FILES = + new String[] { + "ceylonb", + "ceylonb.bat", + ".ceylon/config", + ".ceylon/ide-config", + ".ceylon/bootstrap/ceylon-bootstrap.jar", + ".ceylon/bootstrap/ceylon-bootstrap.properties", + "source/run.ceylon" + }; + + private final FsManager fsManager; + + @Inject + public CreateCeylonProjectHandler(FsManager fsManager) { + this.fsManager = fsManager; + } + + @Override + public void onCreateProject( + String projectWsPath, Map attributes, Map options) + throws ForbiddenException, ConflictException, ServerException, NotFoundException { + + fsManager.createDir(projectWsPath); + fsManager.createDir(resolve(projectWsPath, "source")); + fsManager.createDir(resolve(projectWsPath, "resource")); + for (String file : PROJECT_FILES) { + InputStream inputStream = new ByteArrayInputStream(getProjectContent("project/" + file)); + String wsPath = resolve(projectWsPath, file); + fsManager.createFile(wsPath, inputStream, true, true); + if (file.startsWith("ceylonb")) { + fsManager.toIoFile(wsPath).setExecutable(true); + } + } + } + + private byte[] getProjectContent(String file) { + try { + return toByteArray(getResource(file)); + } catch (IOException e) { + LOG.warn("File %s not found so its content will be empty.", file); + return new byte[0]; + } + } + + @Override + public String getProjectType() { + return Constants.CEYLON_PROJECT_TYPE_ID; + } +} diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.properties b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.properties new file mode 100644 index 0000000000..9bb0ab2243 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/bootstrap/ceylon-bootstrap.properties @@ -0,0 +1,2 @@ +distribution=https\://ceylon-lang.org/download/dist/1_3_3 +installation=../../../.ceylon diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/config b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/config new file mode 100644 index 0000000000..8f621107dd --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/config @@ -0,0 +1,11 @@ + +[compiler] +source=source +resource=resource + +[defaults] +encoding=UTF-8 +offline=false +flatclasspath=false +autoexportmavendependencies=false +fullyexportmavendependencies=false diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/ide-config b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/ide-config new file mode 100644 index 0000000000..9bc0aa1558 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/.ceylon/ide-config @@ -0,0 +1,4 @@ +[project] +compile-jvm=true +compile-js=false +system-repository= diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb new file mode 100755 index 0000000000..b6133e6a87 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb @@ -0,0 +1,81 @@ +#!/bin/sh + +# resolve links - $0 may be a softlink +PRG="$0" +while [ -h "$PRG" ]; do + ls="$(ls -ld "$PRG")" + link="${ls##*-> }" # remove largest prefix: yields link target (behind ->) + if [ "$link" != "${link#/}" ]; then # remove prefix / if present + # path was absolute + PRG="$link" + else + # was not + PRG="$(dirname "$PRG")/$link" + fi +done + +DIR="$(dirname "$PRG")" + +# Check if we should use a distribution bootstrap +if [ -f "$DIR/.ceylon/bootstrap/ceylon-bootstrap.properties" ] && [ -f "$DIR/.ceylon/bootstrap/ceylon-bootstrap.jar" ]; then + # Using bootstrap + LIB="$DIR/.ceylon/bootstrap" +else + # Normal execution + CEYLON_HOME="$DIR/.." + LIB="$CEYLON_HOME/lib" + + if [ "$1" = "--show-home" ]; then + echo "$CEYLON_HOME" + exit + fi +fi + +if [ -z "$JAVA_HOME" ]; then + JAVA="java" +else + JAVA="$JAVA_HOME/bin/java" +fi + +# Make sure we have java installed +if ! hash java 2>&- +then + echo >&2 "Java not found, you must install Java in order to compile and run Ceylon programs" + echo >&2 "Go to http://www.java.com/getjava/ to download the latest version of Java" + exit 1 +fi + +#JAVA_DEBUG_OPTS="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" + +if [ "$PRESERVE_JAVA_OPTS" != "true" ]; then + PREPEND_JAVA_OPTS="$JAVA_DEBUG_OPTS" + if [ -n "$COLUMNS" ]; then + CEYL_COLS="$COLUMNS" + elif stty size 2>/dev/null >/dev/null; then + CEYL_COLS="$(stty size 2>/dev/null | cut -d' ' -f2)" + else + CEYL_COLS="$(tput 2>/dev/null cols)" + fi + PREPEND_JAVA_OPTS="$PREPEND_JAVA_OPTS -Dcom.redhat.ceylon.common.tool.terminal.width=$CEYL_COLS" + PREPEND_JAVA_OPTS="$PREPEND_JAVA_OPTS -Dcom.redhat.ceylon.common.tool.progname=$(basename "$PRG")" +fi +for arg; do + case $arg in + --java=*) JAVA_OPTS="$JAVA_OPTS ${arg#--java=}";; + [!-]*) break;; + esac +done +JAVA_OPTS="$PREPEND_JAVA_OPTS $JAVA_OPTS" + +BOOTSTRAP="$LIB/ceylon-bootstrap.jar" + +# Check for cygwin, convert bootstrap path to Windows format +case "`uname`" in + CYGWIN*) [ -n "$LIB" ] && BOOTSTRAP=`cygpath -w "$BOOTSTRAP"` +esac + +exec "$JAVA" \ + $JAVA_OPTS \ + -jar "$BOOTSTRAP" \ + "$@" + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb.bat b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb.bat new file mode 100755 index 0000000000..74c4547576 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/ceylonb.bat @@ -0,0 +1,132 @@ +@echo off +setlocal ENABLEDELAYEDEXPANSION + +:: Check if we should use a distribution bootstrap +pushd "%~dp0" +set "DIR=%CD%" +popd +if NOT exist "%DIR%\.ceylon\bootstrap\ceylon-bootstrap.properties" ( + goto :normal +) +if NOT exist "%DIR%\.ceylon\bootstrap\ceylon-bootstrap.jar" ( + goto :normal +) + +:: Using bootstrap +set "LIB=%DIR%\.ceylon\bootstrap" + +goto :endbs + +:normal + +:: Normal execution + +:: Find CEYLON_HOME +pushd "%~dp0.." +set "CEYLON_HOME=%CD%" +popd +set "LIB=%CEYLON_HOME%\lib" + +if "%~1" == "--show-home" ( + @echo %CEYLON_HOME% + exit /b 1 +) + +:endbs + +:: Find Java + +:: Only check the registry if JAVA_HOME is not already set +IF NOT "%JAVA_HOME%" == "" ( + goto :javaend +) + +:: Find Java in the registry +set "KEY_NAME=HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" +set "KEY_NAME2=HKLM\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment" + +:: get the current version +FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY "%KEY_NAME%" /v CurrentVersion 2^>nul`) DO ( + set "ValueValue=%%A" +) + +if "%ValueValue%" NEQ "" ( + set "JAVA_CURRENT=%KEY_NAME%\%ValueValue%" +) else ( + rem Try again for 64bit systems + + FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY "%KEY_NAME2%" /v CurrentVersion 2^>nul`) DO ( + set "JAVA_CURRENT=%KEY_NAME2%\%%A" + ) +) + +if "%ValueValue%" NEQ "" ( + set "JAVA_CURRENT=%KEY_NAME%\%ValueValue%" +) else ( + rem Try again for 64bit systems from a 32-bit process + + FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY "%KEY_NAME%" /v CurrentVersion /reg:64 2^>nul`) DO ( + set "JAVA_CURRENT=%KEY_NAME%\%%A" + ) +) + +if "%JAVA_CURRENT%" == "" ( + @echo Java not found, you must install Java in order to compile and run Ceylon programs + @echo Go to http://www.java.com/getjava/ to download the latest version of Java + exit /b 1 +) + +:: get the javahome +FOR /F "usebackq skip=2 tokens=3*" %%A IN (`REG QUERY "%JAVA_CURRENT%" /v JavaHome 2^>nul`) DO ( + set "JAVA_HOME=%%A %%B" +) + +if "%JAVA_HOME%" EQU "" ( + rem Try again for 64bit systems from a 32-bit process + FOR /F "usebackq skip=2 tokens=3*" %%A IN (`REG QUERY "%JAVA_CURRENT%" /v JavaHome /reg:64 2^>nul`) DO ( + set "JAVA_HOME=%%A %%B" + ) +) + +:javaend + +set "JAVA=%JAVA_HOME%\bin\java.exe" + +:: Check that Java executable actually exists +if not exist "%JAVA%" ( + @echo "Cannot find java.exe at %JAVA%, check that your JAVA_HOME variable is pointing to the right place" + exit /b 1 +) + +rem set JAVA_DEBUG_OPTS="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y" + +if NOT "%PRESERVE_JAVA_OPTS%" == "true" ( + set PREPEND_JAVA_OPTS=%JAVA_DEBUG_OPTS% + rem Other java opts go here +) + +rem Find any --java options and add their values to JAVA_OPTS +for %%x in (%*) do ( + set ARG=%%~x + if "!ARG:~0,7!" EQU "--java=" ( + set OPT=!ARG:~7! + set "JAVA_OPTS=!JAVA_OPTS! !OPT!" + ) else if "!ARG!" EQU "--java" ( + @echo Error: use --java options with an equal sign and quotes, eg: "--java=-Xmx500m" + exit /b 1 + ) else if "!ARG:~0,1!" NEQ "-" ( + goto :breakloop + ) +) +:breakloop + +set "JAVA_OPTS=%PREPEND_JAVA_OPTS% %JAVA_OPTS%" + +"%JAVA%" ^ + %JAVA_OPTS% ^ + -jar "%LIB%\ceylon-bootstrap.jar" ^ + %* + +endlocal + +if %errorlevel% neq 0 exit /B %errorlevel% diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/source/run.ceylon b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/source/run.ceylon new file mode 100644 index 0000000000..718d5ba222 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-server/src/main/resources/project/source/run.ceylon @@ -0,0 +1,5 @@ +"A Hello World! program in Ceylon" +shared void run() { + print("Hello World!"); +} + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/pom.xml b/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/pom.xml new file mode 100644 index 0000000000..22fc798701 --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/pom.xml @@ -0,0 +1,30 @@ + + + + 4.0.0 + + che-plugin-ceylon-parent + org.eclipse.che.plugin + 6.8.0-SNAPSHOT + + che-plugin-ceylon-lang-shared + Che Plugin :: Ceylon :: Shared + + + com.google.gwt + gwt-user + provided + + + diff --git a/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/src/main/java/org/eclipse/che/plugin/ceylon/shared/Constants.java b/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/src/main/java/org/eclipse/che/plugin/ceylon/shared/Constants.java new file mode 100644 index 0000000000..2b08f0bcca --- /dev/null +++ b/plugins/plugin-ceylon/che-plugin-ceylon-lang-shared/src/main/java/org/eclipse/che/plugin/ceylon/shared/Constants.java @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2012-2018 Red Hat, Inc. + * 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: + * Red Hat, Inc. - initial API and implementation + */ +package org.eclipse.che.plugin.ceylon.shared; + +/** @author David Festal */ +public final class Constants { + + /** Language attribute name */ + public static final String LANGUAGE = "language"; + + /** Ceylon Project Type ID */ + public static final String CEYLON_PROJECT_TYPE_ID = "ceylon"; + + /** Ceylon Language */ + public static final String CEYLON_LANG = "ceylon_lang"; + + /** Default extension for Ceylon files */ + public static final String CEYLON_EXT = "ceylon"; + + public static final String LANGUAGE_ID = "ceylon"; + + private Constants() {} +} diff --git a/plugins/plugin-ceylon/pom.xml b/plugins/plugin-ceylon/pom.xml new file mode 100644 index 0000000000..701847a510 --- /dev/null +++ b/plugins/plugin-ceylon/pom.xml @@ -0,0 +1,41 @@ + + + + 4.0.0 + + che-plugin-parent + org.eclipse.che.plugin + 6.8.0-SNAPSHOT + ../pom.xml + + che-plugin-ceylon-parent + pom + Che Plugin :: Ceylon :: Parent + + che-plugin-ceylon-lang-ide + che-plugin-ceylon-lang-shared + che-plugin-ceylon-lang-server + + + + + + org.eclipse.che.core + che-core-api-dto-maven-plugin + ${project.version} + + + + + diff --git a/plugins/pom.xml b/plugins/pom.xml index cf7ba3a3b3..c4a0c9757d 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -58,6 +58,7 @@ plugin-pullrequest-parent plugin-yaml plugin-camel + plugin-ceylon plugin-clangd plugin-golang diff --git a/pom.xml b/pom.xml index 4e4880240e..530bdc911e 100644 --- a/pom.xml +++ b/pom.xml @@ -1087,6 +1087,28 @@ che-plugin-camel-server ${che.version} + + org.eclipse.che.plugin + che-plugin-ceylon-lang-ide + ${che.version} + gwt-lib + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-server + ${che.version} + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-shared + ${che.version} + + + org.eclipse.che.plugin + che-plugin-ceylon-lang-shared + ${che.version} + sources + org.eclipse.che.plugin che-plugin-clangd-lang-server