From f2c170b536fa720fbbce7a683987d706071492e7 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Mon, 16 Aug 2010 21:22:31 +0000 Subject: [PATCH] Removed IProjectLifecycle.onCreated/onDestroyed callbacks. git-svn-id: https://www.simantics.org/svn/simantics/sysdyn/trunk@17238 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../ui/project/SysdynProjectLifeCycle.java | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProjectLifeCycle.java b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProjectLifeCycle.java index 5ade3179..8a0f7fab 100644 --- a/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProjectLifeCycle.java +++ b/org.simantics.sysdyn.ui/src/org/simantics/sysdyn/ui/project/SysdynProjectLifeCycle.java @@ -6,8 +6,6 @@ import java.util.HashMap; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IEclipsePreferences; import org.eclipse.core.runtime.preferences.InstanceScope; -import org.eclipse.swt.widgets.Display; -import org.eclipse.ui.cheatsheets.OpenCheatSheetAction; import org.osgi.service.prefs.BackingStoreException; import org.simantics.databoard.accessor.Accessor; import org.simantics.db.Builtins; @@ -44,14 +42,6 @@ public class SysdynProjectLifeCycle implements IProjectLifeCycle{ public static final Key INITIALIZED = new KeyOf(Boolean.class, "SYSDYN_LIFECYCLE_INITIALIZED"); private static final String CHEATSHEET_ID = "org.simantics.sysdyn.ui.cheatsheet1"; private static final String FIRST_SYSDYN_PROJECT = "firstSysdynProject"; - - @Override - public void onCreate(WriteGraph g, Resource project) { - } - - @Override - public void onDestroy(WriteGraph g, Resource project) { - } @Override public void onActivated(RequestProcessor processor, final IProject project) { @@ -102,7 +92,7 @@ public class SysdynProjectLifeCycle implements IProjectLifeCycle{ VirtualGraphSupport support = session.getService(VirtualGraphSupport.class); final VirtualGraph graph = session.getService(VirtualGraph.class); - + processor.asyncRequest(new ObjectsWithType(projectResource, b.ConsistsOf, b.Model), new SingleSetListener() { @Override @@ -113,7 +103,7 @@ public class SysdynProjectLifeCycle implements IProjectLifeCycle{ @Override public void run() { try { - // This creates experiment realizations + // This creates experiment realizations graph.register(new HistoryRealizationVirtualGraph(session, model)); // This creates the BaseRealization graph.register(new DefaultRealizationVirtualGraph(session, model)); @@ -148,14 +138,14 @@ public class SysdynProjectLifeCycle implements IProjectLifeCycle{ cleanProjectFolder(processor, project.get()); context.setHint(INITIALIZED, Boolean.TRUE); - - + + // Open cheatsheets view on the first time the user creates a sysdyn project // for a particular workspace. IEclipsePreferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID); boolean firstSysdynProject = prefs.getBoolean(FIRST_SYSDYN_PROJECT, true); if (firstSysdynProject) { - // This should not be here + // This should not be here // Display.getDefault().asyncExec(new Runnable() { // @Override // public void run() { -- 2.47.1