Configuration 1 : jEdit 4.5pre2 (2012-01-27) + official SideKick (1.2), JavaSideKick (3.1.2), PV (3.4.0)
Bug 3382969 has been fixed in the trunk but not yet released ==> jEdit still freezes from time to time.
Configuration 2 : same as before + Classpath plugin
==> there are two classpath entries in the Project's configuration panel
Configuration 3 : same as before but with daily build of the 4 plugins from http://www.tellurianring.com/projects/jedit-daily/
==> single classpath entry in the PV
==> completion is broken
(still completes for java objects from jre, but not for objects of my project).
classpath defined in the Classpath plugin options -> completion not work*
classpath defined in the Project Panel options -> completion not work*
classpath defined in both -> throws "Ambiguous Classname" all the time
*just hear my computer's fan one or to seconds while searching how to complete...
Thanks
For the completeness, please provide plugin versions reported by plugin manager in configuration 3 (including classpath plugin).
In configuration 3, I have
SideKick (1.3) from 21/12/2011,
JavaSideKick (3.1.3) from 06/12/2011,
PV (3.4.1) from 23/01/2012
Classpath (1.0.1) from 05/12/2011
1. Create a new file and choose java mode for it
2. In sidekick dockable choose parser: java
3. Fill the file with:
class a {
void met() {
// here we'll type
}
4. Test the completion works (type System.)
5. Check the classpath (Console, BSH, issue: classpath.ClasspathPlugin.getClassPath())
6. Test completion on classes in classpath
I have the following classpath:
/usr/share/jEdit/jars/ProjectViewer.jar:/usr/share/jEdit/jedit.jar
and the completion works for these classes. How is it on your side?
All my components are from reposirtory, but I may also try with yours.
Tried to follow your step :
configuration 1 : completion works without classpath plugin
in a class, this. complete with met()
configuration 3 : completion does not work
classpath.ClasspathPlugin.getClassPath() returns the classpath of my previous project
(Classpath plugin configuration panel is empty)
I check Include System classpath in Classpath option panel
now classpath.ClasspathPlugin.getClassPath() returns jedit.jar
I uncheck Include System classpath and check Include working directory
classpath.ClasspathPlugin.getClassPath() still returns jedit.jar !
I try again completion
Writing System, jedit recognize the class and add it as an import ! (do not know which key I hit to get this import ???)
Now,
t = System. => give me code completion,
but
System. => still not
I go to my project
classpath.ClasspathPlugin.getClassPath() returns my class path (including jars and a build directory)
still not have completion for my objets but
System. ==> give me code completion
myObject. ==> sill no completion (neither for objects from build or from external jar)
I go to all project node, close the project dockable panel
classpath.ClasspathPlugin.getClassPath() still returns my project classpath
hmmm, hope it makes sense for you
Michaël
In the same not working configuration 3,
if I do
JavaSideKick > Refresh Global Classloader
I get the following error
Error in method invocation: Method refreshGlobal() not found in class'sidekick.java.util.Locator' : at Line: 4 : in file: inline evaluation of: ``__runCachedMethod(ns) { this.callstack.set(0,ns); sidekick.java.util.Locator . . . '' : .refreshGlobal ( )
at org.gjt.sp.jedit.bsh.BSHPrimarySuffix.doName(BSHPrimarySuffix.java:178)
at org.gjt.sp.jedit.bsh.BSHPrimarySuffix.doSuffix(BSHPrimarySuffix.java:119)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:80)
at org.gjt.sp.jedit.bsh.BSHPrimaryExpression.eval(BSHPrimaryExpression.java:47)
at org.gjt.sp.jedit.bsh.BSHBlock.evalBlock(BSHBlock.java:130)
at org.gjt.sp.jedit.bsh.BSHBlock.eval(BSHBlock.java:80)
at org.gjt.sp.jedit.bsh.BshMethod.invokeImpl(BshMethod.java:362)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:258)
at org.gjt.sp.jedit.bsh.BshMethod.invoke(BshMethod.java:186)
at org.gjt.sp.jedit.BeanShellFacade.runCachedBlock(BeanShellFacade.java:225)
at org.gjt.sp.jedit.BeanShell.runCachedBlock(BeanShell.java:423)
at org.gjt.sp.jedit.BeanShellAction.invoke(BeanShellAction.java:73)
at org.gjt.sp.jedit.gui.InputHandler.invokeAction(InputHandler.java:342)
at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3249)
at org.gjt.sp.jedit.jEdit$4.invokeAction(jEdit.java:3231)
at org.gjt.sp.jedit.EditAction$Wrapper.actionPerformed(EditAction.java:212)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:809)
at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:850)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
at java.awt.Component.processMouseEvent(Component.java:6290)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6055)
at java.awt.Container.processEvent(Container.java:2039)
at java.awt.Component.dispatchEventImpl(Component.java:4653)
at java.awt.Container.dispatchEventImpl(Container.java:2097)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
at java.awt.Container.dispatchEventImpl(Container.java:2083)
at java.awt.Window.dispatchEventImpl(Window.java:2482)
at java.awt.Component.dispatchEvent(Component.java:4481)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:607)
at java.awt.EventQueue$1.run(EventQueue.java:605)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:621)
at java.awt.EventQueue$2.run(EventQueue.java:619)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Micheal, simplify your testing environment, like I did. Choose one jar, let it be jedit.jar. Put it in the classpath. Try to type in my sample file, in the place I pointed:
jEdit.
What happens?
Shouldn't the checkbox "use system classpath" be in the Project Options, rather than only in the ClassPath plugin options?
Also, I get that same exception as michaudm when I try to Refresh the
Global Classloader
If you discovered another bug, please post a new entry to the tracker. Here I only try to solve the original problem.
I see I was not precise in "put it in the classpath". I meant: go to the plugin options of the classpath plugin and add an entry there, for the jedit.jar.
OK, fresh installation of jEdit (on windows vista 64, jre 1.6.0_30) with
jEdit 4.5pre2 (2012-01-27)
SideKick (1.3) from 21/12/2011,
JavaSideKick (3.1.3) from 06/12/2011,
PV (3.4.1) from 23/01/2012
Classpath (1.0.1) from 05/12/2011
CommonControls (1.4.2) from 11/01/2012
ErrorList 1.9) from 21/12/2011
Console (4.4.5) from 27/01/2012
EclipseIcons (1.0) from 24/02/2011
Classpath plugin option set to
- Include working directory
- Include system classpath
(these are default options, I did not check anything)
In Console (mode bsh), I type
classpath.ClasspathPlugin.getClassPath();
I get :
Sourced file: inline evaluation of: ``classpath.ClasspathPlugin.getClassPath();'' : Error in method invocation: Static method getClassPath() not found in class'classpath.ClasspathPlugin'
Now I create a new file (java mode) an write my new class
class a {
void met() {
// here we'll type
}
}
System. ==> do not get completion
x = System. ==> get completion
jEdit. ==> do not get completion
x = jEdit. ==> do not get completion
Now I add jedit.jar in the classpath option
jEdit ==> recognize jEdit class name (fill name listed 2 times in the combo !)
I can expand the name to the full class name with shift return
jEdit. ==> no completion proposed
x = jEdit. ==> completion
Hope this helps
Sorry, small correction,
in the last test, if I write
x = org.gjt.sp.jedit.jEdit. ==> I get completion
if I write
x = jEdit. ==> Ambiguous class : The class jEdit is ambiguous. Use an import or the full class name.
Now add my library (.jar) in the classpath option
I write in my code
MyClass ==> class is recognized and I can expand it to full name
my.package.MyClass. ==> no completion
my.package.MyClass object = my.package.MyClass. ==> no completion
my.package.MyClass object = my.package.MyFactory. ==> no completion
Michaël
1. Sorry for the typo, it should be "classpath.ClasspathPlugin.getClasspath()". If a class does not appear in the output, then there is no chance for this class to autocomplete. Let's suppose the class in question appears there.
2. Now I am able to notice some problems. Thanks for the details. I'll be working on it.
Damien, integrating Classpath and JavaSideKick is your code. I can't get it working in no plugin version. I use a sun example TextFieldDemo.jar from:
http://docs.oracle.com/javase/tutorialJWS/uiswing/components/ex6/TextFieldDemo.jar
Jedit jars are not good to test on, because they are always loaded. An outer jar is needed to test the issue.
I suggest to concentrate on Classpath-JavaSideKick integration, so I change the summary. If other problems appear later, let's have a separate entry for that.
Steps to reproduce:
1. Have TextFieldDemo.jar in classpath plugin elements
2. Load the following file and parse it with "java" parser:
class x {
void xx() {
jEdit j;
components.TextFieldDemo tf;
tf.
}
}
3. After tf. no completion occurs. After j. it does.
This should now be fixed in revision 21135; please build it from trunk and let me know how it works.
The ambiguous class issue (when a jar is added in both the project options and global options) is a separate bug, and I should be able to have a fix ready for it soon.