Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax grammar (highlighting, search, etc.) is broken for Grails @Transactional AST transformation #713

Closed
AntonPanikov opened this issue Sep 12, 2018 · 1 comment

Comments

@AntonPanikov
Copy link

I am developing on Grails 3.3.x (it is also affecting 3.2.x and probably any 3.x) and all services marked as @transaction has no syntax highlighting, does not show up in references or call hierarchy if method called from @transactional method, there is no Quick actions, like Ctrl+Click on anything in @transactional methods.

I am using:
Eclipse Oxygen.3a Release (4.7.3a)
Groovy-Eclipse 3.1.0.xx-201808241936-e47

It is easy to reproduce with SDKMAN:

  1. Install sdkman:
    curl -s "https://get.sdkman.io" | bash
  2. Source or open new shell:
    source "$HOME/.sdkman/bin/sdkman-init.sh"
  3. Install grails:
    sdk i grails
  4. Create sample app in some folder (grails-example):
    grails create-app --profile web --inplace
  5. Create sample service:
    grails create-service sample

It will be created with @transactional, import this project into eclipse and add Gradle nature. Edit grails-sample/grails-app/services/grails/sample/SampleService.groovy, like this:

package grails.sample

import grails.gorm.transactions.NotTransactional
import grails.gorm.transactions.Transactional

@Transactional
class SampleService {

    def serviceMethod() {
        def qwe = "String"
        if (qwe) {
            println "asd"
        }
    }
    
    @NotTransactional
    def serviceMethodNone() {
        def qwe = "String"
        if (qwe) {
            println "asd"
        }
    }
    
}

The first methiod affected by @transactional will have no syntax highlight, like keyword println or local var "qwe" will be grayed as simple text while the second one will have everything.

I am attaching my sample app zip here, just in case.
grails-sample.zip

@eric-milles
Copy link
Member

This was just fixed yesterday. See #712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants