plugins/org.symbian.tools.tmw.debug/src/org/symbian/tools/tmw/debug/internal/WorkspaceLineBreakpointAdapter.java
changeset 471 06589bf52fa7
child 484 f5df819c1852
equal deleted inserted replaced
470:d4809db37847 471:06589bf52fa7
       
     1 /*******************************************************************************
       
     2  * Copyright (c) 2009 Symbian Foundation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the License "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Symbian Foundation - initial contribution.
       
    11  * Contributors:
       
    12  * Description:
       
    13  * Overview:
       
    14  * Details:
       
    15  * Platforms/Drives/Compatibility:
       
    16  * Assumptions/Requirement/Pre-requisites:
       
    17  * Failures and causes:
       
    18  *******************************************************************************/
       
    19 package org.symbian.tools.tmw.debug.internal;
       
    20 
       
    21 import org.chromium.debug.core.model.LineBreakpointAdapter;
       
    22 import org.chromium.debug.core.model.VProjectWorkspaceBridge;
       
    23 import org.eclipse.ui.IWorkbenchPart;
       
    24 import org.eclipse.ui.texteditor.ITextEditor;
       
    25 import org.eclipse.wst.jsdt.internal.ui.javaeditor.JavaEditor;
       
    26 
       
    27 @SuppressWarnings("restriction")
       
    28 public class WorkspaceLineBreakpointAdapter extends LineBreakpointAdapter {
       
    29 	@Override
       
    30 	protected ITextEditor getEditor(IWorkbenchPart part) {
       
    31 		if (part instanceof JavaEditor) {
       
    32 			return (ITextEditor) part;
       
    33 		} else {
       
    34 			return null;
       
    35 		}
       
    36 	}
       
    37 
       
    38     @Override
       
    39     protected String getDebugModelId() {
       
    40       return VProjectWorkspaceBridge.DEBUG_MODEL_ID;
       
    41     }
       
    42 }