/** * Add an entry to the report. * @param stack The path to the element to which the entry applies. * @param message The problem description. */ public void addEntry(Tuple stack, String message) { if(entries==null) // Use index map to keep insertion order for elements. this.entries = new MultiCollection(new IndexMap().getAsMap(), LinkedHashSet.class); if(!entries.getCollection(stack).contains(message)) entries.put(stack, message); }
public V next() { return get(i++); }
/** * Get the encodable representation. */ public Map getEncodableRepresentation() { IndexMap representation = SCollection.createIndexMap();; representation.add("isencodeablepresentation", "true"); // to distinguish this map from normal maps. representation.add("class", "ComposedFilter"); representation.add("operator", operatorToString(operator)); representation.add("filters", SUtil.arrayToString(filters)); return representation.getAsMap(); } }
if(components.containsKey(adesc.getName())) DFComponentDescription ad = (DFComponentDescription)components.get(adesc.getName()); components.removeKey(ad.getName()); else ret.add(ad); DFComponentDescription[] descs = (DFComponentDescription[])components.toArray(new DFComponentDescription[components.size()]); for(int i=0; (con==null || con.getMaxResults()==-1 || ret.size()<con.getMaxResults()) && i<descs.length; i++) components.removeKey(descs[i].getName());
/** * Return a fresh index map. */ public static IndexMap createIndexMap() { IndexMap ret = new IndexMap(); if(DEBUG) addCollection(ret); return ret; }
MProperty prop = parametercache.get(rowIndex); switch(columnIndex) if (!newname.equals(prop.getName())) newname = createFreeName(newname, new MapContains(getMEventProperties().getAsMap())); parametercache.remove(rowIndex); getMEvent().removeProperty(prop.getName()); parametercache.add(rowIndex, newname, prop); modelcontainer.setDirty(true);
tablepanel.add(confbox, gc); paramcche = new IndexMap(); paramtable = new JTable(pmodel); gc = new GridBagConstraints(); paramcche.put(cv.getName(), cparam); paramcche.put(arg.getName(), cparam); for (IArgument res : ress) CachedParameter cparam = (CachedParameter) paramcche.get(res.getName()); if (cparam != null) paramcche.put(res.getName(), cparam); for (UnparsedExpression argexp : argexps) ((CachedParameter) paramcche.get(argexp.getName())).inivals.put(conf.getName(), argexp.getValue()); for (UnparsedExpression resexp : resexps) ((CachedParameter) paramcche.get(resexp.getName())).inivals.put(conf.getName(), resexp.getValue());
if(components.containsKey(clone.getName())) throw new RuntimeException("Component already registered: "+cdesc.getName()); components.add(clone.getName(), clone);
/** * Deregister a component description. * @throws RuntimeException when the component is not registered. */ public IFuture<Void> deregister(IDFComponentDescription cdesc) { Future<Void> ret = new Future<Void>(); if(!components.containsKey(cdesc.getName())) { //throw new RuntimeException("Component not registered: "+adesc.getName()); ret.setException(new RuntimeException("Component not registered: "+cdesc.getName())); } else { components.removeKey(cdesc.getName()); ret.setResult(null); //System.out.println("deregistered: "+adesc.getName()); } return ret; }
/** * Returns the row count. * * @return The row count. */ public int getRowCount() { return paramcche.size(); }
MProperty prop = getMEvent().getProperties().get(rowIndex); switch (columnIndex) if(!value.equals(getValueAt(rowIndex, columnIndex))) getMEvent().getProperties().removeKey(prop.getName()); prop.setName(createFreeName((String)value, new CollectionContains(getMEvent().getProperties().keySet()))); getMEvent().addProperty(prop);
for(Iterator<String> it=mappings.keySet().iterator(); it.hasNext(); ) IParsedExpression exp = (IParsedExpression)((Tuple2<UnparsedExpression, UnparsedExpression>)mappings.get(name)).getFirstEntity().getParsed(); UnparsedExpression uiexp = ((Tuple2<UnparsedExpression, UnparsedExpression>)mappings.get(name)).getSecondEntity(); IParsedExpression iexp = uiexp != null? (IParsedExpression)uiexp.getParsed(): null; Object value; getActivity().getParameters().get(pname) == null || getActivity().getParameters().get(pname).getInitialValueString() == null || getActivity().getParameters().get(pname).getInitialValueString().isEmpty()) for(Iterator it=params.values().iterator(); it.hasNext(); ) for(Iterator it=params.values().iterator(); it.hasNext(); )
MParameter param = (MParameter) getBpmnActivity().getParameters().get(rowIndex); switch (columnIndex) getBpmnActivity().getParameters().remove(rowIndex); param.setName(BasePropertyPanel.createFreeName((String) value, new BasePropertyPanel.IndexMapContains(getBpmnActivity().getParameters()))); getBpmnActivity().getParameters().add(rowIndex, param.getName(), param); if (internal)