protected Set<String> getPropertyPageContexts() {
try {
- return BrowseContext.getBrowseContextClosure(SimanticsUI.getSession(), defaultPropertyBrowseContexts);
+ return BrowseContext.getBrowseContextClosure(Simantics.getSession(), defaultPropertyBrowseContexts);
} catch (DatabaseException e) {
ExceptionUtils.logAndShowError("Failed to load modeled browse contexts for property page, see exception for details.", e);
return defaultPropertyBrowseContexts;
}
protected void initSession() {
- sessionContextProvider = SimanticsUI.getSessionContextProvider();
+ sessionContextProvider = Simantics.getSessionContextProvider();
sessionContext = sessionContextProvider.getSessionContext();
}
addKeyBindingParticipants(ctx);
// Grid & Ruler & Background
- ctx.add(new GridPainter());
- ctx.add(new RulerPainter());
- ctx.add(new BackgroundPainter());
+ addGridRulerBackgroundParticipants(ctx);
h.setHint(Hints.KEY_DISPLAY_PAGE, diagramPreferences.get(DiagramPreferences.P_DISPLAY_PAGE_SIZE));
h.setHint(Hints.KEY_DISPLAY_MARGINS, diagramPreferences.get(DiagramPreferences.P_DISPLAY_MARGINS));
ctx.setLocked(false);
}
+ protected void addGridRulerBackgroundParticipants(CanvasContext ctx) {
+ ctx.add(new GridPainter());
+ ctx.add(new RulerPainter());
+ ctx.add(new BackgroundPainter());
+ }
+
protected void loadPageSettings(ICanvasContext ctx) {
DiagramDesc diagramDesc = null;
// Set initial part name according to the name given by IEditorInput
host.doSetPartName(getEditorInput().getName());
- Session session = SimanticsUI.peekSession();
+ Session session = Simantics.peekSession();
if (session != null) {
Supplier<Boolean> disposedCallback = () -> disposed;
session.asyncRequest(