| 1 | /*******************************************************************************\r |
| 2 | * Copyright (c) 2010 Ericsson\r |
| 3 | * \r |
| 4 | * All rights reserved. This program and the accompanying materials are\r |
| 5 | * made available under the terms of the Eclipse Public License v1.0 which\r |
| 6 | * accompanies this distribution, and is available at\r |
| 7 | * http://www.eclipse.org/legal/epl-v10.html\r |
| 8 | * \r |
| 9 | * Contributors:\r |
| 10 | * Patrick Tasse - Initial API and implementation\r |
| 11 | *******************************************************************************/\r |
| 12 | \r |
| 13 | package org.eclipse.linuxtools.tmf.ui.editors;\r |
| 14 | \r |
| 15 | import org.eclipse.linuxtools.tmf.core.component.ITmfComponent;\r |
| 16 | import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;\r |
| 17 | import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;\r |
| 18 | import org.eclipse.ui.part.MultiPageEditorPart;\r |
| 19 | \r |
| 20 | public abstract class TmfMultiPageEditorPart extends MultiPageEditorPart implements ITmfComponent {\r |
| 21 | \r |
| 22 | private final String fName;\r |
| 23 | \r |
| 24 | // ------------------------------------------------------------------------\r |
| 25 | // Constructor\r |
| 26 | // ------------------------------------------------------------------------\r |
| 27 | \r |
| 28 | public TmfMultiPageEditorPart() {\r |
| 29 | super();\r |
| 30 | fName = "TmfMultiPageEditorPart"; //$NON-NLS-1$\r |
| 31 | TmfSignalManager.register(this);\r |
| 32 | }\r |
| 33 | \r |
| 34 | @Override\r |
| 35 | public void dispose() {\r |
| 36 | TmfSignalManager.deregister(this);\r |
| 37 | super.dispose();\r |
| 38 | }\r |
| 39 | \r |
| 40 | // ------------------------------------------------------------------------\r |
| 41 | // ITmfComponent\r |
| 42 | // ------------------------------------------------------------------------\r |
| 43 | \r |
| 44 | @Override\r |
| 45 | public String getName() {\r |
| 46 | return fName;\r |
| 47 | }\r |
| 48 | \r |
| 49 | @Override\r |
| 50 | public void broadcast(TmfSignal signal) {\r |
| 51 | TmfSignalManager.dispatchSignal(signal);\r |
| 52 | }\r |
| 53 | }\r |