!7 sclass SnippetInfo extends DynSCP { S id, title; int type; JComponent visualize() { JComponent c = super.visualize(); updateVis(); ret c; } void update { S s = dm_getInterestingString(); if (isSnippetID(s) && (setField(id := s) || title == null)) { setField(title := getSnippetTitle(s)); setField(type := getSnippetType(s)); updateVis(); } } void updateVis { if (scp != null) scp.setComponent(jMultiLineLabel(id == null ? "" : "ID: " + id + "\n" + "Title: " + title + "\n" + "Type: " + type)); } }