1
1
/*******************************************************************************
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.
3
3
* This program and the accompanying materials are made available under the terms
4
4
* of the Eclipse Public License 2.0 which accompanies this distribution, and is
5
5
* available at https://www.eclipse.org/legal/epl-2.0/
8
8
*
9
9
* Contributors:
10
10
* Wind River Systems - initial API and implementation
11
+ * Alexander Fedorov (ArSysOp) - further evolution
11
12
*******************************************************************************/
12
13
package org .eclipse .terminal .view .ui .internal .listeners ;
13
14
14
15
import java .util .HashMap ;
15
16
import java .util .Map ;
16
17
18
+ import org .eclipse .terminal .view .ui .IUIConstants ;
17
19
import org .eclipse .ui .IPartListener2 ;
18
20
import org .eclipse .ui .IWorkbenchPart ;
19
21
import org .eclipse .ui .IWorkbenchPartReference ;
@@ -51,7 +53,7 @@ public void partHidden(IWorkbenchPartReference partRef) {
51
53
52
54
@ Override
53
55
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 ())) {
55
57
IWorkbenchPart part = partRef .getPart (false );
56
58
if (part != null && part .getSite () != null ) {
57
59
IContextService service = part .getSite ().getService (IContextService .class );
@@ -69,7 +71,7 @@ public void partActivated(IWorkbenchPartReference partRef) {
69
71
70
72
@ Override
71
73
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 ())) {
73
75
IWorkbenchPart part = partRef .getPart (false );
74
76
if (part != null && part .getSite () != null ) {
75
77
IContextService service = part .getSite ().getService (IContextService .class );
0 commit comments