use of org.talend.core.model.components.IComponentsFactory in project tdi-studio-se by Talend.
the class ExchangeUtils method reloadComponents.
/**
* Reload all components from folder and update palette.
*/
public static void reloadComponents() {
// reload from folder, see ComponentsFactory and UserComponentsProvider
IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();
componentsFactory.resetCache();
// update the palette view, the position of the new component is
// determined by the FAMILY value in the
// component's property file
ComponentPaletteUtilities.updatePalette();
}
use of org.talend.core.model.components.IComponentsFactory in project tdi-studio-se by Talend.
the class DesignerCoreService method getRefrenceNode.
@Override
public INode getRefrenceNode(String componentName, String paletteType) {
if (componentName == null) {
return null;
}
IComponentsFactory compFac = CorePlugin.getDefault().getRepositoryService().getComponentsFactory();
IComponent component = compFac.get(componentName, paletteType);
if (component == null) {
return null;
}
return new DataNode(component, componentName);
}
use of org.talend.core.model.components.IComponentsFactory in project tdi-studio-se by Talend.
the class AbstractTalendEditor method init.
protected void init() {
IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();
this.componenentsHandler = initComponentsHandler();
componentsFactory.setComponentsHandler(componenentsHandler);
}
use of org.talend.core.model.components.IComponentsFactory in project tdi-studio-se by Talend.
the class TalendEditorPaletteFactoryTest method testGetRelatedComponents_partOfComponentName.
@Test
public void testGetRelatedComponents_partOfComponentName() {
storeRecentlyUsed();
IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();
String keyword = "row";
List<IComponent> componentHits = TalendEditorPaletteFactory.getRelatedComponents(componentsFactory, keyword);
Assert.assertFalse("Can't find any components", componentHits.isEmpty());
assertExistedComponent(TJAVAROW, keyword, componentHits);
assertExistedComponent(TMYSQLROW, keyword, componentHits);
keyword = "Row";
componentHits = TalendEditorPaletteFactory.getRelatedComponents(componentsFactory, keyword);
Assert.assertFalse("Can't find any components", componentHits.isEmpty());
assertExistedComponent(TJAVAROW, keyword, componentHits);
assertExistedComponent(TMYSQLROW, keyword, componentHits);
}
use of org.talend.core.model.components.IComponentsFactory in project tdi-studio-se by Talend.
the class TalendEditorPaletteFactoryTest method testGetRelatedComponents_help.
@Test
public void testGetRelatedComponents_help() {
storeRecentlyUsed();
IComponentsFactory componentsFactory = ComponentsFactoryProvider.getInstance();
String keyword = "enter code";
List<IComponent> componentHits = TalendEditorPaletteFactory.getRelatedComponents(componentsFactory, keyword);
Assert.assertFalse("Can't find any components", componentHits.isEmpty());
assertExistedComponent(TJAVA, keyword, componentHits);
keyword = "enter";
componentHits = TalendEditorPaletteFactory.getRelatedComponents(componentsFactory, keyword);
Assert.assertFalse("Can't find any components", componentHits.isEmpty());
assertExistedComponent(TJAVA, keyword, componentHits);
assertExistedComponent(TJAVAROW, keyword, componentHits);
}
Aggregations