JBoss Tools SVN: r18493 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-11-09 05:29:59 -0500 (Mon, 09 Nov 2009)
New Revision: 18493
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5165
This editor is always now text+button, we ceased to emulate Eclipse class chooser as field editor.
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java 2009-11-09 10:26:43 UTC (rev 18492)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/attribute/editor/JavaEclipseChoicerEditor.java 2009-11-09 10:29:59 UTC (rev 18493)
@@ -54,7 +54,7 @@
}
public boolean isGreedyEditor() {
- return true;
+ return false;
}
protected CellEditor createCellEditor(Composite parent) {
15 years, 1 month
JBoss Tools SVN: r18492 - trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2009-11-09 05:26:43 -0500 (Mon, 09 Nov 2009)
New Revision: 18492
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/Factory.java
Log:
JBIDE-5039:Odd validation issue when importing Riftsaw samples into Eclip
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/Factory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/Factory.java 2009-11-09 08:38:00 UTC (rev 18491)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/xpath/Factory.java 2009-11-09 10:26:43 UTC (rev 18492)
@@ -48,7 +48,8 @@
String nsURI = qname.getNamespaceURI();
if (IConstants.XMLNS_XPATH_EXPRESSION_LANGUAGE.equals ( nsURI ) ||
- IConstants.XMLNS_XPATH_EXPRESSION_LANGUAGE_2.equals (nsURI ) )
+ IConstants.XMLNS_XPATH_EXPRESSION_LANGUAGE_2.equals (nsURI ) ||
+ IConstants.XMLNS_XPATH_EXPRESSION_LANGUAGE_XPATH2.equals (nsURI ))
{
Validator val = createValidator(qname.getLocalPart()) ;
if (val == null) {
15 years, 1 month
JBoss Tools SVN: r18491 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: configuration/editors/uitls and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-09 03:38:00 -0500 (Mon, 09 Nov 2009)
New Revision: 18491
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/edimap/editor/EDIMapFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/CreateConnectionCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/TriggerConnectionEditPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/ValueBindingConnectionEditPart.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/JavaBeanGraphModel.java
Log:
JBIDE-5157
Change the metadata of smooks-resource-config element
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksConfigurationOverviewPage.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -64,7 +64,6 @@
import org.jboss.tools.smooks.configuration.SmooksConstants;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener;
-import org.jboss.tools.smooks.editor.AbstractSmooksFormEditor;
import org.jboss.tools.smooks.editor.ISmooksModelProvider;
import org.jboss.tools.smooks.editor.ISourceSynchronizeListener;
import org.jboss.tools.smooks.model.common.AbstractAnyType;
@@ -1396,12 +1395,16 @@
public void sourceChange(Object model) {
lockEventFire = true;
+ SmooksGraphicsExtType extType = smooksModelProvider.getSmooksGraphicsExt();
+ if (extType == null) {
+ return;
+ }
- String name = smooksModelProvider.getSmooksGraphicsExt().getName();
+ String name = extType.getName();
if (name != null)
smooksNameText.setText(name);
- String author = smooksModelProvider.getSmooksGraphicsExt().getAuthor();
+ String author = extType.getAuthor();
if (author != null)
smooksAuthorText.setText(author);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksMultiFormEditor.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -88,16 +88,16 @@
// addSmooksGraphicalEditor();
- // configurationPage = createSmooksConfigurationFormPage();
- // addValidateListener(configurationPage);
- // addSourceSynchronizeListener(configurationPage);
- // addSmooksGraphExtetionListener(configurationPage);
- // try {
- // int index = this.addPage(configurationPage);
- // setPageText(index, "Message Filter");
- // } catch (PartInitException e) {
- // e.printStackTrace();
- // }
+// configurationPage = createSmooksConfigurationFormPage();
+// addValidateListener(configurationPage);
+// addSourceSynchronizeListener(configurationPage);
+// addSmooksGraphExtetionListener(configurationPage);
+// try {
+// int index = this.addPage(configurationPage);
+// setPageText(index, "Message Filter");
+// } catch (PartInitException e) {
+// e.printStackTrace();
+// }
super.addPages();
}
@@ -232,4 +232,13 @@
public String getContributorId() {
return getSite().getId();
}
+
+ @Override
+ public void dispose() {
+ try {
+ super.dispose();
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksReaderFormPage.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -314,7 +314,10 @@
private void initReaderConfigSection() {
Object reader = getCurrentReaderModel();
- String type = getSmooksGraphicsExtType().getInputType();
+ SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
+ if (extType == null)
+ return;
+ String type = extType.getInputType();
if (reader instanceof EObject && type != null) {
SmooksResourceListType list = getSmooksConfigResourceList();
createReaderPanel((EObject) list.getAbstractReader().get(0));
@@ -626,25 +629,28 @@
Collection<?> collections = provider.getNewChildDescriptors(resourceList, editDomain, null);
SmooksGraphicsExtType extType = getSmooksGraphicsExtType();
- String version = extType.getPlatformVersion();
- OnlyReaderViewerFilter filter = new OnlyReaderViewerFilter();
- for (Iterator<?> iterator = collections.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- if (object instanceof CommandParameter) {
- Object value = ((CommandParameter) object).getValue();
- value = AdapterFactoryEditingDomain.unwrap(value);
+ if (extType != null) {
+ String version = extType.getPlatformVersion();
+ OnlyReaderViewerFilter filter = new OnlyReaderViewerFilter();
+ for (Iterator<?> iterator = collections.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (object instanceof CommandParameter) {
+ Object value = ((CommandParameter) object).getValue();
- if (filter.select(null, null, value)) {
- if (SmooksUIUtils.isUnSupportElement(version, (EObject) value)) {
- continue;
+ value = AdapterFactoryEditingDomain.unwrap(value);
+
+ if (filter.select(null, null, value)) {
+ if (SmooksUIUtils.isUnSupportElement(version, (EObject) value)) {
+ continue;
+ }
+
+ IItemLabelProvider lp = (IItemLabelProvider) editDomain.getAdapterFactory().adapt(value,
+ IItemLabelProvider.class);
+ String text = lp.getText(value);
+ readerCombo.add(text);
+ readerTypeList.add(value);
}
-
- IItemLabelProvider lp = (IItemLabelProvider) editDomain.getAdapterFactory().adapt(value,
- IItemLabelProvider.class);
- String text = lp.getText(value);
- readerCombo.add(text);
- readerTypeList.add(value);
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -168,6 +168,7 @@
import org.jboss.tools.smooks.model.graphics.ext.ParamType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphExtensionDocumentRoot;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
+import org.jboss.tools.smooks.model.graphics.ext.TaskType;
import org.jboss.tools.smooks.model.graphics.ext.util.GraphResourceFactoryImpl;
import org.jboss.tools.smooks.model.groovy.GroovyPackage;
import org.jboss.tools.smooks.model.javabean.BindingsType;
@@ -186,6 +187,7 @@
import org.jboss.tools.smooks.model.json12.Json12Package;
import org.jboss.tools.smooks.model.json12.Json12Reader;
import org.jboss.tools.smooks.model.persistence12.Persistence12Package;
+import org.jboss.tools.smooks.model.rules10.RuleBasesType;
import org.jboss.tools.smooks.model.rules10.Rules10Package;
import org.jboss.tools.smooks.model.smooks.AbstractReader;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
@@ -1279,6 +1281,10 @@
if (model == null)
return null;
final Resource resource = ((EObject) model).eResource();
+ return getResource(resource);
+ }
+
+ public static IResource getResource(Resource resource) {
if (resource == null)
return null;
URI uri = resource.getURI();
@@ -2430,6 +2436,15 @@
return types;
}
+ public static void fillAllTask(TaskType task, List<TaskType> taskList) {
+ taskList.add(task);
+ List<TaskType> children = task.getTask();
+ for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
+ TaskType taskType = (TaskType) iterator.next();
+ fillAllTask(taskType, taskList);
+ }
+ }
+
public static boolean isActivedInput(InputType input) {
List<ParamType> params = input.getParam();
for (Iterator<?> iterator2 = params.iterator(); iterator2.hasNext();) {
@@ -2916,7 +2931,8 @@
}
public static boolean isSmooksFile(IFile file) {
- if(file.getName().indexOf(".xml") != -1) return true;
+ if (file.getName().indexOf(".xml") != -1)
+ return true;
IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
IContentType[] types = contentTypeManager.findContentTypesFor(file.getName());
for (IContentType contentType : types) {
@@ -2933,4 +2949,23 @@
}
return false;
}
+
+ public static EStructuralFeature getFeature(Object model) {
+ if (model instanceof BindingsType) {
+ return JavabeanPackage.Literals.DOCUMENT_ROOT__BINDINGS;
+ }
+ if (model instanceof BeanType) {
+ return Javabean12Package.Literals.JAVABEAN12_DOCUMENT_ROOT__BEAN;
+ }
+ if (model instanceof Xsl) {
+ return XslPackage.Literals.DOCUMENT_ROOT__XSL;
+ }
+ if(model instanceof Freemarker){
+ return FreemarkerPackage.Literals.DOCUMENT_ROOT__FREEMARKER;
+ }
+ if(model instanceof RuleBasesType){
+ return Rules10Package.Literals.RULES10_DOCUMENT_ROOT__RULE_BASES;
+ }
+ return null;
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors_10/Smooks10MultiFormEditor.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -118,8 +118,8 @@
}
@Override
- protected void generateSmooksGraphExt() {
- super.generateSmooksGraphExt();
+ protected void generateSmooksGraphExtWithSave() {
+ super.generateSmooksGraphExtWithSave();
}
private Smooks10ConfigurationOverviewPage createSmooksConfigurationOverviewPage() {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/edimap/editor/EDIMapFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/edimap/editor/EDIMapFormEditor.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/edimap/editor/EDIMapFormEditor.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -149,8 +149,8 @@
}
@Override
- protected void generateSmooksGraphExt() {
- super.generateSmooksGraphExt();
+ protected void generateSmooksGraphExtWithSave() {
+ super.generateSmooksGraphExtWithSave();
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/editor/AbstractSmooksFormEditor.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -3,6 +3,7 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.io.InputStream;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Collection;
@@ -15,7 +16,13 @@
import java.util.Timer;
import java.util.TimerTask;
+import org.dom4j.Document;
+import org.dom4j.io.OutputFormat;
+import org.dom4j.io.SAXReader;
+import org.dom4j.io.XMLWriter;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.command.BasicCommandStack;
@@ -59,6 +66,7 @@
import org.jboss.tools.smooks.configuration.validate.ISmooksModelValidateListener;
import org.jboss.tools.smooks.configuration.validate.SmooksMarkerHelper;
import org.jboss.tools.smooks.configuration.validate.SmooksModelValidator;
+import org.jboss.tools.smooks.graphical.editors.ProcessAnalyzer;
import org.jboss.tools.smooks.model.calc.provider.CalcItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.common.provider.CommonItemProviderAdapterFactory;
import org.jboss.tools.smooks.model.csv.provider.CsvItemProviderAdapterFactory;
@@ -170,6 +178,46 @@
return textEditor;
}
+ protected ByteArrayOutputStream getFormattedXMLContentsStream(InputStream outstream) throws IOException {
+ XMLWriter writer = null;
+ try {
+ SAXReader parser = new SAXReader();
+ Document doc = parser.read(outstream);
+ ByteArrayOutputStream stream = new ByteArrayOutputStream();
+ OutputFormat format = OutputFormat.createPrettyPrint();
+ writer = new XMLWriter(stream, format);
+ writer.write(doc);
+ return stream;
+ } catch (Throwable t) {
+
+ } finally {
+ if (writer != null) {
+ writer.close();
+ }
+ }
+ return null;
+ }
+
+ protected String getFormattedXMLContents(String contents) throws IOException {
+ InputStream istream = null;
+ ByteArrayOutputStream stream = null;
+ try {
+ istream = new ByteArrayInputStream(contents.getBytes());
+ stream = getFormattedXMLContentsStream(istream);
+ return new String(stream.toByteArray());
+ } catch (Throwable t) {
+
+ } finally {
+ if (istream != null) {
+ istream.close();
+ }
+ if (stream != null) {
+ stream.close();
+ }
+ }
+ return null;
+ }
+
protected void handleEMFModelChange() {
IDocument document = textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
@@ -178,6 +226,8 @@
smooksModel.eResource().save(out, null);
String newContent = out.toString();
+ newContent = getFormattedXMLContents(newContent);
+
String oldContent = document.get();
int startIndex = 0;
@@ -382,6 +432,10 @@
this.smooksModel = resource.getContents().get(0);
SmooksGraphicsExtType oldGraphModel = smooksGraphicsExt;
smooksGraphicsExt = createSmooksGraphcsExtType(smooksModel);
+ if (smooksGraphicsExt == null) {
+ generateSmooksGraphExt(false);
+ analyzeSmooksProcess(false);
+ }
if (oldGraphModel != null) {
smooksGraphicsExt.getChangeListeners().addAll(oldGraphModel.getChangeListeners());
oldGraphModel.getChangeListeners().clear();
@@ -444,7 +498,29 @@
for (Iterator<Resource> iterator = resourceList.iterator(); iterator.hasNext();) {
handleEMFModelChange = true;
Resource resource = (Resource) iterator.next();
- resource.save(options);
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ resource.save(outputStream, options);
+ IResource file = SmooksUIUtils.getResource(resource);
+ if (file.exists() && file instanceof IFile) {
+ ByteArrayInputStream inputStream = new ByteArrayInputStream(outputStream.toByteArray());
+ ByteArrayOutputStream newOutputStream = getFormattedXMLContentsStream(inputStream);
+ try {
+ ((IFile) file).setContents(new ByteArrayInputStream(newOutputStream.toByteArray()),
+ IResource.FORCE, monitor);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ } finally {
+ if (outputStream != null) {
+ outputStream.close();
+ }
+ if (newOutputStream != null) {
+ newOutputStream.close();
+ }
+ if (inputStream != null) {
+ inputStream.close();
+ }
+ }
+ }
monitor.worked(1);
}
((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
@@ -564,7 +640,7 @@
smooksResource.save(Collections.emptyMap());
}
} else {
- generateSmooksGraphExt();
+ generateSmooksGraphExtWithSave();
}
} catch (Exception e) {
@@ -573,9 +649,48 @@
if (smooksGraphicsExt != null) {
smooksGraphicsExt.addSmooksGraphChangeListener(this);
}
+
+ // analyze procss contents
+ analyzeSmooksProcess(true);
}
- protected void generateSmooksGraphExt() {
+ protected void analyzeSmooksProcess(boolean forceSave) {
+ ProcessAnalyzer processAnalyzer = new ProcessAnalyzer(this);
+ EObject smooksModel = getSmooksResourceList();
+ if (smooksModel != null && smooksModel instanceof SmooksResourceListType) {
+ boolean needSave = processAnalyzer.analyzeSmooksModels((SmooksResourceListType) smooksModel);
+ if (needSave && forceSave) {
+ ResourceSet rs = this.getEditingDomain().getResourceSet();
+ List<Resource> resourceLis = rs.getResources();
+ for (Iterator<?> iterator = resourceLis.iterator(); iterator.hasNext();) {
+ Resource resource = (Resource) iterator.next();
+ try {
+ resource.save(Collections.emptyMap());
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ }
+ }
+ }
+
+ public EObject getSmooksResourceList() {
+ EObject m = null;
+ EObject smooksModel = getSmooksModel();
+ if (smooksModel instanceof org.jboss.tools.smooks10.model.smooks.DocumentRoot) {
+ m = ((org.jboss.tools.smooks10.model.smooks.DocumentRoot) smooksModel).getSmooksResourceList();
+ }
+ if (smooksModel instanceof DocumentRoot) {
+ m = ((DocumentRoot) smooksModel).getSmooksResourceList();
+ }
+ return m;
+ }
+
+ protected void generateSmooksGraphExtWithSave() {
+ generateSmooksGraphExt(true);
+ }
+
+ protected void generateSmooksGraphExt(boolean forceSave) {
String version = SmooksUIUtils.judgeSmooksPlatformVersion(smooksModel);
String inputType = SmooksUIUtils.judgeInputType(smooksModel);
@@ -597,10 +712,12 @@
FeatureMapUtil.createEntry(
GraphPackage.Literals.SMOOKS_GRAPH_EXTENSION_DOCUMENT_ROOT__SMOOKS_GRAPHICS_EXT,
smooksGraphicsExt)).execute();
- try {
- smooksModel.eResource().save(Collections.emptyMap());
- } catch (IOException e) {
- e.printStackTrace();
+ if (forceSave) {
+ try {
+ smooksModel.eResource().save(Collections.emptyMap());
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/CreateConnectionCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/CreateConnectionCommand.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/gef/tree/editparts/CreateConnectionCommand.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -37,7 +37,8 @@
connection = new BeanReferenceConnection(source, target);
}
- if (target instanceof InputDataTreeNodeModel && connection == null) {
+ // default connection type
+ if (source instanceof InputDataTreeNodeModel && connection == null) {
connection = new TriggerConnection(source, target);
}
if (connection == null) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/actions/DeleteTaskNodeAction.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -10,17 +10,25 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.actions;
+import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.editor.ISmooksModelProvider;
-import org.jboss.tools.smooks.model.graphics.ext.ProcessType;
+import org.jboss.tools.smooks.graphical.editors.TaskTypeManager;
import org.jboss.tools.smooks.model.graphics.ext.ProcessesType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.graphics.ext.TaskType;
+import org.jboss.tools.smooks.model.smooks.SmooksPackage;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
/**
* @author Dart
@@ -38,28 +46,69 @@
ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
setImageDescriptor(sharedImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
}
-
@Override
public void update() {
List<TaskType> taskList = this.getCurrentSelectedTask();
- this.setEnabled((taskList != null && !taskList.isEmpty()));
+ this.setEnabled((taskList != null && !taskList.isEmpty() && taskList.size() == 1));
}
@Override
public void run() {
super.run();
- if(getProvider() != null){
+ if (getProvider() != null) {
ISmooksModelProvider p = getProvider();
SmooksGraphicsExtType graph = p.getSmooksGraphicsExt();
- if(graph != null){
+ if (graph != null) {
ProcessesType processes = graph.getProcesses();
- if(processes != null){
- ProcessType process = processes.getProcess();
- Command remove = RemoveCommand.create(p.getEditingDomain(), getCurrentSelectedTask());
- p.getEditingDomain().getCommandStack().execute(remove);
+ if (processes != null) {
+ List<TaskType> currentTasks = getCurrentSelectedTask();
+ TaskType currentTask = currentTasks.get(0);
+ List<TaskType> allTask = new ArrayList<TaskType>();
+ SmooksUIUtils.fillAllTask(currentTask, allTask);
+ List<Object> associatedElements = new ArrayList<Object>();
+ SmooksResourceListType listType = SmooksUIUtils.getSmooks11ResourceListType(p.getSmooksModel());
+ if (listType != null) {
+ for (Iterator<?> iterator = allTask.iterator(); iterator.hasNext();) {
+ TaskType taskType = (TaskType) iterator.next();
+ List<Object> elements = TaskTypeManager.getAssociatedSmooksElements(taskType.getId(),
+ listType);
+ if (elements != null && !elements.isEmpty()) {
+ associatedElements.addAll(elements);
+ }
+ }
+ }
+ Command remove = null;
+ if (associatedElements.isEmpty()) {
+ remove = RemoveCommand.create(p.getEditingDomain(), currentTask);
+ p.getEditingDomain().getCommandStack().execute(remove);
+ } else {
+ associatedElements = getDeletedObjects(associatedElements);
+ CompoundCommand ccommand = new CompoundCommand();
+ ccommand.append(RemoveCommand.create(p.getEditingDomain(), currentTask));
+ remove = RemoveCommand.create(p.getEditingDomain(), listType,
+ SmooksPackage.Literals.SMOOKS_RESOURCE_LIST_TYPE__ABSTRACT_RESOURCE_CONFIG_GROUP,
+ associatedElements);
+ if (remove.canExecute()) {
+ ccommand.append(remove);
+ }
+ p.getEditingDomain().getCommandStack().execute(ccommand);
+ }
}
}
}
}
+
+ private List<Object> getDeletedObjects(List<Object> deletingObjects) {
+ List<Object> objs = new ArrayList<Object>();
+ for (Iterator<?> iterator = deletingObjects.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ EStructuralFeature feature = SmooksUIUtils.getFeature(object);
+ if (feature != null) {
+ object = FeatureMapUtil.createEntry(feature, object);
+ }
+ objs.add(object);
+ }
+ return objs;
+ }
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/ProcessAnalyzer.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -14,8 +14,16 @@
import java.util.Iterator;
import java.util.List;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.domain.IEditingDomainProvider;
+import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.freemarker.Freemarker;
import org.jboss.tools.smooks.model.graphics.ext.GraphFactory;
+import org.jboss.tools.smooks.model.graphics.ext.GraphPackage;
import org.jboss.tools.smooks.model.graphics.ext.ProcessType;
import org.jboss.tools.smooks.model.graphics.ext.ProcessesType;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
@@ -32,6 +40,13 @@
*/
public class ProcessAnalyzer {
+ protected IEditingDomainProvider domainProvider;
+
+ public ProcessAnalyzer(IEditingDomainProvider domainProvider) {
+ this.domainProvider = domainProvider;
+ Assert.isNotNull(this.domainProvider);
+ }
+
public List<String> analyzeTaskID(SmooksResourceListType resourceList) {
List<String> taskIDs = new ArrayList<String>();
List<AbstractResourceConfig> resourceConfigList = resourceList.getAbstractResourceConfig();
@@ -75,12 +90,7 @@
}
private void fillAllTask(TaskType task, List<TaskType> taskList) {
- taskList.add(task);
- List<TaskType> children = task.getTask();
- for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
- TaskType taskType = (TaskType) iterator.next();
- fillAllTask(taskType, taskList);
- }
+ SmooksUIUtils.fillAllTask(task, taskList);
}
/**
@@ -91,14 +101,18 @@
*/
public boolean analyzeSmooksModels(SmooksResourceListType resourceList) {
boolean modelWasChanged = false;
- SmooksGraphicsExtType ext = this. getSmooksGraphicsType(resourceList);
+ CompoundCommand compoundCommand = new CompoundCommand();
+ SmooksGraphicsExtType ext = this.getSmooksGraphicsType(resourceList);
if (ext == null)
throw new RuntimeException("Can't find the smooks-graph-ext element");
ProcessesType processes = ext.getProcesses();
if (processes == null) {
processes = GraphFactory.eINSTANCE.createProcessesType();
- ext.setProcesses(processes);
+ Command c = SetCommand.create(domainProvider.getEditingDomain(), ext,
+ GraphPackage.Literals.SMOOKS_GRAPHICS_EXT_TYPE__PROCESSES, processes);
+ compoundCommand.append(c);
+ // ext.setProcesses(processes);
modelWasChanged = true;
}
ProcessType process = null;
@@ -108,7 +122,9 @@
if (process == null) {
process = GraphFactory.eINSTANCE.createProcessType();
- processes.setProcess(process);
+ Command c = SetCommand.create(domainProvider.getEditingDomain(), processes,
+ GraphPackage.Literals.PROCESSES_TYPE__PROCESS, process);
+ compoundCommand.append(c);
modelWasChanged = true;
}
@@ -123,7 +139,11 @@
TaskType inputTask = GraphFactory.eINSTANCE.createTaskType();
inputTask.setId(TaskTypeManager.TASK_ID_INPUT);
inputTask.setName(TaskTypeManager.getTaskLabel(TaskTypeManager.TASK_ID_INPUT));
- process.getTask().add(inputTask);
+
+ Command command = AddCommand.create(domainProvider.getEditingDomain(), process,
+ GraphPackage.Literals.PROCESS_TYPE__TASK, inputTask);
+ compoundCommand.append(command);
+
taskList.add(inputTask);
modelWasChanged = true;
}
@@ -139,7 +159,8 @@
taskList.add(task);
}
}
- modelWasChanged = linkTask(taskList);
+ modelWasChanged = linkTask(taskList, compoundCommand);
+ compoundCommand.execute();
return modelWasChanged;
}
@@ -153,15 +174,15 @@
return null;
}
- private boolean linkTask(List<TaskType> taskList) {
+ private boolean linkTask(List<TaskType> taskList, CompoundCommand compoundCommand) {
TaskType first = getTaskType(TaskTypeManager.TASK_ID_INPUT, taskList);
if (first != null) {
- return linkTask(first, taskList);
+ return linkTask(first, taskList, compoundCommand);
}
return false;
}
- private boolean linkTask(TaskType taskType, List<TaskType> taskList) {
+ private boolean linkTask(TaskType taskType, List<TaskType> taskList, CompoundCommand compoundCommand) {
String id = taskType.getId();
String[] childrenIds = TaskTypeManager.getChildTaskIDs(id);
boolean changed = false;
@@ -172,11 +193,14 @@
if (childTask != null) {
if (!taskType.getTask().contains(childTask)
&& ((childTask.eContainer() == null) || (childTask.eContainer() instanceof ProcessType))) {
- taskType.getTask().add(childTask);
+ Command c = AddCommand.create(domainProvider.getEditingDomain(), taskType,
+ GraphPackage.Literals.TASK_TYPE__TASK, childTask);
+ compoundCommand.append(c);
+ // taskType.getTask().add(childTask);
changed = true;
}
taskList.remove(childTask);
- boolean cchange = linkTask(childTask, taskList);
+ boolean cchange = linkTask(childTask, taskList, compoundCommand);
changed = (changed || cchange);
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksGraphicalEditorPart.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -27,6 +27,7 @@
import org.eclipse.draw2d.graph.Node;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandWrapper;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.command.AddCommand;
@@ -215,10 +216,24 @@
if (redoCommand != null || rawCommand.equals(redoCommand)) {
commandType = UNDO_COMMAND;
}
- if (rawCommand instanceof SetCommand || rawCommand instanceof AddCommand
- || rawCommand instanceof DeleteCommand || rawCommand instanceof RemoveCommand) {
- refershRecentAffectedModel(rawCommand, mostRecentCommand.getAffectedObjects(),
- commandType);
+ if (rawCommand instanceof CompoundCommand) {
+ List<Command> commandList = ((CompoundCommand) rawCommand).getCommandList();
+ for (Iterator<?> iterator = commandList.iterator(); iterator.hasNext();) {
+ Command command = (Command) iterator.next();
+ while (command instanceof CommandWrapper) {
+ command = ((CommandWrapper) command).getCommand();
+ }
+ if (command instanceof SetCommand || command instanceof AddCommand
+ || command instanceof DeleteCommand || command instanceof RemoveCommand) {
+ refershRecentAffectedModel(command, command.getAffectedObjects(), commandType);
+ }
+ }
+ } else {
+ if (rawCommand instanceof SetCommand || rawCommand instanceof AddCommand
+ || rawCommand instanceof DeleteCommand || rawCommand instanceof RemoveCommand) {
+ refershRecentAffectedModel(rawCommand, mostRecentCommand.getAffectedObjects(),
+ commandType);
+ }
}
}
}
@@ -753,6 +768,23 @@
return cs;
}
+ /**
+ * @return the inputDataList
+ */
+ public List<Object> getInputDataList() {
+ if(inputDataList == null){
+ inputDataList = new ArrayList<Object>();
+ }
+ return inputDataList;
+ }
+
+ /**
+ * @param inputDataList the inputDataList to set
+ */
+ public void setInputDataList(List<Object> inputDataList) {
+ this.inputDataList = inputDataList;
+ }
+
public SmooksGraphicsExtType getSmooksGraphicsExtType() {
if (smooksModelProvider != null) {
return smooksModelProvider.getSmooksGraphicsExt();
@@ -938,7 +970,7 @@
}
}
}
-
+
public boolean autoLayout() {
return autoLayout(false);
}
@@ -1154,7 +1186,7 @@
}
public void inputTypeChanged(SmooksGraphicsExtType extType) {
- if (root != null) {
+ if (root != null && inputDataList != null) {
List<Object> newInputDataList = SelectorCreationDialog.generateInputData(smooksModelProvider
.getSmooksGraphicsExt(), getSmooksResourceListType());
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/SmooksProcessGraphicalEditor.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -10,10 +10,8 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.editors;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
-import java.util.Collections;
import java.util.EventObject;
import java.util.HashMap;
import java.util.Iterator;
@@ -24,10 +22,11 @@
import org.eclipse.draw2d.IFigure;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.CommandWrapper;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.command.DeleteCommand;
+import org.eclipse.emf.edit.command.RemoveCommand;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.gef.dnd.TemplateTransfer;
import org.eclipse.jface.action.IAction;
@@ -45,6 +44,7 @@
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.DragSourceListener;
+import org.eclipse.swt.dnd.DropTarget;
import org.eclipse.swt.dnd.DropTargetEvent;
import org.eclipse.swt.dnd.DropTargetListener;
import org.eclipse.swt.dnd.Transfer;
@@ -98,7 +98,6 @@
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.graphics.ext.TaskType;
import org.jboss.tools.smooks.model.smooks.DocumentRoot;
-import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
/**
* @author Dart
@@ -137,6 +136,24 @@
protected void createProcessGraphicalPanel(Composite parent) {
processGraphViewer = new GraphViewer(parent, SWT.NONE);
+ processGraphViewer.getControl().dispose();
+ processGraphViewer.setControl(new Graph(parent, SWT.NONE) {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.zest.core.widgets.Graph#dispose()
+ */
+ @Override
+ public void dispose() {
+ try {
+ super.dispose();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
+ }
+
+ });
// GridData gd = new GridData(GridData.FILL_BOTH);
// processGraphViewer.getControl().setLayoutData(gd);
processGraphViewer.setNodeStyle(ZestStyles.NODES_FISHEYE);
@@ -187,6 +204,8 @@
protected void initProcessGraphicalViewer() {
SmooksGraphicsExtType ext = this.smooksModelProvider.getSmooksGraphicsExt();
+ if (ext == null)
+ return;
ProcessesType processes = ext.getProcesses();
boolean disableProcessViewer = false;
if (processes != null) {
@@ -213,98 +232,98 @@
protected void hookProcessGraphicalViewer() {
getProcessGraphViewer().getControl();
- getProcessGraphViewer().addDropSupport(DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK,
- new Transfer[] { TemplateTransfer.getInstance() }, new DropTargetListener() {
- private TaskType taskType = null;
+ final DropTarget dropTarge = new DropTarget(getProcessGraphViewer().getControl(), DND.DROP_MOVE | DND.DROP_COPY);
+ dropTarge.setTransfer(new Transfer[] { TemplateTransfer.getInstance() });
+ dropTarge.addDropListener(new DropTargetListener() {
+ private TaskType taskType = null;
- private ProcessType process = null;
+ private ProcessType process = null;
- public void dropAccept(DropTargetEvent event) {
+ public void dropAccept(DropTargetEvent event) {
+ }
+
+ public void drop(DropTargetEvent event) {
+ if (event.detail == DND.DROP_COPY) {
+ if (this.taskType != null) {
+ TaskTypeDescriptor des = (TaskTypeDescriptor) TemplateTransfer.getInstance().getTemplate();
+ AddNextTaskNodeAction action = new AddNextTaskNodeAction(des.getId(), des.getLabel(),
+ smooksModelProvider);
+ TaskType taskType = this.taskType;
+ IStructuredSelection selection = new StructuredSelection(taskType);
+ action.selectionChanged(new SelectionChangedEvent(getProcessGraphViewer(), selection));
+ action.run();
+ return;
}
+ if (this.process != null) {
+ AddNextTaskNodeAction action = new AddInputTaskAction(smooksModelProvider);
+ // IStructuredSelection selection = new
+ // StructuredSelection(taskType);
+ // action.selectionChanged(new
+ // SelectionChangedEvent(getProcessGraphViewer(),
+ // selection));
+ action.run();
+ return;
+ }
+ }
+ }
- public void drop(DropTargetEvent event) {
- if (event.detail == DND.DROP_COPY) {
- if (this.taskType != null) {
- TaskTypeDescriptor des = (TaskTypeDescriptor) TemplateTransfer.getInstance()
- .getTemplate();
- AddNextTaskNodeAction action = new AddNextTaskNodeAction(des.getId(), des.getLabel(),
- smooksModelProvider);
- TaskType taskType = this.taskType;
- IStructuredSelection selection = new StructuredSelection(taskType);
- action.selectionChanged(new SelectionChangedEvent(getProcessGraphViewer(), selection));
- action.run();
+ public void dragOver(DropTargetEvent event) {
+ Control control = getProcessGraphViewer().getControl();
+ if (control != null && control instanceof Graph) {
+ Graph graph = (Graph) control;
+ Point pp = graph.toControl(new Point(event.x, event.y));
+ TaskTypeDescriptor des = (TaskTypeDescriptor) TemplateTransfer.getInstance().getTemplate();
+ TaskType testType = GraphFactory.eINSTANCE.createTaskType();
+ testType.setId(des.getId());
+ IFigure figure = graph.getFigureAt(pp.x, pp.y);
+ if (figure == null) {
+ if (testType.getId().equals(TaskTypeManager.TASK_ID_INPUT)) {
+ ProcessType process = (ProcessType) getProcessGraphViewer().getInput();
+ if (process.getTask().isEmpty()) {
+ event.detail = DND.DROP_COPY;
+ this.process = process;
return;
}
- if (this.process != null) {
- AddNextTaskNodeAction action = new AddInputTaskAction(smooksModelProvider);
- // IStructuredSelection selection = new
- // StructuredSelection(taskType);
- // action.selectionChanged(new
- // SelectionChangedEvent(getProcessGraphViewer(),
- // selection));
- action.run();
- return;
- }
}
+ event.detail = DND.DROP_NONE;
+ this.taskType = null;
+ process = null;
+ return;
}
-
- public void dragOver(DropTargetEvent event) {
- Control control = getProcessGraphViewer().getControl();
- if (control != null && control instanceof Graph) {
- Graph graph = (Graph) control;
- Point pp = graph.toControl(new Point(event.x, event.y));
- TaskTypeDescriptor des = (TaskTypeDescriptor) TemplateTransfer.getInstance().getTemplate();
- TaskType testType = GraphFactory.eINSTANCE.createTaskType();
- testType.setId(des.getId());
- IFigure figure = graph.getFigureAt(pp.x, pp.y);
- if (figure == null) {
- if (testType.getId().equals(TaskTypeManager.TASK_ID_INPUT)) {
- ProcessType process = (ProcessType) getProcessGraphViewer().getInput();
- if (process.getTask().isEmpty()) {
- event.detail = DND.DROP_COPY;
- this.process = process;
- return;
- }
+ List<?> nodes = graph.getNodes();
+ for (Iterator<?> iterator = nodes.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (object instanceof GraphNode) {
+ IFigure f = ((GraphNode) object).getNodeFigure();
+ if (figure == f) {
+ TaskTypeRules rules = new TaskTypeRules();
+ if (rules.isNextTask((TaskType) ((GraphNode) object).getData(), testType)) {
+ event.detail = DND.DROP_COPY;
+ this.taskType = (TaskType) ((GraphNode) object).getData();
+ return;
}
- event.detail = DND.DROP_NONE;
- this.taskType = null;
- process = null;
- return;
}
- List<?> nodes = graph.getNodes();
- for (Iterator<?> iterator = nodes.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- if (object instanceof GraphNode) {
- IFigure f = ((GraphNode) object).getNodeFigure();
- if (figure == f) {
- TaskTypeRules rules = new TaskTypeRules();
- if (rules.isNextTask((TaskType) ((GraphNode) object).getData(), testType)) {
- event.detail = DND.DROP_COPY;
- this.taskType = (TaskType) ((GraphNode) object).getData();
- return;
- }
- }
- }
- }
- event.detail = DND.DROP_NONE;
- this.taskType = null;
- this.process = null;
}
}
+ event.detail = DND.DROP_NONE;
+ this.taskType = null;
+ this.process = null;
+ }
+ }
- public void dragOperationChanged(DropTargetEvent event) {
- }
+ public void dragOperationChanged(DropTargetEvent event) {
+ }
- public void dragLeave(DropTargetEvent event) {
- }
+ public void dragLeave(DropTargetEvent event) {
+ }
- public void dragEnter(DropTargetEvent event) {
- event.detail = DND.DROP_MOVE;
- this.taskType = null;
- process = null;
- }
- });
+ public void dragEnter(DropTargetEvent event) {
+ event.detail = DND.DROP_MOVE;
+ this.taskType = null;
+ process = null;
+ }
+ });
getProcessGraphViewer().addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
@@ -452,7 +471,6 @@
Transfer[] types = new Transfer[] { TemplateTransfer.getInstance() };
int operations = DND.DROP_MOVE | DND.DROP_COPY | DND.DROP_LINK;
-
final DragSource source = new DragSource(toolBar, operations);
source.setTransfer(types);
source.addDragListener(new DragSourceListener() {
@@ -476,7 +494,8 @@
public void dragSetData(DragSourceEvent event) {
// DragSource source = (DragSource) event.getSource();
// ToolBar control = (ToolBar) source.getControl();
- // ToolItem item = control.getItem(new Point(event.x, event.y));
+ // ToolItem item = control.getItem(new Point(event.x,
+ // event.y));
// if(item == null) return;
// TaskTypeDescriptor data = (TaskTypeDescriptor)
// item.getData();
@@ -578,11 +597,43 @@
if (getProcessGraphViewer() != null) {
getProcessGraphViewer().refresh();
getProcessGraphViewer().applyLayout();
+ break;
}
-
- return;
}
}
+ if (rawCommand instanceof CompoundCommand) {
+ List<Command> command = ((CompoundCommand) rawCommand).getCommandList();
+ for (Iterator<?> iterator = command.iterator(); iterator.hasNext();) {
+ Command command2 = (Command) iterator.next();
+ while (command2 instanceof CommandWrapper) {
+ command2 = ((CommandWrapper) command2).getCommand();
+ }
+ if (command2 instanceof DeleteCommand || command2 instanceof RemoveCommand) {
+ Collection<?> objs = ((Command) command2).getAffectedObjects();
+ for (Iterator<?> iterator2 = objs.iterator(); iterator2.hasNext();) {
+ Object object = (Object) iterator2.next();
+ if (object instanceof TaskType || object instanceof ProcessType) {
+ showTaskControl(null);
+ break;
+ }
+ }
+ }
+ }
+ } else {
+ if (rawCommand instanceof DeleteCommand || rawCommand instanceof RemoveCommand) {
+ activeModel = rawCommand.getAffectedObjects();
+ for (Iterator<?> iterator = activeModel.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ if (object instanceof TaskType || object instanceof ProcessType) {
+ if (getProcessGraphViewer() != null) {
+ showTaskControl(null);
+ break;
+ }
+ }
+ }
+
+ }
+ }
}
}
@@ -644,26 +695,10 @@
SmooksJavaMappingGraphicalEditor javaMappingPart = new SmooksJavaMappingGraphicalEditor(smooksModelProvider);
this.registeTaskDetailsPage(javaMappingPart, TaskTypeManager.TASK_ID_JAVA_MAPPING);
-// SmooksXSLTemplateGraphicalEditor xsltemplatePart = new SmooksXSLTemplateGraphicalEditor(smooksModelProvider);
-// this.registeTaskDetailsPage(xsltemplatePart, TaskTypeManager.TASK_ID_XSL_TEMPLATE);
-
- ProcessAnalyzer processAnalyzer = new ProcessAnalyzer();
- EObject smooksModel = getSmooksResourceList();
- if (smooksModel != null && smooksModel instanceof SmooksResourceListType) {
- boolean needSave = processAnalyzer.analyzeSmooksModels((SmooksResourceListType) smooksModel);
- if (needSave) {
- ResourceSet rs = this.smooksModelProvider.getEditingDomain().getResourceSet();
- List<Resource> resourceLis = rs.getResources();
- for (Iterator<?> iterator = resourceLis.iterator(); iterator.hasNext();) {
- Resource resource = (Resource) iterator.next();
- try {
- resource.save(Collections.emptyMap());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- }
- }
+ // SmooksXSLTemplateGraphicalEditor xsltemplatePart = new
+ // SmooksXSLTemplateGraphicalEditor(smooksModelProvider);
+ // this.registeTaskDetailsPage(xsltemplatePart,
+ // TaskTypeManager.TASK_ID_XSL_TEMPLATE);
}
@Override
@@ -753,6 +788,9 @@
}
protected void showTaskControl(Object model) {
+ if (model == null)
+ pageBook.showEmptyPage();
+ ;
FormToolkit toolkit = ((AbstractSmooksFormEditor) this.smooksModelProvider).getToolkit();
if (model instanceof TaskType) {
String id = ((TaskType) model).getId();
@@ -869,6 +907,9 @@
Object object = (Object) iterator.next();
if (object instanceof IEditorPart) {
((IEditorPart) object).removePropertyListener(this);
+ if (((IEditorPart) object).getEditorSite() == null) {
+ continue;
+ }
((IEditorPart) object).dispose();
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/TaskTypeManager.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -15,9 +15,13 @@
import java.util.List;
import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
+import org.jboss.tools.smooks.model.freemarker.Freemarker;
import org.jboss.tools.smooks.model.graphics.ext.TaskType;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.javabean12.BeanType;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
+import org.jboss.tools.smooks.model.xsl.Xsl;
/**
* @author Dart
@@ -61,8 +65,9 @@
GraphicsConstants.IMAGE_JAVA_AMPPING_TASK));
allTaskList.add(new TaskTypeDescriptor(TASK_ID_FREEMARKER_TEMPLATE, "Apply Freemaker Template",
GraphicsConstants.IMAGE_APPLY_FREEMARKER_TASK));
-// allTaskList.add(new TaskTypeDescriptor(TASK_ID_XSL_TEMPLATE, "Apply XSL Template",
-// GraphicsConstants.IMAGE_APPLY_XSL_TASK));
+ // allTaskList.add(new TaskTypeDescriptor(TASK_ID_XSL_TEMPLATE,
+ // "Apply XSL Template",
+ // GraphicsConstants.IMAGE_APPLY_XSL_TASK));
}
return allTaskList;
}
@@ -72,7 +77,20 @@
}
public static List<Object> getAssociatedSmooksElementsType(String taskID) {
- return null;
+ List<Object> elementsType = new ArrayList<Object>();
+ if (taskID == null)
+ return null;
+ if (TASK_ID_JAVA_MAPPING.equals(taskID)) {
+ elementsType.add(BeanType.class);
+ elementsType.add(BindingsType.class);
+ }
+ if (TASK_ID_FREEMARKER_TEMPLATE.equals(taskID)) {
+ elementsType.add(Freemarker.class);
+ }
+ if (TASK_ID_XSL_TEMPLATE.equals(taskID)) {
+ elementsType.add(Xsl.class);
+ }
+ return elementsType;
}
public static String getTaskLabel(String taskId) {
@@ -113,7 +131,13 @@
}
private static boolean isSameType(Object element, List<Object> elementTypes) {
- return true;
+ for (Iterator<?> iterator = elementTypes.iterator(); iterator.hasNext();) {
+ Class<?> object = (Class<?>) iterator.next();
+ if (object.isInstance(element)) {
+ return true;
+ }
+ }
+ return false;
}
public static final class TaskTypeDescriptor {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/TriggerConnectionEditPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/TriggerConnectionEditPart.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/TriggerConnectionEditPart.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -11,7 +11,9 @@
package org.jboss.tools.smooks.graphical.editors.editparts;
import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.FigureUtilities;
import org.eclipse.draw2d.Shape;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart;
/**
@@ -32,6 +34,7 @@
Connection c = super.createConnectionFigure();
if (c instanceof Shape) {
((Shape) c).setLineWidth(2);
+ ((Shape) c).setForegroundColor(FigureUtilities.darker(GraphicsConstants.FONT_COLOR));
}
return c;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/ValueBindingConnectionEditPart.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/ValueBindingConnectionEditPart.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/editparts/ValueBindingConnectionEditPart.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -10,7 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.editors.editparts;
+import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Connection;
+import org.eclipse.draw2d.FigureUtilities;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.gef.tree.editparts.TreeNodeConnectionEditPart;
/**
@@ -25,7 +28,7 @@
@Override
protected Connection createConnectionFigure() {
Connection connection = super.createConnectionFigure();
-// connection.setForegroundColor(GraphicsConstants.BORDER_CORLOER);
+ connection.setForegroundColor(ColorConstants.blue);
return connection;
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/JavaBeanGraphModel.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/JavaBeanGraphModel.java 2009-11-09 08:26:50 UTC (rev 18490)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/model/JavaBeanGraphModel.java 2009-11-09 08:38:00 UTC (rev 18491)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.graphical.editors.model;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
@@ -29,6 +30,8 @@
@Override
protected TreeNodeModel createChildModel(Object model, ITreeContentProvider contentProvider,
ILabelProvider labelProvider) {
+ Object m = AdapterFactoryEditingDomain.unwrap(model);
+ if(m instanceof String) return null;
return new JavaBeanChildGraphModel(model, contentProvider, labelProvider, this.domainProvider);
}
15 years, 1 month
JBoss Tools SVN: r18490 - in trunk/smooks: plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-11-09 03:26:50 -0500 (Mon, 09 Nov 2009)
New Revision: 18490
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/impl/CalcPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl/JavabeanPackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean12/impl/Javabean12PackageImpl.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/impl/SmooksPackageImpl.java
trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java
Log:
JBIDE-5157
Change the metadata of smooks-resource-config element
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/impl/CalcPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/impl/CalcPackageImpl.java 2009-11-09 06:41:28 UTC (rev 18489)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/calc/impl/CalcPackageImpl.java 2009-11-09 08:26:50 UTC (rev 18490)
@@ -455,7 +455,7 @@
source,
new String[] {
"name", "counter",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getCounter_StartExpression(),
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl/JavabeanPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl/JavabeanPackageImpl.java 2009-11-09 06:41:28 UTC (rev 18489)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl/JavabeanPackageImpl.java 2009-11-09 08:26:50 UTC (rev 18490)
@@ -724,7 +724,7 @@
source,
new String[] {
"name", "bindings_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getBindingsType_Group(),
@@ -932,7 +932,7 @@
source,
new String[] {
"name", "value_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getValueType_DecodeParam(),
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean12/impl/Javabean12PackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean12/impl/Javabean12PackageImpl.java 2009-11-09 06:41:28 UTC (rev 18489)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean12/impl/Javabean12PackageImpl.java 2009-11-09 08:26:50 UTC (rev 18490)
@@ -768,7 +768,7 @@
source,
new String[] {
"name", "bean_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getBeanType_Group(),
@@ -992,7 +992,7 @@
source,
new String[] {
"name", "result_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getResultType_RetainBeans(),
@@ -1006,7 +1006,7 @@
source,
new String[] {
"name", "value_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getValueType_DecodeParam(),
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/impl/SmooksPackageImpl.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/impl/SmooksPackageImpl.java 2009-11-09 06:41:28 UTC (rev 18489)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/smooks/impl/SmooksPackageImpl.java 2009-11-09 08:26:50 UTC (rev 18490)
@@ -1950,7 +1950,7 @@
source,
new String[] {
"name", "smooks-resource-list_._type",
- "kind", "elementOnly"
+ "kind", "mixed"
});
addAnnotation
(getSmooksResourceListType_Params(),
Modified: trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java
===================================================================
--- trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java 2009-11-09 06:41:28 UTC (rev 18489)
+++ trunk/smooks/tests/org.jboss.tools.smooks.core.test/src/org/jboss/tools/smooks/test/openeditor/OpenAllSmooksConfigFileTestCase.java 2009-11-09 08:26:50 UTC (rev 18490)
@@ -91,8 +91,8 @@
IEditorPart part = IDE.openEditor(window.getActivePage(), cf);
Assert.assertNotNull(part);
Assert.assertTrue(
- "Editor isn't Smooks editor , there are some errors occur when create Smooks Editor",
- (part instanceof AbstractSmooksFormEditor));
+ "Editor isn't Smooks editor , there are some errors occur when create Smooks Editor for file : '"
+ + cf.getName() + "'", (part instanceof AbstractSmooksFormEditor));
System.out.println("successful to open file : '" + cf.getName() + "'");
}
}
15 years, 1 month
JBoss Tools SVN: r18489 - in trunk/common/releng: maps and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-09 01:41:28 -0500 (Mon, 09 Nov 2009)
New Revision: 18489
Added:
trunk/common/releng/build.properties
trunk/common/releng/build.properties.example.linux
trunk/common/releng/build.xml
trunk/common/releng/maps/
trunk/common/releng/maps/project.map
trunk/common/releng/maps/test.eclipse.map
trunk/common/releng/testing.properties
Log:
first pass at a "common component + tests" builder; needs .tests feature, .sdk feature, .all feature + source feature/plugin templates
Added: trunk/common/releng/build.properties
===================================================================
--- trunk/common/releng/build.properties (rev 0)
+++ trunk/common/releng/build.properties 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,49 @@
+## BEGIN PROJECT BUILD PROPERTIES ##
+
+# this property allows ant-contrib and pde-svn-plugin to be fetched and installed automatically for you
+thirdPartyDownloadLicenseAcceptance="I accept"
+
+projectid=jbosstools.common
+zipPrefix=Common
+incubation=
+buildType=N
+version=2.0.0
+
+mainFeatureToBuildID=org.jboss.tools.common.feature
+#mainFeatureToBuildID=org.jboss.tools.common.sdk.feature
+#testFeatureToBuildID=org.jboss.tools.common.tests.feature
+
+#build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+build.steps=buildUpdate,publish,cleanup
+
+# Re-use local sources?
+localSourceCheckoutDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/common
+relengBuilderDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/common/releng
+relengBaseBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder
+relengCommonBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng
+
+JAVA_HOME=/usr/lib/jvm/java
+JAVA50_HOME=/usr/lib/jvm/java
+
+dependencyURLs=\
+http://repository.jboss.org/eclipse/galileo/GEF-runtime-3.5.1.zip,\
+http://repository.jboss.org/eclipse/galileo/emf-runtime-2.5.0.zip,\
+http://repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0.zip,\
+http://repository.jboss.org/eclipse/galileo/wtp-R-3.1.1-20090917225226.zip,\
+http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip,\
+http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
+
+# use precompiled binaries from latest build as input to this build
+#repositoryURLs=http://download.eclipse.org/releases/galileo/,http://download.jboss.org/jbosstools/updates/nightly/trunk/
+#pluginIDsToInstall=
+
+flattenDependencies=true
+parallelCompilation=true
+generateFeatureVersionSuffix=true
+individualSourceBundles=true
+
+domainNamespace=*
+projNamespace=org.jboss.tools.jmx
+projRelengName=org.jboss.tools.jmx.releng
+
+## END PROJECT BUILD PROPERTIES ##
Property changes on: trunk/common/releng/build.properties
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/common/releng/build.properties.example.linux
===================================================================
--- trunk/common/releng/build.properties.example.linux (rev 0)
+++ trunk/common/releng/build.properties.example.linux 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,49 @@
+## BEGIN PROJECT BUILD PROPERTIES ##
+
+# this property allows ant-contrib and pde-svn-plugin to be fetched and installed automatically for you
+thirdPartyDownloadLicenseAcceptance="I accept"
+
+projectid=jbosstools.common
+zipPrefix=Common
+incubation=
+buildType=N
+version=2.0.0
+
+mainFeatureToBuildID=org.jboss.tools.common.feature
+#mainFeatureToBuildID=org.jboss.tools.common.sdk.feature
+#testFeatureToBuildID=org.jboss.tools.common.tests.feature
+
+#build.steps=buildUpdate,buildTests,generateDigests,test,publish,cleanup
+build.steps=buildUpdate,publish,cleanup
+
+# Re-use local sources?
+localSourceCheckoutDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/common
+relengBuilderDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/common/releng
+relengBaseBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder
+relengCommonBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng
+
+JAVA_HOME=/usr/lib/jvm/java
+JAVA50_HOME=/usr/lib/jvm/java
+
+dependencyURLs=\
+http://repository.jboss.org/eclipse/galileo/GEF-runtime-3.5.1.zip,\
+http://repository.jboss.org/eclipse/galileo/emf-runtime-2.5.0.zip,\
+http://repository.jboss.org/eclipse/galileo/xsd-runtime-2.5.0.zip,\
+http://repository.jboss.org/eclipse/galileo/wtp-R-3.1.1-20090917225226.zip,\
+http://repository.jboss.org/eclipse/galileo/dtp_1.7.1.zip,\
+http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.tar.gz
+
+# use precompiled binaries from latest build as input to this build
+#repositoryURLs=http://download.eclipse.org/releases/galileo/,http://download.jboss.org/jbosstools/updates/nightly/trunk/
+#pluginIDsToInstall=
+
+flattenDependencies=true
+parallelCompilation=true
+generateFeatureVersionSuffix=true
+individualSourceBundles=true
+
+domainNamespace=*
+projNamespace=org.jboss.tools.jmx
+projRelengName=org.jboss.tools.jmx.releng
+
+## END PROJECT BUILD PROPERTIES ##
Property changes on: trunk/common/releng/build.properties.example.linux
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/common/releng/build.xml
===================================================================
--- trunk/common/releng/build.xml (rev 0)
+++ trunk/common/releng/build.xml 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,40 @@
+<project default="run" name="org.jboss.tools.*.releng/build.xml - Run a JBoss Tools component build using the Athena CBI">
+ <target name="run">
+ <!--
+ You must check out the following projects to your workspace:
+
+ org.eclipse.releng.basebuilder
+ org.eclipse.dash.common.releng
+ jbosstools/trunk/<your component>/releng
+ -->
+
+ <!-- load properties and set timestamp for the build -->
+ <property file="build.properties.example.linux" />
+ <tstamp>
+ <format property="buildTimestamp" pattern="yyyyMMddHHmm" />
+ </tstamp>
+
+ <!-- calculate workspaceDir as parent of this folder, the project's .releng folder (relengBuilderDir) -->
+ <property name="relengBuilderDir" value="${basedir}" />
+ <dirname file="${relengBuilderDir}" property="workspaceDir" />
+
+ <!--
+ can build in /tmp, eg., in /tmp/build, or in workspace, eg.,
+ ${WORKSPACE}/build
+ -->
+ <property name="writableBuildRoot" value="/tmp/build" />
+
+ <!--
+ can be simple path, eg.,
+ ${writableBuildRoot}/${buildType}${buildTimestamp} or longer, eg.,
+ ${writableBuildRoot}/${topprojectName}/${projectName}/downloads/drops/${version}/${buildType}${buildTimestamp} or
+ ${writableBuildRoot}/${topprojectName}/${projectName}/${subprojectName}/downloads/drops/${version}/${buildType}${buildTimestamp}
+ -->
+ <property name="buildDir" value="${writableBuildRoot}/${buildType}${buildTimestamp}-${zipPrefix}" />
+
+ <!-- invoke a new Eclipse process and launch the build from the common.releng folder -->
+ <property name="relengCommonBuilderDir" value="${workspaceDir}/org.eclipse.dash.common.releng" />
+ <ant antfile="${relengCommonBuilderDir}/buildAll.xml" target="runEclipse" dir="${relengCommonBuilderDir}" />
+
+ </target>
+</project>
Property changes on: trunk/common/releng/build.xml
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Added: trunk/common/releng/maps/project.map
===================================================================
--- trunk/common/releng/maps/project.map (rev 0)
+++ trunk/common/releng/maps/project.map 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,29 @@
+!*** Generated with org.eclipse.dash.common.releng/tools/scripts/buildAllHelper.xml#dir2svnmap task
+feature@org.jboss.tools.common.core.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/features/org.jboss.tools.common.core.feature
+feature@org.jboss.tools.common.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/features/org.jboss.tools.common.feature
+feature@org.jboss.tools.common.text.ext.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/features/org.jboss.tools.common.text.ext.feature
+feature@org.jboss.tools.common.ui.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/features/org.jboss.tools.common.ui.feature
+feature@org.jboss.tools.common.verification.feature=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/features/org.jboss.tools.common.verification.feature
+
+plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common
+plugin@org.jboss.tools.common.el.core=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.el.core
+plugin@org.jboss.tools.common.el.ui=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.el.ui
+plugin@org.jboss.tools.common.gef=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.gef
+plugin@org.jboss.tools.common.meta.ui=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.meta.ui
+plugin@org.jboss.tools.common.model=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.model
+plugin@org.jboss.tools.common.model.ui=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.model.ui
+plugin@org.jboss.tools.common.projecttemplates=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.projecttemplates
+plugin@org.jboss.tools.common.resref.core=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.resref.core
+plugin@org.jboss.tools.common.resref.ui=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.resref.ui
+plugin@org.jboss.tools.common.text.ext=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.text.ext
+plugin@org.jboss.tools.common.text.xml=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.text.xml
+plugin@org.jboss.tools.common.verification=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.verification
+plugin@org.jboss.tools.common.verification.ui=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common.verification.ui
+plugin@org.jboss.tools.common.el.core.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.el.core.test
+plugin@org.jboss.tools.common.model.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.model.test
+plugin@org.jboss.tools.common.model.ui.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.model.ui.test
+plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.test
+plugin@org.jboss.tools.common.text.ext.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.text.ext.test
+plugin@org.jboss.tools.common.verification.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.verification.test
+plugin@org.jboss.tools.common.verification.ui.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.verification.ui.test
+
Property changes on: trunk/common/releng/maps/project.map
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/releng/maps/test.eclipse.map
===================================================================
--- trunk/common/releng/maps/test.eclipse.map (rev 0)
+++ trunk/common/releng/maps/test.eclipse.map 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,2 @@
+plugin@org.eclipse.test=v20080313,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
+fragment@org.eclipse.ant.optional.junit=v20070202,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,
Property changes on: trunk/common/releng/maps/test.eclipse.map
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/common/releng/testing.properties
===================================================================
--- trunk/common/releng/testing.properties (rev 0)
+++ trunk/common/releng/testing.properties 2009-11-09 06:41:28 UTC (rev 18489)
@@ -0,0 +1,10 @@
+#extraVMargs="-Dfoo=bar"
+
+#csv list of test plugins to run
+testPluginsToRun=\
+org.jboss.tools.common.el.core.test
+
+# define which suite to run within each test plugin; or, include a test.xml script in
+# the test plugin to deviate from default one-suite-per-plugin operation
+org.jboss.tools.common.el.core.test.suite=org.jboss.tools.common.el.core.test.CommonELAllTests
+
Property changes on: trunk/common/releng/testing.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 1 month
JBoss Tools SVN: r18488 - trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-09 00:49:58 -0500 (Mon, 09 Nov 2009)
New Revision: 18488
Modified:
trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
Log:
remove test.util bundle
Modified: trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2009-11-09 02:50:16 UTC (rev 18487)
+++ trunk/bpel/tests/org.jboss.tools.bpel.ui.test/META-INF/MANIFEST.MF 2009-11-09 05:49:58 UTC (rev 18488)
@@ -7,8 +7,7 @@
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.junit;bundle-version="3.8.2",
- org.jboss.tools.common.test,
- org.jboss.tools.common.test.util
+ org.jboss.tools.common.test
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: JBoss by Red Hat
15 years, 1 month
JBoss Tools SVN: r18487 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-08 21:50:16 -0500 (Sun, 08 Nov 2009)
New Revision: 18487
Modified:
trunk/bpel/releng/build.properties
Log:
common test plugins aren't on update site
Modified: trunk/bpel/releng/build.properties
===================================================================
--- trunk/bpel/releng/build.properties 2009-11-09 02:50:05 UTC (rev 18486)
+++ trunk/bpel/releng/build.properties 2009-11-09 02:50:16 UTC (rev 18487)
@@ -46,7 +46,7 @@
# use precompiled binaries from latest build as input to this build
repositoryURLs=http://download.eclipse.org/releases/galileo/,http://downl...
-pluginIDsToInstall=org.jboss.ide.eclipse.as.wtp.core+org.jboss.tools.common.test
+pluginIDsToInstall=org.jboss.ide.eclipse.as.wtp.core
flattenDependencies=true
parallelCompilation=true
15 years, 1 month
JBoss Tools SVN: r18486 - trunk/bpel/releng/maps.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-08 21:50:05 -0500 (Sun, 08 Nov 2009)
New Revision: 18486
Modified:
trunk/bpel/releng/maps/test.common.map
Log:
common.test.util is part of common.test plugin
Modified: trunk/bpel/releng/maps/test.common.map
===================================================================
--- trunk/bpel/releng/maps/test.common.map 2009-11-09 02:49:21 UTC (rev 18485)
+++ trunk/bpel/releng/maps/test.common.map 2009-11-09 02:50:05 UTC (rev 18486)
@@ -1,7 +1,6 @@
!*** required to run tests
plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common
plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.test
-plugin@org.jboss.tools.common.test.util=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.test.util
plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/tests/tests/org.jboss.tools.test
15 years, 1 month
JBoss Tools SVN: r18485 - in trunk/jmx/releng: maps and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-08 21:49:21 -0500 (Sun, 08 Nov 2009)
New Revision: 18485
Modified:
trunk/jmx/releng/build.properties
trunk/jmx/releng/maps/test.common.map
Log:
common test plugins aren't on update site
Modified: trunk/jmx/releng/build.properties
===================================================================
--- trunk/jmx/releng/build.properties 2009-11-09 02:40:51 UTC (rev 18484)
+++ trunk/jmx/releng/build.properties 2009-11-09 02:49:21 UTC (rev 18485)
@@ -27,8 +27,8 @@
http://repository.jboss.org/eclipse/galileo/eclipse-SDK-3.5.1-linux-gtk.t...
# use precompiled binaries from latest build as input to this build
-repositoryURLs=http://download.eclipse.org/releases/galileo/,http://download.jboss.org/jbosstools/updates/nightly/trunk/
-pluginIDsToInstall=org.jboss.tools.tests,org.jboss.tools.common.test
+#repositoryURLs=http://download.eclipse.org/releases/galileo/,http://download.jboss.org/jbosstools/updates/nightly/trunk/
+#pluginIDsToInstall=org.jboss.tools.tests,org.jboss.tools.common.test
flattenDependencies=true
parallelCompilation=true
Modified: trunk/jmx/releng/maps/test.common.map
===================================================================
--- trunk/jmx/releng/maps/test.common.map 2009-11-09 02:40:51 UTC (rev 18484)
+++ trunk/jmx/releng/maps/test.common.map 2009-11-09 02:49:21 UTC (rev 18485)
@@ -1,4 +1,4 @@
-!*** required shared/common plugins instead of pulling sources, build against http://download.jboss.org/jbosstools/updates/nightly/trunk/
-!*** plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common
-!*** plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.test
-!*** plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/tests/tests/org.jboss.tools.test
+!*** required shared/common plugins
+plugin@org.jboss.tools.common=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/plugins/org.jboss.tools.common
+plugin@org.jboss.tools.common.test=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/common/tests/org.jboss.tools.common.test
+plugin@org.jboss.tools.tests=SVN,,http://anonsvn.jboss.org/repos,,jbosstools/trunk/tests/tests/org.jboss.tools.test
15 years, 1 month
JBoss Tools SVN: r18484 - trunk/bpel/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-11-08 21:40:51 -0500 (Sun, 08 Nov 2009)
New Revision: 18484
Modified:
trunk/bpel/releng/build.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5171 add test plugin via update site
Modified: trunk/bpel/releng/build.properties
===================================================================
--- trunk/bpel/releng/build.properties 2009-11-09 02:38:56 UTC (rev 18483)
+++ trunk/bpel/releng/build.properties 2009-11-09 02:40:51 UTC (rev 18484)
@@ -46,7 +46,7 @@
# use precompiled binaries from latest build as input to this build
repositoryURLs=http://download.eclipse.org/releases/galileo/,http://downl...
-pluginIDsToInstall=org.jboss.ide.eclipse.as.wtp.core
+pluginIDsToInstall=org.jboss.ide.eclipse.as.wtp.core+org.jboss.tools.common.test
flattenDependencies=true
parallelCompilation=true
15 years, 1 month