weimingtom / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
1 stars 0 forks source link

Request: Auto Completion: Does it work for DEEPER methods (beyond dots)? #104

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is it possible to use the auto completion function to complete methods in
deeper levels in JAVA?

Very simple example:

---
data structure (class already exists)
class Class1{
  List li = new ArrayList();

  public List getList()
    return li;
  }
}

---

---
Class in JSyntaxPane to use the data structure:
import Class1;
class Class2 extends Class1{
   public call(){
    System.out.println("List-Size: " + getList().size()); <--PROBLEM
  }
}

---

At line marked by "PROBLEM" I can use auto completion to get the
"getList()"-statement, but not to get the following ".size()". Is it
somehow possible to get the auto completion beyond the dot?

I think, I have to include the ArrayList class, but I don't know how to do
this.

Regards,
Lukas
(Sorry for my horrible English)

I'm using JSyntaxPane in my master thesis and quite happy with it! Thanks
for your great work! 

Original issue reported on code.google.com by lmaer...@gmail.com on 28 Jul 2009 at 12:22

GoogleCodeExporter commented 9 years ago
You should be able to use uto-complete at any level, but it is not at all
intelligent. The current implementation does not know anything about the 
context of
the current file so it lists everything, and you can then select the Class you 
want
to display the methods and fields of.  
Look at the ReflectUtils class for how most of this is done.

Original comment by ayman.al...@gmail.com on 29 Jul 2009 at 5:47