JBoss Tools SVN: r10012 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-02 02:58:19 -0400 (Tue, 02 Sep 2008)
New Revision: 10012
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
Log:
change more :
1.when tree viewer is repain , recalculate the model for graphicalviewer
2.pack UI when show tree viewer contents
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-02 06:57:04 UTC (rev 10011)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-09-02 06:58:19 UTC (rev 10012)
@@ -13,8 +13,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.EventObject;
+import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
@@ -58,6 +60,8 @@
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
+import org.eclipse.swt.events.TreeEvent;
+import org.eclipse.swt.events.TreeListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
@@ -115,6 +119,7 @@
*/
public class SmooksGraphicalFormPage extends FormPage implements
ISelectionChangedListener {
+ private static final String REFERENCE_MODEL = "__reference_model";
protected SmooksConfigurationFileGenerateContext smooksConfigurationFileGenerateContext;
protected IViewerInitor sourceViewerInitor;
protected IViewerInitor targetViewerInitor;
@@ -131,6 +136,8 @@
protected SmooksFileBuilder smooksFileBuilder = null;
protected GraphicalInformationSaver graphicalInformationSaver = null;
+ protected Object sourceTreeViewerInputModel = null;
+ protected Object targetTreeViewerInputModel = null;
protected boolean commandStackChanged = false;
protected ActionRegistry actionRegistry;
@@ -205,10 +212,6 @@
new TreePaintControlListener());
sourceViewer.getTree().addListener(SWT.PaintItem,
new TreeItemPaintListener());
-
- if (initSourceTreeViewerProviders()) {
- initSourceTreeViewer();
- }
composite1.setLayoutData(gd);
composite1.setBackground(GraphicsConstants.groupBorderColor);
}
@@ -249,11 +252,6 @@
new TreePaintControlListener());
targetViewer.getTree().addListener(SWT.PaintItem,
new TreeItemPaintListener());
-
- if (initTargetTreeViewerProviders()) {
- initTargetTreeViewer();
- }
- targetViewer.expandAll();
composite3.setBackground(GraphicsConstants.groupBorderColor);
}
@@ -305,9 +303,17 @@
section1.setLayoutData(sgd1);
toolkit.paintBordersFor(rootMainControl);
+
+ form.pack();
+
this.hookGraphicalViewer();
this.initGraphicalViewer();
-
+ if (initSourceTreeViewerProviders()) {
+ initSourceTreeViewer();
+ }
+ if (initTargetTreeViewerProviders()) {
+ initTargetTreeViewer();
+ }
getSite().getSelectionProvider().addSelectionChangedListener(this);
}
@@ -316,7 +322,11 @@
}
protected void initTargetTreeViewer() {
- targetViewer.expandAll();
+ if (this.targetTreeViewerInputModel != null) {
+ List list = new ArrayList();
+ list.add(targetTreeViewerInputModel);
+ targetViewer.setInput(list);
+ }
}
protected boolean initTargetTreeViewerProviders() {
@@ -334,7 +344,11 @@
}
protected void initSourceTreeViewer() {
- sourceViewer.expandAll();
+ if (this.sourceTreeViewerInputModel != null) {
+ List list = new ArrayList();
+ list.add(sourceTreeViewerInputModel);
+ sourceViewer.setInput(list);
+ }
}
protected boolean initSourceTreeViewerProviders() {
@@ -351,22 +365,27 @@
Class<? extends Object> modelClass) {
for (int i = 0; i < items.length; i++) {
TreeItem item = (TreeItem) items[i];
- AbstractStructuredDataModel model = null;
- if (modelClass == SourceModel.class) {
- model = new SourceModel();
+ if (item.getData(REFERENCE_MODEL) != null) {
+
+ } else {
+ AbstractStructuredDataModel model = null;
+ if (modelClass == SourceModel.class) {
+ model = new SourceModel();
+ }
+ if (modelClass == TargetModel.class) {
+ model = new TargetModel();
+ }
+ if (model != null && model instanceof TreeItemRelationModel) {
+ model.setReferenceEntityModel(item.getData());
+ ((TreeItemRelationModel) model).setTreeItem(item);
+ item.setData(REFERENCE_MODEL, model);
+ this.rootModel.addChild(model);
+ }
}
- if (modelClass == TargetModel.class) {
- model = new TargetModel();
+ if (item.getExpanded() && item.getItemCount() > 0) {
+ createGraphModels(item.getItems(), modelClass);
+ } else {
}
- if (model != null && model instanceof TreeItemRelationModel) {
- model.setReferenceEntityModel(item.getData());
- ((TreeItemRelationModel) model).setTreeItem(item);
- this.rootModel.addChild(model);
- if (item.getExpanded() && item.getItemCount() > 0) {
- createGraphModels(item.getItems(), modelClass);
- } else {
- }
- }
}
}
@@ -602,12 +621,14 @@
Resource resource = new SmooksResourceFactoryImpl()
.createResource(URI.createFileURI(path));
resource.load(Collections.EMPTY_MAP);
- IAnalyzer sourceModelAnalyzer = AnalyzerFactory.getInstance().getSmooksModelAnalyzer(sourceDataTypeID);
+ IAnalyzer sourceModelAnalyzer = AnalyzerFactory.getInstance()
+ .getSmooksModelAnalyzer(sourceDataTypeID);
SmooksResourceListType listType = ((DocumentRoot) resource
.getContents().get(0)).getSmooksResourceList();
- Object obj = sourceModelAnalyzer.buildSourceInputObjects(graph, listType,
- ((IFileEditorInput) input).getFile());
+ sourceTreeViewerInputModel = sourceModelAnalyzer
+ .buildSourceInputObjects(graph, listType,
+ ((IFileEditorInput) input).getFile());
} catch (IOException e) {
e.printStackTrace();
} catch (CoreException e) {
@@ -645,7 +666,7 @@
// the viewer must be expanded , then the graphics model can
// calculate the location correctly
try {
- viewer.expandAll();
+ // viewer.expandAll();
if (viewer == this.sourceViewer) {
this.createSourceGraphModels();
sourceDataTypeID = typeID;
@@ -786,6 +807,11 @@
*/
public void paintControl(PaintEvent e) {
Tree tree = (Tree) e.getSource();
+ Class modelClass = TargetModel.class;
+ if (tree == sourceViewer.getTree()) {
+ modelClass = SourceModel.class;
+ }
+ createGraphModels(new TreeItem[] { tree.getTopItem() }, modelClass);
if (tree.getData(TreeItemRelationModel.PRO_TREE_REPAINT) != null) {
// System.out.println("Block a event fire !!");
return;
@@ -816,4 +842,22 @@
return smooksConfigurationFileGenerateContext;
}
+ private class StructuredDataTreeListener implements TreeListener {
+
+ public void treeCollapsed(TreeEvent e) {
+
+ }
+
+ public void treeExpanded(TreeEvent e) {
+ // Tree tree = (Tree) e.getSource();
+ // Class modelClass = TargetModel.class;
+ // if (tree == sourceViewer.getTree()) {
+ // modelClass = SourceModel.class;
+ // }
+ // createGraphModels(new TreeItem[] { tree.getTopItem() },
+ // modelClass);
+ }
+
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r10011 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-02 02:57:04 -0400 (Tue, 02 Sep 2008)
New Revision: 10011
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksGraphConstants.java
Log:
new class for record the image paths and image keys
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksGraphConstants.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksGraphConstants.java (rev 0)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksGraphConstants.java 2008-09-02 06:57:04 UTC (rev 10011)
@@ -0,0 +1,18 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.utils;
+
+/**
+ * @author root
+ *
+ */
+public class SmooksGraphConstants {
+ public static final String IMAGE_PATH_ERROR = "icons/full/obj16/error_obj.gif";
+
+ public static final String IMAGE_PATH_WARNING = "icons/full/obj16/warning_obj.gif";
+
+ public static final String IMAGE_WARNING = IMAGE_PATH_WARNING;
+
+ public static final String IMAGE_ERROR = IMAGE_PATH_ERROR;
+}
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/utils/SmooksGraphConstants.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 8 months
JBoss Tools SVN: r10010 - workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-02 02:56:45 -0400 (Tue, 02 Sep 2008)
New Revision: 10010
Modified:
workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksUIActivator.java
Log:
add two new image
Modified: workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksUIActivator.java
===================================================================
--- workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksUIActivator.java 2008-09-02 06:56:25 UTC (rev 10009)
+++ workspace/dart/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksUIActivator.java 2008-09-02 06:56:45 UTC (rev 10010)
@@ -1,7 +1,10 @@
package org.jboss.tools.smooks.ui;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.smooks.utils.SmooksGraphConstants;
import org.osgi.framework.BundleContext;
/**
@@ -39,6 +42,13 @@
super.stop(context);
}
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+ reg.put(SmooksGraphConstants.IMAGE_ERROR, getImageDescriptor(SmooksGraphConstants.IMAGE_PATH_ERROR));
+ reg.put(SmooksGraphConstants.IMAGE_WARNING, getImageDescriptor(SmooksGraphConstants.IMAGE_PATH_WARNING));
+ }
+
/**
* Returns the shared instance
*
15 years, 8 months
JBoss Tools SVN: r10009 - in workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean: model and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-02 02:56:25 -0400 (Tue, 02 Sep 2008)
New Revision: 10009
Modified:
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/BeanlabelProvider.java
workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
Log:
add some new functions:
1.lazy load javabean properties (javabean children)
2.can analyze the Smooks config file to find whitch property donest exist
3.show error image with LabelProvider
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-09-02 06:26:03 UTC (rev 10008)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/analyzer/JavaBeanAnalyzer.java 2008-09-02 06:56:25 UTC (rev 10009)
@@ -67,6 +67,8 @@
public static final Object PRO_PROJECT_NAME = "__pro_project_name_";
+ public static final String SPACE_STRING = " ";
+
private List usedConnectionList = new ArrayList();
private ComposedAdapterFactory adapterFactory;
@@ -387,14 +389,16 @@
} else {
model = new JavaBeanModel(null, rootClassName);
model.setRootClassModel(true);
- model.setError(true);
+ model.setError("Can't find the class : " + rootClassName);
+ model.setProperties(new ArrayList());
isError = true;
}
if (model != null) {
this.setSelectorIsUsed(rootClassName);
- buildSourceInputProperties(listType, model, false, isError, current);
+ buildSourceInputProperties(listType, model, false, isError,
+ current, classLoader);
}
- return null;
+ return model;
}
public Object buildSourceInputObjects(GraphInformations graphInfo,
@@ -406,7 +410,8 @@
protected void buildSourceInputProperties(SmooksResourceListType listType,
JavaBeanModel beanModel, boolean rootIsWarning,
- boolean rootIsError, ResourceConfigType currentResourceConfigType) {
+ boolean rootIsError, ResourceConfigType currentResourceConfigType,
+ ClassLoader classLoader) {
if (currentResourceConfigType != null) {
List paramList = currentResourceConfigType.getParam();
for (Iterator iterator = paramList.iterator(); iterator.hasNext();) {
@@ -424,7 +429,8 @@
.get(SmooksModelUtils.ATTRIBUTE_SELECTOR, false);
setSelectorIsUsed(currentResourceConfigType
.getSelector());
- analyzeBindingSelector(selector, beanModel, listType);
+ analyzeBindingSelector(selector, beanModel, listType,
+ classLoader);
}
}
}
@@ -432,11 +438,11 @@
}
protected void analyzeBindingSelector(String selector,
- JavaBeanModel currentModel, SmooksResourceListType listType) {
+ JavaBeanModel currentModel, SmooksResourceListType listType,
+ ClassLoader classLoader) {
if (selector.startsWith("${") && selector.endsWith("}")) {
// should get the bean properties
// memory out???
- currentModel.setProperties(null);
currentModel.getProperties();
selector = selector.substring(2, selector.length() - 1);
List rl = listType.getAbstractResourceConfig();
@@ -446,24 +452,65 @@
if (this.isSelectorIsUsed(rct.getSelector()))
continue;
String beanId = getBeanIDFromParam(rct);
- System.out.println(beanId);
if (selector.equals(beanId)) {
resourceConfig = rct;
break;
}
}
if (resourceConfig != null) {
- JavaBeanModel model = findTheChildJavaBeanModelFromBeanId(
- resourceConfig.getSelector(), currentModel);
+ String referenceSelector = resourceConfig.getSelector();
+ JavaBeanModel model = findTheChildJavaBeanModel(
+ referenceSelector, currentModel);
+ // try to test the selector is can be loaded by classloader??
+ Class clazz = null;
+ try {
+ if (classLoader != null) {
+ clazz = classLoader.loadClass(referenceSelector);
+ if (clazz != null)
+ model = JavaBeanModelFactory
+ .getJavaBeanModelWithLazyLoad(clazz);
+ }
+ } catch (Exception e) {
+ // ignore
+ }
// something wrong
if (model == null) {
model = new JavaBeanModel(null, selector);
- currentModel.addProperty(model);
model.setError("don't exist");
+ model.setProperties(new ArrayList());
}
+ currentModel.addProperty(model);
buildSourceInputProperties(listType, model, false, true,
- resourceConfig);
+ resourceConfig, classLoader);
}
+ } else {
+ selector = selector.trim();
+ String[] properties = selector.split(SPACE_STRING);
+ if (properties != null) {
+ JavaBeanModel currentParent = currentModel;
+ for (int i = 0; i < properties.length; i++) {
+ String property = properties[i].trim();
+ Class currentClazz = currentParent.getBeanClass();
+ if (currentClazz != null
+ && property.equals(currentClazz.getName())) {
+
+ } else {
+ JavaBeanModel pm = findTheChildJavaBeanModel(property,
+ currentParent);
+ if (pm != null) {
+
+ } else {
+ pm = new JavaBeanModel(null, property);
+ pm.setProperties(new ArrayList());
+ pm.setError("don't exist");
+ currentParent.addProperty(pm);
+ }
+ currentParent = pm;
+ }
+ }
+ } else {
+ // if properties is null , how to process?
+ }
}
}
@@ -483,15 +530,25 @@
return null;
}
- protected JavaBeanModel findTheChildJavaBeanModelFromBeanId(String name,
+ /**
+ * Find the child JavaBeanModel from parent with the child name <br>
+ * If the parent JavabeanModel is "Collection" or "Array" , the child
+ * JavabeanModel is the first child of the parent model,it means that the
+ * param "name" is useless with the status.
+ *
+ * @param name
+ * @param parentModel
+ * @return
+ */
+ protected JavaBeanModel findTheChildJavaBeanModel(String name,
JavaBeanModel parentModel) {
List list = parentModel.getProperties();
- if (parentModel.isList() || parentModel.isMany()) {
+ if (list == null)
+ return null;
+ if (parentModel.isList() || parentModel.isArray()) {
if (list.size() >= 1) {
JavaBeanModel m = (JavaBeanModel) list.get(0);
- if (m.getBeanClass().getName().equals(name)) {
- return m;
- }
+ return m;
}
}
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/BeanlabelProvider.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/BeanlabelProvider.java 2008-09-02 06:26:03 UTC (rev 10008)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/BeanlabelProvider.java 2008-09-02 06:56:25 UTC (rev 10009)
@@ -4,6 +4,8 @@
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.smooks.javabean.JavaBeanActivator;
import org.jboss.tools.smooks.javabean.ui.JavaImageConstants;
+import org.jboss.tools.smooks.ui.SmooksUIActivator;
+import org.jboss.tools.smooks.utils.SmooksGraphConstants;
public class BeanlabelProvider extends LabelProvider {
@@ -22,6 +24,13 @@
String name = ((JavaBeanModel) element).getName();
if (name == null)
name = "<nonamed>";
+
+ Object error = ((JavaBeanModel) element).getError();
+ if (error != null) {
+ name = name + " " + "<" + error.toString() + ">";
+ return name;
+ }
+
Class typeRef = ((JavaBeanModel) element).getBeanClass();
String typeStr = "";
if (typeRef != null) {
@@ -32,7 +41,10 @@
typeStr = typeRef.getName();
}
}
- name = name + " " + typeStr;
+ if (!typeStr.equals("")) {
+ name = name + " " + typeStr;
+ }
+
return name;
}
return super.getText(element);
@@ -41,6 +53,11 @@
@Override
public Image getImage(Object element) {
if (element instanceof JavaBeanModel) {
+ Object error = ((JavaBeanModel) element).getError();
+ if (error != null) {
+ return SmooksUIActivator.getDefault().getImageRegistry().get(
+ SmooksGraphConstants.IMAGE_ERROR);
+ }
if (((JavaBeanModel) element).isPrimitive()) {
return this.getJavaAttributeImage();
} else {
Modified: workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java
===================================================================
--- workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-09-02 06:26:03 UTC (rev 10008)
+++ workspace/dart/plugins/trunk/org.jboss.tools.smooks.javabean/src/org/jboss/tools/smooks/javabean/model/JavaBeanModel.java 2008-09-02 06:56:25 UTC (rev 10009)
@@ -16,6 +16,7 @@
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Iterator;
import java.util.List;
import org.apache.commons.beanutils.PropertyUtils;
@@ -105,6 +106,7 @@
private boolean lazyLoadProperties = true;
public boolean isList() {
+ if(beanClass == null) return false;
if (Collection.class.isAssignableFrom(beanClass)) {
if (this.propertyDescriptor != null) {
Method rmethod = propertyDescriptor.getReadMethod();
@@ -142,13 +144,14 @@
boolean lazyLoadProperties) {
this.lazyLoadProperties = lazyLoadProperties;
this.beanClass = beanClass;
+ this.name = beanName;
if (beanClass == null)
return;
- if (beanName == null) {
- beanName = beanClass.getSimpleName();
+ if(this.name == null){
+ this.name = beanClass.getSimpleName();
}
- this.name = beanName;
-
+
+
if (propertyDescriptor == null)
isRoot = true;
this.propertyDescriptor = propertyDescriptor;
@@ -180,7 +183,7 @@
setTypeRef(beanType);
this.parentClass = parentClass;
- if (!isMany() && !isList())
+ if (!isArray() && !isList())
setPrimitive(true);
return;
}
@@ -215,7 +218,8 @@
this.isPrimitive = isPrimitive;
}
- public boolean isMany() {
+ public boolean isArray() {
+ if(beanClass == null) return false;
if (beanClass.isArray()) {
Class beanType = beanClass.getComponentType();
setMany(true);
@@ -262,12 +266,13 @@
private List properties;
public List getProperties() {
+
if (properties == null) {
properties = new ArrayList();
Class beanType = beanClass;
if (this.componentClass != null) {
- if (isMany() || isList()) {
+ if (isArray() || isList()) {
JavaBeanModel proxyModel = new JavaBeanModel(
componentClass, componentClass.getSimpleName(),
null, beanClass, this.lazyLoadProperties);
@@ -278,7 +283,7 @@
return properties;
}
}
-
+ if(beanType == null) return null;
PropertyDescriptor[] pds = PropertyUtils
.getPropertyDescriptors(beanType);
@@ -333,4 +338,25 @@
this.error = error;
}
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer buffer = new StringBuffer("JavaBean Name : " + name);
+ if (beanClass != null)
+ buffer.append(";Class : " + this.beanClass.getName());
+ if (this.properties != null) {
+ buffer.append("\n");
+ for (Iterator iterator = properties.iterator(); iterator.hasNext();) {
+ JavaBeanModel child = (JavaBeanModel) iterator.next();
+ buffer.append("\t");
+ buffer.append(child.toString());
+ buffer.append("\n");
+ }
+ }
+ return buffer.toString();
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r10008 - in workspace/dart/plugins/org.jboss.tools.smooks.ui/icons: full and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-09-02 02:26:03 -0400 (Tue, 02 Sep 2008)
New Revision: 10008
Added:
workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/
workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/
workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/error_obj.gif
workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/warning_obj.gif
Log:
Add Error and Warning image
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/error_obj.gif
===================================================================
(Binary files differ)
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/error_obj.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/warning_obj.gif
===================================================================
(Binary files differ)
Property changes on: workspace/dart/plugins/org.jboss.tools.smooks.ui/icons/full/obj16/warning_obj.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 8 months
JBoss Tools SVN: r10007 - in workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools: b2j/messages and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-09-01 22:11:06 -0400 (Mon, 01 Sep 2008)
New Revision: 10007
Added:
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/BpmnToAction.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/dialog/
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/dialog/GeneratedFilesLocationDialog.java
Modified:
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/action/B2JAction.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java
Log:
add some dialogs for translate
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/action/B2JAction.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/action/B2JAction.java 2008-09-01 23:13:10 UTC (rev 10006)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/action/B2JAction.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -11,16 +11,24 @@
package org.jboss.tools.b2j.action;
+import java.util.ArrayList;
+import java.util.List;
+
import org.dom4j.Document;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.dialogs.ListDialog;
import org.jboss.tools.b2j.messages.B2JMessages;
import org.jboss.tools.b2j.translate.BPMN2JPDL;
import org.jboss.tools.b2j.translate.GraphicalFileGenerator;
@@ -30,7 +38,7 @@
/**
* @author Grid Qian
*
- * the popup menu action for bpmn ->jpdl
+ * the popup menu action for bpmn ->jpdl
*/
public class B2JAction implements IObjectActionDelegate {
@@ -44,6 +52,60 @@
String bpmnFileName = bpmnFile.getName();
String bpmnFileParentPath = bpmnFile.getParent().getLocation()
.toOSString();
+ translateBpmn(bpmnFileParentPath, bpmnFileName);
+ }
+
+ public void translateBpmn(String bpmnFileParentPath, String bpmnFileName) {
+ Document bpmnDocument = getDocument(bpmnFileParentPath, bpmnFileName);
+
+ List<String> warningList = new ArrayList<String>();
+ List<String> errorList = new ArrayList<String>();
+
+ List<String> poolIdList = BPMNToUtil.selectElement(BPMNToUtil.getPoolIDsFromDocument(bpmnDocument));
+ BPMN2JPDL translator = new BPMN2JPDL(bpmnFileName, bpmnFileParentPath,poolIdList, bpmnDocument);
+
+ translator.translateToFiles(BPMNToUtil.getGeneratedFileLocation() == null ? bpmnFileParentPath:BPMNToUtil.getGeneratedFileLocation());
+
+ warningList.addAll(translator.getWarnings());
+ errorList.addAll(translator.getErrors());
+
+ // generate jpdl gpd file from *.bpmn_diagram
+ Document bpmnDiagramDocument = getDocument(bpmnFileParentPath,
+ TranslateHelper.getBpmnDiagramName(bpmnFileName));
+ GraphicalFileGenerator generator = new GraphicalFileGenerator(
+ bpmnDiagramDocument, translator.getMap(), bpmnFileParentPath,
+ bpmnFileName);
+ generator.translateToFiles();
+
+ warningList.addAll(generator.getWarnings());
+ errorList.addAll(generator.getErrors());
+
+ showErrors(warningList,errorList);
+ refreshWorkspace();
+ }
+
+ private void showErrors(List<String> warningList, List<String> errorList) {
+ List<String> list = new ArrayList<String>();
+ list.addAll(errorList);
+ list.addAll(warningList);
+ if(list.size() == 0){
+ return;
+ }
+
+ ListDialog dialog = new ListDialog(Display.getCurrent().getActiveShell());
+ dialog.setTitle(B2JMessages.Bpmn_Translate_Message_Dialog_Title);
+ dialog.setMessage(B2JMessages.Bpmn_Translate_Message_Dialog_Message);
+
+ dialog.setInput(list);
+ ILabelProvider labelProvider = new LabelProvider();
+ ArrayContentProvider contentProvider = new ArrayContentProvider();
+ dialog.setContentProvider(contentProvider);
+ dialog.setLabelProvider(labelProvider);
+ dialog.open();
+ dialog.getResult();
+ }
+
+ public Document getDocument(String bpmnFileParentPath, String bpmnFileName) {
Document bpmnDocument = null;
try {
bpmnDocument = BPMNToUtil.parse(bpmnFileParentPath, bpmnFileName);
@@ -51,32 +113,14 @@
System.out.println(B2JMessages.Translate_Error_BpmnFile_CanNotRead
+ e1.getMessage());
}
- BPMN2JPDL translator = new BPMN2JPDL(bpmnFileName, bpmnFileParentPath,
- bpmnDocument);
- translator.translateToFiles();
+ return bpmnDocument;
+ }
- // generate jpdl gpd file from *.bpmn_diagram
- String bpmnDiagramFileName = TranslateHelper
- .getBpmnDiagramName(bpmnFileName);
- Document bpmnDiagramDocument = null;
+ public void refreshWorkspace() {
try {
- bpmnDiagramDocument = BPMNToUtil.parse(bpmnFileParentPath,
- bpmnDiagramFileName);
- } catch (Exception e1) {
- System.out
- .println(B2JMessages.Translate_Error_BpmnDiagramFile_CanNotRead
- + e1.getMessage());
- }
- GraphicalFileGenerator generator = new GraphicalFileGenerator(
- bpmnDiagramDocument, translator.getMap(), bpmnFileParentPath,
- bpmnFileName);
- generator.translateToFiles();
-
- try {
ResourcesPlugin.getWorkspace().getRoot().refreshLocal(
IResource.DEPTH_INFINITE, null);
} catch (CoreException e) {
- // TODO Auto-generated catch block
e.printStackTrace();
}
}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties 2008-09-01 23:13:10 UTC (rev 10006)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2J.properties 2008-09-02 02:11:06 UTC (rev 10007)
@@ -22,6 +22,12 @@
Bpmn_FlowTarget_Attribute_Name=target
Bpmn_FlowDefault_Attribute_Name=isDefault
Bpmn_Element_ID=iD
+Bpmn_Pool_Choose_Dialog_Message=Available BPMN Pools
+Bpmn_Pool_Choose_Dialog_Title=Select BPMN pools to translate
+Bpmn_GeneratedFile_Location_Dialog_Message=Please choose the generated files location. If click Cancel, the generated files will be put under the project
+Bpmn_GeneratedFile_Location_Dialog_Title=Select the generated files location
+Bpmn_Translate_Message_Dialog_Title=Warnings and Errors
+Bpmn_Translate_Message_Dialog_Message=The messages are errors and warnings during the translation:
Jpdl_Suffix=jpdl
Jpdl_Process_Definition_Name=processdefinition.xml
Jpdl_32_Namespace_Url=urn:jbpm.org:jpdl-3.2
@@ -41,12 +47,12 @@
Gpd_Element_Name=element
Gpd_Process_Diagram_Name=process-diagram
Gpd_Label_Element_Name=label
-Translate_Error_GpdFile_CanNotGenerate=Couldn't write gpd.xml:
-Translate_Error_GpdFile_CanNotWrite=Couldn't write gpd definition to a gpd.xml:
-Translate_Error_JpdlProcess_Definition_Null=The JPDL process definition is null.
-Translate_Error_JpdlFile_CanNotGenerate=Couldn't write process definition xml:
-Translate_Error_JpdlFile_CanNotWrite=Couldn't write process definition to a jpdl file:
-Translate_Error_BpmnFile_CanNotRead=Couldn't read or parse bpmn file to a DOM document:
+Translate_Error_GpdFile_CanNotGenerate=Errror: Couldn't write gpd.xml:
+Translate_Error_GpdFile_CanNotWrite=Errror: Couldn't write gpd definition to a gpd.xml:
+Translate_Error_JpdlProcess_Definition_Null=Errror: The JPDL process definition is null.
+Translate_Error_JpdlFile_CanNotGenerate=Errror: Couldn't write process definition xml:
+Translate_Error_JpdlFile_CanNotWrite=Errror: Couldn't write process definition to a jpdl file:
+Translate_Error_BpmnFile_CanNotRead=Errror: Couldn't read or parse bpmn file to a DOM document:
Translate_Error_BpmnDiagramFile_CanNotRead=Couldn't read or parse bpmn_diagram file to a DOM document:
-Translate_Warning_Bpmn_Element_Name= The bpmn element's name is null or same to another element's name:
-Translate_Warning_Bpmn_Element_Type=The type of this bpmn element is not translated to corresponding jpdl element:
\ No newline at end of file
+Translate_Warning_Bpmn_Element_Name=Warning: The bpmn element's name is null or same to another element's name:
+Translate_Warning_Bpmn_Element_Type=Warning: The type of this bpmn element is not translated to corresponding jpdl element:
\ No newline at end of file
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-09-01 23:13:10 UTC (rev 10006)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/messages/B2JMessages.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -29,6 +29,10 @@
public static String Folder_Name_Separator;
public static String Space;
public static String Underline;
+ public static String Width_Attribute_Name;
+ public static String Height_Attribute_Name;
+ public static String X_Attribute_Name;
+ public static String Y_Attribute_Name;
public static String Bpmn_Diagram_Name_Suffix;
public static String Bpmn_Pool_Element_Name;
public static String Bpmn_Element_ID;
@@ -38,14 +42,16 @@
public static String Bpmn_InFlow_Attribute_Name;
public static String Bpmn_XmiType_Attribute_Name;
public static String Bpmn_Href_Attribute_Name;
- public static String Width_Attribute_Name;
- public static String Height_Attribute_Name;
- public static String X_Attribute_Name;
- public static String Y_Attribute_Name;
public static String Bpmn_ActivityType_Attribute_Name;
public static String Bpmn_FlowSource_Attribute_Name;
public static String Bpmn_FlowTarget_Attribute_Name;
public static String Bpmn_FlowDefault_Attribute_Name;
+ public static String Bpmn_Pool_Choose_Dialog_Message;
+ public static String Bpmn_Pool_Choose_Dialog_Title;
+ public static String Bpmn_GeneratedFile_Location_Dialog_Message;
+ public static String Bpmn_GeneratedFile_Location_Dialog_Title;
+ public static String Bpmn_Translate_Message_Dialog_Title;
+ public static String Bpmn_Translate_Message_Dialog_Message;
public static String Jpdl_Suffix;
public static String Jpdl_Process_Definition_Name;
public static String Jpdl_ProcessState_Element_Name;
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-09-01 23:13:10 UTC (rev 10006)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/b2j/translate/BPMN2JPDL.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -82,7 +82,7 @@
/*
* Translate a bpmn diagram to file[]. Every file is a jpdl file
*/
- public void translateToFiles() {
+ public void translateToFiles(String fileLocation) {
String[] strForProcessDefs = translateToStrings();
String[] jpdlFileNames = new String[processDefs.size()];
@@ -93,7 +93,7 @@
}
try {
- TranslateHelper.createFiles(rootLocation, bpmnFileName,
+ TranslateHelper.createFiles(fileLocation, bpmnFileName,
strForProcessDefs, jpdlFileNames,
B2JMessages.Jpdl_Process_Definition_Name);
} catch (Exception e) {
Added: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/BpmnToAction.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/BpmnToAction.java (rev 0)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/action/BpmnToAction.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -0,0 +1,5 @@
+package org.jboss.tools.bpmnto.action;
+
+public class BpmnToAction {
+
+}
Added: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/dialog/GeneratedFilesLocationDialog.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/dialog/GeneratedFilesLocationDialog.java (rev 0)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/dialog/GeneratedFilesLocationDialog.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -0,0 +1,16 @@
+package org.jboss.tools.bpmnto.dialog;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+
+public class GeneratedFilesLocationDialog {
+ MessageDialog dd = null;
+
+ TitleAreaDialog ee;
+
+ void get(){
+
+ }
+
+}
Modified: workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java
===================================================================
--- workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java 2008-09-01 23:13:10 UTC (rev 10006)
+++ workspace/grid/org.jboss.tools.bpmnTo/src/org/jboss/tools/bpmnto/util/BPMNToUtil.java 2008-09-02 02:11:06 UTC (rev 10007)
@@ -18,19 +18,35 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.dom4j.Document;
+import org.dom4j.Element;
import org.dom4j.io.SAXReader;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.widgets.DirectoryDialog;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.dialogs.ListSelectionDialog;
+import org.jboss.tools.b2j.messages.B2JMessages;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
/**
* @author Grid Qian
*
- * this a util class
+ * this a util class
*/
public class BPMNToUtil {
@@ -63,7 +79,8 @@
*/
public static InputSource getInputSource(String parentFolder,
String fileName) throws FileNotFoundException {
- return new InputSource(BPMNToUtil.getInputStream(parentFolder, fileName));
+ return new InputSource(BPMNToUtil
+ .getInputStream(parentFolder, fileName));
}
@@ -85,8 +102,8 @@
throws Exception {
Document document = null;
SAXReader saxReader = createSaxReader();
- document = saxReader.read(BPMNToUtil
- .getInputSource(parentFolder, fileName));
+ document = saxReader.read(BPMNToUtil.getInputSource(parentFolder,
+ fileName));
return document;
}
@@ -127,4 +144,56 @@
return saxParserFactory;
}
+ /*
+ * get bpmn pool id list from a dom document
+ */
+ public static Set<Map.Entry<String, String>> getPoolIDsFromDocument(
+ Document document) {
+ Map<String, String> poolIDMap = new HashMap<String, String>();
+ Element diagram = document.getRootElement();
+ for (Object pool : diagram.elements(B2JMessages.Bpmn_Pool_Element_Name)) {
+ if (((Element) pool).attributeValue(B2JMessages.Bpmn_Element_ID) != null) {
+ poolIDMap.put(((Element) pool)
+ .attributeValue(B2JMessages.Bpmn_Element_ID),
+ ((Element) pool)
+ .attributeValue(B2JMessages.Dom_Element_Name));
+ }
+ }
+ return poolIDMap.entrySet();
+ }
+
+ /*
+ * choose some bpmn pool ids from a ids array
+ */
+ @SuppressWarnings("unchecked")
+ public static List<String> selectElement(
+ Set<Map.Entry<String, String>> idSet) {
+ Shell shell = Display.getCurrent().getActiveShell();
+ ILabelProvider labelProvider = new LabelProvider();
+ ArrayContentProvider contentProvider = new ArrayContentProvider();
+ ListSelectionDialog dialog = new ListSelectionDialog(shell, idSet,
+ contentProvider, labelProvider, null);
+ dialog.setMessage(B2JMessages.Bpmn_Pool_Choose_Dialog_Message);
+ dialog.setTitle(B2JMessages.Bpmn_Pool_Choose_Dialog_Title);
+ Object[] selected = null;
+ if (dialog.open() == Window.OK) {
+ selected = dialog.getResult();
+ }
+ List<String> list = new LinkedList<String>();
+ for (Object entry : selected) {
+ list.add(((Entry<String, String>) entry).getKey());
+ }
+ return list;
+ }
+
+ public static String getGeneratedFileLocation() {
+ DirectoryDialog dialog = new DirectoryDialog(Display.getCurrent()
+ .getActiveShell());
+ dialog.setText(B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Title);
+ dialog
+ .setMessage(B2JMessages.Bpmn_GeneratedFile_Location_Dialog_Message);
+ String path = dialog.open();
+ return path;
+ }
+
}
15 years, 8 months
JBoss Tools SVN: r10006 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-09-01 19:13:10 -0400 (Mon, 01 Sep 2008)
New Revision: 10006
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java
Log:
JBIDE-2671 opening page fails with "div by zero"
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java 2008-09-01 20:20:23 UTC (rev 10005)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/xpl/SashSetting.java 2008-09-01 23:13:10 UTC (rev 10006)
@@ -125,9 +125,9 @@
int[] weights = sash.getWeights();
if (weights.length > 2) {
if (intValue == 0) {
+ sash.maxDown();
+ } else if (intValue == 1000) {
sash.maxUp();
- } else if (intValue == 1000) {
- sash.maxDown();
} else {
weights[0] = intValue;
weights[1] = 1000 - intValue;
15 years, 8 months
JBoss Tools SVN: r10005 - trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-09-01 16:20:23 -0400 (Mon, 01 Sep 2008)
New Revision: 10005
Modified:
trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java
Log:
JBIDE-2621 Portlet wizards should not be restricted to portlet enabled projects
Modified: trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java
===================================================================
--- trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java 2008-09-01 20:07:21 UTC (rev 10004)
+++ trunk/portlet/plugins/org.jboss.tools.portlet.ui/src/org/jboss/tools/portlet/ui/internal/wizard/NewPortletClassDataModelProvider.java 2008-09-01 20:20:23 UTC (rev 10005)
@@ -345,8 +345,9 @@
@Override
public IStatus validate(String propertyName) {
// Validate super class
- if (propertyName.equals(SUPERCLASS))
+ if (propertyName.equals(SUPERCLASS)) {
return validateSuperClassName(getStringProperty(propertyName));
+ }
if ((isJSFPortlet || isSeamPortlet) && propertyName.equals(CLASS_NAME)) {
if (getStringProperty(propertyName).length()!=0) {
@@ -412,8 +413,10 @@
IStatus status = null;
if (superclassName.trim().length() > 0) {
status = super.validate(SUPERCLASS);
- if (status.getSeverity() == IStatus.ERROR)
- return status;
+ if (status.getSeverity() == IStatus.ERROR) {
+ IStatus warningStatus = new Status(IStatus.WARNING,status.getPlugin(),status.getMessage());
+ return warningStatus;
+ }
}
return status;
15 years, 8 months
JBoss Tools SVN: r10004 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-09-01 16:07:21 -0400 (Mon, 01 Sep 2008)
New Revision: 10004
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
Log:
JBIDE-2711 Editor crashes when opening
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-09-01 17:02:40 UTC (rev 10003)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FileUtil.java 2008-09-01 20:07:21 UTC (rev 10004)
@@ -92,10 +92,13 @@
return ResourcesPlugin.getWorkspace().getRoot()
.getFileForLocation(path);
} else {
- WebArtifactEdit edit = WebArtifactEdit
- .getWebArtifactEditForRead(includeFile.getProject());
+ //WebArtifactEdit edit = WebArtifactEdit
+ // .getWebArtifactEditForRead(includeFile.getProject());
IVirtualComponent com = ComponentCore
.createComponent(includeFile.getProject());
+ if (com == null) {
+ return null;
+ }
IVirtualFolder webRootFolder = com.getRootFolder().getFolder(
new Path("/"));
IContainer folder = webRootFolder.getUnderlyingFolder();
15 years, 8 months
JBoss Tools SVN: r10003 - trunk/ws/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: abogachuk
Date: 2008-09-01 13:02:40 -0400 (Mon, 01 Sep 2008)
New Revision: 10003
Modified:
trunk/ws/docs/reference/en/modules/overview.xml
trunk/ws/docs/reference/en/modules/topdown.xml
trunk/ws/docs/reference/en/modules/webproject.xml
Log:
content adjusted
Modified: trunk/ws/docs/reference/en/modules/overview.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/overview.xml 2008-09-01 16:49:03 UTC (rev 10002)
+++ trunk/ws/docs/reference/en/modules/overview.xml 2008-09-01 17:02:40 UTC (rev 10003)
@@ -2,6 +2,6 @@
<chapter id="overview" revisionflag="overview">
<title>JBossWS Runtime Overview</title>
- <para>JBossWS is a web service framework developed as part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5)</para>
+ <para>JBossWS is a web service framework developed as a part of the JBoss Application Server. It implements the JAX-WS specification that defines a programming model and run-time architecture for implementing web services in Java, targeted at the Java Platform, Enterprise Edition 5 (Java EE 5).</para>
</chapter>
\ No newline at end of file
Modified: trunk/ws/docs/reference/en/modules/topdown.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/topdown.xml 2008-09-01 16:49:03 UTC (rev 10002)
+++ trunk/ws/docs/reference/en/modules/topdown.xml 2008-09-01 17:02:40 UTC (rev 10003)
@@ -15,7 +15,7 @@
<section id="createproject">
<title>Creating a Dynamic Web project</title>
- <para>Before create a web service, you must have a Dynamic Web Project</para>
+ <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
<figure>
<title>Dynamic Web Project</title>
<mediaobject>
@@ -24,15 +24,15 @@
</imageobject>
</mediaobject>
</figure>
- <para>Create the service Web project by selecting
+ <para>Create a Web project by selecting
<emphasis><property>New > Project... > Dynamic Web project</property></emphasis>. Enter the following information: </para>
<itemizedlist>
<listitem>
<para>Project Name: enter a project name</para>
</listitem>
<listitem>
- <para>Target runtime: any server depending on you installed. If it is not listed, click New and browse to the location where it is installed. You may set <emphasis><property>Target Runtime</property></emphasis> to <emphasis><property>None</property></emphasis>,
- in this case, you must <link linkend="addfacet">add JBoss Web Service facet to the project</link> .</para>
+ <para>Target runtime: any server depending on your installation. If it is not listed, click New and browse to the location where it is installed to. You may set <emphasis><property>Target Runtime</property></emphasis> to <emphasis><property>None</property></emphasis>,
+ in this case, you should add <link linkend="addfacet">JBoss Web Service facet to the project</link>.</para>
<figure>
<title>Dynamic Web Project Wizard</title>
<mediaobject>
@@ -43,9 +43,9 @@
</figure>
</listitem>
<listitem>
- <para>Set Web Module values</para>
+ <para>Configure Web Module values:</para>
<figure>
- <title>Configures Web Module Settings</title>
+ <title>Web Module Settings Configuration</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/jbossws_webproject_3.png"></imagedata>
@@ -54,12 +54,12 @@
</figure>
</listitem>
</itemizedlist>
- <para>Click <property>Finish</property> button.</para>
+ <para>Click on the <property>Finish</property> button.</para>
</section>
<section id="addfacet">
<title>Configure JBoss Web Service facet settings</title>
- <para>If you have already create a dynamic web project, the next step is to add JBoss Web Service facet to the project </para>
+ <para>If you have already created a new Dynamic Web project, the next step is to add JBoss Web Service facet to the project:</para>
<figure id="figure_addfacet">
<title>Configure JBoss Web Service Facet</title>
<mediaobject>
@@ -69,10 +69,10 @@
</mediaobject>
</figure>
<para>Server Supplied JBossWS Runtime: If you have already set a JBoss runtime to the project's target runtime, you may choose <emphasis><property>Server Supplied JBossWS Runtime</property></emphasis>
- and then click <emphasis><property>Ok</property> to finish the configuration of JBoss Web Service facet. </emphasis>
+ and then click <emphasis><property>Ok</property></emphasis> to finish the configuration of JBoss Web Service facet.
</para>
- <para>If the project has no <emphasis><property>Target Runtime</property></emphasis> settings, you must check the second radio button and specify a JBossWS runtime from the list.
- You also can create a new JBossWS runtime, click <emphasis><property>New...</property></emphasis> button will bring you to another dialog for configuring new JBossWS runtime.</para>
+ <para>If the project has no <emphasis><property>Target Runtime</property></emphasis> settings, you should check the second radio button and specify a JBossWS runtime from the list.
+ You also can create a new JBossWS runtime, click on the <emphasis><property>New...</property></emphasis> button will bring you to another dialog to configure new JBossWS runtime.</para>
<figure id="figure_addfacet1">
<title>Configure JBossWS Runtime</title>
<mediaobject>
@@ -81,7 +81,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>See how to <link linkend="preference">configure a new JBossWS runtime</link> </para>
+ <para>See how to configure a new JBossWS runtime <link linkend="preference">here</link>:</para>
</section>
@@ -89,13 +89,13 @@
<section id="topdownwebservice">
<title>Creating a Web Service from a WSDL document using JBossWS runtime</title>
<para>In this chapter we provide you with the necessary steps to create a Web Service from a WSDL document using JBossWS runtime.</para>
- <para>At first, please make sure that you have already create a dynamic Web project with JBoss Web Service facet get installed. </para>
- <para>To make it see <link linkend="webproject">create dynamic Web project</link>> and <link linkend="facet">add JBoss Web Service facet</link></para>
+ <para>At first, please make sure that you have already created a dynamic Web project with JBoss Web Service facet installed. </para>
+ <para>See how to make it <link linkend="createproject">here</link>> and <link linkend="addfacet">here</link>.</para>
- <para>To create Web Service using JBossWS runtime select<emphasis>
- <property>File > New > Other > Web Services > Web Service</property> to run Web Service creation wizard.
- </emphasis> </para>
- <para>Let's get through the wizard step-by-step.</para>
+ <para>To create a Web Service using JBossWS runtime select<emphasis>
+ <property>File > New > Other > Web Services > Web Service</property></emphasis> to run Web Service creation wizard.
+ </para>
+ <para>Let's get through the wizard step-by-step:</para>
<figure id="figure_create_ws_topdown">
<title>New Web Service Wizard</title>
<mediaobject>
@@ -104,9 +104,9 @@
</imageobject>
</mediaobject>
</figure>
- <para>First, please select <property>Top down Java bean Web Service</property> from Web Service type list,
- and select a WSDL document from workspace, click the link <emphasis><property>Server</property></emphasis> on the page will bring you to
- another dialog. Here you can specify the server to a JBoss Server and Web Service runtime to JBossWS runtime</para>
+ <para>First, please select <property>Top down Java bean Web Service</property> from the Web Service type list,
+ and select a WSDL document from workspace, click on the Server name lilnk on the page will bring you to
+ another dialog. Here you can specify the server to a JBoss Server and Web Service runtime to JBossWS runtime:</para>
<figure id="figure_create_ws_topdown_setserver">
<title>Select Server and Web Service runtime</title>
<mediaobject>
@@ -116,9 +116,9 @@
</mediaobject>
</figure>
- <para>Click on <emphasis>
+ <para>Click on the <emphasis>
<property>Finish</property>
- </emphasis> Button you will have the following wizard view.</para>
+ </emphasis> button to see the next wizard view opened:</para>
<figure id="figure_create_ws_topdown1">
<title>New Web Service Wizard</title>
@@ -129,7 +129,7 @@
</mediaobject>
</figure>
- <para>Click on <emphasis><property>Next</property></emphasis> button to next step</para>
+ <para>Click on the <emphasis><property>Next</property></emphasis> button to proceed:</para>
<figure id="figure_create_ws_topdown_codegen">
<title>New Web Service Wizard</title>
<mediaobject>
@@ -140,10 +140,10 @@
</figure>
<para>On this page, the default package name comes from the namespace of the WSDL document, you also can change it to any valid package name you want.
JAX-WS specification should be set to 2.0 if your JBossWS runtime in JBoss Server is JBossWS native runtime.
- You can specify a catalog file and binding files if you have. If you want the wizard generate empty implementation classes for the
- Web Service, check the <emphasis> <property>Generate default Web Service implementation classes</property> </emphasis> check box .
- If you want update the default Web.xml file with the Web Service servlets get configured, check <emphasis> <property>Update the default Web.xml</property> </emphasis>
- check box. Click on <emphasis><property>Next</property> </emphasis> or <emphasis><property>Finish</property> </emphasis> button to generate code </para>
+ You can specify a catalog file and binding files if you have them. If you want the wizard to generate empty implementation classes for the
+ Web Service, check the <emphasis> <property>Generate default Web Service implementation classes</property> </emphasis> check box.
+ If you want to update the default Web.xml file with the Web Service servlets configured, check the <emphasis> <property>Update the default Web.xml</property> </emphasis>
+ check box. Click on the <emphasis><property>Next</property> </emphasis> or on the <emphasis><property>Finish</property> </emphasis> button to generate code.</para>
<para>Once the Web Service code is generated, you can view the implementation class and add business logic to each method.</para>
<figure id="figure_impl_code">
@@ -154,7 +154,7 @@
</imageobject>
</mediaobject>
</figure>
- <para>View Web.xml</para>
+ <para>View the Web.xml file:</para>
<figure id="figure_webxml">
<title>Web.xml</title>
<mediaobject>
@@ -168,11 +168,11 @@
<section id="bottomupws">
<title>Creating a Web service from a Java bean using JBossWS runtime</title>
- <para>The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and deploying the Web service to a server.</para>
+ <para>The Web Service wizard assists you in creating a new Web service, configuring it for deployment, and then deploying it to the server.</para>
<para>To create a Web service from a bean using JBoss WS:</para>
<para>Setup <link linkend="preference">JBoss WS and development environment</link>.</para>
- <para><link linkend="webproject">Creating a Dynamic Web project</link>.</para>
- <para><link linkend="facet">Add JBossWS Facet to Web project</link>.</para>
+ <para>Create <link linkend="createproject">a Dynamic Web project</link>.</para>
+ <para>Add <link linkend="addfacet">JBossWS Facet</link> to Web project.</para>
<para>Create a Web Service from a java bean: </para>
<itemizedlist>
<listitem>
@@ -184,13 +184,13 @@
<title>Create a new Bean Class</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/jbossws_bottomup.png"></imagedata>
+ <imagedata scale="80" fileref="images/jbossws_bottomup.png"></imagedata>
</imageobject>
</mediaobject>
</figure>
</listitem>
<listitem>
- <para>Click <emphasis><property>File > New > Other</property></emphasis>.Select Web Services in order to display the various Web service wizards. Select the Web Service wizard. Click <property>Next</property> button.</para>
+ <para>Click <emphasis><property>File > New > Other</property></emphasis>. Select Web Services in order to display various Web service wizards. Select the Web Service wizard. Click on the <property>Next</property> button.</para>
<figure>
<title>New Web Service</title>
<mediaobject>
@@ -201,7 +201,7 @@
</figure>
</listitem>
<listitem>
- <para>In the first Web Service wizard page: select <property>Bottom up Java bean Web service</property> as your Web service type, and select the Java bean from which the service will be created.</para>
+ <para>On the first Web Service wizard page: select <property>Bottom up Java bean Web service</property> as your Web service type, and select the Java bean from which the service will be created.</para>
<figure>
<title>Set Web Service Common values</title>
<mediaobject>
Modified: trunk/ws/docs/reference/en/modules/webproject.xml
===================================================================
--- trunk/ws/docs/reference/en/modules/webproject.xml 2008-09-01 16:49:03 UTC (rev 10002)
+++ trunk/ws/docs/reference/en/modules/webproject.xml 2008-09-01 17:02:40 UTC (rev 10003)
@@ -2,7 +2,7 @@
<chapter id="webproject" revisionflag="added">
<title>Creating a Dynamic Web project</title>
- <para>Before create a web service, you must have a Dynamic Web Project</para>
+ <para>Before creating a web service, you should have a Dynamic Web Project created:</para>
<figure>
<title>Dynamic Web Project</title>
<mediaobject>
@@ -11,15 +11,15 @@
</imageobject>
</mediaobject>
</figure>
- <para>Create the service Web project by selecting
+ <para>Create a Web project by selecting
<emphasis><property>New > Project... > Dynamic Web project</property></emphasis>. Enter the following information: </para>
<itemizedlist>
<listitem>
<para>Project Name: enter a project name</para>
</listitem>
<listitem>
- <para>Target runtime: any server depending on you installed. If it is not listed, click New and browse to the location where it is installed. You may set <emphasis><property>Target Runtime</property></emphasis> to <emphasis><property>None</property></emphasis>,
- in this case, you must <link linkend="addfacet">add JBoss Web Service facet to the project</link> .</para>
+ <para>Target runtime: any server depending on your installation. If it is not listed, click New and browse to the location where it is installed to. You may set <emphasis><property>Target Runtime</property></emphasis> to <emphasis><property>None</property></emphasis>,
+ in this case, you should add <link linkend="addfacet">JBoss Web Service facet to the project</link>.</para>
<figure>
<title>Dynamic Web Project Wizard</title>
<mediaobject>
@@ -28,18 +28,18 @@
</imageobject>
</mediaobject>
</figure>
- </listitem>
- <listitem>
- <para>Set Web Module values</para>
+ </listitem>
+ <listitem>
+ <para>Configure Web Module values:</para>
<figure>
- <title>Configures Web Module Settings</title>
+ <title> Web Module Settings Configuration</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/webproject3.png"></imagedata>
</imageobject>
</mediaobject>
- </figure>
+ </figure>
</listitem>
</itemizedlist>
- <para>Click <property>Finish</property> button.</para>
-</chapter>
+ <para>Click on the <property>Finish</property> button.</para>
+</chapter>
15 years, 8 months