- /**
- * Returns the database Session bound to the currently active workbench
- * window.
- *
- * <p>
- * This method should only be invoked in cases where it is certain that the
- * correct workbench window has focus or it is the latest of all workbench
- * windows to have had focus. Basically any invocation from the SWT UI
- * thread is safe, since because in those cases the currently active
- * workbench window is generally known. Instead invocations from any other
- * thread should be carefully considered. The rule of thumb is that if you
- * cannot be sure that the correct workbench window has focus, you should
- * always get a hold of the Session to be used in some other manner.
- * </p>
- *
- * <p>
- * The method always returns a non-null Session or produces an
- * IllegalStateException if a Session was not attainable.
- * </p>
- *
- * @return the Session bound to the currently active workbench window
- * @throws IllegalStateException if no Session was available
- */
- @Deprecated
- public static Session getSession() {
- return Simantics.getSession();
- }
-
- /**
- * Returns the database Session bound to the currently active workbench
- * window. Differently from {@link #getSession()}, this method returns
- * <code>null</code> if there is no current Session available.
- *
- * <p>
- * This method should only be invoked from the SWT UI thread. Check the
- * explanations given in {@link #getSession()}. The same applies to this
- * method also.
- * </p>
- *
- * @return the Session bound to the currently active workbench window or
- * <code>null</code>
- */
- @Deprecated
- public static Session peekSession() {
- return Simantics.peekSession();
- }
-
- /**
- * @return the currently open and active project as an IProject or
- * <code>null</code> if there is no active session or project
- */
- @Deprecated
- public static IProject peekProject() {
- return Simantics.peekProject();
- }
-