Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Exceptions when opening linked resource(Getting a NullPointerException in AddMarkersOperation.execute when opening an linked resource)
Exceptions when opening linked resource [message #758552] Wed, 23 November 2011 16:13 Go to next message
John J. Camilleri is currently offline John J. CamilleriFriend
Messages: 33
Registered: November 2011
Location: Göteborg
Member
My DSL extension is .gf
I want to open a .gf file which is external to the workspace in my plugin. When I try this naively via the File -> Open menu I get the following:

!ENTRY org.apache.log4j 4 0 2011-11-23 09:52:18.914
!MESSAGE org.eclipse.xtext.ui.editor.CompoundXtextEditorCallback  - Was configured with another client or not configured at all.

!STACK 0
java.lang.IllegalStateException: Was configured with another client or not configured at all.
    at org.eclipse.xtext.ui.editor.DirtyStateEditorSupport.removeDirtyStateSupport(DirtyStateEditorSupport.java:318)
    ...(trimmed)...


I managed to partially get around the problem by creating resource links within my project to these external resources, as explained here in the Eclipse documentation.

This works pretty well, the external files are opened, syntax highlighting works and the LanguageSpecificURIEditorOpener.selectAndReveal() method even correctly highlights the referenced identifier.

However I keep getting the following exception which annoying pops up in the client application each time one of these linked files is opened:

!ENTRY org.eclipse.core.jobs 4 2 2011-11-23 16:50:39.343
!MESSAGE An internal error occurred during: "Xtext validation".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.xtext.ui.editor.validation.AddMarkersOperation.execute(AddMarkersOperation.java:84)
	at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)
	at org.eclipse.xtext.ui.editor.validation.MarkerIssueProcessor.processIssues(MarkerIssueProcessor.java:43)
	at org.eclipse.xtext.ui.editor.validation.ValidationJob.run(ValidationJob.java:67)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


From my understanding this case is simply not handled. All I really want to do is suppress the exception but I'm not ever sure where I would be able to do this.

Any ideas how I could overcome this?

[Updated on: Thu, 24 November 2011 10:59]

Report message to a moderator

Re: Exceptions when opening linked resource [message #758742 is a reply to message #758552] Thu, 24 November 2011 12:56 Go to previous messageGo to next message
John J. Camilleri is currently offline John J. CamilleriFriend
Messages: 33
Registered: November 2011
Location: Göteborg
Member
So finally I found out that this was being caused since I did not have the Xtext nature enabled on my test project.
I did so and all these problems seemed to magically go away...
Re: Exceptions when opening linked resource [message #759212 is a reply to message #758742] Sun, 27 November 2011 17:52 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3107
Registered: July 2009
Senior Member
Hi John,

please file a ticket with the stack traces and error conditions.

Thanks,
Sebastian
--
Need professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com

On Thu, 24 Nov 2011 13:56:23 +0100, John J. Camilleri
<forums-noreply@eclipse.org> wrote:

> So finally I found out that this was being caused since I did not have
> the Xtext nature enabled on my test project.
> I did so and all these problems seemed to magically go away...
Previous Topic:[Xtend 2] == != ==
Next Topic:Xtext 2.1.1 news and noteworthy?
Goto Forum:
  


Current Time: Wed Apr 01 20:33:00 GMT 2020

Powered by FUDForum. Page generated in 0.01816 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top