1 11 package org.eclipse.jdt.internal.debug.ui.classpath; 12 13 import org.eclipse.debug.core.ILaunchConfiguration; 14 import org.eclipse.jdt.internal.launching.DefaultProjectClasspathEntry; 15 import org.eclipse.jdt.launching.IRuntimeClasspathEntry; 16 import org.eclipse.jface.window.Window; 17 import org.eclipse.swt.widgets.Shell; 18 19 public class DefaultClasspathEntryEditor implements IClasspathEditor { 20 21 24 public boolean canEdit(ILaunchConfiguration configuration, IRuntimeClasspathEntry[] entries) { 25 return entries.length == 1 && entries[0] instanceof DefaultProjectClasspathEntry; 26 } 27 28 31 public IRuntimeClasspathEntry[] edit(Shell shell, ILaunchConfiguration configuration, IRuntimeClasspathEntry[] entries) { 32 DefaultClasspathEntryDialog dialog = new DefaultClasspathEntryDialog(shell, entries[0]); 33 if (dialog.open() == Window.OK) { 34 return entries; 35 } 36 return null; 37 } 38 39 } 40 | Popular Tags |