Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Encountered an NullPointException with StructuredModelManager
Encountered an NullPointException with StructuredModelManager [message #1796520] Mon, 15 October 2018 16:44 Go to next message
Eclipse UserFriend
Dear, All,

Again, we are reading/writing in-memory objects. A disk file will be
parsed into model, and the SSE editor will display a small portion of the
model.

I implemented the IStorageEditorInput and IStorage for the objects. Then
added required plug-ins to the launch settings. But I kept encountering
NullPointException when trying to open a file. The debug showed that in
the following lines, model is a null value.

Do we need to register a model? If yes, how to register a model?

//org.eclipse.wst.sse.ui.internal.StorageModelProvider
//......
// first parameter must be unique
model = StructuredModelManager.getModelManager().getModelForEdit(id,
contents, null);
model.setBaseLocation(calculateBaseLocation(input));https://subwaysurfers.vip/ https://psiphon.vip/ https://hillclimbracing.vip/



Supplementary:
If the program starts with all the plug-ins, the problem is gone. It seems
that some plug-in contributes models for the issue. Is there a way to
figure out the plug-in?

Thank you so much!

[Updated on: Mon, 15 October 2018 21:14] by Moderator

Report message to a moderator

Re: Encountered an NullPointException with StructuredModelManager [message #1796646 is a reply to message #1796520] Tue, 16 October 2018 21:08 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4498
Registered: July 2009
Senior Member

What ID are you passing to getModelForEdito(), and why are there random URLs in your post? Which plug-ins are
you excluding when you encounter the NPE?


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Noob Question: HTTP Preview (refresh)
Next Topic:m2e plugin under Oxygen creates an empty web.xml
Goto Forum:
  


Current Time: Tue Nov 05 19:42:45 GMT 2024

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

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

Back to the top