Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Diagram partitioning and synchronization
Diagram partitioning and synchronization [message #492179] Mon, 19 October 2009 10:46
Bill HingeFriend
Messages: 156
Registered: July 2009
Senior Member
Hi

I asked a question on this subject a few months back regarding NPE during
Synchronization, I've been away from editing for a few months due to
Personal circumstances, I noticed that there were some similar questions
Since then.

My editor uses the shared GEF-GMF approach but it has 8 instances of sub
Editor (diagram partitioning). Each editor is the same type called from
Different parent nodes, I have given each opendiagrambehavior a different
Open policy.

I managed to comment out the general area where the NPE occurs due to
A resource reference being lost. However, I notice that a symptom of this
Is that subeditors that are already open can continue to be edited and saved
But no new sub editors can be created after the save of one sub editor.

If I close the main editor and sub editors and then reopen the main editor I
Can then create more sub editors until the next save etc.

The main difficulty I have is following the program flow to find the
Offending code, tried the debugger, but maybe I'm doing something wrong but
All I see is multiple threads and no variables etc. Is there an easier way
to debug this type editor?

I recall Alex saying that you need to count editors and manage the
open/close etc but despite loads of println's I haven't managed to find the
Offending areas. Any ideas?

/**
* @generated NOT
*/
private ISelection getNavigatorSelection() {
IDiagramDocument document = getDiagramDocument();
if (document == null) {
return StructuredSelection.EMPTY;
}


Diagram diagram = document.getDiagram();

// half works, stops NPE, but prevents new diagram opening
// need to store record of eRousource URI an manage it
if (diagram.eResource() != null){
IFile file = WorkspaceSynchronizer.getFile(diagram.eResource());


if (file != null) {
NgossNavigatorItem item = new NgossNavigatorItem(diagram,
file,
false);
return new StructuredSelection(item);
}
}
System.out.println(diagram.getName());
System.out.println("Sorry, diagram empty, close and re-open");
return StructuredSelection.EMPTY;

}

Regards
Steve
Previous Topic:Resizing a figure addicted to her children
Next Topic:pop up window should not show all the implementable child references
Goto Forum:
  


Current Time: Thu Apr 25 18:55:11 GMT 2024

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

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

Back to the top