GithubHelp home page GithubHelp logo

xtext-eclipse's Introduction

Eclipse Support For The Xtext Framework

Notice

The content of this repository (xtext-eclipse) has been moved to the Xtext Monorepo. Please refer to that repository to find the code, create issues or file pull requests.

About

This repository contains all Eclipse related code for Xtext, including

How To Build

Checkout and run mvn clean install.

Note: The target platform used for the Tycho build loads the required Xtext dependencies (xtext-lib, xtext-core, xtext-extras) from their respective p2 repositories on the Jenkins server.

Note: The default Maven profile uses Tycho 2.6.0. If you use Tycho 2.7.0+ on the same machine, you may run into an issue with an error about bundleLocation not found. One workaround is to use a separate Maven repository for Tycho 2.6.0: mvn -Dmaven.repo.local=./some/path clean install. Another workaround is to use a different Xtext Maven profile such as latest which uses a newer Tycho version: mvn -P latest clean install.

How to Work with the Source Code

For

  • how to setup your workspace,
  • how to contribute,
  • and many other useful guides

see xtext/CONTRIBUTING.md.

Continuous Integration

This project is built by the xtext-eclipse multi-branch job on Jenkins.

xtext-eclipse's People

Contributors

akosyakov avatar arnedeutsch avatar arshad1990 avatar bananeweizen avatar cdietrich avatar dhuebner avatar eliericha avatar fstolte avatar gallandarakhneorg avatar hbuender avatar holgerschill avatar jankoehnlein avatar loradd avatar lorenzobettini avatar meysholdt avatar miklossy avatar mmews-n4 avatar nbhusare avatar nicoprediger avatar oehme avatar pisv avatar riederm avatar rubenporras avatar sailingkieler avatar spoenemann avatar svenefftinge avatar szarnekow avatar tivervac avatar vorburger avatar vpiskarev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xtext-eclipse's Issues

[Xbase][Refactoring] Renaming Inferred private methods is not working

Renaming Inferred private methods is not working

take the domainmodel example and adapt the inferrer

            members += entity.toMethod("get"+entity.name, Void.TYPE.typeRef) [
                body = ''''''
                visibility = JvmVisibility.PRIVATE
            ]

and refactor Demo in the following model:

package abc {
    entity Demo {
    }
}

gives

Refactoring is not applicable

this is cause by the RenameVirtualMethodProcessor created for the method which does not like private methods (see MethodChecks.isVirtual)

i asume we should change

JdtRenameRefactoringProcessorFactory.createRenameProcessor

to something like

case IJavaElement.METHOD:
                    if(((IMethod)element).isConstructor()) 
                        break;
                    if (Flags.isStatic(((IMethod) element).getFlags()) || Flags.isPrivate(((IMethod) element).getFlags()))
                        return new RenameNonVirtualMethodProcessor((IMethod) element);
                    else
                        return new RenameVirtualMethodProcessor((IMethod) element);

@JanKoehnlein what do you think

MouseOver Tooltip's size is wrong

Heya,

we've stumbled across a problem where the tooltip, when hovering over an EObject with custom description, it doesn't set it's height according to the content.

Reproduction:

Create new Xtext project with Eclipse and Generic IDE Support.

Take the following grammar:

grammar org.xtext.example.mydsl.MyDsl with org.eclipse.xtext.common.Terminals

generate myDsl "http://www.xtext.org/example/mydsl/MyDsl"

Model:
    greetings+=Element*;

Element:
    Greeting | Person;

Greeting:
    'Hello' name=[Person] '!';

Person:
    'Person'
    name=ID
    age=INT
    address=STRING;

implement the following class in the *.ui project:

class MyDslObjectDocumentationProvider implements IEObjectDocumentationProvider
{
    override getDocumentation(EObject o)
    {
        return switch o
        {
            Person:
            '''
                The person is «o.name»</br>
                He is «o.age» years old</br>
                He lives at:</br>
                «o.address»
            '''
        }
    }
}

and override it in the UiModule:

@FinalFieldsConstructor
class MyDslUiModule extends AbstractMyDslUiModule
{
    def Class<? extends IEObjectDocumentationProvider> bindIEObjectDocumentationProvider()
    {
        return MyDslObjectDocumentationProvider
    }
}

What happens

The following tooltip is getting rendered when hovering:
Screenshot

Notice that the box isn't high enough.

I can resize it though:
Screenshot

SMap NPE when closing Eclipse while building large Xtend file

I get the following exception by opening a large Xtend file and closing Eclipse before the build is finished.

  1. Open large Xtend file
  2. Change it and save
  3. Immediately exit Eclipse

Example project attached: xtext-eclipse-38.zip

2 [Worker-2] ERROR org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/SmallClass2.java to install source information: null java.lang.NullPointerException at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145) at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.apache.log4j 4 0 2016-08-03 11:38:17.211
!MESSAGE org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/SmallClass2.java to install source information: null

!STACK 0
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
17 [Worker-2] ERROR org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/SmallClass.java to install source information: null
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.apache.log4j 4 0 2016-08-03 11:38:17.216
!MESSAGE org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/SmallClass.java to install source information: null

!STACK 0
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
218 [Worker-2] ERROR org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/HugeClass.java to install source information: null
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.apache.log4j 4 0 2016-08-03 11:38:17.416
!MESSAGE org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/HugeClass.java to install source information: null

!STACK 0
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!STACK 0
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
39 [Worker-1] ERROR org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant - Could not process /Example/xtend-gen/org/example/HugeClass.java to install source information: null
java.lang.NullPointerException
at org.eclipse.xtext.builder.smap.DebugSourceInstallingCompilationParticipant.buildFinished(DebugSourceInstallingCompilationParticipant.java:145)
at org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:235)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:734)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

include org.eclipse.xtend.lib.macro into Xtext-Eclipse p2-repository?

...because it would be nice if Xtext developers would not need to add the Xtend p2-repository to their target platform definition just to develop an Xtext language. I've seem many projects that added xtend.sdk.feature to their target platform even though they would only need the libs.

options: include 'org.eclipse.xtend.lib.macro'
a) via catalog.xml, then it's in the p2 repo but not in any feature
b) into xtext.sdk.feature

Consolidate proposal provider API and adjust it to the generic IDE one

Currently, if one would like to support the same content proposal logic for both Eclipse IDE and a generic IDE (for instance Web), then one would have to maintain the same logic in two different places.

Based on the current state of Xtext, the Eclipse one is available at MyLanguageProposalProvider in the *.ui bundle while the generic IDE one is located at MyLanguageIdeContentProposalProvider (extending the IdeContentProposalProvider class) in the *.ide bundle.

Although the two APIs seem to be very similar, there are no easy, or convenient ways to use and maintain the same logic at one place.

Preferably, there should be an adapter, and the Eclipse-based implementation could only just delegate in the generic IDE one. In a nutshell; we need an API with a unified content assist context and a generic acceptor for the completion proposals. Other API changes might be required as well.

deadlock between LanguageSpecificURIeditorOpener and OutlinePage

The deadlock happens between LanguageSpecificURIeditorOpener and OutlinePage.
So far I could reproduce it on Linux in 100% cases. Does not happen on Windows, nor OSX.

I have used:

To reproduce:

  1. Launch N4JS ide in a way that Outline is open and no editor is open. (or close all editors, open outline view and re-launch ide).
  2. Trigger OpenType view.
  3. Open any type from search history (or type some name, e.g. StorageInMemory from N4JS example project, and select found type)
  4. No editor is opened, outline is not populated. Click recklessly to irritate your OS
    busy

Stacktraces show that main thread that opens Editor and other thread that populates Outline are locking each other on drawing to the screen and reading the resource:
blockedthreads

Full traces copied from JConsole:

main.txt

worker0.txt

[quickfix] Add quickfix for create action

A rule
Foo: 'id' (name=ID)?;Foo: 'id' (name=ID)?;
produces the warning
The rule 'Foo' may be consumed without object instantiation. Add an action to ensure object creation, e.g. '{Foo}'.

Adding this action could be provided by a quickfix.

JavaProjectClasspathChangeAnalyzer misses cases

org.eclipse.xtext.ui.util.JavaProjectClasspathChangeAnalyzer.isRelevantPackageFragmentRootChange(IJavaElementDelta)misses cases.

  • if a jar on classpath changes in itself then the delta is IJavaElementDelta.F_CONTENT | IJavaElementDelta.F_ARCHIVE_CONTENT_CHANGED
  • if the jar is inside the project ((IPackageFragmentRoot) element).isExternal()is false

"Xtext SDK Complete" and "Xtend IDE"

TL;DR

I really think that "Xtext SDK Complete" (aka xtext.sdk.feature.group) should "include" (actually "requires" in the feature.xml) "Xtend IDE" (aka xtend.sdk.feature.group) as it always did. While, currently, after repo split, this does not hold anymore.

Long Story:

If Xtext SDK Complete did not include also Xtend IDE, then a user that installs Xtext SDK complete would create an Xtext project and could not go on, since all the .xtend files would not be compilable into Java files. So this is strong requirement for the installation in the IDE.

If one wanted to have a reduced set of things for the target platform, we could provide a reduced feature, something like "Xtext Target Platform SDK" (even though xtext.redist feature should work already). However, I've never seen any problem in adding Xtext SDK in the target platform for two reasons:

  1. using Oomph, I avoid duplicate use of disk space, since the bundles in the bundle pool will be reused both for the host Eclipse and for the target platform as well
  2. using Maven Tycho, even if I mention xtext.sdk in the .target file, I know that Tycho will only actually download the bundles that are required by my projects (as long as they're part of a feature mentioned in the .target file), not the whole xtext.sdk feature. (on a side note, this Tycho behavior gives problems in some situations, see e.g., eclipse/xtext#1004, but in this case it is helpful ;)

I also noted the different behavior of Xtext SDK not including Xtend IDE anymore when I was trying to update my Xtext develoment workspace with Oomph: in spite of having the p2 repositories of both Xtext and Xtend based on the latest build in Jenkins (http://services.typefox.io/open-source/jenkins//job/xtext-eclipse/job/master/lastSuccessfulBuild/artifact/build/p2-repository/features/ and http://services.typefox.io/open-source/jenkins//job/xtext-xtend/job/master/lastSuccessfulBuild/artifact/build/p2-repository/features/, respectively), no update was found. Trying to update Xtext SDK and Xtend IDE manually from Eclipse ended up with a p2 resolution error:

Cannot complete the install because of a conflicting dependency.
 Software being installed: Xtend IDE 2.11.0.v20160929-1448 (org.eclipse.xtend.sdk.feature.group 2.11.0.v20160929-1448)
 Software being installed: Xtext Complete SDK 2.11.0.v20160930-0901 (org.eclipse.xtext.sdk.feature.group 2.11.0.v20160930-0901)
 Only one of the following can be installed at once: 
   Xbase Library 2.11.0.v20160929-1035 (org.eclipse.xtext.xbase.lib.feature.jar 2.11.0.v20160929-1035)
   Xbase Library 2.11.0.v20160930-0901 (org.eclipse.xtext.xbase.lib.feature.jar 2.11.0.v20160930-0901)
 Cannot satisfy dependency:
   From: Xtend IDE 2.11.0.v20160929-1448 (org.eclipse.xtend.sdk.feature.group 2.11.0.v20160929-1448)
   To: org.eclipse.xtext.xbase.lib.feature.group [2.11.0.v20160929-1035]
 Cannot satisfy dependency:
   From: Xtext Complete SDK 2.11.0.v20160930-0901 (org.eclipse.xtext.sdk.feature.group 2.11.0.v20160930-0901)
   To: org.eclipse.xtext.xbase.feature.group [2.11.0.v20160930-0901]
 Cannot satisfy dependency:
   From: Xbase 2.11.0.v20160930-0901 (org.eclipse.xtext.xbase.feature.group 2.11.0.v20160930-0901)
   To: org.eclipse.xtext.xbase.lib.feature.group [2.11.0.v20160930-0901]
 Cannot satisfy dependency:
   From: Xbase Library 2.11.0.v20160929-1035 (org.eclipse.xtext.xbase.lib.feature.group 2.11.0.v20160929-1035)
   To: org.eclipse.xtext.xbase.lib.feature.jar [2.11.0.v20160929-1035]
 Cannot satisfy dependency:
   From: Xbase Library 2.11.0.v20160930-0901 (org.eclipse.xtext.xbase.lib.feature.group 2.11.0.v20160930-0901)
   To: org.eclipse.xtext.xbase.lib.feature.jar [2.11.0.v20160930-0901]

Indeed, both p2 repos contain a version of xbase.lib (with different version build qualifiers), and since Xtext SDK includes xbase feature (which includes xbase.lib) and Xtend IDE includes xbase.lib, then p2 can't install them both (and here "includes" really means "includes" in the feature.xml; and we know that feature inclusion means strict version matching).

In any case, as I said at the beginning, I only see drawbacks in changing the fact that Xtext SDK does not require Xtend IDE anymore.

I really think that a single p2 repo should be built with both Xtext and Xtend and restore the original requirement.

Clean up project org.eclipse.xtext.releng

The project contains some files which are obsolete with the new project structure and changes to the build.

All files that are not relevant for the current releng process should be removed.

[oomph] Enable option "Insert Signed-off-by" Footer

When committing to Xtext it is mandatory to insert the Signed-off-by Footer. Sometimes I forget that, fail at a PR, reset the commit and re-commit it. EGit UI allows to automatically insert the option for a commit, so this cannot be forgotten. The Xtext.setup should set this preference.

p2-repository should include source bundle/feature

to get the build working at a time when the upstream repos did not ship source artifacts, including source had explicitly been disabled in

/xtext-eclipse/releng/org.eclipse.xtext.tycho.parent/pom.xml

[oomph] Target platform incomplete

Some projects from xtext-eclipse have dependencies on bundles which are not part of the SDK. This becomes visible when the Xtext setup is executed with the "Eclipse Support" without xtext-core and xtext-extras.

The missing plugins are:

  • org.eclipse.xtext.testlanguages
  • org.eclipse.xtext.testlanguages.ide
  • org.eclipse.xtext.purexbase
  • org.eclipse.xtext.testing
  • org.eclipse.xtext.xbase.testing
  • org.eclipse.xtext.tests

To make these projects compilable without the need to set up the dependent subprojects, the mentioned plugins have to be available in a p2 repository.

[Documentation] Update 3.0.5 Xbase to new Workflow

  • jvm types requires inheriting from "org.eclipse.xtext.xbase.Xtype" or adaption of the workflow commonTypesSupport = { onlyEnabledIfGrammarIsUsed = false}
  • the hints on the workflow still uses old style workflow

Move `CopyQualifiedNameService` and its default implementation to core

Currently, the CopyQualifiedNameService and its default implementation (DefaultCopyQualifiedNameService) are in the org.eclipse.xtext.ui.editor.copyqualifiedname package although it does not use anything from the UI. When one would like to reuse this service from the core or the generic IDE plug-in, it is not possible. I would recommend to move it to the core. If my recommendation is accepted, I am happy to create a PR with the changes.

The other benefit of moving the service to the core would be to be able to test it as a pure JUnit Test instead of a JUnit Plug-in Test.

To not to break any APIs, we could create a new service in the core and just delegate into it from the UI. But I am more than open to any other approaches.

Invalid dirty state modifiers in JdtTypesProposalProvider.searchAndCreateProposals.

Let a grammar that is defining the concept of agent.
Let the definitions of a "final agent" A1 and a "not-final agent" A2:

final agent A1 { }
agent A2 { }

Let the definition of the agent A3 extending another agent definition. Agent super-types must be obtained with the content assist mechanism (| is the current position of the current when the proposal provider is called).

agent A3 extends |

A IContentProposalProvider implementation is provided with a specific filter that is apply at the location of the cursor:

private class ExtensionFilter extends TypeMatchFilters.AbstractFilter {

    private final ITypesProposalProvider.Filter visibilityFilter;

    private final String modelFullName;

    ExtensionFilter(ContentAssistContext context, int searchFor) {
        super(searchFor);
        this.modelFullName = SARLProposalProvider.this.qualifiedNameProvider.getFullyQualifiedName(
                context.getCurrentModel()).toString();
        this.visibilityFilter = createVisibilityFilter(context, searchFor);
    }

    @Override
    public boolean accept(int modifiers, char[] packageName, char[] simpleTypeName,
                char[][] enclosingTypeNames, String path) {
        // Avoid auto reference of type.
        final String fullName = JavaModelUtil.concatenateName(packageName, simpleTypeName);
        if (Objects.equals(this.modelFullName, fullName)) {
            return false;
        }
        //The following tests are done by the visibility filter.
        //if (TypeMatchFilters.isInternalClass(simpleTypeName, enclosingTypeNames)) {
        //  return false;
        //}
        //if (!TypeMatchFilters.isAcceptableByPreference().accept(modifiers, packageName,
        //      simpleTypeName, enclosingTypeNames, path)) {
        //  return false;
        //}
        // Final modifier test
        if (Flags.isFinal(modifiers)) {
            return false;
        }
        return this.visibilityFilter.accept(modifiers, packageName, simpleTypeName, enclosingTypeNames, path);
    }
}

When the definition of A1 is another resource than the one of A3, the proposal provider provides A2 only.

When the definition of A1 is in the same resource pf the one of A3, the proposal provider provides A2 and A1; that is not the expected behavior.

In the case of A1 and A3 defined in the same resource, the modifiers argument in the accept function for A1 is equal to 1 (Flags.AccPublic). This value does not reflect the final modifier.

After deeper debugging, I discover that the JdtTypesProposalProvider.searchAndCreateProposal
considers A1 to be part of the dirty state of the current edited resource. Then the filtering function is invoked with the hard-coded modifiers value Flags.AccPublic. So that is cannot reflect the real modifiers applied to A1.

MWE2 SDK is missing

After installing from the update side generated in the xtext repository as described in #101 and creating an Xtext project, I can't generate the language because the MWE2 SDK is missing. The installation has only

org.eclipse.emf.mwe2.language
org.eclipse.emf.mwe2.launch
org.eclipse.emf.mwe2.runtime

[wizard] Improve usability of Generic IDE Support option

screenshot 96

The option "Generic IDE Support" is mandatory for the options "Eclipse Plugin", "IntelliJ IDEA Plugin" and "Web Support". It is not intuitive that this option is the last one. It should be the first option that a user could choose and dependend on the option, the other options should be made selectable.

An option could be to make the different IDE integration options part of a group, as it is with the "Eclipse Plugin" and "Create Feature/Update Site" options. This would also make the error message obsolete, since it is clear that without the Generic IDE option the other options are not valid.

[xtext-eclipse] overload DefaultDescriptionLabelProvider#image() for EClass

DefaultDescriptionLabelProvider is the base class for the stub generated by the default LabelProviderFragment. It implements image(IEObjectDescription) like this:

public Object image(IEObjectDescription element) {
    return image(element.getEClass());
}

Unfortunately there is no overloaded image(EClass) so it goes to image(Object).

I think it would make sense with an overloaded image(EClass) and even have a default implementation for it, which can be overridden:

@Override
public Object image(final EClass element) {
    return convertToImageDescriptor("full/obj16/" + element.getName() + ".gif");
}

Alternatively image(IEObjectDescription) could be changed to:

public Object image(IEObjectDescription element) {
    return doGetImage(element.getEClass());
}

That way the user could still declare image(EClass) in the generated stub and it would be called.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.