11/*******************************************************************************
2- * Copyright (c) 2011, 2018 Wind River Systems, Inc. and others. All rights reserved.
2+ * Copyright (c) 2011, 2025 Wind River Systems, Inc. and others. All rights reserved.
33 * This program and the accompanying materials are made available under the terms
44 * of the Eclipse Public License 2.0 which accompanies this distribution, and is
55 * available at https://www.eclipse.org/legal/epl-2.0/
88 *
99 * Contributors:
1010 * Wind River Systems - initial API and implementation
11+ * Alexander Fedorov (ArSysOp) - further evolution
1112 *******************************************************************************/
1213package org .eclipse .terminal .view .ui .internal .listeners ;
1314
1415import java .util .HashMap ;
1516import java .util .Map ;
1617
18+ import org .eclipse .terminal .view .ui .IUIConstants ;
1719import org .eclipse .ui .IPartListener2 ;
1820import org .eclipse .ui .IWorkbenchPart ;
1921import org .eclipse .ui .IWorkbenchPartReference ;
@@ -51,7 +53,7 @@ public void partHidden(IWorkbenchPartReference partRef) {
5153
5254 @ Override
5355 public void partActivated (IWorkbenchPartReference partRef ) {
54- if ("org.eclipse.terminal.view.ui.TerminalsView" . equals (partRef .getId ())) { //$NON-NLS-1$
56+ if (IUIConstants . ID . equals (partRef .getId ())) {
5557 IWorkbenchPart part = partRef .getPart (false );
5658 if (part != null && part .getSite () != null ) {
5759 IContextService service = part .getSite ().getService (IContextService .class );
@@ -69,7 +71,7 @@ public void partActivated(IWorkbenchPartReference partRef) {
6971
7072 @ Override
7173 public void partDeactivated (IWorkbenchPartReference partRef ) {
72- if ("org.eclipse.terminal.view.ui.TerminalsView" . equals (partRef .getId ())) { //$NON-NLS-1$
74+ if (IUIConstants . ID . equals (partRef .getId ())) {
7375 IWorkbenchPart part = partRef .getPart (false );
7476 if (part != null && part .getSite () != null ) {
7577 IContextService service = part .getSite ().getService (IContextService .class );
0 commit comments