hugomelendez opened a new issue, #2110:
URL: https://github.com/apache/incubator-kie-tools/issues/2110

   Hi,
   
   I was following this article 
(https://blog.kie.org/2022/05/dmn-types-from-java-classes.html) steps to enable 
the Import but it failed every time.
   
   First I tried the last versions (as of this writing) of plugins:
   
   - DMN Editor 0.32.0 & Language Support for Java 1.25.1
   
   but, as the article + comments mentioned, there are some issues in 0.32.
   
   Then I downgraded both to a combination from the comments:
   
   - DMN Editor 0.31.0 & Language Support for Java 1.22.1
   
   and using this github (https://github.com/yesamer/dmn-javaclasses-example) 
still didn't work. The error is:
   
   ```
   Not available, please check if 'Language Support for Java by Red Hat' 
extension is correctly installed and the @KieActivator annotation is present
   ```
   
   ![button 
disabled](https://github.com/apache/incubator-kie-tools/assets/1382463/73bead04-319f-4e1f-907e-7104a5ac469e)
   
   
   
   Then I changed the Activator.java with 2 things:
   
   - Move it to `com.redhat` package
   - Add the `@KieActivator` annotation
   
   ```java
   package com.redhat;
   
   import org.kie.api.project.KieActivator;
   
   @KieActivator
   public class Activator {
   
     
   }
   ```
   
   After a Language Server restart, it enables the button
   
   ![button 
enabled](https://github.com/apache/incubator-kie-tools/assets/1382463/230e0c47-ce83-4811-9c9e-ff64984759ef)
   
   But, I wasn't able to find any of the available classes (Book, Author):
   
   ![book not 
found](https://github.com/apache/incubator-kie-tools/assets/1382463/6ed768b7-3f14-46b8-88f6-7fd734c08929)
   
   and the log says:
   
   ```log
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.404
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/dto/Author.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.405
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/dto/Book.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.405
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/com/redhat/Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.406
   !MESSAGE Activator found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/com/redhat/Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.406
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/dto/Author.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.406
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/dto/Book.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.407
   !MESSAGE Java file found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/com/redhat/Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.407
   !MESSAGE Activator found: 
/home/hmelendez/clases_model_en_dmn/src/main/java/com/redhat/Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:29.407
   !MESSAGE extension.kogito.isAvailable
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.273
   !MESSAGE extension.kogito.classes
   
   !ENTRY org.eclipse.jdt.ls.core 4 0 2024-01-04 17:01:35.277
   !MESSAGE Arguments: Book
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.361
   !MESSAGE import Book
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.361
   !MESSAGE 
file:///home/hmelendez/clases_model_en_dmn/src/main/java/com/redhat/Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.362
   !MESSAGE package com.redhat;
   
   import Book
   
   public class Activator{
   
   }
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.443
   !MESSAGE Reconciled 1. Took 16 ms
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.658
   !MESSAGE Completion request completed
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:35.659
   !MESSAGE Size: 2
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:36.422
   !MESSAGE begin problem for /Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:36.423
   !MESSAGE 2 problems reported for /Activator.java
   
   !ENTRY org.eclipse.jdt.ls.core 1 0 2024-01-04 17:01:36.423
   !MESSAGE Validated 1. Took 28 ms
   ```
   
   Thanks in advance.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to