1 11 12 package org.eclipse.ui.internal.ide.registry; 13 14 import java.util.HashMap ; 15 import java.util.Map ; 16 17 import org.eclipse.core.commands.IParameterValues; 18 import org.eclipse.ui.IPerspectiveDescriptor; 19 import org.eclipse.ui.internal.WorkbenchPlugin; 20 21 26 public final class PerspectiveParameterValues implements IParameterValues { 27 28 public final Map getParameterValues() { 29 final Map values = new HashMap (); 30 31 final IPerspectiveDescriptor[] perspectives = WorkbenchPlugin 32 .getDefault().getPerspectiveRegistry().getPerspectives(); 33 for (int i = 0; i < perspectives.length; i++) { 34 final IPerspectiveDescriptor perspective = perspectives[i]; 35 values.put(perspective.getLabel(), perspective.getId()); 36 } 37 38 return values; 39 } 40 } 41 | Popular Tags |