+
+ /**
+ * Return the Eclipse view ID in the format <Primary ID>:<Secondary ID> or
+ * simply <Primary ID> if secondary ID is null
+ *
+ * @return This view's view ID
+ * @since 2.2
+ */
+ protected String getViewId() {
+ IViewSite viewSite = getViewSite();
+ String secondaryId = viewSite.getSecondaryId();
+ if (secondaryId == null) {
+ return viewSite.getId();
+ }
+ return viewSite.getId() + ':' + secondaryId;
+ }