Permalink
Browse files

Created public method to indicate if MolTable is showing JCPEditor or…

… not.
  • Loading branch information...
1 parent a0d1350 commit f241c1ef9162a51ba595562e751f4302165c592b @olas olas committed Jul 18, 2009
@@ -61,6 +61,7 @@
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.MultiPageEditorPart;
+import org.eclipse.ui.part.Page;
public class MultiPageMoleculesEditorPart extends MultiPageEditorPart implements
ISelectionListener,
@@ -466,4 +467,14 @@ public Object getAdapter( Class adapter ) {
return jcpPage;
return super.getAdapter( adapter );
}
+
+ /**
+ * @return true if JCP is current editor
+ */
+ public boolean isJCPVisible() {
+ if (getActiveEditor() instanceof JChemPaintEditor)
+ return true;
+ return false;
+ }
+
}

0 comments on commit f241c1e

Please sign in to comment.