1 11 package org.eclipse.debug.internal.ui.views.console; 12 13 import org.eclipse.core.expressions.PropertyTester; 14 import org.eclipse.debug.core.model.IProcess; 15 import org.eclipse.debug.ui.IDebugUIConstants; 16 import org.eclipse.ui.console.TextConsole; 17 18 23 public class ProcessTypePropertyTester extends PropertyTester { 24 25 28 public boolean test(Object receiver, String property, Object [] args, Object expectedValue) { 29 if (receiver instanceof TextConsole) { 30 TextConsole console = (TextConsole) receiver; 31 IProcess process = (IProcess) console.getAttribute(IDebugUIConstants.ATTR_CONSOLE_PROCESS); 32 if (process != null) { 33 String type = process.getAttribute(IProcess.ATTR_PROCESS_TYPE); 34 return (type != null && type.equals(expectedValue)); 35 } } return false; 38 } 40 } | Popular Tags |