Compare commits
24 Commits
release/6.
...
feature/TU
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec1cf37059 | ||
|
|
2867cdf3a7 | ||
|
|
d7f6eca742 | ||
|
|
79841e89f5 | ||
|
|
aae1cae67a | ||
|
|
36f243e53e | ||
|
|
d822a6a5e4 | ||
|
|
9ffcf8a739 | ||
|
|
169a74f05a | ||
|
|
0691fa7ee5 | ||
|
|
1b677c90f5 | ||
|
|
80c5a02a65 | ||
|
|
03982bcdd8 | ||
|
|
c4eedfcc0b | ||
|
|
ab8ae2fe35 | ||
|
|
ef872732cd | ||
|
|
0934b9f0b3 | ||
|
|
0a151b097d | ||
|
|
b568908fb9 | ||
|
|
af1d4010e6 | ||
|
|
2fb6af9057 | ||
|
|
186154fe57 | ||
|
|
9e578c4cb1 | ||
|
|
d72eb7d522 |
@@ -109,4 +109,18 @@
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jackson-core-asl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jackson-mapper-asl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -114,4 +114,38 @@
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jackson-core-asl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="jackson-mapper-asl"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.servicemix.bundles.avro"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
<plugin
|
||||
id="com.thoughtworks.paranamer"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.apache.commons.compress"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
</feature>
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.URI;
|
||||
import org.eclipse.emf.ecore.resource.Resource;
|
||||
@@ -171,6 +172,11 @@ public class RecycleBinManager {
|
||||
}
|
||||
}
|
||||
|
||||
public RecycleBin getRecycleBin(Project project) {
|
||||
loadRecycleBin(project);
|
||||
return projectRecyclebins.get(project.getTechnicalLabel());
|
||||
}
|
||||
|
||||
private void loadRecycleBin(Project project) {
|
||||
if (projectRecyclebins.get(project.getTechnicalLabel()) != null) {
|
||||
// already loaded, nothing to do. Don't do any force reload
|
||||
@@ -193,6 +199,16 @@ public class RecycleBinManager {
|
||||
}
|
||||
}
|
||||
|
||||
public RecycleBin loadRecycleBin(IPath recycleBinIndexPath) throws Exception {
|
||||
Resource resource = createRecycleBinResource(recycleBinIndexPath);
|
||||
resource.load(null);
|
||||
return loadRecycleBin(resource);
|
||||
}
|
||||
|
||||
public RecycleBin loadRecycleBin(Resource resource) {
|
||||
return (RecycleBin) EcoreUtil.getObjectByType(resource.getContents(), RecycleBinPackage.eINSTANCE.getRecycleBin());
|
||||
}
|
||||
|
||||
public void saveRecycleBin(Project project) {
|
||||
if (projectRecyclebins.get(project.getTechnicalLabel()) == null) {
|
||||
loadRecycleBin(project);
|
||||
@@ -226,7 +242,12 @@ public class RecycleBinManager {
|
||||
|
||||
private Resource createRecycleBinResource(Project project) {
|
||||
IProject eclipseProject = ProjectManager.getInstance().getResourceProject(project.getEmfProject());
|
||||
URI uri = URIHelper.convert(eclipseProject.getFullPath().append(TALEND_RECYCLE_BIN_INDEX));
|
||||
|
||||
return createRecycleBinResource(eclipseProject.getFullPath().append(TALEND_RECYCLE_BIN_INDEX));
|
||||
}
|
||||
|
||||
public Resource createRecycleBinResource(IPath recycleBinIndexPath) {
|
||||
URI uri = URIHelper.convert(recycleBinIndexPath);
|
||||
|
||||
XMLResourceFactoryImpl resourceFact = new XMLResourceFactoryImpl();
|
||||
XMLResource resource = (XMLResource) resourceFact.createResource(uri);
|
||||
@@ -241,5 +262,4 @@ public class RecycleBinManager {
|
||||
resource.getDefaultLoadOptions().put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
|
||||
return resource;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -105,14 +105,13 @@ Require-Bundle: org.eclipse.jdt.core,
|
||||
org.apache.log4j,
|
||||
org.talend.model,
|
||||
org.talend.utils;visibility:=reexport,
|
||||
org.talend.libraries.apache,
|
||||
org.talend.libraries.dom4j-jaxen,
|
||||
org.talend.libraries.csv,
|
||||
org.talend.commons.runtime;visibility:=reexport,
|
||||
org.talend.commons.ui,
|
||||
org.ops4j.pax.url.mvn,
|
||||
org.talend.components.api,
|
||||
org.talend.libraries.jackson
|
||||
org.apache.servicemix.bundles.avro
|
||||
Bundle-Activator: org.talend.core.runtime.CoreRuntimePlugin
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-ClassPath: .,
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
<talendType type="id_Date">
|
||||
<dbType type="timestamp" default="true" />
|
||||
<dbType type="date" />
|
||||
<dbType type="time" />
|
||||
</talendType>
|
||||
<talendType type="id_BigDecimal">
|
||||
<dbType type="decimal" default="true" />
|
||||
@@ -67,6 +66,7 @@
|
||||
<talendType type="id_Long">
|
||||
<dbType type="bigint" default="true" />
|
||||
<dbType type="counter" />
|
||||
<dbType type="time" />
|
||||
</talendType>
|
||||
<talendType type="id_Object">
|
||||
<dbType type="varint" default="true" />
|
||||
@@ -135,7 +135,7 @@
|
||||
<talendType type="id_String" default="true" />
|
||||
</dbType>
|
||||
<dbType type="time">
|
||||
<talendType type="id_Date" default="true" />
|
||||
<talendType type="id_Long" default="true" />
|
||||
</dbType>
|
||||
<dbType type="timestamp">
|
||||
<talendType type="id_Date" default="true" />
|
||||
|
||||
@@ -27,6 +27,7 @@ import org.apache.avro.SchemaBuilder.RecordBuilder;
|
||||
import org.talend.core.model.metadata.builder.connection.ConnectionFactory;
|
||||
import org.talend.core.model.metadata.builder.connection.MetadataTable;
|
||||
import org.talend.core.model.metadata.types.JavaTypesManager;
|
||||
import org.talend.core.utils.TalendQuoteUtils;
|
||||
import org.talend.cwm.helper.TaggedValueHelper;
|
||||
import org.talend.daikon.avro.SchemaConstants;
|
||||
import org.talend.daikon.avro.util.AvroUtils;
|
||||
@@ -217,7 +218,7 @@ public final class MetadataToolAvroHelper {
|
||||
builder.prop(Talend6SchemaConstants.TALEND6_COLUMN_TALEND_TYPE, in.getTalendType());
|
||||
}
|
||||
if (in.getPattern() != null) {
|
||||
builder.prop(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN, in.getPattern());
|
||||
builder.prop(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN, TalendQuoteUtils.addQuotesIfNotExist(in.getPattern()));
|
||||
}
|
||||
if (in.getLength() >= 0) {
|
||||
builder.prop(Talend6SchemaConstants.TALEND6_COLUMN_LENGTH, String.valueOf((int) in.getLength()));
|
||||
@@ -340,7 +341,7 @@ public final class MetadataToolAvroHelper {
|
||||
String prop = null;
|
||||
if (null != (prop = nonnullable.getProp(SchemaConstants.TALEND_COLUMN_PATTERN))) {
|
||||
col.setTalendType(JavaTypesManager.DATE.getId());
|
||||
col.setPattern(prop);
|
||||
col.setPattern(TalendQuoteUtils.addQuotesIfNotExist(prop));
|
||||
} else {
|
||||
col.setTalendType(JavaTypesManager.LONG.getId());
|
||||
}
|
||||
@@ -395,7 +396,7 @@ public final class MetadataToolAvroHelper {
|
||||
col.setTalendType(prop);
|
||||
}
|
||||
if (null != (prop = in.getProp(Talend6SchemaConstants.TALEND6_COLUMN_PATTERN))) {
|
||||
col.setPattern(prop);
|
||||
col.setPattern(TalendQuoteUtils.addQuotesIfNotExist(prop));
|
||||
}
|
||||
if (null != (prop = in.getProp(Talend6SchemaConstants.TALEND6_COLUMN_LENGTH))) {
|
||||
Long value = Long.parseLong(prop);
|
||||
|
||||
@@ -604,6 +604,7 @@ public final class MetadataToolHelper {
|
||||
target.getListColumns().addAll(columnsTAdd);
|
||||
target.sortCustomColumns();
|
||||
target.setLabel(source.getLabel());
|
||||
target.getAdditionalProperties().putAll(source.getAdditionalProperties());
|
||||
}
|
||||
|
||||
public static void copyTable(List<IMetadataColumn> sourceColumns, IMetadataTable target, List<IMetadataColumn> targetColumns) {
|
||||
|
||||
@@ -99,6 +99,7 @@ public enum EParameterFieldType {
|
||||
NAME_SELECTION_REFERENCE, // ycbai added for generic wizard
|
||||
COMPONENT_REFERENCE, // ycbai added for generic wizard
|
||||
HIDDEN_TEXT, // hcyi added for generic wizard/component properties
|
||||
SCHEMA_REFERENCE, // hcyi added for component properties
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -208,6 +208,9 @@ public class MavenUrlHelper {
|
||||
if (parseMvnUrl == null) {
|
||||
return null;
|
||||
}
|
||||
if (!MavenConstants.DEFAULT_LIB_GROUP_ID.equals(parseMvnUrl.getGroupId())) {
|
||||
return mavenUri; // snapshot url same as maven url
|
||||
}
|
||||
|
||||
return generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), parseMvnUrl.getVersion()
|
||||
+ MavenConstants.SNAPSHOT, parseMvnUrl.getType(), parseMvnUrl.getClassifier());
|
||||
@@ -219,6 +222,9 @@ public class MavenUrlHelper {
|
||||
if (parseMvnUrl == null) {
|
||||
return null;
|
||||
}
|
||||
if (!MavenConstants.DEFAULT_LIB_GROUP_ID.equals(parseMvnUrl.getGroupId())) {
|
||||
return snapshotMvnuri; // snapshot url same as maven url
|
||||
}
|
||||
String snapshotVerstion = parseMvnUrl.getVersion();
|
||||
String verstion = snapshotVerstion.substring(0, snapshotVerstion.indexOf(MavenConstants.SNAPSHOT));
|
||||
return generateMvnUrl(parseMvnUrl.getGroupId(), parseMvnUrl.getArtifactId(), verstion, parseMvnUrl.getType(),
|
||||
|
||||
@@ -161,6 +161,7 @@ public abstract class AbstractRoutineSynchronizer implements ITalendSynchronizer
|
||||
syncRoutine(routineItem, copyToTemp, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncRoutine(RoutineItem routineItem, boolean copyToTemp, boolean forceUpdate) throws SystemException {
|
||||
boolean needSync = false;
|
||||
if (routineItem != null) {
|
||||
|
||||
@@ -43,6 +43,8 @@ public interface ITalendSynchronizer {
|
||||
|
||||
void syncRoutine(RoutineItem routineItem, boolean copyToTemp) throws SystemException;
|
||||
|
||||
void syncRoutine(RoutineItem routineItem, boolean copyToTemp, boolean forceToUpdate) throws SystemException;
|
||||
|
||||
IFile getFile(Item item) throws SystemException;
|
||||
|
||||
IFile getRoutinesFile(Item routineItem) throws SystemException;
|
||||
|
||||
@@ -20,6 +20,7 @@ import org.apache.maven.model.Dependency;
|
||||
import org.apache.maven.model.Model;
|
||||
import org.eclipse.core.resources.IFile;
|
||||
import org.talend.core.model.general.ModuleNeeded;
|
||||
import org.talend.core.model.general.ModuleNeeded.ELibraryInstallStatus;
|
||||
import org.talend.core.runtime.projectsetting.IProjectSettingTemplateConstants;
|
||||
import org.talend.designer.maven.utils.PomUtil;
|
||||
|
||||
@@ -63,7 +64,10 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
|
||||
}
|
||||
|
||||
for (ModuleNeeded module : runningModules) {
|
||||
Dependency dependency = PomUtil.createModuleDependency(module.getModuleName());
|
||||
Dependency dependency = null;
|
||||
if (module.getMavenUriSnapshot() != null && !module.getMavenUriSnapshot().isEmpty() && module.getStatus() != ELibraryInstallStatus.NOT_INSTALLED) {
|
||||
dependency = PomUtil.createModuleDependency(module.getMavenUriSnapshot());
|
||||
}
|
||||
if (dependency != null) {
|
||||
existedDependencies.add(dependency);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry exported="true" kind="lib" path="lib/avro-1.8.0.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry exported="true" kind="lib" path="lib/ant.jar"/>
|
||||
|
||||
@@ -9,23 +9,13 @@ Bundle-ClassPath: .,
|
||||
lib/castor-1.0.3.jar,
|
||||
lib/jakarta-oro-2.0.8.jar,
|
||||
lib/xerces-2.6.2.jar,
|
||||
lib/xmlbeans-2.3.0.jar,
|
||||
lib/avro-1.8.0.jar
|
||||
lib/xmlbeans-2.3.0.jar
|
||||
Bundle-Vendor: .Talend SA.
|
||||
Require-Bundle: org.apache.log4j;resolution:=optional,
|
||||
org.talend.libraries.apache.common;visibility:=reexport,
|
||||
jackson-core-asl;bundle-version="1.9.13",
|
||||
jackson-mapper-asl;bundle-version="1.9.13"
|
||||
Export-Package:
|
||||
org.apache.avro;version="1.8.0",
|
||||
org.apache.avro.data;version="1.8.0",
|
||||
org.apache.avro.file;version="1.8.0",
|
||||
org.apache.avro.generic;version="1.8.0",
|
||||
org.apache.avro.io;version="1.8.0",
|
||||
org.apache.avro.io.parsing;version="1.8.0",
|
||||
org.apache.avro.reflect;version="1.8.0",
|
||||
org.apache.avro.specific;version="1.8.0",
|
||||
org.apache.avro.util;version="1.8.0",
|
||||
org.apache.james.mime4j,
|
||||
org.apache.james.mime4j.codec,
|
||||
org.apache.james.mime4j.descriptor,
|
||||
|
||||
@@ -2,8 +2,7 @@ output.. = bin/
|
||||
bin.includes = META-INF/,\
|
||||
.,\
|
||||
licences/,\
|
||||
lib/,\
|
||||
lib/avro-1.8.0.jar
|
||||
lib/
|
||||
bin.excludes = libs_not_used/commons-betwixt-0.8.jar,\
|
||||
libs_not_used/commons-digester-1.7.jar,\
|
||||
libs_not_used/commons-discovery-0.2.jar,\
|
||||
|
||||
@@ -38,34 +38,7 @@ Export-Package: com.fasterxml.jackson.databind;version="2.5.3",
|
||||
net.sf.json.regexp,
|
||||
net.sf.json.test,
|
||||
net.sf.json.util,
|
||||
net.sf.json.xml,
|
||||
org.codehaus.jackson,
|
||||
org.codehaus.jackson.annotate,
|
||||
org.codehaus.jackson.format,
|
||||
org.codehaus.jackson.impl,
|
||||
org.codehaus.jackson.io,
|
||||
org.codehaus.jackson.map,
|
||||
org.codehaus.jackson.map.annotate,
|
||||
org.codehaus.jackson.map.deser,
|
||||
org.codehaus.jackson.map.deser.impl,
|
||||
org.codehaus.jackson.map.deser.std,
|
||||
org.codehaus.jackson.map.exc,
|
||||
org.codehaus.jackson.map.ext,
|
||||
org.codehaus.jackson.map.impl,
|
||||
org.codehaus.jackson.map.introspect,
|
||||
org.codehaus.jackson.map.jsontype,
|
||||
org.codehaus.jackson.map.jsontype.impl,
|
||||
org.codehaus.jackson.map.module,
|
||||
org.codehaus.jackson.map.ser,
|
||||
org.codehaus.jackson.map.ser.impl,
|
||||
org.codehaus.jackson.map.ser.std,
|
||||
org.codehaus.jackson.map.type,
|
||||
org.codehaus.jackson.map.util,
|
||||
org.codehaus.jackson.node,
|
||||
org.codehaus.jackson.schema,
|
||||
org.codehaus.jackson.sym,
|
||||
org.codehaus.jackson.type,
|
||||
org.codehaus.jackson.util
|
||||
net.sf.json.xml
|
||||
Require-Bundle: org.apache.commons.lang,
|
||||
org.apache.commons.logging,
|
||||
org.apache.commons.collections,
|
||||
|
||||
@@ -638,6 +638,8 @@
|
||||
</eAnnotations>
|
||||
</eStructuralFeatures>
|
||||
<eStructuralFeatures xsi:type="ecore:EAttribute" name="type" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
|
||||
<eStructuralFeatures xsi:type="ecore:EReference" name="additionalProperties" upperBound="-1"
|
||||
eType="#//AdditionalFieldMap" containment="true"/>
|
||||
</eClassifiers>
|
||||
<eClassifiers xsi:type="ecore:EClass" name="NodeType">
|
||||
<eAnnotations source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData">
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TalendFile.ecore#//MetadataType/name"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TalendFile.ecore#//MetadataType/source"/>
|
||||
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute TalendFile.ecore#//MetadataType/type"/>
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TalendFile.ecore#//MetadataType/additionalProperties"/>
|
||||
</genClasses>
|
||||
<genClasses ecoreClass="TalendFile.ecore#//NodeType">
|
||||
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference TalendFile.ecore#//NodeType/elementParameter"/>
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
package org.talend.designer.core.model.utils.emf.talendfile;
|
||||
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.EMap;
|
||||
import org.eclipse.emf.ecore.EObject;
|
||||
|
||||
/**
|
||||
@@ -24,6 +25,7 @@ import org.eclipse.emf.ecore.EObject;
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getSource <em>Source</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getAdditionalProperties <em>Additional Properties</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@@ -210,4 +212,21 @@ public interface MetadataType extends EObject {
|
||||
*/
|
||||
void setType(String value);
|
||||
|
||||
/**
|
||||
* Returns the value of the '<em><b>Additional Properties</b></em>' map.
|
||||
* The key is of type {@link java.lang.String},
|
||||
* and the value is of type {@link java.lang.String},
|
||||
* <!-- begin-user-doc -->
|
||||
* <p>
|
||||
* If the meaning of the '<em>Additional Properties</em>' map isn't clear,
|
||||
* there really should be more of a description here...
|
||||
* </p>
|
||||
* <!-- end-user-doc -->
|
||||
* @return the value of the '<em>Additional Properties</em>' map.
|
||||
* @see org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage#getMetadataType_AdditionalProperties()
|
||||
* @model mapType="org.talend.designer.core.model.utils.emf.talendfile.AdditionalFieldMap" keyType="java.lang.String" valueType="java.lang.String"
|
||||
* @generated
|
||||
*/
|
||||
EMap getAdditionalProperties();
|
||||
|
||||
} // MetadataType
|
||||
@@ -1000,6 +1000,15 @@ public interface TalendFilePackage extends EPackage {
|
||||
*/
|
||||
int METADATA_TYPE__TYPE = 6;
|
||||
|
||||
/**
|
||||
* The feature id for the '<em><b>Additional Properties</b></em>' map.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int METADATA_TYPE__ADDITIONAL_PROPERTIES = 7;
|
||||
|
||||
/**
|
||||
* The number of structural features of the '<em>Metadata Type</em>' class.
|
||||
* <!-- begin-user-doc -->
|
||||
@@ -1007,7 +1016,7 @@ public interface TalendFilePackage extends EPackage {
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
int METADATA_TYPE_FEATURE_COUNT = 7;
|
||||
int METADATA_TYPE_FEATURE_COUNT = 8;
|
||||
|
||||
/**
|
||||
* The meta object id for the '{@link org.talend.designer.core.model.utils.emf.talendfile.impl.NodeTypeImpl <em>Node Type</em>}' class.
|
||||
@@ -2743,6 +2752,17 @@ public interface TalendFilePackage extends EPackage {
|
||||
*/
|
||||
EAttribute getMetadataType_Type();
|
||||
|
||||
/**
|
||||
* Returns the meta object for the map '{@link org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getAdditionalProperties <em>Additional Properties</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @return the meta object for the map '<em>Additional Properties</em>'.
|
||||
* @see org.talend.designer.core.model.utils.emf.talendfile.MetadataType#getAdditionalProperties()
|
||||
* @see #getMetadataType()
|
||||
* @generated
|
||||
*/
|
||||
EReference getMetadataType_AdditionalProperties();
|
||||
|
||||
/**
|
||||
* Returns the meta object for class '{@link org.talend.designer.core.model.utils.emf.talendfile.NodeType <em>Node Type</em>}'.
|
||||
* <!-- begin-user-doc -->
|
||||
@@ -4270,6 +4290,14 @@ public interface TalendFilePackage extends EPackage {
|
||||
*/
|
||||
EAttribute METADATA_TYPE__TYPE = eINSTANCE.getMetadataType_Type();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '<em><b>Additional Properties</b></em>' map feature.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
EReference METADATA_TYPE__ADDITIONAL_PROPERTIES = eINSTANCE.getMetadataType_AdditionalProperties();
|
||||
|
||||
/**
|
||||
* The meta object literal for the '{@link org.talend.designer.core.model.utils.emf.talendfile.impl.NodeTypeImpl <em>Node Type</em>}' class.
|
||||
* <!-- begin-user-doc -->
|
||||
|
||||
@@ -10,11 +10,14 @@ import java.util.Collection;
|
||||
import org.eclipse.emf.common.notify.Notification;
|
||||
import org.eclipse.emf.common.notify.NotificationChain;
|
||||
import org.eclipse.emf.common.util.EList;
|
||||
import org.eclipse.emf.common.util.EMap;
|
||||
import org.eclipse.emf.ecore.EClass;
|
||||
import org.eclipse.emf.ecore.EStructuralFeature;
|
||||
import org.eclipse.emf.ecore.InternalEObject;
|
||||
import org.eclipse.emf.ecore.impl.ENotificationImpl;
|
||||
import org.eclipse.emf.ecore.impl.EObjectImpl;
|
||||
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
|
||||
import org.eclipse.emf.ecore.util.EcoreEMap;
|
||||
import org.eclipse.emf.ecore.util.InternalEList;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.ColumnType;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.MetadataType;
|
||||
@@ -32,6 +35,7 @@ import org.talend.designer.core.model.utils.emf.talendfile.TalendFilePackage;
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.MetadataTypeImpl#getName <em>Name</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.MetadataTypeImpl#getSource <em>Source</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.MetadataTypeImpl#getType <em>Type</em>}</li>
|
||||
* <li>{@link org.talend.designer.core.model.utils.emf.talendfile.impl.MetadataTypeImpl#getAdditionalProperties <em>Additional Properties</em>}</li>
|
||||
* </ul>
|
||||
* </p>
|
||||
*
|
||||
@@ -169,6 +173,16 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
*/
|
||||
protected String type = TYPE_EDEFAULT;
|
||||
|
||||
/**
|
||||
* The cached value of the '{@link #getAdditionalProperties() <em>Additional Properties</em>}' map.
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @see #getAdditionalProperties()
|
||||
* @generated
|
||||
* @ordered
|
||||
*/
|
||||
protected EMap additionalProperties;
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc --> <!-- end-user-doc -->
|
||||
* @generated
|
||||
@@ -312,6 +326,18 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
eNotify(new ENotificationImpl(this, Notification.SET, TalendFilePackage.METADATA_TYPE__TYPE, oldType, type));
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EMap getAdditionalProperties() {
|
||||
if (additionalProperties == null) {
|
||||
additionalProperties = new EcoreEMap(TalendFilePackage.Literals.ADDITIONAL_FIELD_MAP, AdditionalFieldMapImpl.class, this, TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES);
|
||||
}
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc --> <!-- end-user-doc -->
|
||||
* @generated
|
||||
@@ -320,6 +346,8 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
switch (featureID) {
|
||||
case TalendFilePackage.METADATA_TYPE__COLUMN:
|
||||
return ((InternalEList)getColumn()).basicRemove(otherEnd, msgs);
|
||||
case TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES:
|
||||
return ((InternalEList)getAdditionalProperties()).basicRemove(otherEnd, msgs);
|
||||
}
|
||||
return super.eInverseRemove(otherEnd, featureID, msgs);
|
||||
}
|
||||
@@ -344,6 +372,9 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
return getSource();
|
||||
case TalendFilePackage.METADATA_TYPE__TYPE:
|
||||
return getType();
|
||||
case TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES:
|
||||
if (coreType) return getAdditionalProperties();
|
||||
else return getAdditionalProperties().map();
|
||||
}
|
||||
return super.eGet(featureID, resolve, coreType);
|
||||
}
|
||||
@@ -376,6 +407,9 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
case TalendFilePackage.METADATA_TYPE__TYPE:
|
||||
setType((String)newValue);
|
||||
return;
|
||||
case TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES:
|
||||
((EStructuralFeature.Setting)getAdditionalProperties()).set(newValue);
|
||||
return;
|
||||
}
|
||||
super.eSet(featureID, newValue);
|
||||
}
|
||||
@@ -407,6 +441,9 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
case TalendFilePackage.METADATA_TYPE__TYPE:
|
||||
setType(TYPE_EDEFAULT);
|
||||
return;
|
||||
case TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES:
|
||||
getAdditionalProperties().clear();
|
||||
return;
|
||||
}
|
||||
super.eUnset(featureID);
|
||||
}
|
||||
@@ -431,6 +468,8 @@ public class MetadataTypeImpl extends EObjectImpl implements MetadataType {
|
||||
return SOURCE_EDEFAULT == null ? source != null : !SOURCE_EDEFAULT.equals(source);
|
||||
case TalendFilePackage.METADATA_TYPE__TYPE:
|
||||
return TYPE_EDEFAULT == null ? type != null : !TYPE_EDEFAULT.equals(type);
|
||||
case TalendFilePackage.METADATA_TYPE__ADDITIONAL_PROPERTIES:
|
||||
return additionalProperties != null && !additionalProperties.isEmpty();
|
||||
}
|
||||
return super.eIsSet(featureID);
|
||||
}
|
||||
|
||||
@@ -993,6 +993,15 @@ public class TalendFilePackageImpl extends EPackageImpl implements TalendFilePac
|
||||
return (EAttribute)metadataTypeEClass.getEStructuralFeatures().get(6);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc -->
|
||||
* <!-- end-user-doc -->
|
||||
* @generated
|
||||
*/
|
||||
public EReference getMetadataType_AdditionalProperties() {
|
||||
return (EReference)metadataTypeEClass.getEStructuralFeatures().get(7);
|
||||
}
|
||||
|
||||
/**
|
||||
* <!-- begin-user-doc --> <!-- end-user-doc -->
|
||||
* @generated
|
||||
@@ -1686,6 +1695,7 @@ public class TalendFilePackageImpl extends EPackageImpl implements TalendFilePac
|
||||
createEAttribute(metadataTypeEClass, METADATA_TYPE__NAME);
|
||||
createEAttribute(metadataTypeEClass, METADATA_TYPE__SOURCE);
|
||||
createEAttribute(metadataTypeEClass, METADATA_TYPE__TYPE);
|
||||
createEReference(metadataTypeEClass, METADATA_TYPE__ADDITIONAL_PROPERTIES);
|
||||
|
||||
nodeTypeEClass = createEClass(NODE_TYPE);
|
||||
createEReference(nodeTypeEClass, NODE_TYPE__ELEMENT_PARAMETER);
|
||||
@@ -1899,6 +1909,7 @@ public class TalendFilePackageImpl extends EPackageImpl implements TalendFilePac
|
||||
initEAttribute(getMetadataType_Name(), theXMLTypePackage.getString(), "name", null, 0, 1, MetadataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getMetadataType_Source(), theXMLTypePackage.getString(), "source", null, 0, 1, MetadataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEAttribute(getMetadataType_Type(), ecorePackage.getEString(), "type", null, 0, 1, MetadataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
initEReference(getMetadataType_AdditionalProperties(), this.getAdditionalFieldMap(), null, "additionalProperties", null, 0, -1, MetadataType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
initEClass(nodeTypeEClass, NodeType.class, "NodeType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
|
||||
initEReference(getNodeType_ElementParameter(), this.getElementParameterType(), null, "elementParameter", null, 1, -1, NodeType.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
|
||||
|
||||
@@ -40,6 +40,7 @@ import org.eclipse.swt.graphics.Point;
|
||||
import org.eclipse.swt.widgets.Combo;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Event;
|
||||
import org.eclipse.swt.widgets.Listener;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Tree;
|
||||
import org.eclipse.swt.widgets.TreeItem;
|
||||
@@ -334,6 +335,17 @@ public class RepoViewCommonNavigator extends CommonNavigator implements IReposit
|
||||
super.createPartControl(parent);
|
||||
|
||||
viewer = getCommonViewer();
|
||||
|
||||
if (service != null && service.isGIT())
|
||||
viewer.getTree().addListener(SWT.Resize, new Listener() {
|
||||
|
||||
@Override
|
||||
public void handleEvent(Event event) {
|
||||
Point point = parent.getSize();
|
||||
viewer.getTree().setSize(point.x - 7, point.y - 40);
|
||||
}
|
||||
});
|
||||
|
||||
if (viewer instanceof ITreeViewerListener) {
|
||||
viewer.addTreeListener((ITreeViewerListener) viewer);
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>org.talend.daikon</groupId>
|
||||
<artifactId>daikon</artifactId>
|
||||
<version>0.2.0.BUILD-SNAPSHOT</version>
|
||||
<version>0.2.0.RELEASE</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
|
||||
@@ -43,6 +43,8 @@ import org.talend.core.prefs.ITalendCorePrefConstants;
|
||||
import org.talend.core.runtime.CoreRuntimePlugin;
|
||||
import org.talend.cwm.helper.ConnectionHelper;
|
||||
import org.talend.cwm.helper.PackageHelper;
|
||||
import org.talend.cwm.helper.SAPBWTableHelper;
|
||||
import org.talend.designer.core.model.utils.emf.talendfile.TalendFileFactory;
|
||||
import org.talend.repository.model.IProxyRepositoryFactory;
|
||||
import orgomg.cwm.resource.record.RecordFactory;
|
||||
import orgomg.cwm.resource.record.RecordFile;
|
||||
@@ -539,4 +541,19 @@ public class MetadataToolHelperTest {
|
||||
unit = MetadataToolHelper.getSAPFunctionFromRepository(id);
|
||||
assertNull(unit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test method for
|
||||
* {@link org.talend.core.model.metadata.MetadataToolHelper#copyTable(org.talend.core.model.metadata.IMetadataTable source, org.talend.core.model.metadata.IMetadataTable target)}
|
||||
*
|
||||
*/
|
||||
@Test
|
||||
public void testCopyMetadataTable() {
|
||||
IMetadataTable source = new org.talend.core.model.metadata.MetadataTable();
|
||||
IMetadataTable target = new org.talend.core.model.metadata.MetadataTable();
|
||||
source.getAdditionalProperties().put(SAPBWTableHelper.SAP_INFOOBJECT_INNER_TYPE, SAPBWTableHelper.IO_INNERTYPE_HIERARCHY);
|
||||
MetadataToolHelper.copyTable(source, target);
|
||||
String innerType = target.getAdditionalProperties().get(SAPBWTableHelper.SAP_INFOOBJECT_INNER_TYPE);
|
||||
assertEquals(SAPBWTableHelper.IO_INNERTYPE_HIERARCHY, innerType);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user