use of org.whole.lang.java.model.ImportModifier in project whole by wholeplatform.
the class ImportDeclarationPart method refreshVisuals.
protected void refreshVisuals() {
ImportDeclaration entity = getModelEntity();
ImportModifier m1 = entity.getStatic();
if (DataTypeUtils.getDataKind(m1).isBoolean())
getImportDeclarationFigure().setStaticModifier(m1.wBooleanValue());
else
getImportDeclarationFigure().setStaticModifier(false);
ImportModifier m2 = entity.getOnDemand();
if (DataTypeUtils.getDataKind(m2).isBoolean())
getImportDeclarationFigure().setOnDemandModifier(m2.wBooleanValue());
else
getImportDeclarationFigure().setOnDemandModifier(false);
}
use of org.whole.lang.java.model.ImportModifier in project whole by wholeplatform.
the class IteratorFactoryTest method testFragmentRootIterator.
@Test
public void testFragmentRootIterator() throws Exception {
IEntity e = XmlBuilderPersistenceKit.instance().readModel(new ClasspathPersistenceProvider("org/whole/lang/templates/codebase/TemplateManagerArtifactsTemplates.xwl"));
CompilationUnit cu = Matcher.find(JavaEntityDescriptorEnum.CompilationUnit, e, false);
ImportModifier im = Matcher.find(JavaEntityDescriptorEnum.ImportModifier, e, false);
IEntityIterator<IEntity> i1 = IteratorFactory.rootIterator();
i1.reset(im);
assertTrue(i1.hasNext());
assertSame(e, i1.next());
IEntityIterator<IEntity> i2 = IteratorFactory.fragmentRootIterator();
i2.reset(im);
assertTrue(i2.hasNext());
assertSame(cu, i2.next());
}
Aggregations