Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend')
-rw-r--r--org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend30
1 files changed, 13 insertions, 17 deletions
diff --git a/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend
index 6b35cff..807cf63 100644
--- a/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend
+++ b/org.eclipse.osbp.xtext.table/src/org/eclipse/osbp/xtext/table/jvmmodel/TableDSLJvmModelInferrer.xtend
@@ -834,15 +834,17 @@ class TableDSLJvmModelInferrer extends AbstractModelInferrer {
switch(event.getCommand()) {
case SELECT:
MPerspective perspective = eclipseContext.get(MPerspective.class);
- ArrayList<String> allowedSenderParts = (ArrayList<String>) eclipseContext.getActive(MPart.class).getTransientData().get(IPerspectiveProvider.EventDispatcherConstants.ACCEPTED_SENDERS);
- if((event.getPerspective() == null || (perspective != null && event.getPerspective().equals(perspective))) && ((allowedSenderParts != null && allowedSenderParts.contains(event.getSender())) || allowedSenderParts == null)){
- if(!event.getSender().equals("«table.fullyQualifiedName»")) {
- if(filterGenerator.selectItem(event, getSelectById())) {
- «IF table.isEmbedded || table.task»
- createComponents();
- «ELSE»
- renderData();
- «ENDIF»
+ if(perspective != null) {
+ ArrayList<String> allowedSenderParts = (ArrayList<String>) eclipseContext.getActive(MPart.class).getTransientData().get(IPerspectiveProvider.EventDispatcherConstants.ACCEPTED_SENDERS);
+ if((event.getPerspective() == null || (perspective != null && event.getPerspective().equals(perspective))) && ((allowedSenderParts != null && allowedSenderParts.contains(event.getSender())) || allowedSenderParts == null)){
+ if(!event.getSender().equals("«table.fullyQualifiedName»")) {
+ if(filterGenerator.selectItem(event, getSelectById())) {
+ «IF table.isEmbedded || table.task»
+ createComponents();
+ «ELSE»
+ renderData();
+ «ENDIF»
+ }
}
}
}
@@ -2878,18 +2880,12 @@ class TableDSLJvmModelInferrer extends AbstractModelInferrer {
EventDispatcherEvent evnt = new EventDispatcherEvent(getContext().get(MPerspective.class), EventDispatcherCommand.SELECT, "«entity.baseType.fullyQualifiedName».«entity.idAttributeName»", "«table.fullyQualifiedName»");
evnt.addItem(EventDispatcherDataTag.ID, idObj);
eventDispatcher.sendEvent(evnt);
-
«IF !table.isSelectIdOnly »
// send all refs too
for (String alias : datamartInstance.getPrimaryList().keySet()){
if (!"«alias»".equals(alias)){
- String key = datamartInstance.getPrimaryList().get(alias).getEntityName() + "." + datamartInstance.getPrimaryList().get(alias).getAttributeName();
- idObj = datamartInstance.getPrimaryListKeys(alias).get(selection);
-
- SelectionStore.putSelectionToPerspectiveContext(getPart(),key,idObj);
-
- evnt = new EventDispatcherEvent(getContext().get(MPerspective.class), EventDispatcherCommand.SELECT, key, "«table.fullyQualifiedName»");
- evnt.addItem(EventDispatcherDataTag.ID, idObj);
+ evnt = new EventDispatcherEvent(getContext().get(MPerspective.class), EventDispatcherCommand.SELECT, datamartInstance.getPrimaryList().get(alias).getEntityName() + "." + datamartInstance.getPrimaryList().get(alias).getAttributeName(), "«table.fullyQualifiedName»");
+ evnt.addItem(EventDispatcherDataTag.ID, datamartInstance.getPrimaryListKeys(alias).get(selection));
eventDispatcher.sendEvent(evnt);
}
}

Back to the top