Talk:LiveDB

From APIDesign

(Difference between revisions)
Jump to: navigation, search
(Comment provided by Russ White - via ArticleComments extension)
Line 44: Line 44:
@Override
@Override
public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) {
public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) {
-
Logger.getLogger(FooProcessor.class.getName()).info("Competion.....");
+
Logger.getLogger(FooProcessor.class.getName()).info("Completion.....");
return Collections.singleton(Completions.of("Test"));
return Collections.singleton(Completions.of("Test"));
}
}
-
It gets called and work fine when editing a package-info.java in "Test Packages"
+
It gets called and works fine when editing a package-info.java that is in "Test Packages"
-
But does not get called at in "Source Packages"
+
But does not get called at all while editing a copy of the same file in "Source Packages"
-
I have to admit I am stumped.
+
I have to admit I am stumped. Any ideas?
--Russ White 23:30, 4 September 2010 (CEST)
--Russ White 23:30, 4 September 2010 (CEST)
</div>
</div>

Revision as of 21:36, 4 September 2010

Comments on LiveDB <comments />


Russ White said ...

I was inspired by your article to create a project that would fit the needs I have for a project that requires integration with an existing schema.

http://github.com/AridModel

Thanks so much for your good article.

Cheers! Russ

--Russ White 15:43, 31 August 2010 (CEST)

Nice. I am glad I could motivate someone who understands the project domain. Btw. I'd put the processor into different package than the annotations, so it is not treated as part of the AridModel API. It is an implementation detail, should be hidden to users of the API in some less public part of the API JAR file.

--JaroslavTulach 18:26, 31 August 2010 (UTC)

Russ White said ...

Thanks.

That is good advice. I did as you suggested.

Cheers! Russ

--Russ White 22:13, 31 August 2010 (CEST)

Russ White said ...

Completions questions.

If you put a package-info.java such as the one in the test source package into the regular source package of a project which want to make use of the processor (and it's static and dynamic completions), the getCompletions method is never called. Can you explain why this happens?

Here is what I implemented to test:

   @Override
   public Iterable<? extends Completion> getCompletions(Element element, AnnotationMirror annotation, ExecutableElement member, String userText) {
       Logger.getLogger(FooProcessor.class.getName()).info("Completion.....");
       return Collections.singleton(Completions.of("Test"));
   }

It gets called and works fine when editing a package-info.java that is in "Test Packages"

But does not get called at all while editing a copy of the same file in "Source Packages"

I have to admit I am stumped. Any ideas?


--Russ White 23:30, 4 September 2010 (CEST)

Personal tools
buy