use of org.whole.lang.ui.editparts.DeclarationTextualEntityPart in project whole by wholeplatform.
the class PatternsPartFactoryVisitor method visit.
@Override
public void visit(Name entity) {
if (EntityUtils.hasParent(entity)) {
IEntity parent = entity.wGetParent();
int parentOrd = parent.wGetEntityDescriptor().getOrdinal();
switch(parentOrd) {
case PatternsEntityDescriptorEnum.Pattern_ord:
case PatternsEntityDescriptorEnum.Repetition_ord:
case PatternsEntityDescriptorEnum.Choice_ord:
case PatternsEntityDescriptorEnum.Enumeration_ord:
case PatternsEntityDescriptorEnum.Data_ord:
case PatternsEntityDescriptorEnum.PatternApplication_ord:
case PatternsEntityDescriptorEnum.PatternInstance_ord:
case PatternsEntityDescriptorEnum.FunctionDeclaration_ord:
case PatternsEntityDescriptorEnum.FunctionPoint_ord:
part = new DeclarationTextualEntityPart();
return;
case PatternsEntityDescriptorEnum.PointcutDeclaration_ord:
part = new PointcutStepPart();
return;
case PatternsEntityDescriptorEnum.GoalDeclaration_ord:
part = new GoalStepPart();
return;
case PatternsEntityDescriptorEnum.VariablePoint_ord:
case PatternsEntityDescriptorEnum.VariableDeclaration_ord:
case PatternsEntityDescriptorEnum.VariantSelectionPoint_ord:
case PatternsEntityDescriptorEnum.Variant_ord:
part = new IdentifierTextualEntityPart();
return;
case PatternsEntityDescriptorEnum.JoinPointDeclaration_ord:
part = new JoinPointStepPart();
return;
case PatternsEntityDescriptorEnum.VariantSelector_ord:
part = new VariabilityNamePart();
return;
case PatternsEntityDescriptorEnum.JoinPoint_ord:
part = new ContentTextualEntityPart();
return;
case PatternsEntityDescriptorEnum.PatternLanguage_ord:
case PatternsEntityDescriptorEnum.Library_ord:
part = new ModuleNameTextualEntityPart();
return;
case PatternsEntityDescriptorEnum.EnumValue_ord:
part = new LiteralTextualEntityPart();
return;
case PatternsEntityDescriptorEnum.Binding_ord:
case PatternsEntityDescriptorEnum.Slot_ord:
case PatternsEntityDescriptorEnum.InsertionPoint_ord:
part = new ContentTextualEntityPart();
return;
}
}
part = new ContentTextualEntityPart();
}
use of org.whole.lang.ui.editparts.DeclarationTextualEntityPart in project whole by wholeplatform.
the class ModelsTabularPartFactoryVisitor method visit.
public void visit(SimpleName entity) {
if (EntityUtils.hasParent(entity)) {
IEntity parent = entity.wGetParent();
int parentOrd = parent.wGetEntityDescriptor().getOrdinal();
switch(parentOrd) {
case ModelsEntityDescriptorEnum.CompositeEntity_ord:
case ModelsEntityDescriptorEnum.MapEntity_ord:
if (!parent.wContains(ModelsFeatureDescriptorEnum.name) || parent.wGet(ModelsFeatureDescriptorEnum.name) != entity)
break;
case ModelsEntityDescriptorEnum.SimpleEntity_ord:
case ModelsEntityDescriptorEnum.EnumEntity_ord:
case ModelsEntityDescriptorEnum.DataEntity_ord:
part = new DeclarationTextualEntityPart();
return;
case ModelsEntityDescriptorEnum.Model_ord:
part = new ModuleNameTextualEntityPart();
return;
}
}
part = new ContentTextualEntityPart();
}
use of org.whole.lang.ui.editparts.DeclarationTextualEntityPart in project whole by wholeplatform.
the class GrammarsPartFactoryVisitor method visit.
@Override
public void visit(NonTerminal entity) {
Object parentEntity = context.getModel();
if (parentEntity instanceof Production && entity == ((Production) parentEntity).getName())
part = new DeclarationTextualEntityPart();
else if (parentEntity instanceof Repeat && entity == ((Repeat) parentEntity).getSeparator())
part = new ContentTextualEntityPart();
else
part = new NonTerminalPart();
}
use of org.whole.lang.ui.editparts.DeclarationTextualEntityPart in project whole by wholeplatform.
the class FramesPartFactoryVisitor method visit.
@Override
public void visit(FeatureName entity) {
IEntity parent = entity.wGetParent();
if (EntityUtils.hasParent(entity)) {
if (Matcher.match(FramesEntityDescriptorEnum.Feature, parent) || Matcher.match(FramesEntityDescriptorEnum.FeatureRename, parent) || Matcher.match(FramesEntityDescriptorEnum.FeatureReference, parent) || Matcher.match(FramesEntityDescriptorEnum.Attribute, parent)) {
part = new DeclarationTextualEntityPart();
return;
}
}
part = new IdentifierTextualEntityPart();
}
Aggregations