Eclipse editor problems

aland2 wrote on Sun Jul 30 22:25:58 MEST 2006:
I use Eclipse on WinXP Home. I have the EPIC Perl plugin. I use ActivePerl-

Sometimes the editor behaves strangely. The error message is "Unable to
create this part due to an internal error." In these cases, the only cure
is to delete the file and start again.

The file can be opened using right-click, "Open With Text Editor". The script
runs successfully. This proves that it's an editor problem.

Please advise.

jgangemi wrote on Mon Jul 31 01:22:06 MEST 2006:
can you post what the contents of the editor look like? my initial guess
would be that the source parser is barfing on something it doesn't understand.

i notice the same behavior trying to open a script that uses perl format
syntax. see
leafeater wrote on Mon Jul 31 10:54:00 MEST 2006:
Yes, it must be the parser, it seems to be very alpha. It crashes on simple
lines like:

print $^O;

aland2 wrote on Mon Jul 31 12:40:50 MEST 2006:
I have narrowed the problem down to the use of "$" in the first line in
the file, if this line is pasted from another text file:

$in = "web-client.xml";

1) There is no problem if this line is typed into Eclipse, rather than pasted.

2) When I paste it from another file, I get the error: "Paste did not complete

3) It does not matter whether I paste only that line, or as part of a group
of lines, or in the middle of a group of lines, or at the end of a group
of lines. I always get the "Paste" error.

4) If I do not inlcude the "$" as part of the paste, there is no error (although
of course Eclipse shows the error icon):

in = "web-client.xml";

5) When the editor is in this error mode caused by the paste, typing a "$"
at the start of any line causes strange behaviour. The "$" is displayed,
but the cursor remains before the "$. If I move the cursor after the "$",
and type another character, that character is displayed, but again the cursor
is before the character.

6) If I type a "$" anywhere else except the start of a line, there is no
jploski wrote on Tue Aug  1 16:19:44 MEST 2006:
The key question is: which version of EPIC are you using? I cannot reproduce
any of these problems with epic-devel (using Linux, Eclipse 3.1, though).
jgangemi wrote on Tue Aug  1 16:40:27 MEST 2006:
i'm using 3.2 - and the sample scripts in the bug i posted reproduce the
problem each time.

in the case of the "OutOfMemory" exception, i debugged down into the parser,
and it seems like it's getting stuck in some kind of loop. 

i believe the SWT error occurs b/c the parser goes too far and includes
more code then is part of the current subroutine it may be parsing, and
when the text is styles, the location values passed to it are incorrect.

in my case, i think the bug would be fixed by telling the parser that "format"
is a special kind of subroutine that ends when it finds a single "." on
a line, but i don't know enough about lexical grammers to add that in.
aland2 wrote on Mon Jul 31 13:10:34 MEST 2006:
It's not only the "$" that won't paste. "@" has the same problems when I
try to paste the line:

my @values = split(',', $data);

Removing the "$" before pasting did not prevent the paste error. Also removing
"@" now prevents the paste error.
jopeli wrote on Tue Aug  1 12:31:24 MEST 2006:
I am getting this problem too. But in my case it is none of the specified
reasons. This is quite frustrating because the error message does not seem
to indicate what the problem actually is and there is nothing that would
help me avoid or work around the problem (if that is possible at all).

Here is the complete error message:
java.lang.IllegalArgumentException: Argument not valid
	at org.eclipse.swt.SWT.error(
	at org.eclipse.swt.SWT.error(
	at org.eclipse.swt.SWT.error(
	at org.eclipse.swt.custom.StyledText.setStyleRanges(
	at org.eclipse.swt.custom.StyledText.setStyleRanges(
	at org.eclipse.jface.text.TextViewer.applyTextPresentation(
	at org.eclipse.jface.text.TextViewer.changeTextPresentation(
	at org.eclipse.jface.text.presentation.PresentationReconciler.applyTextRegionCollection(
	at org.eclipse.jface.text.presentation.PresentationReconciler.processDamage(
	at org.eclipse.jface.text.presentation.PresentationReconciler.access$3(
	at org.eclipse.jface.text.presentation.PresentationReconciler$InternalListener.inputDocumentChanged(
	at org.eclipse.jface.text.TextViewer.fireInputDocumentChanged(
	at org.eclipse.jface.text.TextViewer.setDocument(
	at org.eclipse.jface.text.source.SourceViewer.setDocument(
	at org.eclipse.jface.text.source.projection.ProjectionViewer.setDocument(
	at org.eclipse.jface.text.source.SourceViewer.setDocument(
	at org.epic.perleditor.editors.PerlEditor.createActions(
	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(
	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(
	at org.epic.perleditor.editors.PerlEditor.createPartControl(
	at org.eclipse.ui.internal.EditorReference.createPartHelper(
	at org.eclipse.ui.internal.EditorReference.createPart(
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(
	at org.eclipse.ui.internal.EditorReference.getEditor(
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(
	at org.eclipse.ui.internal.WorkbenchPage.access$10(
	at org.eclipse.ui.internal.WorkbenchPage$
	at org.eclipse.swt.custom.BusyIndicator.showWhile(
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(
	at org.eclipse.ui.actions.OpenWithMenu$3.handleEvent(
	at org.eclipse.swt.widgets.EventTable.sendEvent(
	at org.eclipse.swt.widgets.Widget.sendEvent(
	at org.eclipse.swt.widgets.Display.runDeferredEvents(
	at org.eclipse.swt.widgets.Display.readAndDispatch(
	at org.eclipse.ui.internal.Workbench.runEventLoop(
	at org.eclipse.ui.internal.Workbench.runUI(
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
	at org.eclipse.core.internal.runtime.PlatformActivator$
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.eclipse.core.launcher.Main.invokeFramework(
	at org.eclipse.core.launcher.Main.basicRun(
	at org.eclipse.core.launcher.Main.main(
jgangemi wrote on Tue Aug  1 13:55:47 MEST 2006:
this is also a problem caused by the perl parser not knowing what to do
w/ some of the perl code. 

at the moment, there is no work around other then to open the file in the
regular text editor. 

is it possible for you to attach the perl script to the posted bug report,
or a sample script that causes the problem to occur.
aland2 wrote on Tue Aug  1 17:35:48 MEST 2006:
EPIC version is one week old: 0.3.0

Eclipse: 3.2.0

My Java error message is identical to jopeli's, even although jopeli says
"in my case it is none of the specified reasons."
zzolive wrote on Fri Aug  4 11:34:31 MEST 2006:
I am very newbye in Eclipse and EPIC PerlEditor. I have the same message,
and Problem.
In my point of view, this not a question of code form the file we want to
open, because even if I try to open an empty file, I recieved the same message.
My point of view is that Eclipse tries to launch an binary file, that contains
error, or illegal arguement.
(Config i have : Perl 5.8.17, All lwp and xml packages, Java SE 1.5, eclipse
3.2 with EPIC Perl, C/C++ calisto)

Cheers, Olivier
zzolive wrote on Fri Aug  4 18:14:37 MEST 2006:
Hello Again,
I have personnaly updated EPIC version to 0.40, and now the error message
does not occur.
The perlEditor can be used in my installation...

Hope that will work to your platform ...

Note: The above is an archived snapshot of a forum thread. Use the original thread at to post comments.