| Hi Vijay,
I think the problem is that you are running Eclipse with 1.4, it might still let you run programs with 1.5 installation. The stack trace you gave me often occurs when 1.5 code is run under 1.4, which made substantial changes to the java.lang.String and StringBuffer classes. To confirm, go to "Help/About Eclipse SDK/Configuration Details" and look at your java.runtime.version property, it will tell you what Java version Eclipse is running under.
Sean
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; at ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand(ScalaSourceViewerConfiguration.java:199) at org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327) at org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349) at org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent(ProjectionViewer.java:1231) at org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
On Feb 20, 2006, at 12:49 PM, Vijay Saraswat wrote: Sean Mc Dirmid wrote: Hi Vijay,
This sounds like a problem of not using Java 1.5. The plugin is only supported (and will only
work under) Java
1.5. This is a big problem, and there doesn't seem to be a way in Eclipse to prevent users
from installing the
Hmm. I had read your messages and knew that the plug-in needed 1.5. My earlier Eclipse install was using 1.5. As far as I can tell, this new Eclipse install is also running Java 1.5. In Eclipse, Windows -> Preferences -> Java -> Installed JREs, the only Installed JRE is jdk1.5.0. I also checked all the entries in Windows -> Preferences -> Java -> Installed JREs -> Execution Environments and made sure that for each of them (e.g. CDC-1.0/Foundation-1.0, CDC-1.1/Foundation-1.1 etc) the only "Compatible JRE" listed was jdk1.5.0, and it was checked. Finally, I created a little Java project, and a Java source file with generics. I am able to edit, compile, run this code without problems from within Eclipse. (When Eclipse does work, its great!) So this Eclipse definitely knows about jdk1.5. Again, this is a brand new Eclipse, out of the box. java/javac from my bash command line resolve to c:\Program Files\jdk1.5.0 and apparently thats what Eclipse picked up. I am not familiar with how Eclipse determines which java to use to run its plug-ins. Is there some other place that this is supposed to be specified? plugin if they are running Java 1.4. I'll try to improve the documentation somehow so its
more obvious (maybe
put it in the title of the download).
Maybe you can catch the exception and print out a message in the Error log asking the user to check the version of Java in Eclipse (if that is the problem). Also, while I am at it, perhaps the page http://scala.epfl.ch/docu/eclipse/ should be updated to point to a page that describes your plugin...? Best, Vijay Thanks!
Sean
----- Original Message -----
From: Vijay Saraswat <vijay@xxxxxxxxxxxx>
Date: Monday, February 20, 2006 3:38 am
Subject: Unable to edit Scala files in Eclipse...?
Hi Sean --
I cant edit any Scala file with the plug-in.. is this a bug or did
I do
something wrong?
Best,
Vijay
=====================================
I am working with Eclipse 3.2M:
Eclipse SDK
Version: 3.2.0
Build id: I20051215-1506
=====================
Just downloaded a fresh Eclipse install. Installed Scala plugin
(2.1.6)
from the website, created a Scala project (fine), created a new
Scala
file (fine). But now I cant edit the file! (The file is readonly.)
The error log says:
==================================
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/
String;
java.lang.NoSuchMethodError:
java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/
String;
at
ch.epfl.lamp.sdt.ui.text.ScalaSourceViewerConfiguration$3.customizeDocumentCommand
(ScalaSourceViewerConfiguration.java:199)
at
org.eclipse.jface.text.TextViewer.customizeDocumentCommand(TextViewer.java:3327)
at
org.eclipse.jface.text.TextViewer.handleVerifyEvent(TextViewer.java:3349)at
org.eclipse.jface.text.source.projection.ProjectionViewer.handleVerifyEvent
(ProjectionViewer.java:1231)
at
org.eclipse.jface.text.TextViewer$TextVerifyListener.verifyText(TextViewer.java:359)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:194)at
org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:695)
at
org.eclipse.swt.custom.StyledText.modifyContent(StyledText.java:5733)at
org.eclipse.swt.custom.StyledText.sendKeyEvent(StyledText.java:6455)
at org.eclipse.swt.custom.StyledText.doContent(StyledText.java:2083)
at org.eclipse.swt.custom.StyledText.handleKey(StyledText.java:5049)
at
org.eclipse.swt.custom.StyledText.handleKeyDown(StyledText.java:5074)at
org.eclipse.swt.custom.StyledText
$7.handleEvent(StyledText.java:4814)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:923)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:951)
at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:947)
at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1261)
at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3311)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3212)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:3963)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2903)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1762)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1726)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:397)
at
org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)at
org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:379)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:494)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338)
at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
========================================
|