1 11 package org.eclipse.ant.internal.ui.debug.model; 12 13 import org.eclipse.debug.core.DebugException; 14 import org.eclipse.debug.core.model.IValue; 15 import org.eclipse.debug.core.model.IVariable; 16 17 public class AntProperties extends AntDebugElement implements IVariable { 18 19 private IValue fValue; 20 private String fName; 21 private boolean fValid= true; 22 23 public AntProperties(AntDebugTarget target, String name) { 24 super(target); 25 fName= name; 26 } 27 28 31 public synchronized IValue getValue() throws DebugException { 32 int attempts= 0; 33 while (!fValid && !getDebugTarget().isTerminated()) { 34 try { 35 wait(50); 36 } catch (InterruptedException e) { 37 } 38 if (attempts == 20 && !fValid && !getDebugTarget().isTerminated()) { 39 throwDebugException(DebugModelMessages.AntProperties_1); 40 } 41 attempts++; 42 } 43 return fValue; 44 } 45 46 protected IValue getLastValue() { 47 return fValue; 48 } 49 50 53 public String getName() { 54 return fName; 55 } 56 57 60 public String getReferenceTypeName() { 61 return ""; } 63 64 67 public boolean hasValueChanged() { 68 return false; 69 } 70 71 74 public void setValue(String expression) { 75 } 76 77 80 public void setValue(IValue value) { 81 fValue= value; 82 } 83 84 87 public boolean supportsValueModification() { 88 return false; 89 } 90 91 94 public boolean verifyValue(String expression) { 95 return false; 96 } 97 98 101 public boolean verifyValue(IValue value) { 102 return false; 103 } 104 105 protected synchronized void setValid(boolean valid) { 106 fValid= valid; 107 notifyAll(); 108 } 109 } 110 | Popular Tags |