editor.setEditor(combo, item, columnIndex);
combo.setFocus();
- combo.setListVisible(true);
GraphExplorerImpl.this.reconfigureTreeEditorForText(item, columnIndex, combo, combo.getText(), SWT.DEFAULT, 0, 0);
// Removed in comboListener
currentlyModifiedNodes.add(context);
+ combo.setListVisible(true);
//System.out.println("START ENUMERATION EDITING: " + item);
}
*/
public static Resource create(WriteGraph g, Iterable<Resource> elements) throws DatabaseException {
Layer0 L0 = Layer0.getInstance(g);
- return ListUtils.create(g,L0.List, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements);
+ return ListUtils.create(g,L0.List, L0.List_Element, null, elements);
}
-
+
+ public static Resource createWithInverses(WriteGraph g, Iterable<Resource> elements) throws DatabaseException {
+ Layer0 L0 = Layer0.getInstance(g);
+ return ListUtils.create(g,L0.ListWithInverses, L0.List_ElementWithInverse, L0.List_ElementWithInverse_Inverse, elements);
+ }
+
/**
* Creates a list of the given list type containing the given {@code elements}.
*/
Layer0 L0 = g.getService(Layer0.class);
Resource list = g.newResource();
g.claim(list, L0.InstanceOf, null, type);
+ if (!elementPredicate.equals(L0.List_Element))
+ g.claim(list, L0.List_ElementPredicate, L0.List_ElementPredicate_Inverse, elementPredicate);
createExisting(g, list, elementPredicate, elementPredicateInverse, elements);
return list;
}
L0 = <http://www.simantics.org/Layer0-1.1>
-L0.Value <T L0.Entity
+L0.Value <T L0.Entity : L0.ValueType
+
+L0.ValueType <T L0.Type
L0.ExternalValue <T L0.Value
>-- L0.SCLValue.environment --> L0.SCLValue.Environment <R L0.IsRelatedTo : L0.TotalFunction
@L0.assert L0.ConvertsToValueWith L0.Functions.sclValue
-L0.SCLValueType <T L0.Entity
+L0.SCLValueType <T L0.ValueType
>-- L0.SCLValueType.validator ==> "Variable -> <ReadGraph> String" <R L0.HasProperty
L0.scl : L0.Template
StringBuilder signature = new StringBuilder();
signature.append("<div id=\"")
.append(HtmlEscape.escape(name))
- .append("\" class=\"code-doc-box\"><div class=\"code\">");
+ .append("\" class=\"code-doc-box\"><div class=\"code value\">");
char firstChar = name.charAt(0);
if(!Character.isAlphabetic(firstChar) && firstChar != '_')
name = "(" + name + ")";
TypeUnparsingContext tuc = new TypeUnparsingContext();
StringBuilder signature = new StringBuilder();
- signature.append("<div class=\"code-doc-box\"><div class=\"code\">");
+ signature.append("<div id=\"class-")
+ .append(HtmlEscape.escape(name))
+ .append("\" class=\"code-doc-box\"><div class=\"code class\">");
signature.append("class ");
if(typeClass.context.length > 0) {
signature.append('(');
TypeUnparsingContext tuc = new TypeUnparsingContext();
StringBuilder signature = new StringBuilder();
- signature.append("<div class=\"code-doc-box\"><div class=\"code\">");
+ signature.append("<div id=\"data-")
+ .append(HtmlEscape.escape(name))
+ .append("\" class=\"code-doc-box\"><div class=\"code data\">");
signature.append("data ");
signature.append(typeDescriptor.name.name);
if(typeDescriptor instanceof TypeConstructor) {
.code-doc-box>.code {
font-size: 12px;
font-family: Consolas, "Liberation Mono", Courier, monospace;
- background-color: #f0f0ff;
white-space: pre;
padding: 10px 15px;
border-bottom: 1px solid;
display: block;
}
-.code-doc-box>.doc {display: block;
+.code-doc-box>.value {
+ background-color: #f0f0ff;
+}
+
+.code-doc-box>.data {
+ background-color: #f0fff0;
+}
+
+.code-doc-box>.class {
+ background-color: #fff0f0;
+}
+
+.code-doc-box>.doc {
padding: 0px 15px ;
display: block;
}
@JavaName denyValue
denyValue :: Resource -> <WriteGraph> ()
-claimAssertion :: Resource -> Resource -> Resource -> <WriteGraph> ()
-claimAssertion type_ predicate object = do
- ass = newResource ()
- claim ass L0.HasPredicate predicate
- claim ass L0.HasObject object
- claim type_ L0.Asserts ass
-
"Sets the value of the literal that is an object with the given subject and predicate."
@inline
claimRelatedValue :: Serializable a => Resource -> Resource -> a -> <WriteGraph> ()
addMetadataListener :: ChangeListener -> <Proc> ()
removeMetadataListener :: ChangeListener -> <Proc> ()
+ @JavaName assert_
+ claimAssertion :: Resource -> Resource -> Resource -> <WriteGraph> ()
+
copyTo :: Resource -> Resource -> <WriteGraph> Resource
copyTo targetContainer source = do
(collectionToList $ copyTo_ targetContainer source)!0
L0.readOnly true
@L0.assert SEL.HasDisplayValue
_ : SEL.DisplayValue
- SEL.HasEnumerationValues _ : L0.Value
- L0.ConvertsToValueWith SEL.Functions.getEnumerationValues
+ SEL.HasEnumerationValues SEL.Functions.getEnumerationValues
@L0.assert SEL.HasDisplayUnit
_ : SEL.DisplayUnit
L0.readOnly true