本文整理汇总了Java中jetbrains.mps.internal.collections.runtime.ListSequence类的典型用法代码示例。如果您正苦于以下问题:Java ListSequence类的具体用法?Java ListSequence怎么用?Java ListSequence使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListSequence类属于jetbrains.mps.internal.collections.runtime包,在下文中一共展示了ListSequence类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5dfe7d133997fdc5L, "jetbrains.mps.samples.VoiceMenu.structure.Action"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "Action", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996523432008")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new Action_TransformationMenu.TMP_SubMenu_h8wml4_a1());
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:26,代码来源:Action_TransformationMenu.java
示例2: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5dfe7d1339980ac8L, "jetbrains.mps.samples.VoiceMenu.structure.DirectCall"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "DirectCall", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996518440259")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:DirectCall_TransformationMenu.java
示例3: execute
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void execute(final SNode node, final EditorContext editorContext) {
for (SNode concept : ListSequence.fromList(SModelOperations.nodes(SNodeOperations.getModel(node), MetaAdapterFactory.getConcept(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, "ObjectiefRecht.structure.Concept")))) {
if (SPropertyOperations.getInteger(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c6L, "maand")) == 0) {
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c4L, "dag"), "" + (1));
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c6L, "maand"), "" + (1));
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c9L, "jaar"), "" + (1000));
}
if ((SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")) == null)) {
SNodeFactoryOperations.setNewChild(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan"), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, "Datum.structure.Datum")));
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c4L, "dag"), "" + (1));
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c6L, "maand"), "" + (1));
SPropertyOperations.set(SLinkOperations.getTarget(concept, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x4916e0625ce15ba0L, 0x4916e0625ce244baL, "brongeldigVan")), MetaAdapterFactory.getProperty(0x61be2dc6a1404defL, 0xa5927499aa2bac19L, 0x630944a3c415c8c3L, 0x630944a3c415c8c9L, "jaar"), "" + (1000));
}
}
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:17,代码来源:InitialiseerDatums_Intention.java
示例4: for
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static List<SNode> GeefLijstMetInvoerKenmerken_id6$f4rrvMdoa(@NotNull SNode __thisNode__) {
List<SNode> lijstMetKenmerken = new ArrayList<SNode>();
for (SNode rij : ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0xc4c9a68ece244c5bL, 0x9241c819e554f07cL, 0x6626bda7037f61aeL, 0x6626bda7037f61afL, "rijen")))) {
for (SNode kolom : ListSequence.fromList(SLinkOperations.getChildren(rij, MetaAdapterFactory.getContainmentLink(0xc4c9a68ece244c5bL, 0x9241c819e554f07cL, 0x7b98ef41a32dc163L, 0x7b98ef41a32dc164L, "kolommen")))) {
for (SNode presentatieveld : ListSequence.fromList(SLinkOperations.getChildren(kolom, MetaAdapterFactory.getContainmentLink(0xc4c9a68ece244c5bL, 0x9241c819e554f07cL, 0x7b98ef41a32a29d8L, 0x70b6c2b5eaa1f1L, "velden")))) {
{
final SNode invoerVeld = presentatieveld;
if (SNodeOperations.isInstanceOf(invoerVeld, MetaAdapterFactory.getConcept(0xc4c9a68ece244c5bL, 0x9241c819e554f07cL, 0x6626bda7038194f2L, "Interactie.structure.InvoerVeld"))) {
ListSequence.fromList(lijstMetKenmerken).addElement(SLinkOperations.getTarget(invoerVeld, MetaAdapterFactory.getReferenceLink(0xc4c9a68ece244c5bL, 0x9241c819e554f07cL, 0x6626bda7038194f2L, 0x6626bda7038194f3L, "referentieNaarKenmerk")));
}
}
}
}
}
return lijstMetKenmerken;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:17,代码来源:PresentatieDialoog__BehaviorDescriptor.java
示例5: createHeadQuery_ib3595_a4a_0
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
public HeaderGrid createHeadQuery_ib3595_a4a_0(final EditorContext editorContext, final SNode node) {
Object queryResult = new Object() {
public Object query() {
return SLinkOperations.getChildren(node, MetaAdapterFactory.getContainmentLink(0x30ef095ad48945ffL, 0xa80f456a798ac125L, 0xb116d9d60df9be7L, 0xb116d9d60df9be8L, "objectinstanties"));
}
}.query();
IHeaderNodeInsertAction insertAction = null;
IHeaderNodeDeleteAction deleteAction = new IHeaderNodeDeleteAction() {
public void delete(final int index) {
SNodeOperations.deleteNode(ListSequence.fromList(SLinkOperations.getChildren(node, MetaAdapterFactory.getContainmentLink(0x30ef095ad48945ffL, 0xa80f456a798ac125L, 0xb116d9d60df9be7L, 0xb116d9d60df9be8L, "objectinstanties"))).getElement(index));
}
};
HeaderGrid grid = new HeaderGridFactory(editorContext, node, false).createFromObject(queryResult, new StringHeaderReference("797539131727260372"), insertAction, deleteAction, 0, new ITableStyleFactory() {
public Style createStyle(final int columnIndex, final int rowIndex) {
Style style = new StyleImpl();
return style;
}
}, "objectinstanties");
return grid;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:22,代码来源:Tabel_tabel_EditorBuilder_a.java
示例6: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5dfe7d1339980acbL, "jetbrains.mps.samples.VoiceMenu.structure.GetInfo"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "GetInfo", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996521556672")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:GetInfo_TransformationMenu.java
示例7: execute
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void execute(final SNode node, final EditorContext editorContext) {
editorContext.getSelectionManager();
int index = SNodeOperations.getIndexInParent(node);
List<SNode> events = SLinkOperations.getChildren(SNodeOperations.cast(SNodeOperations.getParent(node), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu")), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde688L, "events"));
SNode swap;
swap = ListSequence.fromList(events).getElement(index);
ListSequence.fromList(events).setElement(index, ListSequence.fromList(events).getElement(index + 1));
ListSequence.fromList(events).setElement(index + 1, swap);
for (SNode item : ListSequence.fromList(events)) {
ListSequence.fromList(SLinkOperations.getChildren(SNodeOperations.cast(SNodeOperations.getParent(node), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu")), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde688L, "events"))).addElement(item);
SelectionUtil.selectCell(editorContext, node, SelectionManager.FIRST_ERROR_CELL + "|" + SelectionManager.FOCUS_POLICY_CELL + "|" + SelectionManager.FIRST_EDITABLE_CELL + "|" + SelectionManager.FIRST_CELL);
}
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:19,代码来源:MoveDown_Intention.java
示例8: InitialiseerRechtsbetrekkingen_id146AQXTpFv9
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static void InitialiseerRechtsbetrekkingen_id146AQXTpFv9(@NotNull SNode __thisNode__, SNode simulatie) {
SNode gegevenshuishouding = SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0xa37796bba047244L, "gegevenshuishouding"));
// Verwijder de rechtsbetrekkingen ontstaan in de simulatie
int index = ListSequence.fromList(SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0xa37796bba047244L, "gegevenshuishouding")), MetaAdapterFactory.getContainmentLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6807b3aa0b72d4deL, 0x2b935eb9665dcfc2L, "rechtsbetrekkingen")), MetaAdapterFactory.getContainmentLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x2b935eb9660efb2eL, 0x2b935eb9660efb2fL, "rechtsbetrekkingen"))).count() - 1;
while (index > 2) {
SLinkOperations.getChildren(SLinkOperations.getTarget(SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0xa37796bba047244L, "gegevenshuishouding")), MetaAdapterFactory.getContainmentLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6807b3aa0b72d4deL, 0x2b935eb9665dcfc2L, "rechtsbetrekkingen")), MetaAdapterFactory.getContainmentLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x2b935eb9660efb2eL, 0x2b935eb9660efb2fL, "rechtsbetrekkingen")).remove(index);
index--;
}
// Op basis van de rechtsbetrekkingen in de gegevenshuishouding
SNodeFactoryOperations.setNewChild(simulatie, MetaAdapterFactory.getContainmentLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x6d2de15fcaea0d6fL, "rechtspositie"), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae954a1L, "Simulatie.structure.Informatiepositie")));
for (SNode rechtbetrekking : ListSequence.fromList(SNodeOperations.getNodeDescendants(gegevenshuishouding, MetaAdapterFactory.getConcept(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x630944a3c415c89eL, "SubjectiefRecht.structure.Rechtsbetrekking"), false, new SAbstractConcept[]{}))) {
// Ga opzoek naar de rechtsbetrekkingen van de rechtssubjecten
if ((SLinkOperations.getTarget(rechtbetrekking, MetaAdapterFactory.getReferenceLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x630944a3c415c89eL, 0x630944a3c415c8a1L, "rechtssubjectMetPlicht")) == SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x6d2de15fcae8257fL, "rechtssubject1")) && SLinkOperations.getTarget(rechtbetrekking, MetaAdapterFactory.getReferenceLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x630944a3c415c89eL, 0x630944a3c415c89fL, "rechtssubjectMetRecht")) == SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x1ed85b1d6dac641fL, "rechtssubject2"))) || (SLinkOperations.getTarget(rechtbetrekking, MetaAdapterFactory.getReferenceLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x630944a3c415c89eL, 0x630944a3c415c8a1L, "rechtssubjectMetPlicht")) == SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x1ed85b1d6dac641fL, "rechtssubject2")) && SLinkOperations.getTarget(rechtbetrekking, MetaAdapterFactory.getReferenceLink(0x2c493149da1d45e9L, 0x8ea2e0b0cfc3047aL, 0x630944a3c415c89eL, 0x630944a3c415c89fL, "rechtssubjectMetRecht")) == SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getReferenceLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x6d2de15fcae8257fL, "rechtssubject1")))) {
SNode rechtsbetrekking = SNodeOperations.copyNode(rechtbetrekking);
ListSequence.fromList(SLinkOperations.getChildren(SLinkOperations.getTarget(simulatie, MetaAdapterFactory.getContainmentLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae53fb5L, 0x6d2de15fcaea0d6fL, "rechtspositie")), MetaAdapterFactory.getContainmentLink(0x15970de38fe74b13L, 0x81c738b38d51c39aL, 0x6d2de15fcae954a1L, 0x6c69e5201860cca3L, "rechtsbetrekkingen"))).addElement(rechtsbetrekking);
}
}
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:21,代码来源:Simulatie__BehaviorDescriptor.java
示例9: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x420d89797f0d16f6L, "jetbrains.mps.samples.VoiceMenu.structure.Record"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "Record", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996522819998")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:Record_TransformationMenu.java
示例10: execute
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void execute(final SNode node, final EditorContext editorContext) {
int index = SNodeOperations.getIndexInParent(node);
List<SNode> events = SLinkOperations.getChildren(SNodeOperations.cast(SNodeOperations.getParent(node), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu")), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde688L, "events"));
SNode swap;
swap = ListSequence.fromList(events).getElement(index);
ListSequence.fromList(events).setElement(index, ListSequence.fromList(events).getElement(index - 1));
ListSequence.fromList(events).setElement(index - 1, swap);
for (SNode item : ListSequence.fromList(events)) {
ListSequence.fromList(SLinkOperations.getChildren(SNodeOperations.cast(SNodeOperations.getParent(node), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu")), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde688L, "events"))).addElement(item);
SelectionUtil.selectCell(editorContext, node, SelectionManager.FIRST_ERROR_CELL + "|" + SelectionManager.FOCUS_POLICY_CELL + "|" + SelectionManager.FIRST_EDITABLE_CELL + "|" + SelectionManager.FIRST_CELL);
}
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:18,代码来源:MoveUp_Intention.java
示例11: execute
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void execute(@NotNull String pattern) {
if (SNodeOperations.isInstanceOf(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu"))) {
SNode srcMenu = SNodeOperations.cast(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu"));
final SNode myActivity = SConceptOperations.createNewNode(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde68dL, "jetbrains.mps.samples.VoiceMenu.structure.Activity"));
SNodeFactoryOperations.setNewChild(myActivity, MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde68dL, 0x5b6b060cf3fe08d2L, "commands"), SNodeFactoryOperations.asInstanceConcept(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x555e0967dab9863dL, "jetbrains.mps.samples.VoiceMenu.structure.Command")));
SLinkOperations.setTarget(myActivity, MetaAdapterFactory.getReferenceLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde68dL, 0x5b6b060cf3fe08f3L, "event"), _context.getNode());
ListSequence.fromList(SLinkOperations.getChildren(srcMenu, MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde68aL, "activities"))).addElement(myActivity);
SelectionUtil.selectCell(_context.getEditorContext(), SLinkOperations.getTarget(ListSequence.fromList(SLinkOperations.getChildren(SNodeOperations.cast(SNodeOperations.getParent(_context.getNode()), MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, "jetbrains.mps.samples.VoiceMenu.structure.Menu")), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde308L, 0x5b6b060cf3fde68aL, "activities"))).findFirst(new IWhereFilter<SNode>() {
public boolean accept(SNode it) {
return eq_8shh52_a0a0a0a0a0b0g0a0g2k(it, myActivity);
}
}), MetaAdapterFactory.getContainmentLink(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5b6b060cf3fde68dL, 0x5b6b060cf3fe08d2L, "commands")), SelectionManager.FIRST_CELL);
}
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:17,代码来源:Event_TransformationMenu.java
示例12: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x420d89797f0d16dbL, "jetbrains.mps.samples.VoiceMenu.structure.HangUp"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "HangUp", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996522192360")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:HangUp_TransformationMenu.java
示例13: doExecute
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void doExecute(@NotNull final AnActionEvent event, final Map<String, Object> _params) {
ModelAccess.instance().runReadAction(new Runnable() {
public void run() {
{
final SNode context = ListSequence.fromList(SModelOperations.roots(event.getData(MPSCommonDataKeys.CONTEXT_MODEL), MetaAdapterFactory.getConcept(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x611073d615228d02L, "ObjectiefRecht.structure.Context"))).first();
if (SNodeOperations.isInstanceOf(context, MetaAdapterFactory.getConcept(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x611073d615228d02L, "ObjectiefRecht.structure.Context"))) {
VisualisatieToestandenEnOvergangen graphVizFile = new VisualisatieToestandenEnOvergangen();
graphVizFile.WriteToFile(context);
}
}
if (!((event.getData(MPSCommonDataKeys.NODE) instanceof SNode))) {
JOptionPane.showMessageDialog(null, "Message", "Geen context node", JOptionPane.ERROR_MESSAGE);
}
VisualiseerListener listener = new VisualiseerListener();
listener.show();
listener.Ververs();
}
});
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:21,代码来源:VisualiseerToestandenEnOvergangen_Action.java
示例14: getParts
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
@NotNull
protected List<MenuPart<TransformationMenuItem, TransformationMenuContext>> getParts(TransformationMenuContext _context) {
List<MenuPart<TransformationMenuItem, TransformationMenuContext>> result = new ArrayList<MenuPart<TransformationMenuItem, TransformationMenuContext>>();
if (ListSequence.fromListAndArray(new ArrayList<String>(), MenuLocations.CONTEXT_ACTIONS_TOOL).contains(_context.getMenuLocation())) {
result.add(new DefaultConceptMenusTransformationMenuPart(SModelUtil.getDirectSuperConcepts(MetaAdapterFactory.getConcept(0x4bc750d756884f52L, 0xb7d5b263a3393a24L, 0x5dfe7d1339980acaL, "jetbrains.mps.samples.VoiceMenu.structure.Back"))) {
@NotNull
@Override
public List<TransformationMenuItem> createItems(@NotNull TransformationMenuContext context) {
context.getEditorMenuTrace().pushTraceInfo();
context.getEditorMenuTrace().setDescriptor(new EditorMenuDescriptorBase("include menus for all the direct superconcepts of " + "Back", new SNodePointer("r:7c1e5bbb-2d18-4cf3-a11d-502be6b13261(jetbrains.mps.samples.VoiceMenu.editor)", "4660170996511643335")));
try {
return super.createItems(context);
} finally {
context.getEditorMenuTrace().popTraceInfo();
}
}
});
}
return result;
}
开发者ID:vaclav,项目名称:voicemenu,代码行数:23,代码来源:Back_TransformationMenu.java
示例15: generateText
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void generateText(final TextGenContext ctx) {
final TextGenSupport tgs = new TextGenSupport(ctx);
ctx.getBuffer().area().increaseIndent();
for (SNode element : ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x5dd2e0a8636ba22fL, 0x5dd2e0a8636ba251L, "instantiesVanObject")))) {
tgs.append(SPropertyOperations.getString(SLinkOperations.getTarget(element, MetaAdapterFactory.getReferenceLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x5dd2e0a8636ba231L, 0x5dd2e0a8636ba232L, "instantieVanObject")), MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")));
tgs.append(", ");
}
ctx.getBuffer().area().decreaseIndent();
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:11,代码来源:MeervoudigeObjectWaarde_TextGen.java
示例16: generateText
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
@Override
public void generateText(final TextGenContext ctx) {
final TextGenSupport tgs = new TextGenSupport(ctx);
GenericXMLTextgen.conceptTextgen(ctx.getPrimaryInput(), ctx);
for (SNode child : ListSequence.fromList(SLinkOperations.getChildren(ctx.getPrimaryInput(), MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x67229afa69d710b5L, 0x67229afa69d710c7L, "elementen")))) {
ctx.getBuffer().area().increaseIndent();
tgs.indent();
tgs.appendNode(child);
ctx.getBuffer().area().decreaseIndent();
}
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:12,代码来源:Enumeratie_TextGen.java
示例17: StringMetUniekIdentificerendeKenmerken_id4yDNEIhb6NS
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static String StringMetUniekIdentificerendeKenmerken_id4yDNEIhb6NS(@NotNull SNode __thisNode__) {
String result = "";
for (SNode kenmerk : ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x218d2fe3c8aff5b9L, 0x3642b84024d34ec1L, "uniekIdentificerendeKenmerken")))) {
result = result + kenmerk;
if (kenmerk != ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x218d2fe3c8aff5b9L, 0x3642b84024d34ec1L, "uniekIdentificerendeKenmerken"))).last()) {
result = result + ", ";
}
}
return result;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:11,代码来源:Onderwerp__BehaviorDescriptor.java
示例18: for
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static List<SNode> GeefLijstMetInvoerKenmerken_id6$f4rrvMdoa(@NotNull SNode __thisNode__) {
List<SNode> lijstMetKenmerken = new ArrayList<SNode>();
for (SNode methode : ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x3b19ba47355a8fe6L, 0x75a9691d14b327a0L, "nieuweFeiten")))) {
for (SNode kenmerk : ListSequence.fromList(SLinkOperations.getChildren(methode, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x1d41347b06d6c3eL, 0x1d41347b06d6c86L, "kenmerken")))) {
ListSequence.fromList(lijstMetKenmerken).addElement(SLinkOperations.getTarget(kenmerk, MetaAdapterFactory.getReferenceLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x6e43a734f86e13f2L, 0x6e43a734f86e13f3L, "kenmerk")));
}
}
return lijstMetKenmerken;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:10,代码来源:OvergangZonderRechtsgevolg__BehaviorDescriptor.java
示例19: StringMetUniekIdentificerendeKenmerken_id4yDNEIhbMSq
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static String StringMetUniekIdentificerendeKenmerken_id4yDNEIhbMSq(@NotNull SNode __thisNode__) {
String result = "";
for (SNode kenmerk : ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x611073d615228d0aL, 0x67229afa69bc26cfL, "uniekIdentificerendeKenmerken")))) {
result = result + kenmerk;
if (kenmerk != ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x611073d615228d0aL, 0x67229afa69bc26cfL, "uniekIdentificerendeKenmerken"))).last()) {
result = result + ", ";
}
}
return result;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:11,代码来源:RechtsSubject__BehaviorDescriptor.java
示例20: GeefWaardeVanKenmerk_idFR9FxGLp3H
import jetbrains.mps.internal.collections.runtime.ListSequence; //导入依赖的package包/类
static SNode GeefWaardeVanKenmerk_idFR9FxGLp3H(@NotNull SNode __thisNode__, SNode kenmerk) {
for (SNode waardeVanKenmerk : ListSequence.fromList(SLinkOperations.getChildren(__thisNode__, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x36e4484084e2ca14L, 0x36e4484084e2ca15L, "waardeVanKenmerken")))) {
if (SLinkOperations.getTarget(SLinkOperations.getTarget(waardeVanKenmerk, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x36e4484084e2c9f7L, 0x36e4484084e2c9f8L, "kenmerk")), MetaAdapterFactory.getReferenceLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x6e43a734f86e13f2L, 0x6e43a734f86e13f3L, "kenmerk")) == kenmerk) {
return SLinkOperations.getTarget(waardeVanKenmerk, MetaAdapterFactory.getContainmentLink(0x8dc4b25f4c49400eL, 0xac370fd230db702cL, 0x36e4484084e2c9f7L, 0x36e4484084e2ca11L, "waarde"));
}
}
return null;
}
开发者ID:diederikd,项目名称:DeBrug,代码行数:9,代码来源:InstantieVanObject__BehaviorDescriptor.java
注:本文中的jetbrains.mps.internal.collections.runtime.ListSequence类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论