Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 56062 | Differences between
and this patch

Collapse All | Expand All

(-)plugin.xml (-1 / +6 lines)
Lines 1-7 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<?eclipse version="3.0"?>
2
<?eclipse version="3.0"?>
3
<!--
3
<!--
4
     Copyright (c) 2005, 2014 IBM Corporation and others.
4
     Copyright (c) 2005, 2015 IBM Corporation and others.
5
     All rights reserved. This program and the accompanying materials
5
     All rights reserved. This program and the accompanying materials
6
     are made available under the terms of the Eclipse Public License v1.0
6
     are made available under the terms of the Eclipse Public License v1.0
7
     which accompanies this distribution, and is available at
7
     which accompanies this distribution, and is available at
Lines 3216-3221 Link Here
3216
            adaptableType="org.eclipse.jdt.launching.sourcelookup.containers.ClasspathContainerSourceContainer">
3216
            adaptableType="org.eclipse.jdt.launching.sourcelookup.containers.ClasspathContainerSourceContainer">
3217
            <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
3217
            <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
3218
         </factory>   
3218
         </factory>   
3219
         <factory 
3220
            class="org.eclipse.jdt.internal.debug.ui.sourcelookup.WorkbenchAdapterFactory" 
3221
            adaptableType="org.eclipse.jdt.core.IJavaElement">
3222
            <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
3223
  		</factory>
3219
    
3224
    
3220
    <!-- Adapters for runtime classpath entries -->
3225
    <!-- Adapters for runtime classpath entries -->
3221
         <factory 
3226
         <factory 
(-)ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/JavaDebugWorkbenchAdapter.java (+30 lines)
Added Link Here
1
/*******************************************************************************
2
 * Copyright (c) 2015 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
10
 *******************************************************************************/
11
12
package org.eclipse.jdt.internal.debug.ui.sourcelookup;
13
14
import org.eclipse.jdt.internal.ui.JavaWorkbenchAdapter;
15
import org.eclipse.jdt.ui.JavaElementLabels;
16
17
/**
18
 * Class provides the JavaElement labels for WorkbenchAdapater Objects
19
 */
20
public class JavaDebugWorkbenchAdapter extends JavaWorkbenchAdapter {
21
	/*
22
	 *  Append Root path to identify full path for duplicate Java elements in source lookup dialog
23
	 */
24
	@Override
25
	public String getLabel(Object element) {
26
		return JavaElementLabels.getTextLabel(getJavaElement(element), JavaElementLabels.ALL_DEFAULT | JavaElementLabels.APPEND_ROOT_PATH);
27
	}
28
29
30
}
(-)ui/org/eclipse/jdt/internal/debug/ui/sourcelookup/WorkbenchAdapterFactory.java (-1 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
2
 * Copyright (c) 2000, 2015 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 11-16 Link Here
11
package org.eclipse.jdt.internal.debug.ui.sourcelookup;
11
package org.eclipse.jdt.internal.debug.ui.sourcelookup;
12
12
13
import org.eclipse.core.runtime.IAdapterFactory;
13
import org.eclipse.core.runtime.IAdapterFactory;
14
import org.eclipse.jdt.core.IJavaElement;
14
import org.eclipse.ui.model.IWorkbenchAdapter;
15
import org.eclipse.ui.model.IWorkbenchAdapter;
15
16
16
/**
17
/**
Lines 22-27 Link Here
22
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
23
	 * @see org.eclipse.core.runtime.IAdapterFactory#getAdapter(java.lang.Object, java.lang.Class)
23
	 */
24
	 */
24
	public Object getAdapter(Object adaptableObject, Class adapterType) {
25
	public Object getAdapter(Object adaptableObject, Class adapterType) {
26
		if (adaptableObject instanceof IJavaElement && adapterType.equals(IWorkbenchAdapter.class)) {
27
			return new JavaDebugWorkbenchAdapter();
28
		}
25
		if (adapterType.equals(IWorkbenchAdapter.class)) {
29
		if (adapterType.equals(IWorkbenchAdapter.class)) {
26
			return new WorkbenchAdapter();
30
			return new WorkbenchAdapter();
27
		}
31
		}

Return to bug 56062