The method applyBindings() from the type ChartData is not visible

24 views
Skip to first unread message

eric.b...@gmail.com

unread,
Jun 7, 2016, 2:54:58 PM6/7/16
to DukeScript
[ERROR] ui.applyBindings();
[ERROR] ^^^^^^^^^^^^^
[ERROR] The method applyBindings() from the type ChartData is not visible

annotations created class has:
  private ChartData applyBindings() {
    throw new IllegalStateException("Please specify targetId=\"\" in your @Model annotation");
  }

Although, I do have targetId specified.  Is there another reason for this?

@Model(className = "ChartData", targetId = "", properties = {
        @Property(name = "numProviders", type = int.class), 
        @Property(name = "providerName", type = String.class),
...

Thank you!
Eric

Jaroslav Tulach

unread,
Jun 8, 2016, 2:15:42 AM6/8/16
to dukes...@googlegroups.com, eric.b...@gmail.com
Hello Eric.

### eric.b...@gmail.com : 7. 6. 2016 @ 11:54 ###
Strange. Adding targetId always helped so far. If reproducible from command
line, that would be a bug to be reported at

https://netbeans.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&email1=jtulach&emailassigned_to1=1&emailtype1=substring&list_id=668562&query_format=advanced

If you don't have NetBeans account, I can report it, but I need steps to
reproduce the problem.

-jt

eric.b...@gmail.com

unread,
Jun 9, 2016, 10:10:38 AM6/9/16
to DukeScript, eric.b...@gmail.com
I'm using:
<net.java.html.version>1.3</net.java.html.version>

This happens with mvn clean verify.

But, this is a mvn/tycho build (eclipse).

So, the Manifest has the dependencies, and the pom looks like so:
<?xml version="1.0" encoding="UTF-8"?>
<project
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.csstudio</groupId>
<artifactId>java2html-plugins</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.csstudio.java2html.scan</artifactId>
<packaging>eclipse-plugin</packaging>
<build>
<plugins>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.2.4</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<includes>
<include>src/main/java</include>
</includes>
<outputDirectory>target/generated-sources/annotations</outputDirectory>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.netbeans.html</groupId>
<artifactId>html4j-maven-plugin</artifactId>
<version>${net.java.html.version}</version>
</dependency>
</dependencies>
</plugin>
          <plugin>
              <artifactId>maven-assembly-plugin</artifactId>
              <version>2.4</version>
              <executions>
                  <execution>
                      <id>web-pages</id>
                      <phase>package</phase>
                      <goals>
                          <goal>single</goal>
                      </goals>
                      <configuration>
                          <descriptors>
                              <descriptor>src/main/assembly/webpages.xml</descriptor>
                          </descriptors>
                      </configuration>
                  </execution>
                  <execution>
                      <id>distro-assembly</id>
                      <phase>package</phase>
                      <goals>
                          <goal>single</goal>
                      </goals>
                      <configuration>
                          <descriptors>
                              <descriptor>src/main/assembly/javafx.xml</descriptor>
                          </descriptors>
                      </configuration>
                  </execution>
              </executions>                
          </plugin> 
</plugins>
</build>
</project>

eric.b...@gmail.com

unread,
Jun 10, 2016, 9:53:47 AM6/10/16
to DukeScript, eric.b...@gmail.com
Hello!

This is reproducible, but I am trying to compile with maven/tycho (eclipse), which includes bundles through p2 sites.
I've included the binaries needed in one plugin (  org.csstudio.java2html.eclipse ).

I have a repo at:

"mvn clean verify" should compile with two errors in the generated sources:

1. AllModel.java produces AllData.java with:
  private AllData applyBindings() {
    throw new IllegalStateException("Please specify targetId=\"\" in your @Model annotation");
  }

expected:

 public AllData applyBindings() {
    proto.applyBindings();
    return this;
  }

2.  AllModel.java produces AllData.java with:
public int getComputedProp() {
    org.csstudio.java2html.scan.java.util.List<SomeArrayData> arg1 = getSomeArray();
    try {
      proto.acquireLock("computedProp");
      return org.csstudio.java2html.scan.AllModel.computedProp(arg1);
    } finally {
      proto.releaseLock();
    }

expected:

  public int getComputedProp() {
    java.util.List<SomeArrayData> arg1 = getSomeArray();
    try {
      proto.acquireLock("computedProp");
      return org.csstudio.java2html.scan.AllModel.computedProp(arg1);
    } finally {
      proto.releaseLock();
    }
  }

Thank you!
Eric

Jaroslav Tulach

unread,
Jun 14, 2016, 12:20:58 AM6/14/16
to dukes...@googlegroups.com, eric.b...@gmail.com
### eric.b...@gmail.com : 10. 6. 2016 @ 06:53 ###
> Hello!
>
> This is reproducible, but I am trying to compile with maven/tycho
> (eclipse), which includes bundles through p2 sites.
> I've included the binaries needed in one plugin (
> org.csstudio.java2html.eclipse ).
>
> I have a repo at:
> https://github.com/berryma4/dukescript.eclipse
>
> "mvn clean verify" should compile with two errors in the generated sources:

Hi. I tried:

dukescript.eclipse$ git log | head
commit bf17628e21e1d60981b33627faa14b74f9ff89dc
Author: Eric Berryman <eric.b...@gmail.com>
Date: Fri Jun 10 14:45:14 2016 -0400

Update README.md

and when invoking

dukescript.eclipse$ mvn clean verify

I get:

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-
plugin:0.23.1:package-plugin (default-package-plugin) on project
org.csstudio.java2html.eclipse:
/home/devel/tmp/dukescript.eclipse/plugins/org.csstudio.java2html.eclipse/build.properties:
bin.includes value(s) [bin/] do not match any files. -> [Help 1]

I don't see any of the AllModel or AllData classes being generated:

dukescript.eclipse$ find | grep class
./plugins/org.csstudio.java2html.eclipse/target/classes
./plugins/org.csstudio.java2html.eclipse/target/classes/org
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJE3Editor$2.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJView.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HtmlComponent$1.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/Activator.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJEditorPart$1.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HtmlComponent.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJEditorPart.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJE3Editor.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJView$1.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/E3EditorPart.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJE3Editor$1.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HtmlComponent$2.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HtmlComponent$1X.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/HTMLJView$2.class
./plugins/org.csstudio.java2html.eclipse/target/classes/org/csstudio/java2html/eclipse/E3EditorPart$CompatLabel.class
./plugins/org.csstudio.java2html.eclipse/.classpath
./plugins/org.csstudio.java2html.scan/.classpath~
./plugins/org.csstudio.java2html.scan/.classpath

-jt

Jaroslav Tulach

unread,
Jun 14, 2016, 12:27:39 AM6/14/16
to dukes...@googlegroups.com, eric.b...@gmail.com
In spite of not being able to reproduce the problem, here is a thought:

According to https://eclipse.org/tycho/sitedocs/tycho-compiler-plugin/compile-mojo.html the default tycho compilerId is "jdt" - the annotation processor
hasn't been carefully tested with "jdt" - maybe you could convince tycho to
compile with javac.

-jt

### eric.b...@gmail.com : 10. 6. 2016 @ 06:53 ###

eric.b...@gmail.com

unread,
Jun 14, 2016, 8:41:03 AM6/14/16
to DukeScript, eric.b...@gmail.com

I've fixed the not related build error.  Sorry about that.

eric.b...@gmail.com

unread,
Jun 14, 2016, 8:50:22 AM6/14/16
to DukeScript, eric.b...@gmail.com

Good point on jdt, I see if I can replace it to remove the error.  If it does, I will report the bug to them.

eric.b...@gmail.com

unread,
Jun 14, 2016, 11:20:08 AM6/14/16
to DukeScript, eric.b...@gmail.com
It does look like jdt is "different".  Right now, I will look disabling jdt's annotation processing.
I'll write back with a solution and commit back to the repo.

eric.b...@gmail.com

unread,
Jun 14, 2016, 12:27:21 PM6/14/16
to DukeScript, eric.b...@gmail.com
Thank you!

Everything works now.

What I did:
1. remove all eclipse .settings preferences for jdt/apt (so the ide doesn't overwrite)
2. use the maven-processor-plugin to generate sources from processor
3. disable processing in tycho compiler plugin (jdt)
4. include generated sources directory in tycho compiler plugin

Thank you again for the help.

eric.b...@gmail.com

unread,
Jun 15, 2016, 9:11:39 AM6/15/16
to DukeScript, eric.b...@gmail.com
Just for reference, I made a small change.
The Eclipse IDE doesn't parse the includes from the pom correctly yet, so I added it to the build.properties file.
Also, I turn off the jdt processor only for the dukescript module.
Reply all
Reply to author
Forward
0 new messages