use of com.twinsoft.convertigo.beans.connectors.HtmlConnector in project convertigo by convertigo.
the class CreateHandlerDialogComposite method createTreeScreenClasses.
/**
* This method initializes jComboBoxScreenClasses
*/
private void createTreeScreenClasses() {
tree = new Tree(this, SWT.MULTI | SWT.BORDER);
tree.setHeaderVisible(false);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
gridData.verticalSpan = 20;
tree.setLayoutData(gridData);
if (isScreenClassAware) {
Connector connector = (Connector) transaction.getParent();
if (connector instanceof HtmlConnector) {
HtmlConnector htmlConnector = (HtmlConnector) connector;
ScreenClass defaultScreenClass = htmlConnector.getDefaultScreenClass();
TreeItem branch = new TreeItem(tree, SWT.NONE);
branch.setText(defaultScreenClass.getName());
List<ScreenClass> screenClasses = defaultScreenClass.getInheritedScreenClasses();
for (ScreenClass screenClass : screenClasses) {
getInHeritedScreenClass(screenClass, branch);
}
} else if (connector instanceof JavelinConnector) {
JavelinConnector javelinConnector = (JavelinConnector) connector;
ScreenClass defaultScreenClass = javelinConnector.getDefaultScreenClass();
TreeItem branch = new TreeItem(tree, SWT.NONE);
branch.setText(defaultScreenClass.getName());
List<ScreenClass> screenClasses = defaultScreenClass.getInheritedScreenClasses();
for (ScreenClass screenClass : screenClasses) {
getInHeritedScreenClass(screenClass, branch);
}
}
}
}
use of com.twinsoft.convertigo.beans.connectors.HtmlConnector in project convertigo by convertigo.
the class HtmlConnectorDesignComposite method selectionChanged.
public void selectionChanged(SelectionChangedEvent event) {
if (event.getSource() instanceof ISelectionProvider) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
TreeObject treeObject = (TreeObject) selection.getFirstElement();
if (treeObject != null) {
ConnectorTreeObject connectorTreeObject = treeObject.getConnectorTreeObject();
if (connectorTreeObject != null) {
Connector connector = (Connector) connectorTreeObject.getObject();
if (connector.equals(htmlConnector)) {
if (treeObject instanceof TransactionTreeObject) {
if (!htmlConnector.isLearning())
toolLearn.setEnabled(true);
} else {
if (!htmlConnector.isLearning())
toolLearn.setEnabled(false);
}
} else {
if (!htmlConnector.isLearning())
toolLearn.setEnabled(false);
}
}
}
}
}
use of com.twinsoft.convertigo.beans.connectors.HtmlConnector in project convertigo by convertigo.
the class ConnectorEditorPart method getStudioContext.
private Context getStudioContext(boolean bForce) {
String projectName = connector.getParent().getName();
String connectorName = connector.getName();
String contextType = ContextManager.CONTEXT_TYPE_TRANSACTION;
String contextID = Engine.theApp.contextManager.computeStudioContextName(contextType, projectName, connectorName);
Context ctx = Engine.theApp.contextManager.get(contextID);
if ((ctx == null) || bForce) {
ctx = new Context(contextID);
if (connector instanceof HtmlConnector) {
ctx.cleanXpathApi();
ctx.htmlParser = ((HtmlConnector) connector).getHtmlParser();
}
ctx.contextID = contextID;
ctx.name = contextID;
ctx.projectName = projectName;
ctx.setConnector(connector);
ctx.lastAccessTime = System.currentTimeMillis();
Engine.theApp.contextManager.add(ctx);
}
return ctx;
}
use of com.twinsoft.convertigo.beans.connectors.HtmlConnector in project convertigo by convertigo.
the class ConnectorEditorPart method createTabFolderOutputDesign.
/**
* This method initializes tabFolder
*/
private void createTabFolderOutputDesign() {
GridData gridData2 = new org.eclipse.swt.layout.GridData();
gridData2.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
gridData2.grabExcessVerticalSpace = true;
gridData2.grabExcessHorizontalSpace = true;
gridData2.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
tabFolderOutputDesign = new TabFolder(this, SWT.BOTTOM);
tabFolderOutputDesign.setLayoutData(gridData2);
createCompositeDesign();
createCompositeOutput();
tabItemOutput = new TabItem(tabFolderOutputDesign, SWT.NONE);
tabItemOutput.setText("Output");
tabItemOutput.setControl(compositeOutput);
tabItemDesign = new TabItem(tabFolderOutputDesign, SWT.NONE);
tabItemDesign.setText("Design");
tabItemDesign.setControl(compositeDesign);
if (connector instanceof HtmlConnector)
selectTabDesign();
}
use of com.twinsoft.convertigo.beans.connectors.HtmlConnector in project convertigo by convertigo.
the class HttpTriggerScreenClassEditorComposite method getScreenClassList.
private java.util.List<HtmlScreenClass> getScreenClassList() {
java.util.List<HtmlScreenClass> screenClasses = null;
TreeObject treeConnector = parent.cellEditor.databaseObjectTreeObject.getParentDatabaseObjectTreeObject().getConnectorTreeObject();
HtmlConnector connector = (HtmlConnector) treeConnector.getObject();
screenClasses = connector.getAllScreenClasses();
return screenClasses;
}
Aggregations