MCPcopy Create free account
hub / github.com/GateNLP/gate-core / setTarget

Method setTarget

src/main/java/gate/gui/PRViewer.java:107–129  ·  view source on GitHub ↗
(Object target)

Source from the content-addressed store, hash-verified

105 }
106
107 @Override
108 public void setTarget(Object target){
109 if(target == null) return;
110 if(!(target instanceof Resource)){
111 throw new GateRuntimeException(this.getClass().getName() +
112 " can only be used to display " +
113 Resource.class.getName() +
114 "\n" + target.getClass().getName() +
115 " is not a " +
116 Resource.class.getName() + "!");
117 }
118
119 Resource pr = (Resource)target;
120 ResourceData rData =
121 Gate.getCreoleRegister().get(pr.getClass().getName());
122 if(rData != null) {
123 editor.init(pr, rData.getParameterList().getInitimeParameters());
124 } else {
125 editor.init(pr, null);
126 }
127
128 editor.removeCreoleListenerLink();
129 }
130
131 protected ResourceParametersEditor editor;
132

Callers

nothing calls this directly

Calls 7

getCreoleRegisterMethod · 0.95
getParameterListMethod · 0.95
getInitimeParametersMethod · 0.80
getNameMethod · 0.65
getMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected