JBoss Tools SVN: r15619 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: internal/scanner and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-05-31 05:54:14 -0400 (Sun, 31 May 2009)
New Revision: 15619
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDTag.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbObject.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -176,7 +176,7 @@
XModelObject o = (XModelObject)id;
XMLStoreHelper.saveModelObject(element, o, XMLStoreConstants.TAG_ID, context);
} else {
- //TODO consider other kinds of id
+ //consider other kinds of id
}
}
XModelObject old = pushModelObject(context);
@@ -204,7 +204,7 @@
} else if(XMLStoreConstants.CLS_MODEL_OBJECT.equals(cls)) {
id = XMLStoreHelper.loadModelObject(e_id, context);
} else {
- //TODO consider other kinds of id
+ //consider other kinds of id
}
}
XModelObject old = pushModelObject(context);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbProject.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -43,6 +43,7 @@
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractTagLib;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTagLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDLibrary;
+import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibrary;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
import org.w3c.dom.Element;
@@ -438,6 +439,7 @@
if(fs != null && !fs.isEmpty()) {
Element cse = XMLUtilities.createElement(pathElement, "libraries"); //$NON-NLS-1$
for (ITagLibrary d: fs) {
+ if(d instanceof ICustomTagLibrary) continue;
AbstractTagLib t = (AbstractTagLib)d;
t.toXML(cse, context);
}
@@ -577,7 +579,7 @@
fireChanges(addedLibraries);
libraryDeclarationsRemoved(currentLibraries);
- //TODO
+
try {
registerComponentsInDependentProjects(ds, source);
} catch (CloneNotSupportedException e) {
@@ -695,7 +697,7 @@
postponedChanges.addAll(changes);
return;
}
- //TODO
+ //TODO Implement if it will be needed events and listeners. and fire events to them.
}
class LibraryStorage {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -10,9 +10,6 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.scanner;
-import java.util.HashSet;
-import java.util.Set;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
@@ -44,7 +41,9 @@
* @author Viacheslav Kabanovich
*/
public class XMLScanner implements IFileScanner {
- public static final String ATTR_TAGCLASS ="tagclass"; //$NON-NLS-1$
+ public static final String ATTR_SHORTNAME = "shortname"; //$NON-NLS-1$
+ public static final String ATTR_TAGCLASS = "tagclass"; //$NON-NLS-1$
+ public static final String ATTR_TAG_NAME = "tag-name"; //$NON-NLS-1$
public static final String ATTR_BODY_CONTENT = "bodycontent"; //$NON-NLS-1$
public static final String ATTR_FACET_NAME = "facet-name"; //$NON-NLS-1$
public static final String ATTR_ATTRIBUTE_NAME = "attribute-name"; //$NON-NLS-1$
@@ -76,7 +75,9 @@
if(model == null) return false;
XModelObject o = EclipseResourceUtil.getObjectByResource(model, f);
if(o == null) return false;
- if(LibraryScanner.isTLDFile(o) || LibraryScanner.isFaceletTaglibFile(o)) return true;
+ if(LibraryScanner.isTLDFile(o)
+ || LibraryScanner.isFaceletTaglibFile(o)
+ || LibraryScanner.isFacesConfigFile(o)) return true;
return false;
}
@@ -93,14 +94,6 @@
return parse(o, f.getFullPath(), sp);
}
- static Set<String> INTERNAL_ATTRIBUTES = new HashSet<String>();
-
- static {
- INTERNAL_ATTRIBUTES.add("NAME"); //$NON-NLS-1$
- INTERNAL_ATTRIBUTES.add("EXTENSION"); //$NON-NLS-1$
- INTERNAL_ATTRIBUTES.add("#comment"); //$NON-NLS-1$
- }
-
public LoadedDeclarations parse(XModelObject o, IPath source, IKbProject sp) {
if(o == null) return null;
@@ -137,7 +130,7 @@
library.setId(o);
library.setURI(new XMLValueInfo(o, AbstractTagLib.URI));
library.setDisplayName(new XMLValueInfo(o, TLDLibrary.DISPLAY_NAME));
- library.setShortName(new XMLValueInfo(o, "shortname"));
+ library.setShortName(new XMLValueInfo(o, ATTR_SHORTNAME));
String version = o.getAttributeValue(TLDLibrary.VERSION);
if(version == null) {
if("FileTLD_1_2".equals(o.getModelEntity().getName())) {
@@ -162,8 +155,6 @@
tag.setDescription(new XMLValueInfo(t, AbstractComponent.DESCRIPTION));
tag.setComponentClass(new XMLValueInfo(t, ATTR_TAGCLASS));
tag.setCanHaveBody(new XMLValueInfo(t, ATTR_BODY_CONTENT));
- //TODO
-// tag.setComponentType(componentType);
XModelObject[] as = t.getChildren();
for(XModelObject a: as) {
@@ -197,7 +188,7 @@
if(entity.startsWith("FaceletTaglibTag")) {
FaceletTag tag = new FaceletTag();
tag.setId(t);
- tag.setName(new XMLValueInfo(t, "tag-name"));
+ tag.setName(new XMLValueInfo(t, ATTR_TAG_NAME));
library.addComponent(tag);
} else if(entity.startsWith("FaceletTaglibFunction")) {
ELFunction f = new ELFunction();
@@ -223,11 +214,11 @@
FacesConfigComponent component = new FacesConfigComponent();
component.setId(c);
//what else can we take for the name? only attribute 'component-type' is available
- component.setName(new XMLValueInfo(c, "component-type"));
+ component.setName(new XMLValueInfo(c, AbstractComponent.COMPONENT_TYPE));
- component.setComponentClass(new XMLValueInfo(c, "component-class"));
- component.setComponentType(c.getAttributeValue("component-type"));
- component.setDescription(new XMLValueInfo(c, "description"));
+ component.setComponentClass(new XMLValueInfo(c, AbstractComponent.COMPONENT_CLASS));
+ component.setComponentType(new XMLValueInfo(c, AbstractComponent.COMPONENT_TYPE));
+ component.setDescription(new XMLValueInfo(c, AbstractComponent.DESCRIPTION));
XModelObject[] as = c.getChildren();
for (XModelObject child: as) {
@@ -235,8 +226,7 @@
if(entity.startsWith("JSFAttribute")) {
FacesConfigAttribute attr = new FacesConfigAttribute();
attr.setId(child);
- attr.setName(new XMLValueInfo(child, ATTR_ATTRIBUTE_NAME));
-
+ attr.setName(new XMLValueInfo(child, ATTR_ATTRIBUTE_NAME));
component.addAttribute(attr);
} else if(entity.startsWith("JSFFacet")) {
Facet f = new Facet();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -123,6 +123,10 @@
return proposals.toArray(new TextProposal[proposals.size()]);
}
+ public AbstractAttribute clone() throws CloneNotSupportedException {
+ return (AbstractAttribute)super.clone();
+ }
+
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
@@ -160,14 +164,14 @@
public void loadXML(Element element, Properties context) {
super.loadXML(element, context);
+ setName(attributesInfo.get(XMLStoreConstants.ATTR_NAME));
+ setDescription(attributesInfo.get(AbstractComponent.DESCRIPTION));
+ setRequired(attributesInfo.get(REQUIRED));
+
if(name == null && element.hasAttribute(XMLStoreConstants.ATTR_NAME)) {
name = element.getAttribute(XMLStoreConstants.ATTR_NAME);
}
- setName(attributesInfo.get(XMLStoreConstants.ATTR_NAME));
- setDescription(attributesInfo.get(AbstractComponent.DESCRIPTION));
- setRequired(attributesInfo.get(REQUIRED));
- //TODO
}
@Override
@@ -181,7 +185,7 @@
@Override
protected void loadAttributesInfo(Element element, Properties context) {
- if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLStoreConstants.ATTR_NAME));
attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -152,6 +152,11 @@
this.componentType = componentType;
}
+ public void setComponentType(IValueInfo s) {
+ componentType = s == null ? null : s.getValue();
+ attributesInfo.put(COMPONENT_TYPE, s);
+ }
+
/* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.taglib.IComponent#getDescription()
*/
@@ -287,6 +292,18 @@
requiredAttributes.remove(attribute.getName());
}
+ public AbstractComponent clone() throws CloneNotSupportedException {
+ AbstractComponent copy = (AbstractComponent)super.clone();
+ copy.attributes = new HashMap<String, IAttribute>();
+ copy.preferableAttributes = new HashMap<String, IAttribute>();
+ copy.requiredAttributes = new HashMap<String, IAttribute>();
+ IAttribute[] as = getAttributes();
+ for (IAttribute a: as) {
+ copy.addAttribute(((AbstractAttribute)a).clone());
+ }
+ return copy;
+ }
+
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
@@ -321,8 +338,8 @@
public void mergeAttributes(AbstractComponent c, Change children) {
Map<Object,AbstractAttribute> attributeMap = new HashMap<Object, AbstractAttribute>();
- for (IAttribute a: attributes.values()) attributeMap.put(((KbObject)a).getId(), (AbstractAttribute)a);
- for (IAttribute a: c.attributes.values()) {
+ for (IAttribute a: getAttributes()) attributeMap.put(((KbObject)a).getId(), (AbstractAttribute)a);
+ for (IAttribute a: c.getAttributes()) {
AbstractAttribute loaded = (AbstractAttribute)a;
AbstractAttribute current = attributeMap.get(loaded.getId());
if(current == null) {
@@ -344,9 +361,6 @@
}
}
- public AbstractComponent clone() throws CloneNotSupportedException {
- return (AbstractComponent)super.clone();
- }
public String getXMLName() {
return KbXMLStoreConstants.TAG_COMPONENT;
}
@@ -358,7 +372,7 @@
element.setAttribute(XMLStoreConstants.ATTR_NAME, name);
}
- for (IAttribute c: attributes.values()) {
+ for (IAttribute c: getAttributes()) {
((KbObject)c).toXML(element, context);
}
@@ -375,9 +389,8 @@
setDescription(attributesInfo.get(DESCRIPTION));
setComponentClass(attributesInfo.get(COMPONENT_CLASS));
setCanHaveBody(attributesInfo.get(BODY_CONTENT));
+ setComponentType(attributesInfo.get(COMPONENT_TYPE));
- //TODO
- //componentType?
Element[] cs = XMLUtilities.getChildren(element, KbXMLStoreConstants.TAG_ATTRIBUTE);
for (Element e: cs) {
String cls = e.getAttribute(XMLStoreConstants.ATTR_CLASS);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -326,6 +326,8 @@
c = new TLDTag();
} else if(KbXMLStoreConstants.CLS_FACELET_LIBRARY.equals(cls)) {
c = new FaceletTag();
+ } else if(KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY.equals(cls)) {
+ c = new FacesConfigComponent();
} else {
//consider other cases;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -77,7 +77,7 @@
@Override
protected void loadAttributesInfo(Element element, Properties context) {
- if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_NAME));
attributesInfo.put(SIGNATURE, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_SIGN));
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTag.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -21,4 +21,8 @@
return KbXMLStoreConstants.CLS_FACELET_LIBRARY;
}
+ public FaceletTag clone() throws CloneNotSupportedException {
+ return (FaceletTag)super.clone();
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -11,14 +11,15 @@
package org.jboss.tools.jst.web.kb.internal.taglib;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.common.xml.XMLUtilities;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
-import org.jboss.tools.jst.web.kb.taglib.Facet;
import org.jboss.tools.jst.web.kb.taglib.IELFunction;
import org.jboss.tools.jst.web.kb.taglib.IFaceletTagLibrary;
import org.w3c.dom.Element;
@@ -50,6 +51,7 @@
public FaceletTagLibrary clone() throws CloneNotSupportedException {
FaceletTagLibrary copy = (FaceletTagLibrary)super.clone();
copy.functions = new ArrayList<ELFunction>();
+ copy.functionArray = null;
for (IELFunction f: getFunctions()) {
copy.addFunction(((ELFunction)f).clone());
}
@@ -62,11 +64,42 @@
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
- FacesConfigTagLibrary t = (FacesConfigTagLibrary)s;
- //TODO
+ FaceletTagLibrary t = (FaceletTagLibrary)s;
+ Change children = new Change(this, null, null, null);
+ mergeFunctions(t, children);
+ changes = Change.addChange(changes, children);
return changes;
}
+ public void mergeFunctions(FaceletTagLibrary c, Change children) {
+ Map<Object,ELFunction> functionMap = new HashMap<Object, ELFunction>();
+ for (IELFunction f: getFunctions()) functionMap.put(((KbObject)f).getId(), (ELFunction)f);
+ for (IELFunction f: c.getFunctions()) {
+ ELFunction loaded = (ELFunction)f;
+ ELFunction current = functionMap.get(loaded.getId());
+ if(current == null) {
+ addFunction(loaded);
+ Change change = new Change(this, null, null, loaded);
+ children.addChildren(Change.addChange(null, change));
+ } else {
+ List<Change> rc = current.merge(loaded);
+ if(rc != null) children.addChildren(rc);
+ }
+ }
+ for (ELFunction f: functionMap.values()) {
+ ELFunction removed = f;
+ synchronized (functions) {
+ if(functions.contains(removed)) {
+ continue;
+ }
+ functions.remove(removed.getName());
+ functionArray = null;
+ }
+ Change change = new Change(this, null, removed, null);
+ children.addChildren(Change.addChange(null, change));
+ }
+ }
+
public Element toXML(Element parent, Properties context) {
Element element = super.toXML(parent, context);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -30,7 +30,7 @@
@Override
protected void loadAttributesInfo(Element element, Properties context) {
- if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_ATTRIBUTE_NAME));
attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -38,10 +38,12 @@
public Facet[] getFacets() {
if(facetArray == null) {
- if(facets.isEmpty()) {
- facetArray = EMPTY_FACET_SET;
- } else {
- facetArray = facets.values().toArray(new Facet[0]);
+ synchronized (facets) {
+ if (facets.isEmpty()) {
+ facetArray = EMPTY_FACET_SET;
+ } else {
+ facetArray = facets.values().toArray(new Facet[0]);
+ }
}
}
return facetArray;
@@ -49,11 +51,12 @@
public Facet[] getFacets(String nameTemplate) {
Facet[] fs = getFacets();
- if(fs == null || fs.length == 0) return EMPTY_FACET_SET;
+ if(fs.length == 0) return EMPTY_FACET_SET;
List<Facet> result = new ArrayList<Facet>();
for (Facet f: fs) {
String name = f.getName();
- boolean match = false; //TODO implement
+ //TODO implement better matching name and nameTemplate
+ boolean match = name.startsWith(nameTemplate);
if(match) result.add(f);
}
return result.isEmpty() ? EMPTY_FACET_SET : result.toArray(new Facet[0]);
@@ -61,10 +64,21 @@
public void addFacet(Facet f) {
adopt((KbObject)f);
- facets.put(f.getName(), f);
- facetArray = null;
+ synchronized(facets) {
+ facets.put(f.getName(), f);
+ facetArray = null;
+ }
}
+ public FacesConfigComponent clone() throws CloneNotSupportedException {
+ FacesConfigComponent copy = new FacesConfigComponent();
+ copy.facets = new HashMap<String, Facet>();
+ for (Facet f: getFacets()) {
+ copy.addFacet(f.clone());
+ }
+ return copy;
+ }
+
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
}
@@ -82,9 +96,9 @@
public void mergeFacets(FacesConfigComponent c, Change children) {
Map<Object,Facet> facetMap = new HashMap<Object, Facet>();
- for (Facet a: facets.values()) facetMap.put(((KbObject)a).getId(), a);
- for (Facet a: c.facets.values()) {
- Facet loaded = (Facet)a;
+ for (Facet f: getFacets()) facetMap.put(f.getId(), f);
+ for (Facet f: c.getFacets()) {
+ Facet loaded = f;
Facet current = facetMap.get(loaded.getId());
if(current == null) {
addFacet(loaded);
@@ -95,14 +109,17 @@
if(rc != null) children.addChildren(rc);
}
}
- for (Facet a: facetMap.values()) {
- Facet removed = a;
- if(facets.get(removed.getName()) == removed) {
+ for (Facet f: facetMap.values()) {
+ Facet removed = f;
+ synchronized (facets) {
+ if(facets.get(removed.getName()) != removed) {
+ continue;
+ }
facets.remove(removed.getName());
facetArray = null;
- Change change = new Change(this, null, removed, null);
- children.addChildren(Change.addChange(null, change));
}
+ Change change = new Change(this, null, removed, null);
+ children.addChildren(Change.addChange(null, change));
}
}
@@ -110,7 +127,7 @@
Element element = super.toXML(parent, context);
for (Facet f: getFacets()) {
- ((KbObject)f).toXML(element, context);
+ f.toXML(element, context);
}
return element;
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -17,7 +17,6 @@
import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
-import org.jboss.tools.jst.web.kb.taglib.Facet;
import org.jboss.tools.jst.web.kb.taglib.IComponent;
import org.jboss.tools.jst.web.kb.taglib.IFacesConfigTagLibrary;
@@ -46,19 +45,11 @@
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
- FacesConfigTagLibrary t = (FacesConfigTagLibrary)s;
+// FacesConfigTagLibrary t = (FacesConfigTagLibrary)s;
- Change children = new Change(this, null, null, null);
- mergeFunctions(t, children);
- changes = Change.addChange(changes, children);
-
return changes;
}
- public void mergeFunctions(FacesConfigTagLibrary c, Change children) {
- //TODO
- }
-
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDAttribute.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDAttribute.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -14,6 +14,10 @@
public class TLDAttribute extends AbstractAttribute {
+ public TLDAttribute clone() throws CloneNotSupportedException {
+ return (TLDAttribute)super.clone();
+ }
+
public String getXMLClass() {
return KbXMLStoreConstants.CLS_TLD_LIBRARY;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDLibrary.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -11,11 +11,11 @@
package org.jboss.tools.jst.web.kb.internal.taglib;
import java.util.List;
-
import org.jboss.tools.common.model.project.ext.IValueInfo;
import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.taglib.INameSpace;
import org.jboss.tools.jst.web.kb.taglib.ITLDLibrary;
import org.w3c.dom.Element;
@@ -63,7 +63,16 @@
}
public void createDefaultNameSpace() {
+ setDefaultNameSpace(new INameSpace() {
+ public String getURI() {
+ return uri;
+ }
+
+ public String getPrefix() {
+ return shortName;
+ }
+ });
}
public TLDLibrary clone() throws CloneNotSupportedException {
@@ -72,7 +81,19 @@
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
- //TODO
+ TLDLibrary l = (TLDLibrary)s;
+ if(!stringsEqual(displayName, l.displayName)) {
+ changes = Change.addChange(changes, new Change(this, DISPLAY_NAME, displayName, l.displayName));
+ displayName = l.displayName;
+ }
+ if(!stringsEqual(shortName, l.shortName)) {
+ changes = Change.addChange(changes, new Change(this, SHORT_NAME, shortName, l.shortName));
+ shortName = l.shortName;
+ }
+ if(!stringsEqual(version, l.version)) {
+ changes = Change.addChange(changes, new Change(this, VERSION, version, l.version));
+ version = l.version;
+ }
return changes;
}
@@ -95,7 +116,6 @@
if(version == null && element.hasAttribute(VERSION)) {
version = element.getAttribute(VERSION);
}
- //TODO
}
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDTag.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDTag.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/TLDTag.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -36,13 +36,12 @@
@Override
protected void loadAttributesInfo(Element element, Properties context) {
- if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLStoreConstants.ATTR_NAME));
attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
attributesInfo.put(COMPONENT_CLASS, new XMLValueInfo(a, XMLScanner.ATTR_TAGCLASS));
attributesInfo.put(BODY_CONTENT, new XMLValueInfo(a, XMLScanner.ATTR_BODY_CONTENT));
- //TODO other attributes as in XMLScanner
} else {
super.loadAttributesInfo(element, context);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java 2009-05-30 21:59:40 UTC (rev 15618)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java 2009-05-31 09:54:14 UTC (rev 15619)
@@ -10,10 +10,12 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.taglib;
+import java.util.List;
import java.util.Properties;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.ext.IValueInfo;
+import org.jboss.tools.common.model.project.ext.event.Change;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
@@ -63,6 +65,24 @@
attributesInfo.put(AbstractComponent.DESCRIPTION, s);
}
+ public Facet clone() throws CloneNotSupportedException {
+ return (Facet)super.clone();
+ }
+
+ public List<Change> merge(KbObject s) {
+ List<Change> changes = super.merge(s);
+ Facet f = (Facet)s;
+ if(!stringsEqual(name, f.name)) {
+ changes = Change.addChange(changes, new Change(this, XMLStoreConstants.ATTR_NAME, name, f.name));
+ name = f.name;
+ }
+ if(!stringsEqual(description, f.description)) {
+ changes = Change.addChange(changes, new Change(this, AbstractComponent.DESCRIPTION, description, f.description));
+ description = f.description;
+ }
+ return changes;
+ }
+
public String getXMLName() {
return KbXMLStoreConstants.TAG_FACET;
}
@@ -99,7 +119,7 @@
@Override
protected void loadAttributesInfo(Element element, Properties context) {
- if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId() && getId() != null) {
XModelObject a = (XModelObject)getId();
attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_FACET_NAME));
attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
17 years, 1 month
JBoss Tools SVN: r15618 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-30 17:59:40 -0400 (Sat, 30 May 2009)
New Revision: 15618
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/CustomTask.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java
Log:
- allow config of jbpm 4 runtimes (GPD-346)
- support custom node (GPD-349)
- remove esb node temporarily (GPD-350)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-30 21:57:32 UTC (rev 15617)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-30 21:59:40 UTC (rev 15618)
@@ -162,7 +162,7 @@
<figure class="org.jboss.tools.flow.jpdl4.figure.TaskFigure"></figure>
</node>
</element>
- <element
+<!-- <element
class="org.jboss.tools.flow.jpdl4.model.ServiceTask"
figure="icons/16/task_empty.png"
id="org.jboss.tools.flow.jpdl4.serviceTask"
@@ -171,7 +171,7 @@
<node>
<figure class="org.jboss.tools.flow.jpdl4.figure.TaskFigure"></figure>
</node>
- </element>
+ </element> -->
<element
class="org.jboss.tools.flow.jpdl4.model.HumanTask"
figure="icons/16/task_empty.png"
@@ -191,7 +191,17 @@
<node>
<figure class="org.jboss.tools.flow.jpdl4.figure.TaskFigure"></figure>
</node>
+ <element
+ class="org.jboss.tools.flow.jpdl4.model.CustomTask"
+ figure="icons/16/task_empty.png"
+ id="org.jboss.tools.flow.jpdl4.customTask"
+ label="custom"
+ language="org.jboss.tools.flow.jpdl4">
+ <node>
+ <figure class="org.jboss.tools.flow.jpdl4.figure.TaskFigure"></figure>
+ </node>
</element>
+ </element>
<element
class="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"
figure="icons/16/gateway_exclusive.png"
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2009-05-30 21:57:32 UTC (rev 15617)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2009-05-30 21:59:40 UTC (rev 15618)
@@ -151,16 +151,16 @@
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
);
entries.add(combined);
+// combined = new CombinedTemplateCreationEntry(
+// "esb",
+// "Create a new Service Task",
+// "org.jboss.tools.flow.jpdl4.serviceTask",
+// ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.serviceTask"),
+// ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/16/task_empty.png")),
+// ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
+// );
+// entries.add(combined);
combined = new CombinedTemplateCreationEntry(
- "esb",
- "Create a new Service Task",
- "org.jboss.tools.flow.jpdl4.serviceTask",
- ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.serviceTask"),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/16/task_empty.png")),
- ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
- );
- entries.add(combined);
- combined = new CombinedTemplateCreationEntry(
"task",
"Create a new Human Task",
"org.jboss.tools.flow.jpdl4.humanTask",
@@ -178,6 +178,15 @@
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
);
entries.add(combined);
+ combined = new CombinedTemplateCreationEntry(
+ "custom",
+ "Create a new Custom Node",
+ "org.jboss.tools.flow.jpdl4.customTask",
+ ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.customTask"),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/16/task_empty.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
+ );
+ entries.add(combined);
return entries;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-30 21:57:32 UTC (rev 15617)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-30 21:59:40 UTC (rev 15618)
@@ -31,6 +31,7 @@
import org.jboss.tools.flow.jpdl4.Logger;
import org.jboss.tools.flow.jpdl4.model.Assignment;
import org.jboss.tools.flow.jpdl4.model.CancelEndEvent;
+import org.jboss.tools.flow.jpdl4.model.CustomTask;
import org.jboss.tools.flow.jpdl4.model.ErrorEndEvent;
import org.jboss.tools.flow.jpdl4.model.EventListener;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
@@ -197,6 +198,7 @@
else if ("org.jboss.tools.flow.jpdl4.serviceTask".equals(elementId)) return "esb";
else if ("org.jboss.tools.flow.jpdl4.humanTask".equals(elementId)) return "task";
else if ("org.jboss.tools.flow.jpdl4.subprocessTask".equals(elementId)) return "sub-process";
+ else if ("org.jboss.tools.flow.jpdl4.customTask".equals(elementId)) return "node";
else if ("org.jboss.tools.flow.jpdl4.exclusiveGateway".equals(elementId)) return "decision";
else if ("org.jboss.tools.flow.jpdl4.parallelJoinGateway".equals(elementId)) return "join";
else if ("org.jboss.tools.flow.jpdl4.parallelForkGateway".equals(elementId)) return "fork";
@@ -747,6 +749,8 @@
new HumanTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof SubprocessTask) {
new SubprocessTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
+ } else if (element instanceof CustomTask) {
+ new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ExclusiveGateway) {
new ExclusiveGatewayWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ForkParallelGateway) {
@@ -802,6 +806,8 @@
new HumanTaskWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof SubprocessTask) {
new SubprocessTaskWrapperSerializer().appendBody(buffer, wrapper, level);
+ } else if (element instanceof CustomTask) {
+ new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ExclusiveGateway) {
new ExclusiveGatewayWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ForkParallelGateway) {
@@ -867,6 +873,8 @@
buffer.append("</task>");
} else if (element instanceof SubprocessTask) {
buffer.append("</sub-process>");
+ } else if (element instanceof CustomTask) {
+ buffer.append("</node>");
} else if (element instanceof ExclusiveGateway) {
buffer.append("</decision>");
} else if (element instanceof ForkParallelGateway) {
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/CustomTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/CustomTask.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/CustomTask.java 2009-05-30 21:59:40 UTC (rev 15618)
@@ -0,0 +1,10 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+
+public class CustomTask extends Task {
+
+ protected boolean isPropagationExclusive() {
+ return true;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/CustomTask.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java 2009-05-30 21:57:32 UTC (rev 15617)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java 2009-05-30 21:59:40 UTC (rev 15618)
@@ -4,14 +4,13 @@
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
import org.jboss.tools.flow.common.properties.IPropertyId;
public class JavaTaskArgumentsSection extends JpdlPropertySection implements IPropertyId {
- private final static String NO_FIELDS = "The configured class has no fields that can be configured.";
- private final static String CONFIGURE_FIELDS = "Configure the value of the supported fields as needed.";
+ private final static String NO_ARGUMENTS = "The configured method has no arguments that can be configured.";
+ private final static String CONFIGURE_ARGUMENTS = "Configure the value of the supported arguments as needed.";
private CLabel infoLabel;
@@ -51,7 +50,7 @@
private void createInfoLabel(Composite parent) {
- infoLabel = getWidgetFactory().createCLabel(parent, NO_FIELDS);
+ infoLabel = getWidgetFactory().createCLabel(parent, NO_ARGUMENTS);
FormData data = new FormData();
data.left = new FormAttachment(0, 0);
data.top = new FormAttachment(0, 5);
17 years, 1 month
JBoss Tools SVN: r15617 - trunk/jbpm/features/org.jboss.tools.jbpm.common.feature.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-30 17:57:32 -0400 (Sat, 30 May 2009)
New Revision: 15617
Modified:
trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.xml
Log:
update licence info
Modified: trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.xml
===================================================================
--- trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.xml 2009-05-30 12:54:25 UTC (rev 15616)
+++ trunk/jbpm/features/org.jboss.tools.jbpm.common.feature/feature.xml 2009-05-30 21:57:32 UTC (rev 15617)
@@ -9,8 +9,201 @@
[Enter Feature Description here.]
</description>
- <copyright url="http://www.example.com/copyright">
- [Enter Copyright Description here.]
+ <copyright>
+ Eclipse Public License - v 1.0
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
+ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
+DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.
+1. DEFINITIONS
+"Contribution" means:
+a) in the case of the initial Contributor, the initial code and
+documentation distributed under this Agreement, and
+b) in the case of each subsequent Contributor:
+i) changes to the Program, and
+ii) additions to the Program;
+where such changes and/or additions to the Program originate
+from and are distributed by that particular Contributor. A Contribution
+'originates' from a Contributor if it was added to the Program
+by such Contributor itself or anyone acting on such Contributor's
+behalf. Contributions do not include additions to the Program
+which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii)
+are not derivative works of the Program.
+"Contributor" means any person or entity that distributes the
+Program.
+"Licensed Patents " mean patent claims licensable by a Contributor
+which are necessarily infringed by the use or sale of its Contribution
+alone or when combined with the Program.
+"Program" means the Contributions distributed in accordance with
+this Agreement.
+"Recipient" means anyone who receives the Program under this
+Agreement, including all Contributors.
+2. GRANT OF RIGHTS
+a) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free copyright
+license to reproduce, prepare derivative works of, publicly display,
+publicly perform, distribute and sublicense the Contribution
+of such Contributor, if any, and such derivative works, in source
+code and object code form.
+b) Subject to the terms of this Agreement, each Contributor hereby
+grants Recipient a non-exclusive, worldwide, royalty-free patent
+license under Licensed Patents to make, use, sell, offer to sell,
+import and otherwise transfer the Contribution of such Contributor,
+if any, in source code and object code form. This patent license
+shall apply to the combination of the Contribution and the Program
+if, at the time the Contribution is added by the Contributor,
+such addition of the Contribution causes such combination to
+be covered by the Licensed Patents. The patent license shall
+not apply to any other combinations which include the Contribution.
+No hardware per se is licensed hereunder.
+c) Recipient understands that although each Contributor grants
+the licenses to its Contributions set forth herein, no assurances
+are provided by any Contributor that the Program does not infringe
+the patent or other intellectual property rights of any other
+entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement
+of intellectual property rights or otherwise. As a condition
+to exercising the rights and licenses granted hereunder, each
+Recipient hereby assumes sole responsibility to secure any other
+intellectual property rights needed, if any. For example, if
+a third party patent license is required to allow Recipient to
+distribute the Program, it is Recipient's responsibility to acquire
+that license before distributing the Program.
+d) Each Contributor represents that to its knowledge it has sufficient
+copyright rights in its Contribution, if any, to grant the copyright
+license set forth in this Agreement.
+3. REQUIREMENTS
+A Contributor may choose to distribute the Program in object
+code form under its own license agreement, provided that:
+a) it complies with the terms and conditions of this Agreement;
+and
+b) its license agreement:
+i) effectively disclaims on behalf of all Contributors all warranties
+and conditions, express and implied, including warranties or
+conditions of title and non-infringement, and implied warranties
+or conditions of merchantability and fitness for a particular
+purpose;
+ii) effectively excludes on behalf of all Contributors all liability
+for damages, including direct, indirect, special, incidental
+and consequential damages, such as lost profits;
+iii) states that any provisions which differ from this Agreement
+are offered by that Contributor alone and not by any other party;
+and
+iv) states that source code for the Program is available from
+such Contributor, and informs licensees how to obtain it in a
+reasonable manner on or through a medium customarily used for
+software exchange.
+When the Program is made available in source code form:
+a) it must be made available under this Agreement; and
+b) a copy of this Agreement must be included with each copy of
+the Program.
+Contributors may not remove or alter any copyright notices contained
+within the Program.
+Each Contributor must identify itself as the originator of its
+Contribution, if any, in a manner that reasonably allows subsequent
+Recipients to identify the originator of the Contribution.
+4. COMMERCIAL DISTRIBUTION
+Commercial distributors of software may accept certain responsibilities
+with respect to end users, business partners and the like. While
+this license is intended to facilitate the commercial use of
+the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create
+potential liability for other Contributors. Therefore, if a Contributor
+includes the Program in a commercial product offering, such Contributor
+("Commercial Contributor") hereby agrees to defend and indemnify
+every other Contributor ("Indemnified Contributor") against any
+losses, damages and costs (collectively "Losses") arising from
+claims, lawsuits and other legal actions brought by a third party
+against the Indemnified Contributor to the extent caused by the
+acts or omissions of such Commercial Contributor in connection
+with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any
+claims or Losses relating to any actual or alleged intellectual
+property infringement. In order to qualify, an Indemnified Contributor
+must: a) promptly notify the Commercial Contributor in writing
+of such claim, and b) allow the Commercial Contributor to control,and
+cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor
+may participate in any such claim at its own expense. For example,
+a Contributor might include the Program in a commercial product
+offering, Product X. That Contributor is then a Commercial Contributor.
+If that Commercial Contributor then makes performance claims,
+or offers warranties related to Product X, those performance
+claims and warranties are such Commercial Contributor's responsibility
+alone. Under this section, the Commercial Contributor would have
+to defend claims against the other Contributors related to those
+performance claims and warranties, and if a court requires any
+other Contributor to pay any damages as a result, the Commercial
+Contributor must pay those damages.
+5. NO WARRANTY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
+IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
+ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
+OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and
+distributing the Program and assumes all risks associated with
+its exercise of rights under this Agreement , including but not
+limited to the risks and costs of program errors, compliance
+with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations.
+6. DISCLAIMER OF LIABILITY
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
+NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
+OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
+OF SUCH DAMAGES.
+7. GENERAL
+If any provision of this Agreement is invalid or unenforceable
+under applicable law, it shall not affect the validity or enforceability
+of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be
+reformed to the minimum extent necessary to make such provision
+valid and enforceable. If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in
+a lawsuit) alleging that the Program itself (excluding combinations
+of the Program with other software or hardware) infringes such
+Recipient's patent(s), then such Recipient's rights granted under
+Section 2(b) shall terminate as of the date such litigation is
+filed. All Recipient's rights under this Agreement shall terminate
+if it fails to comply with any of the material terms or conditions
+of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If
+all Recipient's rights under this Agreement terminate, Recipient
+agrees to cease use and distribution of the Program as soon as
+reasonably practicable. However, Recipient's obligations under
+this Agreement and any licenses granted by Recipient relating
+to the Program shall continue and survive. Everyone is permitted
+to copy and distribute copies of this Agreement,
+but in order to avoid inconsistency the Agreement is copyrighted
+and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including
+revisions) of this Agreement from time to time. No one other
+than the Agreement Steward has the right to modify this Agreement.
+The Eclipse Foundation is the initial Agreement Steward. The
+Eclipse Foundation may assign the responsibility to serve as
+the Agreement Steward to a suitable separate entity. Each new
+version of the Agreement will be given a distinguishing version
+number. The Program (including Contributions) may always be distributed
+subject to the version of the Agreement under which it was received.
+In addition, after a new version of the Agreement is published,
+Contributor may elect to distribute the Program (including its
+Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights
+or licenses to the intellectual property of any Contributor under
+this Agreement, whether expressly, by implication, estoppel or
+otherwise. All rights in the Program not expressly granted under
+this Agreement are reserved. This Agreement is governed by the
+laws of the State of New York and the intellectual property laws
+of the United States of America. No party to this Agreement will
+bring a legal action under this Agreement more than one year
+after the cause of action arose. Each party waives its rights
+to a jury trial in any resulting litigation.
</copyright>
<license url="http://www.example.com/license">
17 years, 1 month
JBoss Tools SVN: r15616 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog: tabs and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-05-30 08:54:25 -0400 (Sat, 30 May 2009)
New Revision: 15616
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/BaseTabControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/ICSSTabControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4395
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -218,6 +218,7 @@
clearButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
getStyleComposite().clearStyleComposite();
+ getStyleComposite().updateCurrentTab();
}
});
}
@@ -252,7 +253,7 @@
classCombo.setToolTipText(cssModel.getCSSRuleText(selectorLabel));
getStyleComposite().setStyleProperties(
cssModel.getClassProperties(selectorLabel));
- getStyleComposite().selectTab(StyleComposite.DEFAULT_START_TAB);
+ getStyleComposite().updateCurrentTab();
}
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/StyleComposite.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -69,10 +69,7 @@
tabFolder.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
-
- final TabItem tabItem = (TabItem) e.item;
- if (tabItem.getData() instanceof ICSSTabControl)
- ((ICSSTabControl) tabItem.getData()).tabSelected();
+ updateTab((TabItem) e.item);
}
public void widgetDefaultSelected(SelectionEvent e) {
@@ -145,6 +142,8 @@
tabComposite.setContent(baseTabControl);
tabComposite.setMinSize(baseTabControl.computeSize(SWT.DEFAULT,
SWT.DEFAULT));
+
+ tabFolder.setSelection(DEFAULT_START_TAB);
}
@@ -195,9 +194,17 @@
tabFolder.setSelection(index);
TabItem item = tabFolder.getItem(index);
- if (item.getData() instanceof ICSSTabControl)
- ((ICSSTabControl) item.getData()).tabSelected();
+ updateTab(item);
}
+ public void updateCurrentTab() {
+ updateTab(tabFolder.getSelection()[0]);
+ }
+
+ private void updateTab(TabItem item) {
+ if (item.getData() instanceof ICSSTabControl)
+ ((ICSSTabControl) item.getData()).update();
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/BaseTabControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/BaseTabControl.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/BaseTabControl.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -505,7 +505,7 @@
}
- public void tabSelected() {
+ public void update() {
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/ICSSTabControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/ICSSTabControl.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/ICSSTabControl.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -2,5 +2,5 @@
public interface ICSSTabControl {
- public void tabSelected();
+ public void update();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -111,7 +111,7 @@
}
}
- public void tabSelected() {
+ public void update() {
cssModel.updateCSSStyle(selector, styleAttributes);
selectClass(selector);
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-05-30 12:46:21 UTC (rev 15615)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabQuickEditControl.java 2009-05-30 12:54:25 UTC (rev 15616)
@@ -45,24 +45,6 @@
}
/**
- * Update data method.
- */
- protected void updateData() {
-
- Control[] controls = this.getChildren();
- if (controls != null) {
- for (int i = 0; i < controls.length; i++) {
- if (!controls[i].isDisposed()) {
- controls[i].dispose();
- }
- }
- }
-
- addContent();
- this.layout();
- }
-
- /**
* Initialize method.s
*/
private void addContent() {
@@ -81,19 +63,25 @@
String value = getStyleAttributes().getAttribute(key);
if (value != null && value.length() > 0) {
- addLabel(this, getLabel(key));
+ addLabel(this, key);
createControl(this, key);
}
}
}
@Override
- public void tabSelected() {
- updateData();
- }
+ public void update() {
+ Control[] controls = this.getChildren();
+ if (controls != null) {
+ for (int i = 0; i < controls.length; i++) {
+ if (!controls[i].isDisposed()) {
+ controls[i].dispose();
+ }
+ }
+ }
- private String getLabel(String key) {
- return key;
+ addContent();
+ this.layout();
}
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15615 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: internal and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-05-30 08:46:21 -0400 (Sat, 30 May 2009)
New Revision: 15615
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbXMLStoreConstants.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFacesConfigTagLibrary.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IProposalProcessor.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -16,10 +16,11 @@
* @author Alexey Kazakov
*/
public interface IProposalProcessor {
+ public TextProposal[] EMPTY_PROPOSAL_LIST = new TextProposal[0];
/**
* @return proposals
*/
- TextProposal[] getProposals(KbQuery query, IPageContext context);
+ public TextProposal[] getProposals(KbQuery query, IPageContext context);
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbXMLStoreConstants.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbXMLStoreConstants.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/KbXMLStoreConstants.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -20,6 +20,8 @@
public String TAG_LIBRARY = "library"; //$NON-NLS-1$
public String TAG_COMPONENT = "component"; //$NON-NLS-1$
public String TAG_ATTRIBUTE = "attribute"; //$NON-NLS-1$
+ public String TAG_FACET = "facet"; //$NON-NLS-1$
+ public String TAG_FUNCTION = "function"; //$NON-NLS-1$
public String CLS_TLD_LIBRARY = "tld"; //$NON-NLS-1$
public String CLS_FACELET_LIBRARY = "facelet"; //$NON-NLS-1$
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -27,6 +27,7 @@
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractAttribute;
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractComponent;
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractTagLib;
+import org.jboss.tools.jst.web.kb.internal.taglib.ELFunction;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTag;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTagLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigAttribute;
@@ -35,6 +36,7 @@
import org.jboss.tools.jst.web.kb.internal.taglib.TLDAttribute;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDTag;
+import org.jboss.tools.jst.web.kb.taglib.Facet;
import org.jboss.tools.jst.web.model.helpers.InnerModelHelper;
import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
@@ -44,6 +46,10 @@
public class XMLScanner implements IFileScanner {
public static final String ATTR_TAGCLASS ="tagclass"; //$NON-NLS-1$
public static final String ATTR_BODY_CONTENT = "bodycontent"; //$NON-NLS-1$
+ public static final String ATTR_FACET_NAME = "facet-name"; //$NON-NLS-1$
+ public static final String ATTR_ATTRIBUTE_NAME = "attribute-name"; //$NON-NLS-1$
+ public static final String ATTR_FUNC_SIGN = "function-signature"; //$NON-NLS-1$
+ public static final String ATTR_FUNC_NAME = "function-name"; //$NON-NLS-1$
public XMLScanner() {}
@@ -192,11 +198,13 @@
FaceletTag tag = new FaceletTag();
tag.setId(t);
tag.setName(new XMLValueInfo(t, "tag-name"));
- //what else?
-
library.addComponent(tag);
} else if(entity.startsWith("FaceletTaglibFunction")) {
- //TODO
+ ELFunction f = new ELFunction();
+ f.setId(t);
+ f.setName(new XMLValueInfo(t, ATTR_FUNC_NAME));
+ f.setSignature(new XMLValueInfo(t, ATTR_FUNC_SIGN));
+ library.addFunction(f);
}
}
}
@@ -214,8 +222,8 @@
for (XModelObject c: os) {
FacesConfigComponent component = new FacesConfigComponent();
component.setId(c);
+ //what else can we take for the name? only attribute 'component-type' is available
component.setName(new XMLValueInfo(c, "component-type"));
- //TODO what else can we take for the name? only attribute 'component-type' is available
component.setComponentClass(new XMLValueInfo(c, "component-class"));
component.setComponentType(c.getAttributeValue("component-type"));
@@ -226,10 +234,16 @@
String entity = child.getModelEntity().getName();
if(entity.startsWith("JSFAttribute")) {
FacesConfigAttribute attr = new FacesConfigAttribute();
+ attr.setId(child);
+ attr.setName(new XMLValueInfo(child, ATTR_ATTRIBUTE_NAME));
component.addAttribute(attr);
} else if(entity.startsWith("JSFFacet")) {
- //TODO
+ Facet f = new Facet();
+ f.setId(child);
+ f.setName(new XMLValueInfo(child, ATTR_FACET_NAME));
+ f.setDescription(new XMLValueInfo(child, AbstractComponent.DESCRIPTION));
+ component.addFacet(f);
}
}
library.addComponent(component);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractAttribute.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -107,11 +107,19 @@
* @see org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.IPageContext)
*/
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
- List<TextProposal> proposals = new ArrayList<TextProposal>();
+ List<TextProposal> proposals = null;
ELResolver[] resolvers = context.getElResolvers();
for (int i = 0; i < resolvers.length; i++) {
- proposals.addAll(resolvers[i].getCompletions(query.getValue(), false, query.getValue().length(), context));
+ List<TextProposal> list = resolvers[i].getCompletions(query.getValue(), false, query.getValue().length(), context);
+ if(list == null || list.isEmpty()) continue;
+ if(proposals == null) {
+ proposals = new ArrayList<TextProposal>();
+ }
+ proposals.addAll(list);
}
+ if(proposals == null || proposals.isEmpty()) {
+ return EMPTY_PROPOSAL_LIST;
+ }
return proposals.toArray(new TextProposal[proposals.size()]);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -25,6 +25,7 @@
import org.jboss.tools.jst.web.kb.KbQuery;
import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.taglib.Facet;
import org.jboss.tools.jst.web.kb.taglib.IAttribute;
import org.jboss.tools.jst.web.kb.taglib.IComponent;
import org.w3c.dom.Element;
@@ -207,13 +208,36 @@
}
}
+ /**
+ * Facets are a feature of JSF only, they are included into
+ * the base interface and implementation
+ * for the sake of common approach.
+ */
+ public Facet getFacet(String name) {
+ return null;
+ }
+
+ public static final Facet[] EMPTY_FACET_SET = new Facet[0];
+
+ public Facet[] getFacets() {
+ return EMPTY_FACET_SET;
+ }
+
+ public Facet[] getFacets(String nameTemplate) {
+ return EMPTY_FACET_SET;
+ }
+
/* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.IProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.IPageContext)
*/
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
- List<TextProposal> proposals = new ArrayList<TextProposal>();
IAttribute[] attributes = getAttributes(query, context);
+ if(attributes.length == 0) {
+ return EMPTY_PROPOSAL_LIST;
+ }
+ List<TextProposal> proposals = null;
if(query.getType() == KbQuery.Type.ATTRIBUTE_NAME) {
+ proposals = new ArrayList<TextProposal>();
for (int i = 0; i < attributes.length; i++) {
TextProposal proposal = new TextProposal();
proposal.setContextInfo(attributes[i].getDescription());
@@ -224,11 +248,17 @@
} else if(query.getType() == KbQuery.Type.ATTRIBUTE_VALUE) {
for (int i = 0; i < attributes.length; i++) {
TextProposal[] attributeProposals = attributes[i].getProposals(query, context);
+ if(attributeProposals.length > 0 && proposals == null) {
+ proposals = new ArrayList<TextProposal>();
+ }
for (int j = 0; j < attributeProposals.length; j++) {
proposals.add(attributeProposals[j]);
}
}
}
+ if(proposals == null || proposals.isEmpty()) {
+ return EMPTY_PROPOSAL_LIST;
+ }
return proposals.toArray(new TextProposal[proposals.size()]);
}
@@ -314,6 +344,9 @@
}
}
+ public AbstractComponent clone() throws CloneNotSupportedException {
+ return (AbstractComponent)super.clone();
+ }
public String getXMLName() {
return KbXMLStoreConstants.TAG_COMPONENT;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -276,6 +276,9 @@
public AbstractTagLib clone() throws CloneNotSupportedException {
AbstractTagLib t = (AbstractTagLib)super.clone();
t.components = new HashMap<String, IComponent>();
+ for (IComponent c: components.values()) {
+ t.addComponent(((AbstractComponent)c).clone());
+ }
t.components.putAll(components);
return t;
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -0,0 +1,89 @@
+package org.jboss.tools.jst.web.kb.internal.taglib;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.ext.IValueInfo;
+import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.KbObject;
+import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
+import org.jboss.tools.jst.web.kb.taglib.IELFunction;
+import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
+import org.w3c.dom.Element;
+
+public class ELFunction extends KbObject implements IELFunction {
+ public static final String SIGNATURE = "signature";
+ private String name;
+ private String signature;
+
+ public ELFunction() {}
+
+ public String getName() {
+ return name;
+ }
+
+ public String getFunctionSignature() {
+ return signature;
+ }
+
+ public void setName(IValueInfo s) {
+ name = s == null ? null : s.getValue();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, s);
+ }
+
+ public void setSignature(IValueInfo s) {
+ signature = s == null ? null : s.getValue();
+ attributesInfo.put(SIGNATURE, s);
+ }
+
+ public ELFunction clone() throws CloneNotSupportedException {
+ return (ELFunction)super.clone();
+ }
+
+ public String getXMLName() {
+ return KbXMLStoreConstants.TAG_FUNCTION;
+ }
+
+ public Element toXML(Element parent, Properties context) {
+ Element element = super.toXML(parent, context);
+
+ if(attributesInfo.get(XMLStoreConstants.ATTR_NAME) == null && name != null) {
+ element.setAttribute(XMLStoreConstants.ATTR_NAME, name);
+ }
+
+ return element;
+ }
+
+ public void loadXML(Element element, Properties context) {
+ super.loadXML(element, context);
+
+ setName(attributesInfo.get(XMLStoreConstants.ATTR_NAME));
+ setSignature(attributesInfo.get(SIGNATURE));
+
+ if(name == null && element.hasAttribute(XMLStoreConstants.ATTR_NAME)) {
+ name = element.getAttribute(XMLStoreConstants.ATTR_NAME);
+ }
+ }
+
+ @Override
+ protected void saveAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+
+ } else {
+ super.saveAttributesInfo(element, context);
+ }
+ }
+
+ @Override
+ protected void loadAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ XModelObject a = (XModelObject)getId();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_NAME));
+ attributesInfo.put(SIGNATURE, new XMLValueInfo(a, XMLScanner.ATTR_FUNC_SIGN));
+ } else {
+ super.loadAttributesInfo(element, context);
+ }
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/ELFunction.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FaceletTagLibrary.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -10,27 +10,49 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.jboss.tools.common.model.project.ext.event.Change;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.taglib.Facet;
import org.jboss.tools.jst.web.kb.taglib.IELFunction;
import org.jboss.tools.jst.web.kb.taglib.IFaceletTagLibrary;
+import org.w3c.dom.Element;
/**
* @author Viacheslav Kabanovich
*/
public class FaceletTagLibrary extends AbstractTagLib implements
IFaceletTagLibrary {
+ List<ELFunction> functions = new ArrayList<ELFunction>();
+ IELFunction[] functionArray = null;
public FaceletTagLibrary() {
}
public IELFunction[] getFunctions() {
- // TODO Auto-generated method stub
- return null;
+ if(functionArray == null) {
+ functionArray = functions.toArray(new ELFunction[0]);
+ }
+ return functionArray;
}
+ public void addFunction(ELFunction f) {
+ functions.add(f);
+ functionArray = null;
+ }
+
public FaceletTagLibrary clone() throws CloneNotSupportedException {
FaceletTagLibrary copy = (FaceletTagLibrary)super.clone();
+ copy.functions = new ArrayList<ELFunction>();
+ for (IELFunction f: getFunctions()) {
+ copy.addFunction(((ELFunction)f).clone());
+ }
return copy;
}
@@ -38,4 +60,32 @@
return KbXMLStoreConstants.CLS_FACELET_LIBRARY;
}
+ public List<Change> merge(KbObject s) {
+ List<Change> changes = super.merge(s);
+ FacesConfigTagLibrary t = (FacesConfigTagLibrary)s;
+ //TODO
+ return changes;
+ }
+
+ public Element toXML(Element parent, Properties context) {
+ Element element = super.toXML(parent, context);
+
+ for (IELFunction f: getFunctions()) {
+ ((KbObject)f).toXML(element, context);
+ }
+
+ return element;
+ }
+
+ public void loadXML(Element element, Properties context) {
+ super.loadXML(element, context);
+
+ Element[] cs = XMLUtilities.getChildren(element, KbXMLStoreConstants.TAG_FUNCTION);
+ for (Element e: cs) {
+ ELFunction f = new ELFunction();
+ f.loadXML(e, context);
+ addFunction(f);
+ }
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -15,6 +15,7 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
import org.w3c.dom.Element;
@@ -31,9 +32,9 @@
protected void loadAttributesInfo(Element element, Properties context) {
if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
XModelObject a = (XModelObject)getId();
- attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, "attribute-name"));
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_ATTRIBUTE_NAME));
+ attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
//TODO how to define required?
- attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
// attributesInfo.put(REQUIRED, new XMLValueInfo(a, REQUIRED));
} else {
super.loadAttributesInfo(element, context);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigComponent.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -10,15 +10,121 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.internal.taglib;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.jboss.tools.common.model.project.ext.event.Change;
+import org.jboss.tools.common.xml.XMLUtilities;
+import org.jboss.tools.jst.web.kb.internal.KbObject;
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.taglib.Facet;
+import org.w3c.dom.Element;
/**
* @author Viacheslav Kabanovich
*/
public class FacesConfigComponent extends AbstractComponent {
+ Map<String,Facet> facets = new HashMap<String, Facet>();
+ Facet[] facetArray = EMPTY_FACET_SET;
+ public Facet getFacet(String name) {
+ return facets.get(name);
+ }
+
+ public static final Facet[] EMPTY_FACET_SET = new Facet[0];
+
+ public Facet[] getFacets() {
+ if(facetArray == null) {
+ if(facets.isEmpty()) {
+ facetArray = EMPTY_FACET_SET;
+ } else {
+ facetArray = facets.values().toArray(new Facet[0]);
+ }
+ }
+ return facetArray;
+ }
+
+ public Facet[] getFacets(String nameTemplate) {
+ Facet[] fs = getFacets();
+ if(fs == null || fs.length == 0) return EMPTY_FACET_SET;
+ List<Facet> result = new ArrayList<Facet>();
+ for (Facet f: fs) {
+ String name = f.getName();
+ boolean match = false; //TODO implement
+ if(match) result.add(f);
+ }
+ return result.isEmpty() ? EMPTY_FACET_SET : result.toArray(new Facet[0]);
+ }
+
+ public void addFacet(Facet f) {
+ adopt((KbObject)f);
+ facets.put(f.getName(), f);
+ facetArray = null;
+ }
+
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
}
+ public List<Change> merge(KbObject s) {
+ List<Change> changes = super.merge(s);
+ FacesConfigComponent c = (FacesConfigComponent)s;
+
+ Change children = new Change(this, null, null, null);
+ mergeFacets(c, children);
+ changes = Change.addChange(changes, children);
+
+ return changes;
+ }
+
+ public void mergeFacets(FacesConfigComponent c, Change children) {
+ Map<Object,Facet> facetMap = new HashMap<Object, Facet>();
+ for (Facet a: facets.values()) facetMap.put(((KbObject)a).getId(), a);
+ for (Facet a: c.facets.values()) {
+ Facet loaded = (Facet)a;
+ Facet current = facetMap.get(loaded.getId());
+ if(current == null) {
+ addFacet(loaded);
+ Change change = new Change(this, null, null, loaded);
+ children.addChildren(Change.addChange(null, change));
+ } else {
+ List<Change> rc = current.merge(loaded);
+ if(rc != null) children.addChildren(rc);
+ }
+ }
+ for (Facet a: facetMap.values()) {
+ Facet removed = a;
+ if(facets.get(removed.getName()) == removed) {
+ facets.remove(removed.getName());
+ facetArray = null;
+ Change change = new Change(this, null, removed, null);
+ children.addChildren(Change.addChange(null, change));
+ }
+ }
+ }
+
+ public Element toXML(Element parent, Properties context) {
+ Element element = super.toXML(parent, context);
+
+ for (Facet f: getFacets()) {
+ ((KbObject)f).toXML(element, context);
+ }
+
+ return element;
+ }
+
+ public void loadXML(Element element, Properties context) {
+ super.loadXML(element, context);
+
+ Element[] cs = XMLUtilities.getChildren(element, KbXMLStoreConstants.TAG_FACET);
+ for (Element e: cs) {
+ Facet f = new Facet();
+ f.loadXML(e, context);
+ addFacet(f);
+ }
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigTagLibrary.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -38,34 +38,27 @@
return componentsByType.get(type);
}
- public Facet getFacet(String name) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Facet[] getFacets() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public Facet[] getFacets(String nameTemplate) {
- // TODO Auto-generated method stub
- return null;
- }
-
public FacesConfigTagLibrary clone() throws CloneNotSupportedException {
FacesConfigTagLibrary copy = (FacesConfigTagLibrary)super.clone();
- //TODO
+
return copy;
}
public List<Change> merge(KbObject s) {
List<Change> changes = super.merge(s);
FacesConfigTagLibrary t = (FacesConfigTagLibrary)s;
- //TODO
+
+ Change children = new Change(this, null, null, null);
+ mergeFunctions(t, children);
+ changes = Change.addChange(changes, children);
+
return changes;
}
+ public void mergeFunctions(FacesConfigTagLibrary c, Change children) {
+ //TODO
+ }
+
public String getXMLClass() {
return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/Facet.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -10,11 +10,23 @@
******************************************************************************/
package org.jboss.tools.jst.web.kb.taglib;
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.ext.IValueInfo;
+import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.KbObject;
+import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.scanner.XMLScanner;
+import org.jboss.tools.jst.web.kb.internal.taglib.AbstractComponent;
+import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
+import org.w3c.dom.Element;
+
/**
* JSF Facet Component
* @author Alexey Kazakov
*/
-public class Facet {
+public class Facet extends KbObject {
private String description;
private String name;
@@ -40,4 +52,60 @@
public void setName(String name) {
this.name = name;
}
+
+ public void setName(IValueInfo s) {
+ name = s == null ? null : s.getValue();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, s);
+ }
+
+ public void setDescription(IValueInfo s) {
+ description = s == null ? null : s.getValue();
+ attributesInfo.put(AbstractComponent.DESCRIPTION, s);
+ }
+
+ public String getXMLName() {
+ return KbXMLStoreConstants.TAG_FACET;
+ }
+
+ public Element toXML(Element parent, Properties context) {
+ Element element = super.toXML(parent, context);
+
+ if(attributesInfo.get(XMLStoreConstants.ATTR_NAME) == null && name != null) {
+ element.setAttribute(XMLStoreConstants.ATTR_NAME, name);
+ }
+
+ return element;
+ }
+
+ public void loadXML(Element element, Properties context) {
+ super.loadXML(element, context);
+
+ setName(attributesInfo.get(XMLStoreConstants.ATTR_NAME));
+ setDescription(attributesInfo.get(AbstractComponent.DESCRIPTION));
+
+ if(name == null && element.hasAttribute(XMLStoreConstants.ATTR_NAME)) {
+ name = element.getAttribute(XMLStoreConstants.ATTR_NAME);
+ }
+ }
+
+ @Override
+ protected void saveAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+
+ } else {
+ super.saveAttributesInfo(element, context);
+ }
+ }
+
+ @Override
+ protected void loadAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ XModelObject a = (XModelObject)getId();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, XMLScanner.ATTR_FACET_NAME));
+ attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
+ } else {
+ super.loadAttributesInfo(element, context);
+ }
+ }
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IComponent.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IComponent.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -78,4 +78,24 @@
* @return
*/
public IAttribute[] getAttributes(KbQuery query, IPageContext context);
+
+ /**
+ * Facets are a feature of JSF only, they are included into
+ * the base interface for the sake of common approach.
+ *
+ * @return all facets of this component
+ */
+ Facet[] getFacets();
+
+ /**
+ * @param nameTemplate
+ * @return facets with names which start with given template.
+ */
+ Facet[] getFacets(String nameTemplate);
+
+ /**
+ * @param name
+ * @return facet by name
+ */
+ Facet getFacet(String name);
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFacesConfigTagLibrary.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFacesConfigTagLibrary.java 2009-05-30 12:01:27 UTC (rev 15614)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/IFacesConfigTagLibrary.java 2009-05-30 12:46:21 UTC (rev 15615)
@@ -21,20 +21,4 @@
*/
IComponent getComponentByType(String type);
- /**
- * @return all facets of this component
- */
- Facet[] getFacets();
-
- /**
- * @param nameTemplate
- * @return facets with names which start with given template.
- */
- Facet[] getFacets(String nameTemplate);
-
- /**
- * @param name
- * @return facet by name
- */
- Facet getFacet(String name);
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15614 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-05-30 08:01:27 -0400 (Sat, 30 May 2009)
New Revision: 15614
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4396
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-30 01:35:08 UTC (rev 15613)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-30 12:01:27 UTC (rev 15614)
@@ -86,8 +86,6 @@
gridData.heightHint = DEFAULT_DIALOG_HEIGHT;
gridData.widthHint = DEFAULT_DIALOG_WIDTH;
- setTitle(JstUIMessages.CSS_STYLE_CLASS_EDITOR_TITLE);
-
createControlPane(parentComposite);
return parentComposite;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-30 01:35:08 UTC (rev 15613)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-30 12:01:27 UTC (rev 15614)
@@ -77,16 +77,23 @@
public CSSClassDialog(Shell parentShell, IFile file,
IStructuredSelection selection) {
super(parentShell);
-
setShellStyle(getShellStyle() | SWT.RESIZE | SWT.MAX
| SWT.APPLICATION_MODAL);
this.file = file;
this.cssModel = new CSSModel(file);
this.selection = selection;
+
}
@Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(JstUIMessages.CSS_STYLE_CLASS_EDITOR_TITLE);
+
+ }
+
+ @Override
protected Control createContents(Composite parent) {
Control contents = super.createContents(parent);
updateControlPane();
@@ -94,6 +101,12 @@
}
@Override
+ protected Control createDialogArea(Composite parent) {
+ setTitle(JstUIMessages.CSS_STYLE_CLASS_EDITOR_TITLE);
+ return super.createDialogArea(parent);
+ }
+
+ @Override
protected StyleComposite createStyleComposite(Composite parent) {
StyleComposite styleComposite = super.createStyleComposite(parent);
@@ -257,13 +270,12 @@
classCombo.select(classCombo.getItemCount() - 1);
}
-
@Override
public void releaseResources() {
-
+
super.releaseResources();
preview.releaseModel();
-
+
if (cssModel != null) {
cssModel.release();
cssModel = null;
@@ -364,17 +376,17 @@
applyButton.setEnabled(false);
}
-
+
protected Button getApplyButton() {
return applyButton;
}
-
+
protected Button getAddNewClassButton() {
return addNewClassButton;
}
-
+
protected Combo getClassCombo() {
return classCombo;
}
-
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2009-05-30 01:35:08 UTC (rev 15613)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSStyleDialog.java 2009-05-30 12:01:27 UTC (rev 15614)
@@ -14,7 +14,10 @@
import java.util.Map;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.jst.jsp.messages.JstUIMessages;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.CSSConstants;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.Constants;
import org.jboss.tools.jst.jsp.outline.cssdialog.common.Util;
@@ -61,4 +64,16 @@
}
return properties;
}
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(JstUIMessages.CSS_STYLE_EDITOR_TITLE);
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ setTitle(JstUIMessages.CSS_STYLE_EDITOR_TITLE);
+ return super.createDialogArea(parent);
+ }
}
17 years, 1 month
JBoss Tools SVN: r15613 - in trunk/jbpm/plugins/org.jboss.tools.jbpm.common: src/org/jboss/tools/jbpm and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-29 21:35:08 -0400 (Fri, 29 May 2009)
New Revision: 15613
Removed:
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
Log:
- allow for configurations of jbpm 4 runtimes (GPD-346)
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF 2009-05-30 01:34:31 UTC (rev 15612)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/META-INF/MANIFEST.MF 2009-05-30 01:35:08 UTC (rev 15613)
@@ -10,5 +10,3 @@
org.eclipse.core.runtime;bundle-version="3.4.0"
Export-Package: org.jboss.tools.jbpm.preferences,
org.jboss.tools.jbpm.util
-Bundle-Activator: org.jboss.tools.jbpm.Activator
-Bundle-ActivationPolicy: lazy
Deleted: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2009-05-30 01:34:31 UTC (rev 15612)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/Activator.java 2009-05-30 01:35:08 UTC (rev 15613)
@@ -1,18 +0,0 @@
-package org.jboss.tools.jbpm;
-
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class Activator extends AbstractUIPlugin {
-
- private static Activator activator;
-
- public static Activator getDefault() {
- return activator;
- }
-
- public Activator() {
- super();
- activator = this;
- }
-
-}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2009-05-30 01:34:31 UTC (rev 15612)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/AddJbpmInstallationDialog.java 2009-05-30 01:35:08 UTC (rev 15613)
@@ -22,10 +22,9 @@
package org.jboss.tools.jbpm.preferences;
-import java.io.File;
-
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.StatusDialog;
@@ -43,34 +42,29 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
-import org.jboss.tools.jbpm.Activator;
public abstract class AddJbpmInstallationDialog extends StatusDialog {
- private static final String pluginId = Activator.getDefault().getBundle().getSymbolicName();
+ private static final String ENTER_NAME = "Enter the name of the jBPM installation.";
+ private static final String ENTER_LOCATION = "Enter the location of the jBPM installation.";
+ private static final String UNEXISTING_LOCATION = "The location does not exist.";
+ private static final String NAME_ALREADY_USED = "The name is already used.";
+ private static final String INVALID_JBPM_INSTALLATION = "This is not a valid jBPM installation.";
- private static final IStatus enterNameStatus = new Status(
- Status.INFO, pluginId, 0, "Enter the name of the jBPM installation.", null);
- private static final IStatus enterLocationStatus = new Status(
- Status.INFO, pluginId, 0, "Enter the location of the jBPM installation.", null);
- private static final IStatus unExistingLocationStatus = new Status(
- Status.ERROR, pluginId, 0, "The location does not exist.", null);
- private static final IStatus nameAlreadyUsedStatus = new Status(
- Status.ERROR, pluginId, 0, "The name is already used.", null);
- private static final IStatus inValidJbpmInstallationStatus = new Status(
- Status.ERROR, pluginId, 0, "This is not a valid jBPM installation.", null);
+ private Plugin plugin;
String title;
Text nameText, locationText;
Button locationButton;
- IStatus currentStatus = enterNameStatus;
+ IStatus currentStatus; ;
String name, location;
IStatus status;
- public AddJbpmInstallationDialog(Shell parentShell) {
+ public AddJbpmInstallationDialog(Shell parentShell, Plugin plugin) {
super(parentShell);
+ this.plugin = plugin;
}
public void initialize(String t, String n, String l) {
@@ -97,7 +91,7 @@
protected Control createContents(Composite parent) {
Control result = super.createContents(parent);
- updateStatus(currentStatus);
+ updateCurrentStatus();
return result;
}
@@ -117,7 +111,6 @@
private void handleLocationChanged() {
location = locationText.getText();
updateCurrentStatus();
- updateStatus(currentStatus);
}
private void createLocationButton(Composite area) {
@@ -166,29 +159,33 @@
private void handleNameChanged() {
name = nameText.getText();
updateCurrentStatus();
- updateStatus(currentStatus);
}
+ private IStatus getStatus(int severity, String str) {
+ return new Status(severity, plugin.getBundle().getSymbolicName(), str, null);
+ }
+
private void updateCurrentStatus() {
if (isNameEmpty() && isLocationEmpty()) {
- currentStatus = enterNameStatus;
+ currentStatus = getStatus(Status.INFO, ENTER_NAME);
} else if (isNameAlreadyUsed() && !"Edit Location".equals(title)) {
- currentStatus = nameAlreadyUsedStatus;
+ currentStatus = getStatus(Status.ERROR, NAME_ALREADY_USED);
} else if (isLocationEmpty()) {
- currentStatus = enterLocationStatus;
+ currentStatus = getStatus(Status.INFO, ENTER_LOCATION);
} else if (!isLocationExisting()) {
- currentStatus = unExistingLocationStatus;
+ currentStatus = getStatus(Status.ERROR, UNEXISTING_LOCATION);
} else if (!isValidJbpmInstallation()) {
- currentStatus = inValidJbpmInstallationStatus;
+ currentStatus = getStatus(Status.ERROR, INVALID_JBPM_INSTALLATION);
} else if (isNameEmpty()) {
- currentStatus = enterNameStatus;
+ currentStatus = getStatus(Status.INFO, ENTER_NAME);
} else {
currentStatus = Status.OK_STATUS;
}
+ updateStatus(currentStatus);
}
private boolean isNameAlreadyUsed() {
- return PreferencesManager.INSTANCE.getJbpmInstallation(nameText.getText()) != null;
+ return PreferencesManager.getPreferencesManager(plugin).getJbpmInstallation(nameText.getText()) != null;
}
private boolean isLocationExisting() {
@@ -202,15 +199,7 @@
private boolean isLocationEmpty() {
return location == null || "".equals(location);
}
-
- private boolean isValidJbpmInstallation() {
- return getJbpmVersionInfoFile().exists();
- }
-
- private File getJbpmVersionInfoFile() {
- return new Path(location).append("/src/resources/gpd/version.info.xml").toFile();
- }
-
+
protected void updateButtonsEnableState(IStatus status) {
Button ok = getButton(IDialogConstants.OK_ID);
if (ok != null && !ok.isDisposed())
@@ -223,7 +212,7 @@
label.setLayoutData(gridData);
label.setText("Name :");
}
-
+
public String getName() {
return name;
}
@@ -232,6 +221,7 @@
return location;
}
- public abstract String getVersion();
+ protected abstract String getVersion();
+ protected abstract boolean isValidJbpmInstallation();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2009-05-30 01:34:31 UTC (rev 15612)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/JbpmLocationsPage.java 2009-05-30 01:35:08 UTC (rev 15613)
@@ -21,7 +21,6 @@
*/
package org.jboss.tools.jbpm.preferences;
-import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.ColumnWeightData;
@@ -41,7 +40,7 @@
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
-import org.jboss.tools.jbpm.Activator;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.jbpm.Constants;
import org.jboss.tools.jbpm.util.AutoResizeTableLayout;
@@ -49,10 +48,13 @@
private TableViewer tableViewer;
private Button addButton, editButton, removeButton;
+
+ private AbstractUIPlugin plugin;
- public JbpmLocationsPage() {
+ public JbpmLocationsPage(AbstractUIPlugin plugin) {
super();
- setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ this.plugin = plugin;
+ setPreferenceStore(plugin.getPreferenceStore());
}
protected abstract AddJbpmInstallationDialog createAddJbpmInstallationDialog(Shell shell);
@@ -177,12 +179,12 @@
}
private void initializeInput(TableViewer viewer) {
- viewer.setInput(PreferencesManager.INSTANCE);
+ viewer.setInput(PreferencesManager.getPreferencesManager(plugin));
checkItemToCheck(viewer);
}
private void checkItemToCheck(TableViewer viewer) {
- String name = getPreferences().getString(Constants.JBPM_NAME);
+ String name = plugin.getPreferenceStore().getString(Constants.JBPM_NAME);
if (name != null) {
TableItem tableItem = getItemToCheck(viewer, name);
if (tableItem != null) {
@@ -299,7 +301,7 @@
if (item != null) {
name = item.getText(0);
}
- getPreferences().setValue(Constants.JBPM_NAME, name);
+ plugin.getPluginPreferences().setValue(Constants.JBPM_NAME, name);
return true;
}
@@ -312,7 +314,7 @@
}
public void performDefaults() {
- getPreferences().setToDefault(Constants.JBPM_NAME);
+ plugin.getPluginPreferences().setToDefault(Constants.JBPM_NAME);
PreferencesManager inputManager =
(PreferencesManager)tableViewer.getInput();
inputManager.getJbpmInstallationMap().clear();
@@ -322,9 +324,5 @@
updateButtons();
setValid(true);
}
-
- private Preferences getPreferences() {
- return Activator.getDefault().getPluginPreferences();
- }
}
Modified: trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2009-05-30 01:34:31 UTC (rev 15612)
+++ trunk/jbpm/plugins/org.jboss.tools.jbpm.common/src/org/jboss/tools/jbpm/preferences/PreferencesManager.java 2009-05-30 01:35:08 UTC (rev 15613)
@@ -31,21 +31,32 @@
import java.util.Iterator;
import java.util.Map;
+import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.WorkbenchException;
import org.eclipse.ui.XMLMemento;
-import org.jboss.tools.jbpm.Activator;
import org.jboss.tools.jbpm.Constants;
public class PreferencesManager {
- public static final PreferencesManager INSTANCE = new PreferencesManager();
+ private static Map<Plugin, PreferencesManager> managerMap = new HashMap<Plugin, PreferencesManager>();
private Map<String, JbpmInstallation> jbpmInstallations = null;
private File installationsFile = null;
+ private Plugin plugin;
+
+ public static PreferencesManager getPreferencesManager(Plugin key) {
+ PreferencesManager preferencesManager = managerMap.get(key);
+ if (preferencesManager == null) {
+ preferencesManager = new PreferencesManager(key);
+ managerMap.put(key, preferencesManager);
+ }
+ return preferencesManager;
+ }
- private PreferencesManager() {
+ private PreferencesManager(Plugin plugin) {
+ this.plugin = plugin;
initializeInstallations();
}
@@ -63,13 +74,13 @@
return jbpmInstallations;
}
- private static Preferences getPreferences() {
- return Activator.getDefault().getPluginPreferences();
+ private Preferences getPreferences() {
+ return plugin.getPluginPreferences();
}
private void initializeInstallations() {
installationsFile =
- Activator.getDefault().getStateLocation().append("jbpm-installations.xml").toFile();
+ plugin.getStateLocation().append("jbpm-installations.xml").toFile();
if (!installationsFile.exists()) {
createInstallationsFile();
} else {
17 years, 1 month
JBoss Tools SVN: r15612 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4 and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-29 21:34:31 -0400 (Fri, 29 May 2009)
New Revision: 15612
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskFieldsSection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/preferences/Jbpm4LocationsPage.java
Log:
- allow for configurations of jbpm 4 runtimes (GPD-346)
- fields and method arguments configuration pages
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-29 20:58:15 UTC (rev 15611)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-30 01:34:31 UTC (rev 15612)
@@ -315,6 +315,16 @@
category="general"
id="org.jboss.tools.jpdl4.subprocess"
label="Subprocess"/>
+ <propertyTab
+ afterTab="org.jboss.tools.jpdl4.general"
+ category="general"
+ id="org.jboss.tools.jpdl4.javaTask.fields"
+ label="Fields"/>
+ <propertyTab
+ afterTab="org.jboss.tools.jpdl4.javaTask.fields"
+ category="general"
+ id="org.jboss.tools.jpdl4.javaTask.arguments"
+ label="Arguments"/>
<!-- <propertyTab
afterTab="org.jboss.tools.jpdl4.general"
category="details"
@@ -561,6 +571,18 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.OutputParameter"/>
</propertySection>
+ <propertySection
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskFieldsSection"
+ id="org.jboss.tools.jpdl4.javaTask.fields"
+ tab="org.jboss.tools.jpdl4.javaTask.fields">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
+ <propertySection
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskArgumentsSection"
+ id="org.jboss.tools.jpdl4.javaTask.arguments"
+ tab="org.jboss.tools.jpdl4.javaTask.arguments">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2009-05-29 20:58:15 UTC (rev 15611)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/Activator.java 2009-05-30 01:34:31 UTC (rev 15612)
@@ -17,6 +17,7 @@
*/
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.jbpm.preferences.PreferencesManager;
import org.osgi.framework.BundleContext;
public class Activator extends AbstractUIPlugin {
@@ -27,6 +28,10 @@
public Activator() {
}
+
+ public PreferencesManager getPreferencesManager() {
+ return PreferencesManager.getPreferencesManager(this);
+ }
public void start(BundleContext context) throws Exception {
super.start(context);
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/preferences/Jbpm4LocationsPage.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/preferences/Jbpm4LocationsPage.java 2009-05-29 20:58:15 UTC (rev 15611)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/preferences/Jbpm4LocationsPage.java 2009-05-30 01:34:31 UTC (rev 15612)
@@ -21,15 +21,24 @@
*/
package org.jboss.tools.flow.jpdl4.preferences;
+import org.eclipse.core.runtime.Path;
import org.eclipse.swt.widgets.Shell;
+import org.jboss.tools.flow.jpdl4.Activator;
import org.jboss.tools.jbpm.preferences.AddJbpmInstallationDialog;
import org.jboss.tools.jbpm.preferences.JbpmLocationsPage;
public class Jbpm4LocationsPage extends JbpmLocationsPage {
+ public Jbpm4LocationsPage() {
+ super(Activator.getDefault());
+ }
+
protected AddJbpmInstallationDialog createAddJbpmInstallationDialog(Shell shell) {
- return new AddJbpmInstallationDialog(getShell()) {
- public String getVersion() {
+ return new AddJbpmInstallationDialog(getShell(), Activator.getDefault()) {
+ protected boolean isValidJbpmInstallation() {
+ return new Path(getLocation()).append("/jbpm.jar").toFile().exists();
+ }
+ protected String getVersion() {
return "4.0";
}
};
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java 2009-05-30 01:34:31 UTC (rev 15612)
@@ -0,0 +1,88 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.jboss.tools.flow.common.properties.IPropertyId;
+
+public class JavaTaskArgumentsSection extends JpdlPropertySection implements IPropertyId {
+
+ private final static String NO_FIELDS = "The configured class has no fields that can be configured.";
+ private final static String CONFIGURE_FIELDS = "Configure the value of the supported fields as needed.";
+
+ private CLabel infoLabel;
+
+// private ModifyListener nameTextModifyListener = new ModifyListener() {
+// public void modifyText(ModifyEvent arg0) {
+// IPropertySource input = getInput();
+// if (input != null) {
+// RenameElementCommand rec = new RenameElementCommand();
+// rec.setSource(input);
+// rec.setOldName((String)input.getPropertyValue(NAME));
+// rec.setName(nameText.getText());
+// getCommandStack().execute(rec);
+// }
+// }
+// };
+//
+// private CommandStackListener commandStackListener = new CommandStackListener() {
+// public void commandStackChanged(EventObject event) {
+// refresh();
+// }
+// };
+//
+// public void dispose() {
+// if (getCommandStack() != null) {
+// getCommandStack().removeCommandStackListener(commandStackListener);
+// }
+// super.dispose();
+// }
+
+ public void createControls(Composite parent,
+ TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ Composite composite = getFlatFormComposite();
+ createInfoLabel(composite);
+ createFieldsComposite(composite);
+ }
+
+
+ private void createInfoLabel(Composite parent) {
+ infoLabel = getWidgetFactory().createCLabel(parent, NO_FIELDS);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.top = new FormAttachment(0, 5);
+ data.right = new FormAttachment(100, 0);
+ infoLabel.setLayoutData(data);
+ }
+
+ private void createFieldsComposite(Composite parent) {
+ Composite fieldsComposite = getWidgetFactory().createComposite(parent);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 0);
+ data.left = new FormAttachment(JpdlPropertySection.SECOND_COLUMN_LEFT_LIMIT, 0);
+ data.right = new FormAttachment(100, 0);
+ fieldsComposite.setLayoutData(data);
+ }
+
+ protected void hookListeners() {
+// nameText.addModifyListener(nameTextModifyListener);
+ }
+
+ protected void unhookListeners() {
+// nameText.removeModifyListener(nameTextModifyListener);
+ }
+
+ protected void updateValues() {
+// IPropertySource input = getInput();
+// if (input != null) {
+// nameText.setText(getValueNotNull((String)input.getPropertyValue(NAME)));
+// } else {
+// nameText.setText("");
+// }
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskArgumentsSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskFieldsSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskFieldsSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskFieldsSection.java 2009-05-30 01:34:31 UTC (rev 15612)
@@ -0,0 +1,124 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.swt.custom.CLabel;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
+import org.jboss.tools.flow.common.properties.IPropertyId;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
+import org.jboss.tools.flow.common.wrapper.ModelListener;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskFieldsSection extends JpdlPropertySection implements IPropertyId {
+
+ private final static String NO_FIELDS = "The configured class has no fields that can be configured.";
+ private final static String CONFIGURE_FIELDS = "Configure the value of the supported fields as needed.";
+
+ private Wrapper input;
+
+ private CLabel infoLabel;
+
+ private ModelListener modelListener = new ModelListener() {
+ public void modelChanged(ModelEvent event) {
+ System.out.println("changeDiscriminator; " + event.getChangeDiscriminator());
+ System.out.println("changeType " + event.getChangeType());
+ }
+
+ };
+
+// private ModifyListener nameTextModifyListener = new ModifyListener() {
+// public void modifyText(ModifyEvent arg0) {
+// IPropertySource input = getInput();
+// if (input != null) {
+// RenameElementCommand rec = new RenameElementCommand();
+// rec.setSource(input);
+// rec.setOldName((String)input.getPropertyValue(NAME));
+// rec.setName(nameText.getText());
+// getCommandStack().execute(rec);
+// }
+// }
+// };
+//
+// private CommandStackListener commandStackListener = new CommandStackListener() {
+// public void commandStackChanged(EventObject event) {
+// refresh();
+// }
+// };
+//
+ public void dispose() {
+ if (input != null) {
+ input.removeListener(modelListener);
+ }
+ super.dispose();
+ }
+
+ public void createControls(Composite parent,
+ TabbedPropertySheetPage aTabbedPropertySheetPage) {
+ super.createControls(parent, aTabbedPropertySheetPage);
+ Composite composite = getFlatFormComposite();
+ createInfoLabel(composite);
+ createFieldsComposite(composite);
+ }
+
+
+ private void createInfoLabel(Composite parent) {
+ infoLabel = getWidgetFactory().createCLabel(parent, NO_FIELDS);
+ FormData data = new FormData();
+ data.left = new FormAttachment(0, 0);
+ data.top = new FormAttachment(0, 5);
+ data.right = new FormAttachment(100, 0);
+ infoLabel.setLayoutData(data);
+ }
+
+ private void createFieldsComposite(Composite parent) {
+ Composite fieldsComposite = getWidgetFactory().createComposite(parent);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 0);
+ data.left = new FormAttachment(JpdlPropertySection.SECOND_COLUMN_LEFT_LIMIT, 0);
+ data.right = new FormAttachment(100, 0);
+ fieldsComposite.setLayoutData(data);
+ }
+
+ public void setInput(IWorkbenchPart part, ISelection selection) {
+ if (input != null) {
+ input.removeListener(modelListener);
+ }
+ super.setInput(part, selection);
+ if (selection instanceof IStructuredSelection) {
+ Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (object instanceof EditPart && ((EditPart)object).getModel() instanceof Wrapper) {
+ input = (Wrapper)((EditPart)object).getModel();
+ input.addListener(modelListener);
+ return;
+ }
+ }
+ input = null;
+ }
+
+ protected void hookListeners() {
+// nameText.addModifyListener(nameTextModifyListener);
+ }
+
+ protected void unhookListeners() {
+// nameText.removeModifyListener(nameTextModifyListener);
+ }
+
+ protected void updateValues() {
+// IPropertySource input = getInput();
+// if (input != null) {
+// nameText.setText(getValueNotNull((String)input.getPropertyValue(NAME)));
+// } else {
+// nameText.setText("");
+// }
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskFieldsSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15611 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-29 16:58:15 -0400 (Fri, 29 May 2009)
New Revision: 15611
Modified:
trunk/jmx/releng/
Log:
Property changes on: trunk/jmx/releng
___________________________________________________________________
Name: svn:ignore
+ buildlog.latest.txt
17 years, 1 month
JBoss Tools SVN: r15609 - trunk/birt/plugins/org.jboss.tools.birt.core.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-05-29 14:56:57 -0400 (Fri, 29 May 2009)
New Revision: 15609
Modified:
trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml
Log:
fixing BIRT Facet template version
Modified: trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml
===================================================================
--- trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml 2009-05-29 17:59:22 UTC (rev 15608)
+++ trunk/birt/plugins/org.jboss.tools.birt.core/plugin.xml 2009-05-29 18:56:57 UTC (rev 15609)
@@ -38,7 +38,7 @@
<static-preset id="preset.jboss.birt">
<label>%JBOSS_BIRT_FACET_TEMPLATE_LABEL</label>
<description>%JBOSS_BIRT_FACET_TEMPLATE_LABEL</description>
- <facet id="birt.runtime" version="2.3.0"/>
+ <facet id="birt.runtime" version="2.5.0"/>
<facet id="jst.java" version="5.0"/>
<facet id="jst.web" version="2.5"/>
<facet id="jst.jsf" version="1.2"/>
17 years, 1 month
JBoss Tools SVN: r15608 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-29 13:59:22 -0400 (Fri, 29 May 2009)
New Revision: 15608
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
Corrected spelling.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 16:03:34 UTC (rev 15607)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 17:59:22 UTC (rev 15608)
@@ -124,7 +124,7 @@
// Test before renaming
ISeamComponent component = seamProject.getComponent(componentName);
assertNotNull("Can't load component " + componentName, component);
- assertNull("There is unexisted component in seam project: " + newName, seamProject.getComponent(newName));
+ assertNull("There is unexpected component in seam project: " + newName, seamProject.getComponent(newName));
for(TestChangeStructure changeStructure : changeList){
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
@@ -160,7 +160,7 @@
JobUtils.waitForIdle();
// Test results
- assertNull("There is unexisted component in seam project: " + componentName, seamProject.getComponent(componentName));
+ assertNull("There is unexpected component in seam project: " + componentName, seamProject.getComponent(componentName));
assertNotNull("Can't load component " + newName, seamProject.getComponent(newName));
for(TestChangeStructure changeStructure : changeList){
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
17 years, 1 month
JBoss Tools SVN: r15607 - in trunk/documentation: jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-29 12:03:34 -0400 (Fri, 29 May 2009)
New Revision: 15607
Modified:
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl
trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/images/feedback_logo.png
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/script/toggle.js
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/images/feedback_logo.png
trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js
Log:
JBDS-741 Feedback form on JBDS and Tools guides is implemented
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/common.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -11,6 +11,46 @@
<!-- XHTML settings -->
<xsl:param name="html.stylesheet" select="'css/tools.css'"/>
+ <xsl:template name="feedback">
+ <!--[if IE 6]><iframe frameborder="0" class="problemLayer" id="place"><xsl:text> </xsl:text></iframe><![endif]-->
+ <div class="time_out_div" id="timeOutDiv"><xsl:text> </xsl:text></div>
+ <div id="feedback-maincontainer">
+ <h3 id="feedback-header">
+ Create new JBDS Documentation Jira issue
+ <a href="javascript:void(0);" onclick="hidePopup('feedback-maincontainer', 'feedback-mailform', 'feedback-iFrame','feedback-submit', 'feedback-maincontainer');" id="feedback-close">
+ <img src="images/close.png" class="feedback-images" />
+ </a>
+ </h3>
+ <iframe id='feedback-iFrame' name="feedback-iFrame"><xsl:text> </xsl:text></iframe>
+ <form onsubmit="return validate_form()" id="feedback-mailform" method="post" action="https://jira.jboss.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310..." target="feedback-iFrame">
+ <input type="hidden" id="priority" name="priority" value="3" />
+ <input type="hidden" id="components" name="components" value="12311170" />
+ <input type="hidden" id="versions" name="versions" value="12312451" />
+ <input type="hidden" id="customfield_12310031" name="customfield_12310031" value="Documentation (Ref Guide, User Guide, etc.)" />
+
+ <label for="summary">Summary</label>
+ <input type="text" id="feedback-summary" name="feedback-summary" title="Summarize the subject of the issue in a few words" maxlength="255" onKeyDown="countLeft('feedback-summary', 'left', 255);"
+ onKeyUp="countLeft('feedback-summary', 'left', 255);"/>
+ <div id="summary-helper-left" class="feedback-helper">
+ <span id="left">255</span> characters left
+ </div>
+ <div class="clear"><xsl:text> </xsl:text></div>
+ <label for="feedback-description">Description</label>
+ <textarea id="feedback-description" name="feedback-description" title="Provide more details about the issue" onKeyDown="countLeft('feedback-description', 'none', 500);"
+ onKeyUp="countLeft('feedback-description', 'none', 500);"><xsl:text> </xsl:text></textarea>
+ <div class="clear"><xsl:text> </xsl:text></div>
+ <label for="feedback-environment">Environment</label>
+ <textarea id="feedback-environment" name="feedback-environment" title="Describe your environment"><xsl:text> </xsl:text></textarea>
+ </form>
+ <div id="guide_words">This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.</div>
+ <input type="button" id="feedback-submit" value="Proceed to Jira" name="submit" class="feedback-formbutton" title="Proceed to create new issue" onclick="fillForm('feedback-mailform'); submitForm('feedback-mailform', 'feedback-iFrame', 'feedback-submit', 'feedback-maincontainer');"/>
+ </div>
+ <div id="feedback-wrapper">
+ <a id="feedback-link" onclick="showPopup('feedback-maincontainer');">
+ <img src="images/feedback_logo.png" class="feedback-images" onload="init('feedback-summary', 'feedback-description');"/>
+ </a>
+ </div>
+ </xsl:template>
<xsl:template name="head.content">
@@ -54,17 +94,12 @@
</meta>
</xsl:if>
</xsl:if>
-
- <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon0.ico" />
-
+ <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon0.ico" />
+ <script type="text/javascript" src="script/toggle.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
<xsl:apply-templates select="." mode="head.keywords.content"/>
</xsl:template>
-
-
-
-
-
+
<!-- Overriding toc.line -->
<xsl:template name="toc.line">
<xsl:param name="toc-context" select="."/>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml-single.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -15,6 +15,9 @@
<div id="overlay">
<xsl:text> </xsl:text>
</div>
+
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
<p xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id">
<xsl:text>title</xsl:text>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/com/jboss/tools/xhtml.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -34,6 +34,8 @@
<xsl:text> </xsl:text>
</div>
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
<p xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id">
<xsl:text>title</xsl:text>
@@ -97,6 +99,9 @@
</xsl:if>
</li>
</ul>
+
+
+
</xsl:if>
</xsl:if>
<xsl:if test="$header.rule != 0">
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/common.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -10,8 +10,47 @@
<!-- XHTML settings -->
<xsl:param name="html.stylesheet" select="'css/tools.css'"/>
+ <xsl:template name="feedback">
+ <!--[if IE 6]><iframe frameborder="0" class="problemLayer" id="place"><xsl:text> </xsl:text></iframe><![endif]-->
+ <div class="time_out_div" id="timeOutDiv"><xsl:text> </xsl:text></div>
+ <div id="feedback-maincontainer">
+ <h3 id="feedback-header">
+ Create new JBoss Tools Documentation Jira issue
+ <a href="javascript:void(0);" onclick="hidePopup('feedback-maincontainer', 'feedback-mailform', 'feedback-iFrame','feedback-submit', 'feedback-maincontainer');" id="feedback-close">
+ <img src="images/close_org.png" class="feedback-images" />
+ </a>
+ </h3>
+ <iframe id='feedback-iFrame' name="feedback-iFrame"><xsl:text> </xsl:text></iframe>
+ <form onsubmit="return validate_form()" id="feedback-mailform" method="post" action="https://jira.jboss.org/jira/secure/CreateIssueDetails!init.jspa?pid=12310..." target="feedback-iFrame">
+ <input type="hidden" id="priority" name="priority" value="3" />
+ <input type="hidden" id="components" name="components" value="12311170" />
+ <input type="hidden" id="versions" name="versions" value="12312451" />
+ <input type="hidden" id="customfield_12310031" name="customfield_12310031" value="Documentation (Ref Guide, User Guide, etc.)" />
+
+ <label for="summary">Summary</label>
+ <input type="text" id="feedback-summary" name="feedback-summary" title="Summarize the subject of the issue in a few words" maxlength="255" onKeyDown="countLeft('feedback-summary', 'left', 255);"
+ onKeyUp="countLeft('feedback-summary', 'left', 255);"/>
+ <div id="summary-helper-left" class="feedback-helper">
+ <span id="left">255</span> characters left
+ </div>
+ <div class="clear"><xsl:text> </xsl:text></div>
+ <label for="feedback-description">Description</label>
+ <textarea id="feedback-description" name="feedback-description" title="Provide more details about the issue" onKeyDown="countLeft('feedback-description', 'none', 500);"
+ onKeyUp="countLeft('feedback-description', 'none', 500);"><xsl:text> </xsl:text></textarea>
+ <div class="clear"><xsl:text> </xsl:text></div>
+ <label for="feedback-environment">Environment</label>
+ <textarea id="feedback-environment" name="feedback-environment" title="Describe your environment"><xsl:text> </xsl:text></textarea>
+ </form>
+ <div id="guide_words">This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.</div>
+ <input type="button" id="feedback-submit" value="Proceed to Jira" name="submit" class="feedback-formbutton" title="Proceed to create new issue" onclick="fillForm('feedback-mailform'); submitForm('feedback-mailform', 'feedback-iFrame', 'feedback-submit', 'feedback-maincontainer');"/>
+ </div>
+ <div id="feedback-wrapper">
+ <a id="feedback-link" onclick="showPopup('feedback-maincontainer');">
+ <img src="images/feedback_logo.png" class="feedback-images" onload="init('feedback-summary', 'feedback-description');"/>
+ </a>
+ </div>
+ </xsl:template>
-
<xsl:template name="head.content">
<xsl:param name="node" select="."/>
@@ -56,7 +95,7 @@
</xsl:if>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="images/favicon.ico" />
-
+ <script type="text/javascript" src="script/toggle.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
<xsl:apply-templates select="." mode="head.keywords.content"/>
</xsl:template>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml-single.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -14,6 +14,8 @@
<div id="overlay">
<xsl:text> </xsl:text>
</div>
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
<p xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id">
<xsl:text>title</xsl:text>
Modified: trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl
===================================================================
--- trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-docbook-xslt/src/main/resources/xslt/org/jboss/tools/xhtml.xsl 2009-05-29 16:03:34 UTC (rev 15607)
@@ -16,7 +16,7 @@
<script type="text/javascript" src="script/prototype-1.6.0.2.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
<script type="text/javascript" src="script/effects.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
<script type="text/javascript" src="script/scriptaculous.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
- <script type="text/javascript" src="script/toggle.js"><xsl:comment>If you see this message, your web browser doesn't support JavaScript or JavaScript is disabled.</xsl:comment></script>
+
</xsl:template>
<xsl:template name="header.navigation">
@@ -34,6 +34,8 @@
<xsl:text> </xsl:text>
</div>
+ <!-- FEEDBACK -->
+ <xsl:call-template name="feedback" />
<p xmlns="http://www.w3.org/1999/xhtml">
<xsl:attribute name="id">
<xsl:text>title</xsl:text>
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-29 16:03:34 UTC (rev 15607)
@@ -126,3 +126,205 @@
h1.title {
display:block;
}
+
+/* Feedback styles */
+
+.problemLayer {
+ position: absolute;
+ left: 34%;
+ top: 20%;
+ width: 400px;
+ height: 110px;
+ z-index: 2;
+ background: #fff;
+ display: none;
+}
+
+.time_out_div {
+ height: 100%;
+ width: 100%;
+ min-height: 100%;
+ background-color: #5781AF;
+ filter:alpha(opacity=50);
+ opacity: 0.5;
+ -moz-opacity: 0.5;
+ -khtml-opacity: 0.5;
+ z-index: 99;
+ position: fixed;
+ top: 0;
+ left: 0;
+ display: none;
+}
+
+* html div#feedback-wrapper, * html div#feedback-maincontainer, * html div#time_out_div {
+position: absolute;
+top:expression(eval(document.compatMode &&
+document.compatMode=='CSS1Compat') ?
+documentElement.scrollTop
++(documentElement.clientHeight-this.clientHeight)
+: document.body.scrollTop
++(document.body.clientHeight-this.clientHeight));
+}
+
+#feedback-maincontainer{
+ font-family: Arial;
+ font-size: 14px;
+ display:none;
+ background: #F5F5F5;
+ border: 8px solid #ababab;
+ height:440px;
+ left:30%;
+ position:fixed;
+ text-align:left;
+ top:20%;
+ bottom:20%;
+ width:500px;
+ z-index:100;
+}
+* html #feedback-maincontainer {
+ width:480px;
+}
+#feedback-maincontainer div#guide_words{
+ margin: 0px 20px 0px 20px !important;
+ font-size: 12px;
+}
+.feedback-helper, #summary-helper-left{
+ color: #ff3333;
+ font-size: 10px;
+ float:left;
+
+}
+#summary-helper-left{
+ float:right;
+ color: #5781AF;
+ padding-right:5px;
+}
+
+.clear{
+ clear:both;
+}
+*html #feedback-maincontainer{
+ width: 500px;
+}
+*html #feedback-header{
+ width: 100%;
+}
+#feedback-header{
+ background-color:#880001;
+ border-bottom: 2px solid #ccc;
+ color:white;
+ font-weight:bold;
+ font-size: 16px;
+ height:20px;
+ margin:0;
+ padding:10px 0 10px 20px;
+ position:relative;
+ text-align:left;
+}
+
+#feedback-close{
+ display:block;
+ position:absolute;
+ right:9px;
+ top:6px;
+ width:12px;
+ border: 0px;
+}
+
+#feedback-mailform{
+ margin: 0px 20px 0px 20px !important;
+ padding-bottom:5px;
+ text-align:left;
+}
+
+*html #feedback-mailform{
+ margin: 0px 20px 0px 0px;
+ padding-bottom:5px;
+}
+#feedback-mailform textarea, #feedback-mailform input, #feedback-mailform label{
+ font-family: Arial,Helvetica,sans-serif;
+ width:450px;
+}
+#feedback-mailform input, #feedback-mailform label{
+ display:block;
+}
+#feedback-mailform label{
+ margin-top: 10px;
+}
+#feedback-mailform label span{
+ color: #ff0000
+}
+#feedback-mailform textarea{
+ font-size: 14px;
+ height: 100px;
+ padding: 2px;
+}
+#feedback-mailform textarea#feedback-environment{
+ height: 50px;
+}
+
+.feedback-formbutton{
+ font-size: 12px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #999;
+ margin: 15px 20px;
+}
+
+
+.feedback-images{
+ border:0;
+ margin:0;
+ display: inline;
+}
+#feedback-iFrame {
+ background-color:#F5F5F5;
+ border:medium none;
+ height:90%;
+ line-height:20px;
+ overflow:visible;
+ width:100%;
+ display:none;
+}
+
+#feedback-wrapper{
+ margin: 0px;
+ padding: 0px;
+ position:fixed;
+ bottom:0px;
+ right:0px;
+ height:315px;
+ width: 47px;
+ overflow: hidden;
+ cursor:pointer;
+}
+
+#feedback-link{
+ float: left;
+ display: block;
+}
+
+#feedback-link img{
+ width: 47px;
+ height:315px;
+}
+h3#feedback-header{
+ display:block;
+ }
+
+.remark{
+ font-size: 11px;
+ margin-top: -15px;
+ margin-bottom:25px;
+ padding:0px;
+}
+.remark ul{
+ list-style: none;
+}
+.remark ul li{
+ margin:0px;
+ padding:0px;
+}
+p.remark i{
+ font-style:normal;
+}
+
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/images/feedback_logo.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/script/toggle.js
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/script/toggle.js 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/script/toggle.js 2009-05-29 16:03:34 UTC (rev 15607)
@@ -1,3 +1,115 @@
+var inputCorrect = false;
+var textCorrect = false;
+
+function getPlace(){
+ if(navigator.appName=="Microsoft Internet Explorer" && parseFloat(navigator.appVersion) < 7){
+ document.getElementById('place').style.display = "block";
+ }
+}
+
+function showPopup(_popupId) {
+ document.getElementById(_popupId).style.display = "block";
+ document.getElementById('timeOutDiv').style.display = "block";
+ document.getElementById("feedback-maincontainer").style.display = "block";
+ document.getElementById("guide_words").style.display = "block";
+ getPlace();
+}
+
+function hidePopup(_popupId, form, iFrame, but, container) {
+ document.getElementById(_popupId).style.display = "none";
+ document.getElementById('timeOutDiv').style.display = "none";
+ document.getElementById(iFrame).style.display = "none";
+ document.getElementById(form).style.display = "block";
+ document.getElementById(but).style.display = "inline";
+ document.getElementById(container).style.left="30%";
+ document.getElementById(container).style.top="20%";
+ document.getElementById(container).style.width="500px";
+ document.getElementById(container).style.height="440px";
+ getPlace();
+}
+
+function showIFrame(form, iFrame, but, container){
+ document.getElementById(form).style.display = "none";
+ document.getElementById(but).style.display = "none";
+ document.getElementById(iFrame).style.display = "block";
+ document.getElementById(container).style.height="99%";
+ document.getElementById(container).style.left="10%";
+ document.getElementById(container).style.top="0";
+ document.getElementById(container).style.width="80%";
+ document.getElementById("guide_words").style.display = "none";
+
+}
+function fillForm(form){
+ document.getElementById(form).attributes['action'].value =
+ document.getElementById(form).attributes['action'].value
+ +'&priority='+document.getElementById('priority').value
+ +'&summary='+document.getElementById('feedback-summary').value
+ +'&description='+document.getElementById('feedback-description').value
+ +'&environment='+document.getElementById('feedback-environment').value
+ +'&components='+document.getElementById('components').value
+ +'&versions='+document.getElementById('versions').value
+ +'&customfield_12310031='+document.getElementById('customfield_12310031').value;
+}
+
+function submitForm(form, iFrame, but, container){
+ document.getElementById(form).submit();
+ showIFrame(form, iFrame, but, container);
+}
+
+function setFieldFlag(type, flag){
+ if(type=="textarea"){
+ textCorrect = flag;
+ }else if(type=="text"){
+ inputCorrect = flag;
+ }
+}
+function countLeft(fieldToCheck, count, max) {
+ var field = document.getElementById(fieldToCheck);
+ var left = 'none';
+ var char_count = field.value.length;
+ var fullStr = field.value + " ";
+ var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
+ var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
+ var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
+ var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
+ var splitString = cleanedStr.split(" ");
+ var word_count = splitString.length -1;
+ if (fullStr.length <2) {
+ word_count = 0;
+ }
+ if (field.value.length > max){
+ field.value = field.value.substring(0, max);
+ }else if(count != "none"){
+ left = document.getElementById(count);
+ if(navigator.appName=="Microsoft Internet Explorer"){
+ left.innerText = max - field.value.length;
+ }else{
+ left.textContent = max - field.value.length;
+ }
+
+ }
+ if (word_count >= 1){
+ setFieldFlag(field.type, true);
+ }else{
+ setFieldFlag(field.type, false);
+ }
+ if(inputCorrect && textCorrect){
+ document.getElementById("feedback-submit").disabled=false;
+ document.getElementById("feedback-submit").style.color="#415973";
+ }else{
+ document.getElementById("feedback-submit").disabled=true;
+ document.getElementById("feedback-submit").style.color="#999";
+ }
+}
+
+
+function init(input, textarea){
+ document.getElementById("feedback-submit").disabled=true;
+ countLeft(input, "left", 255);
+ countLeft(textarea, "none", 500);
+}
+
+
// attach handler to window object
Event.observe(window,'load',initializeEmailClient,false);
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/css/tools.css 2009-05-29 16:03:34 UTC (rev 15607)
@@ -123,3 +123,204 @@
display:block;
}
+/* Feedback styles */
+
+.problemLayer {
+ position: absolute;
+ left: 34%;
+ top: 20%;
+ width: 400px;
+ height: 110px;
+ z-index: 2;
+ background: #fff;
+ display: none;
+}
+
+.time_out_div {
+ height: 100%;
+ width: 100%;
+ min-height: 100%;
+ background-color: #5781AF;
+ filter:alpha(opacity=50);
+ opacity: 0.5;
+ -moz-opacity: 0.5;
+ -khtml-opacity: 0.5;
+ z-index: 99;
+ position: fixed;
+ top: 0;
+ left: 0;
+ display: none;
+}
+
+* html div#feedback-wrapper, * html div#feedback-maincontainer, * html div#time_out_div {
+position: absolute;
+top:expression(eval(document.compatMode &&
+document.compatMode=='CSS1Compat') ?
+documentElement.scrollTop
++(documentElement.clientHeight-this.clientHeight)
+: document.body.scrollTop
++(document.body.clientHeight-this.clientHeight));
+}
+
+#feedback-maincontainer{
+ font-family: Arial;
+ font-size: 14px;
+ display:none;
+ background: #F5F5F5;
+ border: 8px solid #7F9DB9;
+ height:440px;
+ left:30%;
+ position:fixed;
+ text-align:left;
+ top:20%;
+ bottom:20%;
+ width:500px;
+ z-index:100;
+}
+* html #feedback-maincontainer {
+ width:480px;
+}
+#feedback-maincontainer div#guide_words{
+ margin: 0px 20px 0px 20px !important;
+ font-size: 12px;
+}
+.feedback-helper, #summary-helper-left{
+ color: #ff3333;
+ font-size: 10px;
+ float:left;
+
+}
+#summary-helper-left{
+ float:right;
+ color: #5781AF;
+ padding-right:5px;
+}
+
+.clear{
+ clear:both;
+}
+*html #feedback-maincontainer{
+ width: 500px;
+}
+*html #feedback-header{
+ width: 100%;
+}
+#feedback-header{
+ background-color:#5781AF;
+ border-bottom: 2px solid #ccc;
+ color:white;
+ font-weight:bold;
+ font-size: 16px;
+ height:20px;
+ margin:0;
+ padding:10px 0 10px 20px;
+ position:relative;
+ text-align:left;
+}
+
+#feedback-close{
+ display:block;
+ position:absolute;
+ right:9px;
+ top:6px;
+ width:12px;
+ border: 0px;
+}
+
+#feedback-mailform{
+ margin: 0px 20px 0px 20px !important;
+ padding-bottom:5px;
+ text-align:left;
+}
+
+*html #feedback-mailform{
+ margin: 0px 20px 0px 0px;
+ padding-bottom:5px;
+}
+#feedback-mailform textarea, #feedback-mailform input, #feedback-mailform label{
+ font-family: Arial,Helvetica,sans-serif;
+ width:450px;
+}
+#feedback-mailform input, #feedback-mailform label{
+ display:block;
+}
+#feedback-mailform label{
+ margin-top: 10px;
+}
+#feedback-mailform label span{
+ color: #ff0000
+}
+#feedback-mailform textarea{
+ font-size: 14px;
+ height: 100px;
+ padding: 2px;
+}
+#feedback-mailform textarea#feedback-environment{
+ height: 50px;
+}
+
+.feedback-formbutton{
+ font-size: 12px;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #999;
+ margin: 15px 20px;
+}
+
+
+.feedback-images{
+ border:0;
+ margin:0;
+ display: inline;
+}
+#feedback-iFrame {
+ background-color:#F5F5F5;
+ border:medium none;
+ height:90%;
+ line-height:20px;
+ overflow:visible;
+ width:100%;
+ display:none;
+}
+
+#feedback-wrapper{
+ margin: 0px;
+ padding: 0px;
+ position:fixed;
+ bottom:0px;
+ right:0px;
+ height:315px;
+ width: 47px;
+ overflow: hidden;
+ cursor:pointer;
+}
+
+#feedback-link{
+ float: left;
+ display: block;
+}
+
+#feedback-link img{
+ width: 47px;
+ height:315px;
+}
+h3#feedback-header{
+ display:block;
+ }
+
+.remark{
+ font-size: 11px;
+ margin-top: -15px;
+ margin-bottom:25px;
+ padding:0px;
+}
+.remark ul{
+ list-style: none;
+}
+.remark ul li{
+ margin:0px;
+ padding:0px;
+}
+p.remark i{
+ font-style:normal;
+}
+
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/images/feedback_logo.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js 2009-05-29 15:48:53 UTC (rev 15606)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/org/css/script/toggle.js 2009-05-29 16:03:34 UTC (rev 15607)
@@ -1,3 +1,114 @@
+var inputCorrect = false;
+var textCorrect = false;
+
+function getPlace(){
+ if(navigator.appName=="Microsoft Internet Explorer" && parseFloat(navigator.appVersion) < 7){
+ document.getElementById('place').style.display = "block";
+ }
+}
+
+function showPopup(_popupId) {
+ document.getElementById(_popupId).style.display = "block";
+ document.getElementById('timeOutDiv').style.display = "block";
+ document.getElementById("feedback-maincontainer").style.display = "block";
+ document.getElementById("guide_words").style.display = "block";
+ getPlace();
+}
+
+function hidePopup(_popupId, form, iFrame, but, container) {
+ document.getElementById(_popupId).style.display = "none";
+ document.getElementById('timeOutDiv').style.display = "none";
+ document.getElementById(iFrame).style.display = "none";
+ document.getElementById(form).style.display = "block";
+ document.getElementById(but).style.display = "inline";
+ document.getElementById(container).style.left="30%";
+ document.getElementById(container).style.top="20%";
+ document.getElementById(container).style.width="500px";
+ document.getElementById(container).style.height="440px";
+ getPlace();
+}
+
+function showIFrame(form, iFrame, but, container){
+ document.getElementById(form).style.display = "none";
+ document.getElementById(but).style.display = "none";
+ document.getElementById(iFrame).style.display = "block";
+ document.getElementById(container).style.height="99%";
+ document.getElementById(container).style.left="10%";
+ document.getElementById(container).style.top="0";
+ document.getElementById(container).style.width="80%";
+ document.getElementById("guide_words").style.display = "none";
+
+}
+function fillForm(form){
+ document.getElementById(form).attributes['action'].value =
+ document.getElementById(form).attributes['action'].value
+ +'&priority='+document.getElementById('priority').value
+ +'&summary='+document.getElementById('feedback-summary').value
+ +'&description='+document.getElementById('feedback-description').value
+ +'&environment='+document.getElementById('feedback-environment').value
+ +'&components='+document.getElementById('components').value
+ +'&versions='+document.getElementById('versions').value
+ +'&customfield_12310031='+document.getElementById('customfield_12310031').value;
+}
+
+function submitForm(form, iFrame, but, container){
+ document.getElementById(form).submit();
+ showIFrame(form, iFrame, but, container);
+}
+
+function setFieldFlag(type, flag){
+ if(type=="textarea"){
+ textCorrect = flag;
+ }else if(type=="text"){
+ inputCorrect = flag;
+ }
+}
+function countLeft(fieldToCheck, count, max) {
+ var field = document.getElementById(fieldToCheck);
+ var left = 'none';
+ var char_count = field.value.length;
+ var fullStr = field.value + " ";
+ var initial_whitespace_rExp = /^[^A-Za-z0-9]+/gi;
+ var left_trimmedStr = fullStr.replace(initial_whitespace_rExp, "");
+ var non_alphanumerics_rExp = rExp = /[^A-Za-z0-9]+/gi;
+ var cleanedStr = left_trimmedStr.replace(non_alphanumerics_rExp, " ");
+ var splitString = cleanedStr.split(" ");
+ var word_count = splitString.length -1;
+ if (fullStr.length <2) {
+ word_count = 0;
+ }
+ if (field.value.length > max){
+ field.value = field.value.substring(0, max);
+ }else if(count != "none"){
+ left = document.getElementById(count);
+ if(navigator.appName=="Microsoft Internet Explorer"){
+ left.innerText = max - field.value.length;
+ }else{
+ left.textContent = max - field.value.length;
+ }
+
+ }
+ if (word_count >= 1){
+ setFieldFlag(field.type, true);
+ }else{
+ setFieldFlag(field.type, false);
+ }
+ if(inputCorrect && textCorrect){
+ document.getElementById("feedback-submit").disabled=false;
+ document.getElementById("feedback-submit").style.color="#415973";
+ }else{
+ document.getElementById("feedback-submit").disabled=true;
+ document.getElementById("feedback-submit").style.color="#999";
+ }
+}
+
+
+function init(input, textarea){
+ document.getElementById("feedback-submit").disabled=true;
+ countLeft(input, "left", 255);
+ countLeft(textarea, "none", 500);
+}
+
// attach handler to window object
Event.observe(window,'load',initializeEmailClient,false);
17 years, 1 month
JBoss Tools SVN: r15606 - in trunk: seam/plugins/org.jboss.tools.seam.core/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-29 11:48:53 -0400 (Fri, 29 May 2009)
New Revision: 15606
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
Log:
Removed plug-in versions from dependencies.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2009-05-29 15:23:06 UTC (rev 15605)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/META-INF/MANIFEST.MF 2009-05-29 15:48:53 UTC (rev 15606)
@@ -61,7 +61,7 @@
org.eclipse.core.databinding,
org.eclipse.jface.databinding,
org.eclipse.core.databinding.property,
- org.jboss.tools.jst.web.kb;bundle-version="1.0.0"
+ org.jboss.tools.jst.web.kb
Bundle-Version: 2.0.0
Export-Package: org.jboss.tools.jst.jsp.outline.cssdialog.common,
org.jboss.tools.jst.jsp.outline.cssdialog.parsers
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2009-05-29 15:23:06 UTC (rev 15605)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2009-05-29 15:48:53 UTC (rev 15606)
@@ -52,7 +52,7 @@
org.eclipse.jst.jsf.facesconfig,
org.eclipse.jst.common.frameworks,
org.jboss.tools.common.kb,
- org.jboss.tools.jst.web.kb;bundle-version="1.0.0"
+ org.jboss.tools.jst.web.kb
Bundle-Version: 2.0.0
Export-Package:
org.jboss.tools.seam.core,
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-05-29 15:23:06 UTC (rev 15605)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2009-05-29 15:48:53 UTC (rev 15606)
@@ -57,11 +57,11 @@
org.eclipse.search,
org.jboss.tools.jst.jsp,
org.eclipse.jst.jsf.core,
- org.eclipse.ltk.core.refactoring;bundle-version="3.4.0",
- org.eclipse.ltk.ui.refactoring;bundle-version="3.4.0",
- org.jboss.ide.eclipse.as.core;bundle-version="1.0.0",
- org.jboss.tools.jst.web.kb;bundle-version="1.0.0",
- org.jboss.tools.jsf;bundle-version="2.0.0"
+ org.eclipse.ltk.core.refactoring,
+ org.eclipse.ltk.ui.refactoring,
+ org.jboss.ide.eclipse.as.core,
+ org.jboss.tools.jst.web.kb,
+ org.jboss.tools.jsf
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.seam.ui,
org.jboss.tools.seam.ui.actions,
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-29 15:23:06 UTC (rev 15605)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-29 15:48:53 UTC (rev 15606)
@@ -36,6 +36,6 @@
org.eclipse.wst.validation,
org.eclipse.jdt.launching,
org.eclipse.jdt.ui,
- org.eclipse.jst.j2ee;bundle-version="1.1.300",
- org.eclipse.text;bundle-version="3.5.0"
+ org.eclipse.jst.j2ee,
+ org.eclipse.text
Bundle-Localization: plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2009-05-29 15:23:06 UTC (rev 15605)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/META-INF/MANIFEST.MF 2009-05-29 15:48:53 UTC (rev 15606)
@@ -37,7 +37,7 @@
org.jboss.tools.jst.jsp,
org.jboss.tools.jst.jsp.test,
org.eclipse.jdt.ui,
- org.jboss.tools.vpe.ui.test;bundle-version="1.0.0"
+ org.jboss.tools.vpe.ui.test
Export-Package: org.jboss.tools.seam.ui.test,
org.jboss.tools.seam.ui.test.ca,
org.jboss.tools.seam.ui.test.hyperlink,
17 years, 1 month
JBoss Tools SVN: r15605 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-05-29 11:23:06 -0400 (Fri, 29 May 2009)
New Revision: 15605
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4391
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-29 14:59:38 UTC (rev 15604)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-29 15:23:06 UTC (rev 15605)
@@ -58,6 +58,8 @@
private StyleComposite styleComposite;
private DataBindingContext bindingContext = new DataBindingContext();
+
+ private AggregateValidationStatus aggregateStatus;
private IStatus status = Status.OK_STATUS;
@@ -114,7 +116,7 @@
});
- AggregateValidationStatus aggregateStatus = new AggregateValidationStatus(
+ aggregateStatus = new AggregateValidationStatus(
getBindingContext().getValidationStatusProviders(),
AggregateValidationStatus.MAX_SEVERITY);
aggregateStatus.addValueChangeListener(new IValueChangeListener() {
@@ -244,9 +246,14 @@
return html.toString();
}
+
+ public void releaseResources() {
+ aggregateStatus.dispose();
+ }
@Override
public boolean close() {
+ releaseResources();
return super.close();
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-29 14:59:38 UTC (rev 15604)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-29 15:23:06 UTC (rev 15605)
@@ -257,8 +257,11 @@
classCombo.select(classCombo.getItemCount() - 1);
}
+
+ @Override
public void releaseResources() {
+ super.releaseResources();
preview.releaseModel();
if (cssModel != null) {
@@ -298,7 +301,6 @@
default:
// make some closure operation
}
- releaseResources();
return super.close();
}
@@ -320,7 +322,8 @@
protected void handleStyleChanged() {
super.handleStyleChanged();
- applyButton.setEnabled(true);
+ if (getStatus().isOK())
+ applyButton.setEnabled(true);
}
17 years, 1 month
JBoss Tools SVN: r15604 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-29 10:59:38 -0400 (Fri, 29 May 2009)
New Revision: 15604
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-29 14:46:28 UTC (rev 15603)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-29 14:59:38 UTC (rev 15604)
@@ -81,7 +81,7 @@
} else if(SeamXMLConstants.CLS_PROPERTIES.equals(cls)) {
d2 = new SeamPropertiesDeclaration();
}
- assertTrue("Cannot restore declaration " + d.getName() + " " + d.getClass().getName(), d2 != null);
+ assertNotNull("Cannot restore declaration " + d.getName() + " " + d.getClass().getName(), d2);
d2.loadXML(e, context);
List<Change> changes = d2.merge(d);
if(changes != null && changes.size() > 0) {
@@ -104,7 +104,7 @@
} else if(SeamXMLConstants.CLS_JAVA.equals(cls)) {
f2 = new SeamAnnotatedFactory();
}
- assertTrue("Cannot restore factory declaration " + f.getName() + " " + f.getClass().getName(), f2 != null);
+ assertNotNull("Cannot restore factory declaration " + f.getName() + " " + f.getClass().getName(), f2);
f2.loadXML(e, context);
List<Change> changes = f2.merge(f);
if(changes != null && changes.size() > 0) {
@@ -113,21 +113,19 @@
System.out.println(f.getName() + " " + f.getClass().getName() + " " + changes.size());
}
}
-
}
-
+
public void testLoadSerializedModelTime() {
ISeamProject sp = getSeamProject();
-
+
long time = ((SeamProject)sp).reload();
int components = sp.getComponents().length;
System.out.print("Reloaded " + components + " components in " + time + " ms");
-
+
float timePerComponent = 1f * time / components;
- assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 20.0f);
+ assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 30.0f);
}
-
public void testCleanBuild() {
ISeamProject sp = getSeamProject();
try {
@@ -137,15 +135,14 @@
assertFalse(components_1 == 0);
sp.getProject().build(IncrementalProjectBuilder.CLEAN_BUILD, null);
int components_2 = sp.getComponents().length;
- assertTrue(components_2 == 0);
+ assertEquals(components_2, 0);
sp.getProject().build(IncrementalProjectBuilder.FULL_BUILD, null);
int components_3 = sp.getComponents().length;
assertEquals(components_1, components_3);
-
+
ResourcesUtils.setBuildAutomatically(auto);
} catch (CoreException e) {
JUnitUtils.fail(e.getMessage(), e);
}
}
-
-}
+}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15603 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-29 10:46:28 -0400 (Fri, 29 May 2009)
New Revision: 15603
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 14:20:29 UTC (rev 15602)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 14:46:28 UTC (rev 15603)
@@ -10,7 +10,6 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
-import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.eclipse.text.edits.MultiTextEdit;
@@ -121,10 +120,11 @@
}
private void renameComponent(ISeamProject seamProject, String componentName, String newName, List<TestChangeStructure> changeList) throws CoreException{
+ JobUtils.waitForIdle();
// Test before renaming
ISeamComponent component = seamProject.getComponent(componentName);
- assertNotNull(component);
- assertNull(seamProject.getComponent(newName));
+ assertNotNull("Can't load component " + componentName, component);
+ assertNull("There is unexisted component in seam project: " + newName, seamProject.getComponent(newName));
for(TestChangeStructure changeStructure : changeList){
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
@@ -140,28 +140,28 @@
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
+
for(int i = 0; i < rootChange.getChildren().length;i++){
TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
-
+
MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
TestChangeStructure change = findChange(changeList, fileChange.getFile());
if(change != null){
- if(change.size() != edit.getChildrenSize()){
- System.out.println("File - "+fileChange.getFile().getName());
- System.out.println("Edit size - "+edit.getChildrenSize());
- }
+// if(change.size() != edit.getChildrenSize()){
+// System.out.println("File - "+fileChange.getFile().getName());
+// System.out.println("Edit size - "+edit.getChildrenSize());
+// }
assertEquals(change.size(), edit.getChildrenSize());
}
}
-
+
rootChange.perform(new NullProgressMonitor());
JobUtils.waitForIdle();
// Test results
- assertNull(seamProject.getComponent(componentName));
- assertNotNull(seamProject.getComponent(newName));
+ assertNull("There is unexisted component in seam project: " + componentName, seamProject.getComponent(componentName));
+ assertNotNull("Can't load component " + newName, seamProject.getComponent(newName));
for(TestChangeStructure changeStructure : changeList){
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
17 years, 1 month
JBoss Tools SVN: r15602 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-29 10:20:29 -0400 (Fri, 29 May 2009)
New Revision: 15602
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
Test improvement
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-29 14:17:49 UTC (rev 15601)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-29 14:20:29 UTC (rev 15602)
@@ -197,24 +197,27 @@
}
private void renameJavaDeclaration(ISeamJavaComponentDeclaration javaDecl) throws CoreException{
- declarationFile = (IFile)javaDecl.getResource();
- if(declarationFile != null && !coreHelper.isJar(javaDecl)){
+ IFile file = (IFile)javaDecl.getResource();
+ if(file != null && !coreHelper.isJar(javaDecl)){
ITextSourceReference location = ((SeamComponentDeclaration)javaDecl).getLocationFor(ISeamXmlComponentDeclaration.NAME);
if(location != null && !isBadLocation(location)){
- TextFileChange change = getChange(declarationFile);
+ TextFileChange change = getChange(file);
TextEdit edit = new ReplaceEdit(location.getStartPosition(), location.getLength(), "\""+newName+"\""); //$NON-NLS-1$ //$NON-NLS-2$
change.addEdit(edit);
}
}
+ declarationFile = file;
}
private void renameXMLDeclaration(ISeamXmlComponentDeclaration xmlDecl){
- declarationFile = (IFile)xmlDecl.getResource();
- if(declarationFile != null && !coreHelper.isJar(xmlDecl)){
+ IFile file = (IFile)xmlDecl.getResource();
+ if(file != null && !coreHelper.isJar(xmlDecl)){
ITextSourceReference location = ((SeamComponentDeclaration)xmlDecl).getLocationFor(ISeamXmlComponentDeclaration.NAME);
if(location != null && !isBadLocation(location))
- changeXMLNode(location, declarationFile);
+ changeXMLNode(location, file);
}
+ if(declarationFile == null)
+ declarationFile = file;
}
private void scanJava(IFile file, String content){
17 years, 1 month
JBoss Tools SVN: r15601 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/page and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-05-29 10:17:49 -0400 (Fri, 29 May 2009)
New Revision: 15601
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-footer.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-header.png
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-theme-simple.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4381, templates for rich:layout, rich:layoutPanel, rich:page were added, code adjustment.
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-footer.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-footer.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-header.png
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/bkg-header.png
___________________________________________________________________
Name: svn:mime-type
+ image/png
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css 2009-05-29 14:17:49 UTC (rev 15601)
@@ -0,0 +1,56 @@
+.rich-page {
+ font-size: 11px;
+ margin: auto 10px;
+ width: auto;
+ min-width: 750px;
+ text-align: left;
+}
+
+.rich-page-header {
+
+}
+
+.rich-page-header-content {
+
+}
+
+.rich-page-subheader {
+
+}
+
+.rich-page-content {
+
+}
+
+.rich-page-sidebar {
+ float: left;
+ position: relative;
+ width: 12.3077em;
+}
+
+.rich-page-main {
+ float: right;
+ margin-left: -30em;
+ width: 100%;
+}
+
+.rich-page-body {
+ float: none;
+ width: auto;
+ position: static;
+ margin-left: 13.3077em;
+}
+
+.rich-page-footer {
+ clear: both;
+}
+
+.rich-page-footer-content {
+
+}
+
+.rich-page-sidebar,.rich-page-body,.rich-page-footer {
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+}
\ No newline at end of file
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-basic.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-theme-simple.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-theme-simple.css (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-theme-simple.css 2009-05-29 14:17:49 UTC (rev 15601)
@@ -0,0 +1,50 @@
+.rich-page-header {
+ min-height: 40px;
+ padding: 0 20px;
+ background-color: #EDEAE6;
+ background-image: url(bkg-header.png);
+ background-position: left top;
+ background-repeat: repeat-x;
+ border-bottom: 1px solid #FFFFFF;
+ color: #DFDCD5;
+}
+
+.rich-page-header-content {
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+}
+
+.rich-page-subheader {
+ padding: 0 20px;
+ background-color: #EDEAE6;
+ border-bottom: 1px solid #FFFFFF;
+ color: #DFDCD5;
+}
+
+.rich-page-sidebar {
+ vertical-align: top;
+}
+
+.rich-page-content {
+ background-color: #FFFFFF;
+ border: 2px solid #C4C0B9;
+}
+
+.rich-page-main {
+ border-top: 2px solid #C4C0B9;
+}
+
+.rich-page-body {
+ vertical-align: top;
+}
+
+.rich-page-footer {
+ background-color: #C4C0B9;
+ background-image: url(bkg-footer.png);
+ background-position: left center;
+ background-repeat: repeat-x;
+ border-top: 1px solid #FFFFFF;
+ padding: 20px 0;
+ text-align: center;
+}
\ No newline at end of file
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/page/page-theme-simple.css
___________________________________________________________________
Name: svn:mime-type
+ text/css
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2009-05-29 14:04:37 UTC (rev 15600)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesColumnTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -147,7 +147,7 @@
public static nsIDOMElement getHeaderIcon(VpePageContext pageContext, Element column, nsIDOMDocument visualDocument) {
String sortable = ComponentUtil.getAttribute(column, RichFaces.ATTR_SORTABLE);
String sortBy = column.getAttribute(RichFaces.ATTR_SORT_BY);
- if (RichFaces.VAL_TRUE.equals(sortable) || sortBy != null) {
+ if (RichFaces.VALUE_TRUE.equals(sortable) || sortBy != null) {
nsIDOMElement img = visualDocument.createElement(HTML.TAG_IMG);
String sortIcon = column.getAttribute(RichFaces.ATTR_SORT_ICON);
if (sortIcon != null) {
@@ -166,7 +166,7 @@
public static boolean isBreakBefore(Node child) {
String breakBeforeVal = ((Element)child).getAttribute(RichFaces.ATTR_BREAK_BEFORE);
- boolean breakBefore = breakBeforeVal != null && breakBeforeVal.equalsIgnoreCase(RichFaces.VAL_TRUE);
+ boolean breakBefore = breakBeforeVal != null && breakBeforeVal.equalsIgnoreCase(RichFaces.VALUE_TRUE);
return breakBefore;
}
@@ -176,6 +176,6 @@
* @param column should be not {@code null}
*/
public static boolean isVisible(Element column) {
- return !RichFaces.VAL_FALSE.equals(column.getAttribute(RichFaces.ATTR_VISIBLE));
+ return !RichFaces.VALUE_FALSE.equals(column.getAttribute(RichFaces.ATTR_VISIBLE));
}
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2009-05-29 14:04:37 UTC (rev 15600)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -252,7 +252,7 @@
private String uploadListClass = "rich-fileupload-list-overflow"; //$NON-NLS-1$
public StyleClasses(final Element sourceElement) {
- final boolean disabled = RichFaces.VAL_TRUE
+ final boolean disabled = RichFaces.VALUE_TRUE
.equalsIgnoreCase(sourceElement.getAttribute(RichFaces.ATTR_DISABLED));
final String styleAttrPostfix = disabled ? POSTFIX_DISABLED : POSTFIX_ENABLED;
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -0,0 +1,56 @@
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class RichFacesLayoutPanelTemplate extends VpeAbstractTemplate {
+
+ private static final String FLOAT_LEFT_STYLE = ";float: left;"; //$NON-NLS-1$
+ private static final String FLOAT_RIGHT_STYLE = ";float: right;"; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ */
+ public RichFacesLayoutPanelTemplate() {
+ super();
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ VpeCreationData creationData = null;
+ Element sourceElement = (Element)sourceNode;
+ nsIDOMElement mainDiv = visualDocument.createElement(HTML.TAG_DIV);
+ String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ String width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ String position = sourceElement.getAttribute(RichFaces.ATTR_POSITION);
+ if (ComponentUtil.isNotBlank(width)) {
+ mainDiv.setAttribute(HTML.ATTR_WIDTH, width);
+ style += ";width: " + width + ";"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ if (RichFaces.VALUE_LEFT.equalsIgnoreCase(position)
+ || RichFaces.VALUE_CENTER.equalsIgnoreCase(position)) {
+ style += FLOAT_LEFT_STYLE;
+ } else if (RichFaces.VALUE_RIGHT.equalsIgnoreCase(position)) {
+ style += FLOAT_RIGHT_STYLE;
+ } else if (RichFaces.VALUE_BOTTOM.equalsIgnoreCase(position)) {
+ nsIDOMElement bottomDiv = visualDocument.createElement(HTML.TAG_DIV);
+ bottomDiv.setAttribute(HTML.ATTR_STYLE, "display: block; height: 0; clear: both; visibility: hidden;"); //$NON-NLS-1$
+ bottomDiv.appendChild(visualDocument.createTextNode(".")); //$NON-NLS-1$
+ mainDiv.appendChild(bottomDiv);
+ }
+ if (ComponentUtil.isNotBlank(style)) {
+ mainDiv.setAttribute(HTML.ATTR_STYLE, style);
+ }
+ creationData = new VpeCreationData(mainDiv);
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutPanelTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -0,0 +1,35 @@
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class RichFacesLayoutTemplate extends VpeAbstractTemplate {
+
+ /**
+ * Constructor
+ */
+ public RichFacesLayoutTemplate() {
+ super();
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ VpeCreationData creationData = null;
+ Element sourceElement = (Element)sourceNode;
+ nsIDOMElement mainDiv = visualDocument.createElement(HTML.TAG_DIV);
+ String style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ if (ComponentUtil.isNotBlank(style)) {
+ mainDiv.setAttribute(HTML.ATTR_STYLE, style);
+ }
+ creationData = new VpeCreationData(mainDiv);
+ return creationData;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesLayoutTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -0,0 +1,302 @@
+package org.jboss.tools.jsf.vpe.richfaces.template;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+public class RichFacesPageTemplate extends VpeAbstractTemplate {
+
+ private static final String CSS_BASIC_STYLE_PATH = "page/page-basic.css"; //$NON-NLS-1$
+ private static final String CSS_SIMPLE_THEME_STYLE_PATH = "page/page-theme_simple.css"; //$NON-NLS-1$
+ private static final String COMPONENT_NAME = "richFacesPage"; //$NON-NLS-1$
+
+// private static final String FACET_NAME_PAGE_HEADER = "pageHeader"; //$NON-NLS-1$
+ private static final String FACET_NAME_SUBHEADER = "subheader"; //$NON-NLS-1$
+ private static final String FACET_NAME_SIDEBAR = "sidebar"; //$NON-NLS-1$
+
+ private static final String CSS_PAGE = "rich-page"; //$NON-NLS-1$
+ private static final String CSS_PAGE_HEADER = "rich-page-header"; //$NON-NLS-1$
+ private static final String CSS_PAGE_HEADER_CONTENT = "rich-page-header-content"; //$NON-NLS-1$
+ private static final String CSS_PAGE_SUBHEADER = "rich-page-subheader"; //$NON-NLS-1$
+ private static final String CSS_PAGE_CONTENT = "rich-page-content"; //$NON-NLS-1$
+ private static final String CSS_PAGE_SIDEBAR = "rich-page-sidebar"; //$NON-NLS-1$
+ private static final String CSS_PAGE_MAIN = "rich-page-main"; //$NON-NLS-1$
+ private static final String CSS_PAGE_BODY = "rich-page-body"; //$NON-NLS-1$
+ private static final String CSS_PAGE_FOOTER = "rich-page-footer"; //$NON-NLS-1$
+ private static final String CSS_PAGE_FOOTER_CONTENT = "rich-page-footer-content"; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ */
+ public RichFacesPageTemplate() {
+ super();
+ }
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
+ nsIDOMDocument visualDocument) {
+ VpeCreationData creationData = null;
+ Element sourceElement = (Element)sourceNode;
+
+ /*
+ * Adding default css file for rich:page component
+ */
+ ComponentUtil.setCSSLink(pageContext, CSS_BASIC_STYLE_PATH, COMPONENT_NAME);
+
+ /*
+ * Read rich:page's attributes
+ */
+ Attributes attrs = new Attributes(sourceElement);
+
+ /*
+ * Create divs' structure.
+ */
+ nsIDOMElement pageDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement pageContentDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement pageMainDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement pageBodyDiv = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement pageHeaderDiv;
+ nsIDOMElement pageHeaderContentDiv;
+ nsIDOMElement pageSubHeaderDiv;
+ nsIDOMElement pageSidebarDiv;
+ nsIDOMElement pageFooterDiv;
+ nsIDOMElement pageFooterContentDiv;
+ creationData = new VpeCreationData(pageDiv);
+
+ /*
+ * Add basic style classes.
+ */
+ String styleClass = CSS_PAGE;
+ if (ComponentUtil.isNotBlank(attrs.getStyleClass())) {
+ styleClass += attrs.getStyleClass();
+ }
+ if (ComponentUtil.isNotBlank(attrs.getStyle())) {
+ pageDiv.setAttribute(HTML.ATTR_STYLE, attrs.getStyle());
+ }
+ pageDiv.setAttribute(HTML.ATTR_CLASS, styleClass);
+ pageContentDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_CONTENT);
+ pageMainDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_MAIN);
+ pageBodyDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_BODY);
+
+ /*
+ * 1)
+ * Encode page header facet,
+ * add header divs and classes
+ */
+ Element headerFacet = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_HEADER);
+ if(headerFacet != null) {
+ pageHeaderDiv = visualDocument.createElement(HTML.TAG_DIV);
+ pageHeaderContentDiv = visualDocument.createElement(HTML.TAG_DIV);
+
+ pageHeaderDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_HEADER);
+ pageHeaderContentDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_HEADER_CONTENT);
+
+ pageHeaderDiv.appendChild(pageHeaderContentDiv);
+ pageDiv.appendChild(pageHeaderDiv);
+
+ VpeChildrenInfo headerInfo = new VpeChildrenInfo(pageHeaderContentDiv);
+ headerInfo.addSourceChild(headerFacet);
+ creationData.addChildrenInfo(headerInfo);
+ }
+
+ /*
+ * 2)
+ * Encode page subheader facet,
+ * add subheader divs and classes
+ */
+ Element subHeaderFacet = ComponentUtil.getFacet(sourceElement, FACET_NAME_SUBHEADER);
+ if(subHeaderFacet != null) {
+ pageSubHeaderDiv = visualDocument.createElement(HTML.TAG_DIV);
+ pageSubHeaderDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_SUBHEADER);
+ pageDiv.appendChild(pageSubHeaderDiv);
+
+ VpeChildrenInfo subHeaderInfo = new VpeChildrenInfo(pageSubHeaderDiv);
+ subHeaderInfo.addSourceChild(subHeaderFacet);
+ creationData.addChildrenInfo(subHeaderInfo);
+ }
+
+ /*
+ * 3)
+ * Nesting page content div.
+ */
+ pageDiv.appendChild(pageContentDiv);
+
+ /*
+ * 4)
+ * Encode page sidebar facet,
+ * add sidebar divs and classes
+ */
+ Element sidebarFacet = ComponentUtil.getFacet(sourceElement, FACET_NAME_SIDEBAR);
+ if(sidebarFacet != null) {
+ pageSidebarDiv = visualDocument.createElement(HTML.TAG_DIV);
+ pageSidebarDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_SIDEBAR);
+ pageContentDiv.appendChild(pageSidebarDiv);
+
+ VpeChildrenInfo sidebarInfo = new VpeChildrenInfo(pageSidebarDiv);
+ sidebarInfo.addSourceChild(sidebarFacet);
+ creationData.addChildrenInfo(sidebarInfo);
+ }
+
+ /*
+ * 5)
+ * Nesting page's main and body divs.
+ * Encode all children into page body div.
+ */
+ pageContentDiv.appendChild(pageMainDiv);
+ pageMainDiv.appendChild(pageBodyDiv);
+ VpeChildrenInfo pageBodyDivInfo = new VpeChildrenInfo(pageBodyDiv);
+ for (Node child : ComponentUtil.getChildren(sourceElement, true)) {
+ pageBodyDivInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(pageBodyDivInfo);
+
+ /*
+ * 6)
+ * Encode page footer facet,
+ * add footer divs and classes
+ */
+ Element footerFacet = ComponentUtil.getFacet(sourceElement, RichFaces.NAME_FACET_FOOTER);
+ if(footerFacet != null) {
+ pageFooterDiv = visualDocument.createElement(HTML.TAG_DIV);
+ pageFooterContentDiv = visualDocument.createElement(HTML.TAG_DIV);
+
+ pageFooterDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_FOOTER);
+ pageFooterContentDiv.setAttribute(HTML.ATTR_CLASS, CSS_PAGE_FOOTER_CONTENT);
+
+ pageFooterDiv.appendChild(pageFooterContentDiv);
+ pageDiv.appendChild(pageFooterDiv);
+
+ VpeChildrenInfo footerInfo = new VpeChildrenInfo(pageFooterContentDiv);
+ footerInfo.addSourceChild(footerFacet);
+ creationData.addChildrenInfo(footerInfo);
+ }
+
+ return creationData;
+ }
+
+ class Attributes {
+
+ /*
+ * rich:page attributes for groups
+ */
+ private final String BODY_CLASS = "bodyClass"; //$NON-NLS-1$
+ private final String CONTENT_CLASS = "contentClass"; //$NON-NLS-1$
+ private final String FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
+ private final String HEADER_CLASS = "headerClass"; //$NON-NLS-1$
+ private final String LANG = "lang"; //$NON-NLS-1$
+ private final String MARKUP_TYPE = "markupType"; //$NON-NLS-1$
+ private final String NAMESPACE = "namespace"; //$NON-NLS-1$
+ private final String PAGE_TITLE = "pageTitle"; //$NON-NLS-1$
+ private final String SIDERBAR_CLASS = "siderbarClass"; //$NON-NLS-1$
+ private final String SIDERBAR_POSITION = "siderbarPosition"; //$NON-NLS-1$
+ private final String SIDERBAR_WIDTH = "siderbarWidth"; //$NON-NLS-1$
+ private final String THEME = "theme"; //$NON-NLS-1$
+
+ private String bodyClass;
+ private String contentClass;
+ private String footerClass;
+ private String headerClass;
+ private String lang;
+ private String markupType;
+ private String namespace;
+ private String pageTitle;
+ private String siderbarClass;
+ private String siderbarPosition;
+ private String siderbarWidth;
+ private String style;
+ private String styleClass;
+ private String theme;
+ private String width;
+
+ public Attributes(final Element sourceElement) {
+ bodyClass = sourceElement.getAttribute(BODY_CLASS);
+ contentClass = sourceElement.getAttribute(CONTENT_CLASS);
+ footerClass = sourceElement.getAttribute(FOOTER_CLASS);
+ headerClass = sourceElement.getAttribute(HEADER_CLASS);
+ lang = sourceElement.getAttribute(LANG);
+ markupType = sourceElement.getAttribute(MARKUP_TYPE);
+ namespace = sourceElement.getAttribute(NAMESPACE);
+ pageTitle = sourceElement.getAttribute(PAGE_TITLE);
+ siderbarClass = sourceElement.getAttribute(SIDERBAR_CLASS);
+ siderbarPosition = sourceElement.getAttribute(SIDERBAR_POSITION);
+ siderbarWidth = sourceElement.getAttribute(SIDERBAR_WIDTH);
+ style = sourceElement.getAttribute(HTML.ATTR_STYLE);
+ styleClass = sourceElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ theme = sourceElement.getAttribute(THEME);
+ width = sourceElement.getAttribute(HTML.ATTR_WIDTH);
+ }
+
+
+ public String getLang() {
+ return lang;
+ }
+
+ public void setLang(String lang) {
+ this.lang = lang;
+ }
+
+ public String getBodyClass() {
+ return bodyClass;
+ }
+
+ public String getContentClass() {
+ return contentClass;
+ }
+
+ public String getFooterClass() {
+ return footerClass;
+ }
+
+ public String getHeaderClass() {
+ return headerClass;
+ }
+
+ public String getMarkupType() {
+ return markupType;
+ }
+
+ public String getNamespace() {
+ return namespace;
+ }
+
+ public String getPageTitle() {
+ return pageTitle;
+ }
+
+ public String getSiderbarClass() {
+ return siderbarClass;
+ }
+
+ public String getSiderbarPosition() {
+ return siderbarPosition;
+ }
+
+ public String getSiderbarWidth() {
+ return siderbarWidth;
+ }
+
+ public String getStyle() {
+ return style;
+ }
+
+ public String getStyleClass() {
+ return styleClass;
+ }
+
+ public String getTheme() {
+ return theme;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPageTemplate.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2009-05-29 14:04:37 UTC (rev 15600)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSubTableTemplate.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -99,7 +99,7 @@
String nodeName = child.getNodeName();
if (nodeName.endsWith(':' + RichFaces.TAG_COLUMN) ||
nodeName.endsWith(':' + RichFaces.TAG_COLUMNS)) {
- final boolean breakBefore = RichFaces.VAL_TRUE.equals( ((Element)child).getAttribute(RichFaces.ATTR_BREAK_BEFORE) );
+ final boolean breakBefore = RichFaces.VALUE_TRUE.equals( ((Element)child).getAttribute(RichFaces.ATTR_BREAK_BEFORE) );
if (breakBefore) {
curRow++;
curColumn = 0;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2009-05-29 14:04:37 UTC (rev 15600)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/util/RichFaces.java 2009-05-29 14:17:49 UTC (rev 15601)
@@ -27,27 +27,20 @@
private RichFaces() {
}
- /** The Constant ATTR_ADD_CONTROL_LABEL. */
public static final String ATTR_ADD_CONTROL_LABEL = "addControlLabel"; //$NON-NLS-1$
public static final String ATTR_ALIGN = "align"; //$NON-NLS-1$
public static final String ATTR_BREAK_BEFORE = "breakBefore"; //$NON-NLS-1$
-
public static final String ATTR_CAPTION_CLASS = "captionClass"; //$NON-NLS-1$
public static final String ATTR_CAPTION_STYLE = "captionStyle"; //$NON-NLS-1$
- /** The Constant ATTR_COLUMN_CLASSES. */
public static final String ATTR_COLUMN_CLASSES = "columnClasses"; //$NON-NLS-1$
public static final String ATTR_COLUMNS = "columns"; //$NON-NLS-1$
public static final String ATTR_COLUMNS_WIDTH = "columnsWidth"; //$NON-NLS-1$
-
public static final String ATTR_BUTTON_ICON = "buttonIcon"; //$NON-NLS-1$
public static final String ATTR_BUTTON_ICON_DISABLED = "buttonIconDisabled"; //$NON-NLS-1$
public static final String ATTR_BUTTON_CLASS = "buttonClass"; //$NON-NLS-1$
public static final String ATTR_SHOW_INPUT = "showInput"; //$NON-NLS-1$
public static final String ATTR_LOCALE = "locale"; //$NON-NLS-1$
-
- /** The Constant ATTR_CONTROLS_TYPE. */
public static final String ATTR_CONTROLS_TYPE = "controlsType"; //$NON-NLS-1$
- /** The Constant ATTR_DEFAULT_LABEL. */
public static final String ATTR_DEFAULT_LABEL = "defaultLabel"; //$NON-NLS-1$
public static final String ATTR_DIRECTION = "direction"; //$NON-NLS-1$
public static final String ATTR_JOINT_POINT = "jointPoint"; //$NON-NLS-1$
@@ -55,40 +48,31 @@
public static final String ATTR_ELEMENTS = "elements"; //$NON-NLS-1$
public static final String ATTR_FOOTER_CLASS = "footerClass"; //$NON-NLS-1$
public static final String ATTR_HEADER_CLASS = "headerClass"; //$NON-NLS-1$
- /** The Constant ATTR_INPUT_CLASS. */
public static final String ATTR_INPUT_CLASS = "inputClass"; //$NON-NLS-1$
- /** The Constant ATTR_INPUT_SIZE. */
public static final String ATTR_INPUT_SIZE = "inputSize"; //$NON-NLS-1$
- /** The Constant ATTR_INPUT_STYLE. */
public static final String ATTR_INPUT_STYLE = "inputStyle"; //$NON-NLS-1$
public static final String ATTR_LIST_HEIGHT = "listHeight"; //$NON-NLS-1$
public static final String ATTR_LIST_WIDTH = "listWidth"; //$NON-NLS-1$
- /** The Constant ATTR_NAME. */
public static final String ATTR_NAME = "name"; //$NON-NLS-1$
public static final String ATTR_POPUP = "popup";//$NON-NLS-1$
public static final String ATTR_ROWS = "rows"; //$NON-NLS-1$
public static final String ATTR_ROW_CLASSES = "rowClasses"; //$NON-NLS-1$
public static final String ATTR_SELECT_ITEM_LABEL = "itemLabel"; //$NON-NLS-1$
public static final String ATTR_SELECT_ITEM_VALUE = "itemValue"; //$NON-NLS-1$
- /** The Constant ATTR_SHOW_BUTTON_LABELS. */
public static final String ATTR_SHOW_BUTTON_LABELS = "showButtonLabels"; //$NON-NLS-1$
public static final String ATTR_SORT_BY = "sortBy"; //$NON-NLS-1$
public static final String ATTR_SORT_ICON = "sortIcon"; //$NON-NLS-1$
public static final String ATTR_SORTABLE = "sortable"; //$NON-NLS-1$
- /** The Constant ATTR_STYLE. */
public static final String ATTR_STYLE = "style"; //$NON-NLS-1$
- /** The Constant ATTR_STYLE_CLASS. */
public static final String ATTR_STYLE_CLASS = "styleClass"; //$NON-NLS-1$
- /** The Constant ATTR_VALUE. */
public static final String ATTR_VALUE = "value"; //$NON-NLS-1$
public static final String ATTR_VISIBLE = "visible"; //$NON-NLS-1$
- /** The Constant ATTR_WIDTH. */
public static final String ATTR_WIDTH = "width"; //$NON-NLS-1$
public static final String ATTR_HEIGHT = "height"; //$NON-NLS-1$
-
public static final String ATTR_HORIZONTAL_OFFSET = "horizontalOffset"; //$NON-NLS-1$
public static final String ATTR_VERTICAL_OFFSET = "verticalOffset"; //$NON-NLS-1$
public static final String ATTR_ZINDEX = "zindex"; //$NON-NLS-1$
+ public static final String ATTR_POSITION = "position"; //$NON-NLS-1$
/** FACETS NAMES **/
public static final String NAME_FACET_CAPTION = "caption"; //$NON-NLS-1$
@@ -99,12 +83,16 @@
public static final String TAG_COLUMN = "column"; //$NON-NLS-1$
public static final String TAG_COLUMN_GROUP = "columnGroup"; //$NON-NLS-1$
public static final String TAG_COLUMNS = "columns"; //$NON-NLS-1$
- /** The Constant TAG_FACET. */
public static final String TAG_FACET = "facet"; //$NON-NLS-1$
public static final String TAG_SUB_TABLE = "subTable"; //$NON-NLS-1$
- public static final String VAL_TRUE = "true"; //$NON-NLS-1$
- public static final String VAL_FALSE = "false"; //$NON-NLS-1$
+ public static final String VALUE_TRUE = "true"; //$NON-NLS-1$
+ public static final String VALUE_FALSE = "false"; //$NON-NLS-1$
+ public static final String VALUE_LEFT = "left"; //$NON-NLS-1$
+ public static final String VALUE_RIGHT = "right"; //$NON-NLS-1$
+ public static final String VALUE_TOP = "top"; //$NON-NLS-1$
+ public static final String VALUE_BOTTOM = "bottom"; //$NON-NLS-1$
+ public static final String VALUE_CENTER = "center"; //$NON-NLS-1$
private static VpeExpression exprColumnClasses = null;
/**
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-05-29 14:04:37 UTC (rev 15600)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2009-05-29 14:17:49 UTC (rev 15601)
@@ -755,4 +755,24 @@
</vpe:template>
</vpe:if>
</vpe:tag>
+
+ <!-- Since RichFaces 3.3.1 -->
+ <vpe:tag name="rich:page" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesPageTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:layout" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesLayoutTemplate">
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:layoutPanel" case-sensitive="yes">
+ <vpe:template children="yes" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesLayoutPanelTemplate">
+ </vpe:template>
+ </vpe:tag>
+
</vpe:templates>
17 years, 1 month
JBoss Tools SVN: r15600 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-29 10:04:37 -0400 (Fri, 29 May 2009)
New Revision: 15600
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-29 13:53:46 UTC (rev 15599)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-29 14:04:37 UTC (rev 15600)
@@ -494,10 +494,7 @@
}
private boolean isBadLocation(ITextSourceReference location){
- if(location.getStartPosition() == 0 && location.getLength() == 0)
- return true;
- else
- return false;
+ return location.getStartPosition() == 0 && location.getLength() == 0;
}
private void changeXMLNode(ITextSourceReference location, IFile file){
17 years, 1 month
JBoss Tools SVN: r15599 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-29 09:53:46 -0400 (Fri, 29 May 2009)
New Revision: 15599
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3786
Name changes in Properties view calls ConsoleConfiguration rename(If the name is valid)
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java 2009-05-29 13:52:27 UTC (rev 15598)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/JPAPostInstallFasetListener.java 2009-05-29 13:53:46 UTC (rev 15599)
@@ -28,8 +28,8 @@
import org.eclipse.wst.common.project.facet.core.events.IProjectFacetActionEvent;
import org.eclipse.wst.common.project.facet.core.events.IFacetedProjectEvent.Type;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences.ConfigurationMode;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
import org.hibernate.eclipse.console.utils.ProjectUtils;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
/**
@@ -70,11 +70,10 @@
}
private ILaunchConfiguration getLaunchConfiguration(IProject project) throws CoreException{
- ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType lct = lm.getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
List<ILaunchConfiguration> configs = new ArrayList<ILaunchConfiguration>();
- for (int i = 0; i < lm.getLaunchConfigurations(lct).length; i++){
- ILaunchConfiguration lc = lm.getLaunchConfigurations(lct)[i];
+ ILaunchConfiguration[] lcs = LaunchHelper.findHibernateLaunchConfigs();
+ for (int i = 0; i < lcs.length; i++){
+ ILaunchConfiguration lc = lcs[i];
if (project.getName().equals(
lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""))){//lc uses this project //$NON-NLS-1$
if (project.getName().equals(lc.getName())) return lc;
@@ -92,7 +91,7 @@
protected void buildConsoleConfiguration(IProject project){
ILaunchManager lm = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType lct = lm.getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
+ ILaunchConfigurationType lct = LaunchHelper.getHibernateLaunchConfigsType();
String launchName = lm.generateUniqueLaunchConfigurationNameFrom(project.getName());
ILaunchConfigurationWorkingCopy wc;
try {
17 years, 1 month
JBoss Tools SVN: r15598 - trunk/jsf/docs/userguide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-29 09:52:27 -0400 (Fri, 29 May 2009)
New Revision: 15598
Modified:
trunk/jsf/docs/userguide/en/modules/editors.xml
trunk/jsf/docs/userguide/en/modules/vwt_faq.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBIDE-4076 -The info about the issue and it's resolving was added to Doc - VisualWebTools. </p>
</body></html>
Modified: trunk/jsf/docs/userguide/en/modules/editors.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/editors.xml 2009-05-29 13:50:25 UTC (rev 15597)
+++ trunk/jsf/docs/userguide/en/modules/editors.xml 2009-05-29 13:52:27 UTC (rev 15598)
@@ -1690,7 +1690,23 @@
visual page editor then close all browser views/editors and leave one visual page
editor open and restart eclipse. This should force a load of the right XULRunner
viewer.</para>
-
+ <para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xulrunner-gtk-3449.so file doesn't present
+ in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse you should:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Decompress eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar form eclipse-SDK-3.4.1-linux-gtk-x86_64.tar.gz</para>
+ </listitem>
+ <listitem>
+ <para>Copy <property>libswt-xulrunner-gtk-3449.so</property> file to your Fedora Eclipse location.</para>
+ </listitem>
+
+ <listitem>
+ <para>Open the file eclipse.ini,which can be found in your Fedora Eclipse location and add the following line: </para>
+ <programlisting role="JAVA"><![CDATA[-Dswt.library.path=/usr/lib/eclipse
+]]></programlisting><para>,where <code>/usr/lib/eclipse</code> is the path to your eclipse folder.</para>
+ </listitem>
+ </itemizedlist>
</section>
<!-- <section id="CreateLookAndFeel(Design-timeMetadate)ForAnyCustomJSFComponents41">
Modified: trunk/jsf/docs/userguide/en/modules/vwt_faq.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/vwt_faq.xml 2009-05-29 13:50:25 UTC (rev 15597)
+++ trunk/jsf/docs/userguide/en/modules/vwt_faq.xml 2009-05-29 13:52:27 UTC (rev 15598)
@@ -30,11 +30,28 @@
]]></programlisting>
</listitem>
</itemizedlist>
-
+
<para> In case you have the library installed and you still have issue with starting the
<property>Visual Page Editor</property> then close all browser views/editors and leave one <property>Visual Page
Editor</property> open and restart eclipse. This should force a load of the right XULRunner
viewer.</para>
+ <para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xulrunner-gtk-3449.so file doesn't present
+ in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse you should:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Decompress eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar form eclipse-SDK-3.4.1-linux-gtk-x86_64.tar.gz</para>
+ </listitem>
+ <listitem>
+ <para>Copy <property>libswt-xulrunner-gtk-3449.so</property> file to your Fedora Eclipse location. </para>
+ </listitem>
+
+ <listitem>
+ <para>Open the file eclipse.ini,which can be found in your Fedora Eclipse location and add the following line: </para>
+ <programlisting role="JAVA"><![CDATA[-Dswt.library.path=/usr/lib/eclipse
+]]></programlisting><para>,where <code>/usr/lib/eclipse</code> is the path to your eclipse folder.</para>
+ </listitem>
+ </itemizedlist>
</section>
<section id="question_2">
17 years, 1 month
JBoss Tools SVN: r15597 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-29 09:50:25 -0400 (Fri, 29 May 2009)
New Revision: 15597
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBIDE-4076 -The info about the issue and it's resolving was added to Doc - RHDS GSG . </p>
</body></html>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2009-05-29 13:43:33 UTC (rev 15596)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/gsg_faq.xml 2009-05-29 13:50:25 UTC (rev 15597)
@@ -39,6 +39,24 @@
<para>Open the JBDS perspective. If you see the Help view open, close it and restart
JBDS</para>
</listitem>
+ <listitem><para> If it doesn't help and you use Fedora Core Linux and Eclipse Version: 3.4.1,the issue can be produced because libswt-xulrunner-gtk-3449.so file doesn't present
+ in eclipse-swt-3.4.1-5.fc10.x86_64.rpm/eclipse/plugins/org.eclipse.swt.gtk.linux.x86_64_3.4.1.v3449c.jar.To add this file to eclipse you should:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>Decompress eclipse/plugins/org.eclipse.swt.gtk.linux.x86_3.4.1.v3449c.jar form eclipse-SDK-3.4.1-linux-gtk-x86_64.tar.gz</para>
+ </listitem>
+ <listitem>
+ <para>Copy <property>libswt-xulrunner-gtk-3449.so</property> file to your Fedora Eclipse location.</para>
+ </listitem>
+
+ <listitem>
+ <para>Open the file eclipse.ini,which can be found in your Fedora Eclipse location and add the following line: </para>
+ <programlisting role="JAVA"><![CDATA[-Dswt.library.path=/usr/lib/eclipse
+]]></programlisting><para>,where <code>/usr/lib/eclipse</code> is the path to your eclipse folder.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
<listitem>
<para>If none of these work, do the following:</para>
<itemizedlist>
17 years, 1 month
JBoss Tools SVN: r15596 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse: console/actions and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-29 09:43:33 -0400 (Fri, 29 May 2009)
New Revision: 15596
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3786
Name changes in Properties view calls ConsoleConfiguration rename(If the name is valid)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/HibernateConsolePlugin.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -37,7 +37,6 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationListener;
-import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.ui.PreferenceConstants;
import org.eclipse.jdt.ui.text.JavaTextTools;
@@ -62,6 +61,7 @@
import org.hibernate.console.KnownConfigurationsListener;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.actions.AddConfigurationAction;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
import org.hibernate.eclipse.console.workbench.ConfigurationAdapterFactory;
import org.hibernate.eclipse.criteriaeditor.CriteriaEditorInput;
import org.hibernate.eclipse.criteriaeditor.CriteriaEditorStorage;
@@ -252,10 +252,7 @@
private void loadExistingConfigurations() throws CoreException {
- final ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunchConfigurationType lct = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
- ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations( lct );
+ ILaunchConfiguration[] launchConfigurations = LaunchHelper.findHibernateLaunchConfigs();
for (int i = 0; i < launchConfigurations.length; i++) {
KnownConfigurations.getInstance().addConfiguration(
new ConsoleConfiguration(new EclipseLaunchConsoleConfigurationPreferences(launchConfigurations[i])), false );
@@ -274,25 +271,9 @@
}
}
- private ILaunchConfiguration findLaunchConfig(String name)
+ public ILaunchConfiguration findLaunchConfig(String name)
throws CoreException {
- ILaunchManager launchManager = DebugPlugin.getDefault()
- .getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager
- .getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
- ILaunchConfiguration[] launchConfigurations = launchManager
- .getLaunchConfigurations(launchConfigurationType);
-
- for (int i = 0; i < launchConfigurations.length; i++) { // can't believe
- // there is no
- // look up by
- // name API
- ILaunchConfiguration launchConfiguration = launchConfigurations[i];
- if (launchConfiguration.getName().equals(name)) {
- return launchConfiguration;
- }
- }
- return null;
+ return LaunchHelper.findHibernateLaunchConfig(name);
}
/**
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/AddConfigurationAction.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -38,7 +38,7 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.utils.EclipseImages;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
/**
*
@@ -91,7 +91,7 @@
throws CoreException {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
+ ILaunchConfigurationType launchConfigurationType = LaunchHelper.getHibernateLaunchConfigsType();
String launchName = launchManager.generateUniqueLaunchConfigurationNameFrom(HibernateConsoleMessages.AddConfigurationAction_hibernate);
//ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations( launchConfigurationType );
ILaunchConfigurationWorkingCopy wc = launchConfigurationType.newInstance(null, launchName);
@@ -118,12 +118,8 @@
static private List<ILaunchConfiguration> getTemporaryLaunchConfigurations()
throws CoreException {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
-
List<ILaunchConfiguration> listTempConfigs = new ArrayList<ILaunchConfiguration>();
- ILaunchConfiguration[] configs = launchManager.getLaunchConfigurations(launchConfigurationType);
+ ILaunchConfiguration[] configs = LaunchHelper.findHibernateLaunchConfigs();
for (int i = 0; i < configs.length; i++) {
boolean temporary = configs[i].getAttribute(AddConfigurationAction.TEMPORARY_CONFIG_FLAG, false);
if (temporary) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/EditConsoleConfiguration.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -24,10 +24,7 @@
import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IWorkbenchWindow;
@@ -36,7 +33,7 @@
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
/**
* @author max
@@ -82,32 +79,17 @@
private void edit(final ConsoleConfiguration config) {
IWorkbenchWindow win = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- /*if(MessageDialog.openQuestion( null, "Use old dialog ?", "Use old dialog" )) {
- ConsoleConfigurationCreationWizard wizard = new ConsoleConfigurationCreationWizard();
- wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(config) );
-
-
- WizardDialog dialog = new WizardDialog(win.getShell(), wizard);
- dialog.open(); // This opens a dialog
- } else {*/
- try {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
- ILaunchConfiguration[] launchConfigurations = launchManager.getLaunchConfigurations( launchConfigurationType );
- for (int i = 0; i < launchConfigurations.length; i++) { // can't believe there is no look up by name API
- ILaunchConfiguration launchConfiguration = launchConfigurations[i];
- if(launchConfiguration.getName().equals(config.getName())) {
- DebugUITools.openLaunchConfigurationPropertiesDialog( win.getShell(), launchConfiguration, "org.eclipse.debug.ui.launchGroup.run" ); //$NON-NLS-1$
- return;
- }
- }
- String out = NLS.bind(HibernateConsoleMessages.EditConsoleConfiguration_could_not_find_launch_cfg, config.getName());
- HibernateConsolePlugin.getDefault().showError(win.getShell(), out, new IllegalStateException(HibernateConsoleMessages.EditConsoleConfiguration_no_launch_cfg_matched + config.getName()));
- } catch (CoreException ce) {
- HibernateConsolePlugin.getDefault().showError( win.getShell(), HibernateConsoleMessages.EditConsoleConfiguration_problem_adding_console_cfg, ce);
+ try {
+ ILaunchConfiguration launchConfiguration = LaunchHelper.findHibernateLaunchConfig(config.getName());
+ if(launchConfiguration != null) {
+ DebugUITools.openLaunchConfigurationPropertiesDialog( win.getShell(), launchConfiguration, "org.eclipse.debug.ui.launchGroup.run" ); //$NON-NLS-1$
+ return;
}
- //}
+ String out = NLS.bind(HibernateConsoleMessages.EditConsoleConfiguration_could_not_find_launch_cfg, config.getName());
+ HibernateConsolePlugin.getDefault().showError(win.getShell(), out, new IllegalStateException(HibernateConsoleMessages.EditConsoleConfiguration_no_launch_cfg_matched + config.getName()));
+ } catch (CoreException ce) {
+ HibernateConsolePlugin.getDefault().showError( win.getShell(), HibernateConsoleMessages.EditConsoleConfiguration_problem_adding_console_cfg, ce);
+ }
}
protected boolean updateState(ConsoleConfiguration consoleConfiguration) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/LaunchHelper.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -2,20 +2,39 @@
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.osgi.util.NLS;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.actions.AddConfigurationAction;
+import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
public class LaunchHelper {
+
+ public static ILaunchConfiguration findHibernateLaunchConfig(String name) throws CoreException {
+ return findLaunchConfigurationByName(
+ ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID, name);
+ }
+
+ public static ILaunchConfigurationType getHibernateLaunchConfigsType(){
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ return launchManager.getLaunchConfigurationType(
+ ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
+ }
+
+ public static ILaunchConfiguration[] findHibernateLaunchConfigs() throws CoreException {
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
+ return launchManager.getLaunchConfigurations(getHibernateLaunchConfigsType());
+ }
- static public ILaunchConfiguration findLaunchConfigurationByName(String launchConfigurationTypeId, String name) throws CoreException {
+ public static ILaunchConfiguration findLaunchConfigurationByName(String launchConfigurationTypeId, String name) throws CoreException {
Assert.isNotNull(launchConfigurationTypeId, HibernateConsoleMessages.LaunchHelper_launch_cfg_type_cannot_be_null);
- ILaunchManager launchManager = DebugPlugin.getDefault()
- .getLaunchManager();
+ ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
-
ILaunchConfigurationType launchConfigurationType = launchManager
.getLaunchConfigurationType(launchConfigurationTypeId);
@@ -33,4 +52,48 @@
}
return null;
}
+
+ public static String verifyConfigurationName(String currentName) {
+ if (currentName == null || currentName.length() < 1) {
+ return HibernateConsoleMessages.ConsoleConfigurationWizardPage_name_must_specified;
+ }
+ if (Platform.OS_WIN32.equals(Platform.getOS())) {
+ String[] badnames = new String[] { "aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
+ "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+ for (int i = 0; i < badnames.length; i++) {
+ if (currentName.equals(badnames[i])) {
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_name, currentName);
+ }
+ }
+ }
+ // See if name contains any characters that we deem illegal.
+ // '@' and '&' are disallowed because they corrupt menu items.
+ char[] disallowedChars = new char[] { '@', '&', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' };
+ for (int i = 0; i < disallowedChars.length; i++) {
+ char c = disallowedChars[i];
+ if (currentName.indexOf(c) > -1) {
+ return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_char, c);
+ }
+ }
+
+ if(existingLaunchConfiguration(currentName)) {
+ return HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist;
+ }
+ return null;
+ }
+
+ public static boolean existingLaunchConfiguration(String name) {
+ try {
+ ILaunchConfiguration config = findHibernateLaunchConfig(name);
+ if(config != null && !config.getAttribute(AddConfigurationAction.TEMPORARY_CONFIG_FLAG, false)) {
+ if (name.equalsIgnoreCase(config.getName())) {
+ return true;
+ }
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(e.getMessage(), e);
+ }
+ return false;
+ }
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/utils/ProjectUtils.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -43,10 +43,7 @@
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.preferences.IScopeContext;
-import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IType;
@@ -65,7 +62,6 @@
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.hibernate.util.StringHelper;
import org.osgi.service.prefs.BackingStoreException;
@@ -216,27 +212,20 @@
* @return a handle to the project resource
*/
public static IProject findProject(ConsoleConfiguration consoleConfiguration) {
- IProject res = null;
if (consoleConfiguration != null) {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager.getLaunchConfigurationType( ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID );
try {
- ILaunchConfiguration[] launchConfigurations =
- launchManager.getLaunchConfigurations( launchConfigurationType );
- // can't believe there is no look up by name API
- for (int i = 0; i < launchConfigurations.length && res == null; i++) {
- ILaunchConfiguration launchConfiguration = launchConfigurations[i];
- if (launchConfiguration.getName().equals(consoleConfiguration.getName())) {
- String projName = launchConfiguration.getAttribute(
- IConsoleConfigurationLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
- res = findProject(projName);
- }
+ ILaunchConfiguration launchConfiguration = LaunchHelper.findHibernateLaunchConfig(
+ consoleConfiguration.getName());
+ if(launchConfiguration != null) {
+ String projName = launchConfiguration.getAttribute(
+ IConsoleConfigurationLaunchConstants.PROJECT_NAME, ""); //$NON-NLS-1$
+ return findProject(projName);
}
} catch (CoreException e1) {
HibernateConsolePlugin.getDefault().log(e1);
}
}
- return res;
+ return null;
}
/**
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/ConsoleConfigurationPropertySource.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -24,19 +24,24 @@
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.PropertyDescriptor;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.console.KnownConfigurations;
import org.hibernate.console.preferences.ConsoleConfigurationPreferences;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
+import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
public class ConsoleConfigurationPropertySource implements IPropertySource {
- private final ConsoleConfiguration cfg;
+ private ConsoleConfiguration cfg;
-
static IPropertyDescriptor[] pd;
static {
List<IPropertyDescriptor> l = new ArrayList<IPropertyDescriptor>();
@@ -93,6 +98,27 @@
}
public void setPropertyValue(Object id, Object value) {
+ if("name".equals(id) && value instanceof String) { //$NON-NLS-1$
+ String newName = (String) value;
+ if (LaunchHelper.verifyConfigurationName(newName) != null) {
+ return;//just do not change name
+ }
+ String oldName = cfg.getName();
+ try {
+ ILaunchConfiguration lc = HibernateConsolePlugin.getDefault().findLaunchConfig(oldName);
+ if (lc != null){
+ ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
+ wc.rename(newName);
+ wc.doSave();
+ //find newly created console configuration
+ cfg = KnownConfigurations.getInstance().find(newName);
+ } else {
+ HibernateConsolePlugin.getDefault().log("Can't find Console Configuration \"" + oldName + "\"");
+ }
+ } catch (CoreException e) {
+ HibernateConsolePlugin.getDefault().log(e);
+ }
}
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/wizards/ConsoleConfigurationWizardPage.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -31,10 +31,7 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.DebugPlugin;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
@@ -72,9 +69,9 @@
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
import org.hibernate.eclipse.console.actions.AddConfigurationAction;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
import org.hibernate.eclipse.launch.ConsoleConfigurationMainTab;
import org.hibernate.eclipse.launch.ConsoleConfigurationTabGroup;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.hibernate.util.StringHelper;
@@ -264,7 +261,7 @@
if (name != null) {
name = name.trim();
}
- messageError = verifyConfigurationName(name);
+ messageError = LaunchHelper.verifyConfigurationName(name);
if (messageError != null) {
setMessage(messageWarning);
updateStatus(messageError);
@@ -295,26 +292,6 @@
updateStatus(messageError);
}
- private boolean existingLaunchConfiguration(String name) {
- ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
- ILaunchConfigurationType launchConfigurationType = launchManager
- .getLaunchConfigurationType(ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID);
- try {
- ILaunchConfiguration[] configs;
- configs = launchManager.getLaunchConfigurations(launchConfigurationType);
- for (int i = 0; i < configs.length; i++) {
- if(!configs[i].getAttribute(AddConfigurationAction.TEMPORARY_CONFIG_FLAG, false)) {
- if (name.equalsIgnoreCase(configs[i].getName())) {
- return true;
- }
- }
- }
- } catch (CoreException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(e.getMessage(), e);
- }
- return false;
- }
-
/**
* Notification that a tab has been selected
*
@@ -368,36 +345,6 @@
return null;
}
- protected String verifyConfigurationName(String currentName) {
- if (currentName == null || currentName.length() < 1) {
- return HibernateConsoleMessages.ConsoleConfigurationWizardPage_name_must_specified;
- }
- if (Platform.OS_WIN32.equals(Platform.getOS())) {
- String[] badnames = new String[] { "aux", "clock$", "com1", "com2", "com3", "com4", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- "com5", "com6", "com7", "com8", "com9", "con", "lpt1", "lpt2", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
- "lpt3", "lpt4", "lpt5", "lpt6", "lpt7", "lpt8", "lpt9", "nul", "prn" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
- for (int i = 0; i < badnames.length; i++) {
- if (currentName.equals(badnames[i])) {
- return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_name, currentName);
- }
- }
- }
- // See if name contains any characters that we deem illegal.
- // '@' and '&' are disallowed because they corrupt menu items.
- char[] disallowedChars = new char[] { '@', '&', '\\', '/', ':', '*', '?', '"', '<', '>', '|', '\0' };
- for (int i = 0; i < disallowedChars.length; i++) {
- char c = disallowedChars[i];
- if (currentName.indexOf(c) > -1) {
- return NLS.bind(HibernateConsoleMessages.ConsoleConfigurationWizardPage_bad_char, c);
- }
- }
-
- if(existingLaunchConfiguration(currentName)) {
- return HibernateConsoleMessages.ConsoleConfigurationWizardPage_config_name_already_exist;
- }
- return null;
- }
-
private String getConfigurationName() {
return nameWidget.getText();
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-05-29 13:40:46 UTC (rev 15595)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/launch/core/refactoring/HibernateRefactoringUtil.java 2009-05-29 13:43:33 UTC (rev 15596)
@@ -27,7 +27,6 @@
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -38,9 +37,6 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.jdt.core.IJavaModel;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
@@ -48,8 +44,8 @@
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.hibernate.eclipse.console.HibernateConsoleMessages;
import org.hibernate.eclipse.console.HibernateConsolePlugin;
+import org.hibernate.eclipse.console.utils.LaunchHelper;
import org.hibernate.eclipse.launch.HibernateLaunchConstants;
-import org.hibernate.eclipse.launch.ICodeGenerationLaunchConstants;
import org.hibernate.eclipse.launch.IConsoleConfigurationLaunchConstants;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -334,10 +330,9 @@
public static ILaunchConfiguration[] getAffectedLaunchConfigurations(IPath path){
ILaunchConfiguration[] configs = null;
try {
- configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations();
+ configs = LaunchHelper.findHibernateLaunchConfigs();
List<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>();
for(int i = 0; i < configs.length && configs[i].exists(); i++) {//refactor only hibernate launch configurations
- if (!ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID.equals(configs[i].getType().getIdentifier())) continue;
if (HibernateRefactoringUtil.isConfigurationAffected(configs[i], path)) list.add(configs[i]);
}
configs = list.toArray(new ILaunchConfiguration[list.size()]);
@@ -353,10 +348,9 @@
public static ILaunchConfiguration[] getAffectedLaunchConfigurations(IConnectionProfile profile){
ILaunchConfiguration[] configs = null;
try {
- configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations();
+ configs = LaunchHelper.findHibernateLaunchConfigs();
List<ILaunchConfiguration> list = new ArrayList<ILaunchConfiguration>();
for(int i = 0; i < configs.length && configs[i].exists(); i++) {//refactor only hibernate launch configurations
- if (!ICodeGenerationLaunchConstants.CONSOLE_CONFIGURATION_LAUNCH_TYPE_ID.equals(configs[i].getType().getIdentifier())) continue;
if (profile.getName().equals(configs[i].getAttribute(IConsoleConfigurationLaunchConstants.CONNECTION_PROFILE_NAME, ""))) //$NON-NLS-1$
list.add(configs[i]);
}
17 years, 1 month
JBoss Tools SVN: r15595 - in trunk/seam/tests/org.jboss.tools.seam.core.test: src/org/jboss/tools/seam/core/test/refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-29 09:40:46 -0400 (Fri, 29 May 2009)
New Revision: 15595
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
Tests improvements
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-29 11:43:14 UTC (rev 15594)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-29 13:40:46 UTC (rev 15595)
@@ -36,5 +36,6 @@
org.eclipse.wst.validation,
org.eclipse.jdt.launching,
org.eclipse.jdt.ui,
- org.eclipse.jst.j2ee;bundle-version="1.1.300"
+ org.eclipse.jst.j2ee;bundle-version="1.1.300",
+ org.eclipse.text;bundle-version="3.5.0"
Bundle-Localization: plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 11:43:14 UTC (rev 15594)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-29 13:40:46 UTC (rev 15595)
@@ -10,7 +10,10 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
+import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
+import org.eclipse.ltk.core.refactoring.TextFileChange;
+import org.eclipse.text.edits.MultiTextEdit;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamProject;
@@ -63,47 +66,55 @@
public void testSeamComponentRename() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
- TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(), "/ejbModule/org/domain/"+warProjectName+"/session/TestComponent.java",
- 89, 6, "\"best\"");
+ TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(), "/ejbModule/org/domain/"+warProjectName+"/session/TestComponent.java");
+ TestTextChange change = new TestTextChange(89, 6, "\"best\"");
+ structure.addTextChange(change);
list.add(structure);
- structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
- 1106, 4, "best");
+ structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml");
+ change = new TestTextChange(1106, 4, "best");
+ structure.addTextChange(change);
+
+ change = new TestTextChange(1934, 4, "best");
+ structure.addTextChange(change);
list.add(structure);
- structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
- 1934, 4, "best");
- list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
- 420, 11, "@In(\"best\")");
+ structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java");
+ change = new TestTextChange(420, 11, "@In(\"best\")");
+ structure.addTextChange(change);
+
+ change = new TestTextChange(389, 8, "(\"best\")");
+ structure.addTextChange(change);
+
+ change = new TestTextChange(455, 16, "@Factory(\"best\")");
+ structure.addTextChange(change);
+
+ change = new TestTextChange(529, 8, "(\"best\")");
+ structure.addTextChange(change);
+
+ change = new TestTextChange(589, 4, "best");
+ structure.addTextChange(change);
+
list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
- 389, 8, "(\"best\")");
- list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
- 455, 16, "@Factory(\"best\")");
- list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
- 529, 8, "(\"best\")");
- list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
- 589, 4, "best");
- list.add(structure);
- structure = new TestChangeStructure(ejbProject, "/ejbModule/seam.properties",
- 0, 4, "best");
+ structure = new TestChangeStructure(ejbProject, "/ejbModule/seam.properties");
+ change = new TestTextChange(0, 4, "best");
+ structure.addTextChange(change);
list.add(structure);
- structure = new TestChangeStructure(warProject, "/WebContent/test.xhtml",
- 1088, 4, "best");
+ structure = new TestChangeStructure(warProject, "/WebContent/test.xhtml");
+ change = new TestTextChange(1088, 4, "best");
+ structure.addTextChange(change);
list.add(structure);
- structure = new TestChangeStructure(warProject, "/WebContent/test.jsp",
- 227, 4, "best");
+ structure = new TestChangeStructure(warProject, "/WebContent/test.jsp");
+ change = new TestTextChange(227, 4, "best");
+ structure.addTextChange(change);
list.add(structure);
- structure = new TestChangeStructure(warProject, "/WebContent/test.properties",
- 29, 4, "best");
+ structure = new TestChangeStructure(warProject, "/WebContent/test.properties");
+ change = new TestTextChange(29, 4, "best");
+ structure.addTextChange(change);
list.add(structure);
renameComponent(seamEjbProject, "test", "best", list);
@@ -118,7 +129,9 @@
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
content = FileUtil.readStream(file.getContents());
- assertNotSame(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertNotSame(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
}
assertNotNull("Component " + component.getName() + " does not have java declaration.", component.getJavaDeclaration());
@@ -127,7 +140,22 @@
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
+
+ for(int i = 0; i < rootChange.getChildren().length;i++){
+ TextFileChange fileChange = (TextFileChange)rootChange.getChildren()[i];
+
+ MultiTextEdit edit = (MultiTextEdit)fileChange.getEdit();
+
+ TestChangeStructure change = findChange(changeList, fileChange.getFile());
+ if(change != null){
+ if(change.size() != edit.getChildrenSize()){
+ System.out.println("File - "+fileChange.getFile().getName());
+ System.out.println("Edit size - "+edit.getChildrenSize());
+ }
+ assertEquals(change.size(), edit.getChildrenSize());
+ }
+ }
+
rootChange.perform(new NullProgressMonitor());
JobUtils.waitForIdle();
@@ -139,23 +167,29 @@
String content = null;
content = FileUtil.readStream(file.getContents());
//System.out.println("File - "+file.getName()+" offset - "+changeStructure.getOffset()+" expected - ["+changeStructure.getText()+"] actual - ["+content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength())+"]");
- assertEquals(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
+ for(TestTextChange change : changeStructure.getTextChanges()){
+ assertEquals(change.getText(), content.substring(change.getOffset(), change.getOffset()+change.getLength()));
+ }
}
}
+
+ private TestChangeStructure findChange(List<TestChangeStructure> changeList, IFile file){
+ for(TestChangeStructure tcs : changeList){
+ if(tcs.getFileName().equals("/"+file.getFullPath().removeFirstSegments(1).toString()))
+ return tcs;
+ }
+ return null;
+ }
class TestChangeStructure{
private IProject project;
private String fileName;
- private int offset;
- private int length;
- private String text;
+ ArrayList<TestTextChange> textChanges = new ArrayList<TestTextChange>();
+
- public TestChangeStructure(IProject project, String fileName, int offset, int length, String text){
+ public TestChangeStructure(IProject project, String fileName){
this.project = project;
this.fileName = fileName;
- this.offset = offset;
- this.length = length;
- this.text = text;
}
public IProject getProject(){
@@ -165,7 +199,32 @@
public String getFileName(){
return fileName;
}
+
+ public ArrayList<TestTextChange> getTextChanges(){
+ return textChanges;
+ }
+
+ public void addTextChange(TestTextChange change){
+ textChanges.add(change);
+ }
+
+ public int size(){
+ return textChanges.size();
+ }
+ }
+
+ class TestTextChange{
+ private int offset;
+ private int length;
+ private String text;
+
+ public TestTextChange(int offset, int length, String text){
+ this.offset = offset;
+ this.length = length;
+ this.text = text;
+ }
+
public int getOffset(){
return offset;
}
17 years, 1 month
JBoss Tools SVN: r15594 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-05-29 07:43:14 -0400 (Fri, 29 May 2009)
New Revision: 15594
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/jbide4337.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/main.css
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4337Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1479Test.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4337
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/jbide4337.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/jbide4337.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/jbide4337.xhtml 2009-05-29 11:43:14 UTC (rev 15594)
@@ -0,0 +1,276 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich"
+ xmlns:a4j="http://richfaces.org/a4j">
+<f:loadBundle var="msg" basename="dataTable.columns.messages"/>
+<f:loadBundle var="message" basename="extendedDataTable.messages"/>
+
+<link rel="stylesheet" href="${facesContext.externalContext.requestContextPath}/pages/JBIDE/4337/main.css"
+type="text/css"/>
+ <a4j:form>
+ <rich:panel style="width : 1087px; height : 4012px;" styleClass="btn">
+ <f:facet name="header">
+ <h:outputText value="Main Table"/>
+ </f:facet>
+ <f:facet name="footer">
+ <h:outputText value="End of components" />
+ </f:facet>
+ <table>
+ <tr>
+ <td width="30%">Component</td>
+ <td align="center" style="background-color: black; font: bold; color: white;">Problems</td>
+ </tr>
+ <tr>
+ <td>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Tooltip" />
+ </f:facet>
+ <h:panelGrid columns="2">
+ <rich:panel id="sample1" styleClass="tooltip-text" bodyClass="rich-laguna-panel-no-header">
+ <p>
+ Here you can see <b>default client-side</b> tool-tip
+ </p>
+ <rich:toolTip>
+ <span style="white-space:nowrap">
+ This tool-tip content was <strong>pre-rendered</strong> to the page.<br/>
+ The look of this tool-tip is 100% defined by skin.
+ </span>
+ </rich:toolTip>
+ </rich:panel>
+ <rich:panel id="sample2" styleClass="tooltip-text" bodyClass="rich-laguna-panel-no-header">
+ <p>
+ This tool-tip will <b>follow mouse</b>. Also this tool-tip has a <b>delay 0.5 sec</b>,
+ so be patient!
+ </p>
+ <rich:toolTip followMouse="true" direction="top-right" showDelay="500" styleClass="tooltip">
+ <span style="white-space:nowrap">
+ This tool-tip content also <strong>pre-rendered</strong> to the page.<br/>
+ However, the look of this tool-tip is customized<br/>
+ by styleClass attribute.
+ </span>
+ </rich:toolTip>
+ </rich:panel>
+ <h:form>
+ <rich:panel id="sample3" styleClass="tooltip-text" bodyClass="rich-laguna-panel-no-header">
+ <p>
+ This tool-tip rendered on server <b>in separate request</b>.
+ </p>
+ <rich:toolTip direction="top-right" mode="ajax" styleClass="tooltip" layout="block">
+ <f:facet name="defaultContent">
+ <strong>Wait...</strong>
+ </f:facet>
+ <span style="white-space:nowrap">This tool-tip content was <strong>rendered on server</strong>
+ </span>
+ <h:panelGrid columns="2">
+ <h:outputText style="white-space:nowrap" value="tooltips requested:" />
+ <h:outputText value="#{toolTipData.tooltipCounter}" styleClass="tooltipData" />
+ </h:panelGrid>
+ </rich:toolTip>
+ </rich:panel>
+ </h:form>
+ <h:form>
+ <rich:panel id="sample4" styleClass="tooltip-text" bodyClass="rich-laguna-panel-no-header">
+ <p>
+ This tool-tip will be <b>activated on mouse click</b>. It also has a <b>bottom-left</b> position.
+ </p>
+ <rich:toolTip showEvent="onclick" direction="bottom-left" mode="ajax" styleClass="tooltip" layout="block">
+ <f:facet name="defaultContent">
+ <strong>Wait...</strong>
+ </f:facet>
+ <span style="white-space:nowrap">This tool-tip content was <strong>rendered on server</strong><br/></span>
+ <h:panelGrid columns="2">
+ <h:outputText style="white-space:nowrap" value="tooltips requested:" />
+ <h:outputText value="#{toolTipData.tooltipCounter}" styleClass="tooltipData" />
+ </h:panelGrid>
+ </rich:toolTip>
+ </rich:panel>
+ </h:form>
+ </h:panelGrid>
+ </rich:panel>
+ </td>
+ <td>
+ <ul>
+ <li>
+ There no problems
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Tool Bar & Tool Bar Group" />
+ </f:facet>
+ <rich:toolBar contentClass="btn" height="26" itemSeparator="line" separatorClass="btn" styleClass="btn">
+ <rich:toolBarGroup style="font-style:italic;background-color:Cornsilk;text-decoration:overline;font-family:Arial Narrow;font-weight:bolder;" width="500">
+ <h:graphicImage value="images/icons/create_doc.gif" styleClass="pic"/>
+ <h:graphicImage value="images/icons/create_folder.gif" styleClass="pic"/>
+ <h:graphicImage value="images/icons/copy.gif" styleClass="pic"/>
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right">
+ <h:graphicImage value="images/icons/save.gif" styleClass="pic"/>
+ <h:graphicImage value="images/icons/save_as.gif" styleClass="pic"/>
+ <h:graphicImage value="images/icons/save_all.gif" styleClass="pic"/>
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right">
+ <h:graphicImage value="images/icons/find.gif" styleClass="pic"/>
+ <h:graphicImage value="images/icons/filter.gif" styleClass="pic"/>
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ <h:form>
+ <rich:toolBar height="34" contentStyle="color:PaleVioletRed;font-size:medium;font-style:italic;background-color:FloralWhite;font-family:Arial TUR;font-weight:bolder;"
+ itemSeparator="line" styleClass="evenRow" separatorClass="btn">
+ <rich:toolBarGroup itemSeparator="grid">
+ <h:graphicImage id="edit" value="images/icons/edit.gif" />
+ <h:outputLabel value="Edit" for="edit" />
+ </rich:toolBarGroup>
+ <rich:toolBarGroup>
+ <h:graphicImage id="find" value="images/icons/find.gif" />
+ <h:outputLabel value="Find" for="find" />
+ </rich:toolBarGroup>
+ <rich:toolBarGroup>
+ <h:graphicImage id="filter" value="images/icons/filter.gif" />
+ <h:outputLabel value="Filter" for="filter" />
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right">
+ <h:inputText styleClass="barsearch" />
+ <h:commandButton styleClass="barsearchbutton" onclick="return false;" value="Search" />
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ </h:form>
+ <h:form>
+ <h:panelGrid columns="3" width="100%" cellpadding="0" cellspacing="0" style="margin-bottom : 4px">
+ <rich:panel bodyClass="rich-laguna-panel-no-header">
+ <h:panelGrid columns="8">
+ <h:outputText value="Group Separator:" />
+ <a4j:commandLink value="Line" reRender="bar">
+ <a4j:actionparam name="gs" value="line" assignTo="#{tbBean.groupSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Grid" reRender="bar">
+ <a4j:actionparam name="gs" value="grid" assignTo="#{tbBean.groupSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Disc" reRender="bar">
+ <a4j:actionparam name="gs" value="disc" assignTo="#{tbBean.groupSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Square" reRender="bar">
+ <a4j:actionparam name="gs" value="square" assignTo="#{tbBean.groupSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="None" reRender="bar">
+ <a4j:actionparam name="gs" value="none" assignTo="#{tbBean.groupSeparator}" />
+ </a4j:commandLink>
+ </h:panelGrid>
+ </rich:panel>
+ <h:panelGroup style="padding-left : 4px">
+ <br/>
+ </h:panelGroup>
+ <rich:panel bodyClass="rich-laguna-panel-no-header">
+ <h:panelGrid columns="8">
+ <h:outputText value="Group Item Separator:" />
+ <a4j:commandLink value="Line" reRender="bar">
+ <a4j:actionparam name="gs" value="line" assignTo="#{tbBean.groupItemSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Grid" reRender="bar">
+ <a4j:actionparam name="gs" value="grid" assignTo="#{tbBean.groupItemSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Disc" reRender="bar">
+ <a4j:actionparam name="gs" value="disc" assignTo="#{tbBean.groupItemSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="Square" reRender="bar">
+ <a4j:actionparam name="gs" value="square" assignTo="#{tbBean.groupItemSeparator}" />
+ </a4j:commandLink>
+
+ <a4j:commandLink value="None" reRender="bar">
+ <a4j:actionparam name="gs" value="none" assignTo="#{tbBean.groupItemSeparator}" />
+ </a4j:commandLink>
+ </h:panelGrid>
+ </rich:panel>
+ </h:panelGrid>
+ </h:form>
+
+ <rich:toolBar contentClass="btn" contentStyle="color:PaleVioletRed;font-size:medium;font-style:italic;background-color:FloralWhite;font-family:Arial TUR;font-weight:bolder;" id="bar" height="30" itemSeparator="#{tbBean.groupSeparator}" style="color:Cornsilk;font-style:italic;background-color:Orchid;text-decoration:underline;font-family:Arial Narrow,Bodoni MT;font-weight:bold;">
+ <rich:toolBarGroup itemSeparator="#{tbBean.groupItemSeparator}">
+ <h:outputText value="Group1.1"></h:outputText>
+ <h:outputText value="Group1.2"></h:outputText>
+ <h:outputText value="Group1.3"></h:outputText>
+ </rich:toolBarGroup>
+ <rich:toolBarGroup itemSeparator="#{tbBean.groupItemSeparator}">
+ <h:outputText value="Group2.1"></h:outputText>
+ <h:outputText value="Group2.2"></h:outputText>
+ </rich:toolBarGroup>
+ <rich:toolBarGroup location="right" itemSeparator="#{tbBean.groupItemSeparator}">
+ <h:outputText value="Group3.1"></h:outputText>
+ <h:outputText value="Group3.2"></h:outputText>
+ </rich:toolBarGroup>
+ </rich:toolBar>
+ </rich:panel>
+ </td>
+ <td>
+ <ul>
+ <li>
+ There no problems
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Tooltip" />
+ </f:facet>
+ <rich:togglePanel id="panel" initialState="panelB" switchType="client"
+
+ stateOrder="panelA,panelB,panelC">
+
+ <f:facet name="panelA">
+
+ ...
+
+ </f:facet>
+
+ <f:facet name="panelB">
+
+ ...
+
+ </f:facet>
+
+ <f:facet name="panelC">
+
+ ...
+
+ </f:facet>
+
+ </rich:togglePanel>
+
+ <rich:toggleControl for="panel" value="Switch" style=""/>
+ </rich:panel>
+ </td>
+ <td>
+ <ul>
+ <li>
+ There no problems
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </table>
+ </rich:panel>
+ <rich:panel style="text-align:center">
+ <h:outputLink value="${facesContext.externalContext.requestContextPath}/pages/allComponents3.jsf">
+ <f:verbatim>PREVIUOS PAGE</f:verbatim>
+ </h:outputLink>
+ </rich:panel>
+ </a4j:form>
+</ui:composition>
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/main.css
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/main.css (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/4337/main.css 2009-05-29 11:43:14 UTC (rev 15594)
@@ -0,0 +1,40 @@
+.evenRow {
+ text-align: center;
+ background-color: green;
+ font-style: italic;
+
+}
+
+.oddRow{
+ text-align: right;
+ background-color: blue;
+ font-style: oblique;
+
+}
+
+.btn {
+ text-align: center;
+ color: DodgerBlue;
+ font-size: x-large;
+ font-style: italic;
+ background-color: Turquoise;
+ border-style: ridge;
+ border-color: DarkViolet;
+ text-decoration: overline;
+ font-weight: bolder;
+ border-width: thick;
+}
+
+
+.btn {
+
+}
+
+.vpe-text {
+ color:red;
+}
+
+#editor {
+ background-color: red;
+
+}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-29 10:33:22 UTC (rev 15593)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-29 11:43:14 UTC (rev 15594)
@@ -57,6 +57,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3734Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3969Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4037Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4337Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4373Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
@@ -142,6 +143,7 @@
suite.addTestSuite(JBIDE4373Test.class);
suite.addTestSuite(JBIDE675Test.class);
suite.addTestSuite(JBIDE3969Test.class);
+ suite.addTestSuite(JBIDE4337Test.class);
// $JUnit-END$
// added by Max Areshkau
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1479Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1479Test.java 2009-05-29 10:33:22 UTC (rev 15593)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE1479Test.java 2009-05-29 11:43:14 UTC (rev 15594)
@@ -60,7 +60,8 @@
Job job = new WorkspaceJob("Test JBIDE-1479"){ //$NON-NLS-1$
- public IStatus runInWorkspace(IProgressMonitor monitor) {
+ @Override
+ public IStatus runInWorkspace(IProgressMonitor monitor) {
try {
new FormatProcessorXML().formatFile(file);
}catch (Throwable exception){
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4337Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4337Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4337Test.java 2009-05-29 11:43:14 UTC (rev 15594)
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.swt.custom.StyledText;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE4337Test extends VpeTest {
+
+ public JBIDE4337Test(String name) {
+ super(name);
+ }
+
+ public void testJBIDE4337() throws Exception {
+
+ final String testFileName = "JBIDE/4337/jbide4337.xhtml";//$NON-NLS-1$
+ setException(null);
+
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_PROJECT_NAME,testFileName);
+ long headChildCount = vpeController.getVisualBuilder().getHeadNode().getChildNodes().getLength();
+
+ StyledText styledText = vpeController.getSourceEditor().getTextViewer().getTextWidget();
+ int offset = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 11, 23);
+ styledText.setCaretOffset(offset);
+ styledText.insert(" "); //$NON-NLS-1$
+ TestUtil.delay(450);
+ TestUtil.waitForJobs();
+ assertEquals("Number of child nodes should be equal before and after change",headChildCount, //$NON-NLS-1$
+ vpeController.getVisualBuilder().getHeadNode().getChildNodes().getLength());
+
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-05-29 10:33:22 UTC (rev 15593)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2009-05-29 11:43:14 UTC (rev 15594)
@@ -1039,9 +1039,11 @@
} else {
// Max Areshkau Why we need update parent node when we update text
// node?
- // lookd like we haven't need do it.
+ // looks like we haven't need do it.
if (sourceNode.getNodeType() == Node.TEXT_NODE) {
updateNode(sourceNode.getParentNode());
+ }else if(HTML.TAG_LINK.equalsIgnoreCase(sourceNode.getNodeName())) {
+ addNode(sourceNode, null, getHeadNode());
}
}
}
17 years, 1 month
JBoss Tools SVN: r15593 - trunk/as/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-29 06:33:22 -0400 (Fri, 29 May 2009)
New Revision: 15593
Modified:
trunk/as/docs/reference/en/modules/runtimes_servers.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-732 -According to the new features of JBoss AS profile docs were updated. </p>
</body></html>
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2009-05-29 04:24:23 UTC (rev 15592)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2009-05-29 10:33:22 UTC (rev 15593)
@@ -255,7 +255,7 @@
<property>Edit</property></emphasis>.
</para>
</section>
-
+ </section>
<section>
<title>Servers</title>
<para>WTP servers are eclipse-representations of a backing server installation. They are used to
@@ -334,6 +334,6 @@
url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
</section>
</section>
- </section>
+
</chapter>
17 years, 1 month
JBoss Tools SVN: r15592 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-05-29 00:24:23 -0400 (Fri, 29 May 2009)
New Revision: 15592
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java
Log:
JBIDE-4385
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2009-05-29 04:01:51 UTC (rev 15591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2009-05-29 04:24:23 UTC (rev 15592)
@@ -78,6 +78,8 @@
public static String ServerNotFound;
public static String CannotLoadServerPoller;
public static String AddingJMXDeploymentFailed;
+ public static String JMXPauseScannerError;
+ public static String JMXResumeScannerError;
public static String CannotSaveServersStartArgs;
static {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2009-05-29 04:01:51 UTC (rev 15591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2009-05-29 04:24:23 UTC (rev 15592)
@@ -58,4 +58,6 @@
ServerNotFound=Server {0} not found.
CannotLoadServerPoller=Error instantiating Server Poller {0}
CannotSaveServersStartArgs=Could not save server start arguments for server {0}.
-AddingJMXDeploymentFailed=Error adding deployment folder to deployment scanner
\ No newline at end of file
+AddingJMXDeploymentFailed=Error adding deployment folder to deployment scanner
+JMXPauseScannerError=JBossTools was unable to pause the JBoss deployment scanner. For optimal performance, verify your version includes an unsecured JMX RMI adaptor
+JMXResumeScannerError=JBossTools was unable to resume the JBoss deployment scanner. For optimal performance, verify your version includes an unsecured JMX RMI adaptor
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java 2009-05-29 04:01:51 UTC (rev 15591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java 2009-05-29 04:24:23 UTC (rev 15592)
@@ -10,9 +10,17 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.extensions.events;
+import org.eclipse.core.runtime.IStatus;
+
public interface IEventCodes {
- public static final int MAJOR_TYPE_MASK = 0xFF << 24;
+ public static final int ISTATUS_CODE_OK = 0 << 29;
+ public static final int ISTATUS_CODE_INFO = 1 << 29;
+ public static final int ISTATUS_CODE_WARN = 2 << 29;
+ public static final int ISTATUS_CODE_ERROR = 3 << 29;
+
+ public static final int ISTATUS_MASK = 0xE0 << 24; // slot 31 and 32
+ public static final int MAJOR_TYPE_MASK = 0x1F << 24;
public static final int POLLING_CODE = 1 << 24;
public static final int PUBLISHING_CODE = 2 << 24;
public static final int POLLER_MASK = 0xFF << 16;
@@ -35,7 +43,10 @@
public static final int JST_PUBLISHER_CODE = PUBLISHING_CODE | (2 << 16);
public static final int SINGLE_FILE_PUBLISHER_CODE = PUBLISHING_CODE | (3 << 16);
public static final int ADD_DEPLOYMENT_FOLDER = PUBLISHING_CODE | (4<<16);
-
+ public static final int SUSPEND_DEPLOYMENT_SCANNER = PUBLISHING_CODE | ISTATUS_CODE_WARN | (5<<16);
+ public static final int RESUME_DEPLOYMENT_SCANNER = PUBLISHING_CODE | ISTATUS_CODE_WARN | (6<<16);
+
+
// Publishing.JST
public static final int JST_PUB_FULL_SUCCESS = JST_PUBLISHER_CODE | 1;
public static final int JST_PUB_FULL_FAIL = JST_PUBLISHER_CODE | 2;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2009-05-29 04:01:51 UTC (rev 15591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2009-05-29 04:24:23 UTC (rev 15592)
@@ -43,9 +43,9 @@
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
-import org.jboss.ide.eclipse.as.core.util.IConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeConstants;
import org.jboss.tools.jmx.core.IJMXRunnable;
+import org.jboss.tools.jmx.core.JMXException;
/**
*
@@ -187,16 +187,19 @@
protected void publishStart(IProgressMonitor monitor) throws CoreException {
super.publishStart(monitor);
- JMXClassLoaderRepository.getDefault().addConcerned(getServer(), this);
- final boolean suspend = shouldSuspendScanner();
- if( suspend ) {
+ if( shouldSuspendScanner()) {
+ JMXClassLoaderRepository.getDefault().addConcerned(getServer(), this);
IJMXRunnable r = new IJMXRunnable() {
public void run(MBeanServerConnection connection) throws Exception {
- if( suspend )
- suspendDeployment(connection);
+ suspendDeployment(connection);
}
};
- JBossServerConnectionProvider.run(getServer(), r);
+ try {
+ JBossServerConnectionProvider.run(getServer(), r);
+ } catch( JMXException jmxe ) {
+ IStatus status = new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.SUSPEND_DEPLOYMENT_SCANNER, Messages.JMXPauseScannerError, jmxe);
+ ServerLogger.getDefault().log(getServer(), status);
+ }
}
}
@@ -207,15 +210,21 @@
resumeDeployment(connection);
}
};
- JBossServerConnectionProvider.run(getServer(), r);
+ try {
+ JBossServerConnectionProvider.run(getServer(), r);
+ } catch( JMXException jmxe ) {
+ IStatus status = new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.RESUME_DEPLOYMENT_SCANNER, Messages.JMXResumeScannerError, jmxe);
+ ServerLogger.getDefault().log(getServer(), status);
+ } finally {
+ JMXClassLoaderRepository.getDefault().removeConcerned(getServer(), this);
+ }
}
- JMXClassLoaderRepository.getDefault().removeConcerned(getServer(), this);
super.publishFinish(monitor);
}
protected boolean shouldSuspendScanner() {
- if( getServer().getServerType().getId().equals(IConstants.AS_50))
- return false;
+// if( getServer().getServerType().getId().equals(IConstants.AS_50))
+// return false;
if( getServer().getServerState() != IServer.STATE_STARTED)
return false;
return true;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java 2009-05-29 04:01:51 UTC (rev 15591)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java 2009-05-29 04:24:23 UTC (rev 15592)
@@ -32,6 +32,17 @@
if( element instanceof LogEntry) {
int code = ((LogEntry)element).getCode();
+ int istatusCode = (code & IEventCodes.ISTATUS_MASK) >> 29;
+
+
+ if(istatusCode != 0 ) {
+ switch(istatusCode) {
+ case 1: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+ case 2: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+ case 3: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ }
+ }
+
int majorType = code & IEventCodes.MAJOR_TYPE_MASK;
switch(majorType) {
case IEventCodes.POLLING_CODE:
17 years, 1 month
JBoss Tools SVN: r15591 - in branches/jbosstools-3.0.x/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-05-29 00:01:51 -0400 (Fri, 29 May 2009)
New Revision: 15591
Modified:
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java
Log:
/JBIDE-4385
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2009-05-29 02:25:21 UTC (rev 15590)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.java 2009-05-29 04:01:51 UTC (rev 15591)
@@ -29,6 +29,8 @@
public static String server;
public static String runtime;
public static String runModeNotSupported;
+ public static String JMXPauseScannerError;
+ public static String JMXResumeScannerError;
static {
NLS.initializeMessages(JBossServerCorePlugin.PLUGIN_ID + ".Messages",
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2009-05-29 02:25:21 UTC (rev 15590)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/Messages.properties 2009-05-29 04:01:51 UTC (rev 15591)
@@ -1,4 +1,6 @@
jboss=JBoss
server=Server
runtime=Runtime
-runModeNotSupported=Selected VM does not support this mode
\ No newline at end of file
+runModeNotSupported=Selected VM does not support this mode
+JMXPauseScannerError=JBossTools was unable to pause the JBoss deployment scanner. For optimal performance, verify your version includes an unsecured JMX RMI adaptor
+JMXResumeScannerError=JBossTools was unable to resume the JBoss deployment scanner. For optimal performance, verify your version includes an unsecured JMX RMI adaptor
\ No newline at end of file
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java 2009-05-29 02:25:21 UTC (rev 15590)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/events/IEventCodes.java 2009-05-29 04:01:51 UTC (rev 15591)
@@ -1,8 +1,16 @@
package org.jboss.ide.eclipse.as.core.extensions.events;
+import org.eclipse.core.runtime.IStatus;
+
public interface IEventCodes {
- public static final int MAJOR_TYPE_MASK = 0xFF << 24;
+ public static final int ISTATUS_CODE_OK = 0 << 29;
+ public static final int ISTATUS_CODE_INFO = 1 << 29;
+ public static final int ISTATUS_CODE_WARN = 2 << 29;
+ public static final int ISTATUS_CODE_ERROR = 3 << 29;
+
+ public static final int ISTATUS_MASK = 0xE0 << 24; // slot 31 and 32
+ public static final int MAJOR_TYPE_MASK = 0x1F << 24;
public static final int POLLING_CODE = 1 << 24;
public static final int PUBLISHING_CODE = 2 << 24;
public static final int POLLER_MASK = 0xFF << 16;
@@ -25,7 +33,10 @@
public static final int JST_PUBLISHER_CODE = PUBLISHING_CODE | (2 << 16);
public static final int SINGLE_FILE_PUBLISHER_CODE = PUBLISHING_CODE | (3 << 16);
public static final int ADD_DEPLOYMENT_FOLDER = PUBLISHING_CODE | (4<<16);
-
+ public static final int SUSPEND_DEPLOYMENT_SCANNER = PUBLISHING_CODE | ISTATUS_CODE_WARN | (5<<16);
+ public static final int RESUME_DEPLOYMENT_SCANNER = PUBLISHING_CODE | ISTATUS_CODE_WARN | (6<<16);
+
+
// Publishing.JST
public static final int JST_PUB_FULL_SUCCESS = JST_PUBLISHER_CODE | 1;
public static final int JST_PUB_FULL_FAIL = JST_PUBLISHER_CODE | 2;
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2009-05-29 02:25:21 UTC (rev 15590)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2009-05-29 04:01:51 UTC (rev 15591)
@@ -36,6 +36,7 @@
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Messages;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.extensions.jmx.JBossServerConnectionProvider;
@@ -44,6 +45,7 @@
import org.jboss.ide.eclipse.as.core.server.internal.launch.JBossServerStartupLaunchConfiguration;
import org.jboss.ide.eclipse.as.core.server.internal.launch.StopLaunchConfiguration;
import org.jboss.tools.jmx.core.IJMXRunnable;
+import org.jboss.tools.jmx.core.JMXException;
/**
*
@@ -190,16 +192,19 @@
protected void publishStart(IProgressMonitor monitor) throws CoreException {
super.publishStart(monitor);
- JMXClassLoaderRepository.getDefault().addConcerned(getServer(), this);
- final boolean suspend = shouldSuspendScanner();
- if( suspend ) {
+ if( shouldSuspendScanner()) {
+ JMXClassLoaderRepository.getDefault().addConcerned(getServer(), this);
IJMXRunnable r = new IJMXRunnable() {
public void run(MBeanServerConnection connection) throws Exception {
- if( suspend )
- suspendDeployment(connection);
+ suspendDeployment(connection);
}
};
- JBossServerConnectionProvider.run(getServer(), r);
+ try {
+ JBossServerConnectionProvider.run(getServer(), r);
+ } catch( JMXException jmxe ) {
+ IStatus status = new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.SUSPEND_DEPLOYMENT_SCANNER, Messages.JMXPauseScannerError, jmxe);
+ ServerLogger.getDefault().log(getServer(), status);
+ }
}
}
@@ -210,15 +215,21 @@
resumeDeployment(connection);
}
};
- JBossServerConnectionProvider.run(getServer(), r);
+ try {
+ JBossServerConnectionProvider.run(getServer(), r);
+ } catch( JMXException jmxe ) {
+ IStatus status = new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.RESUME_DEPLOYMENT_SCANNER, Messages.JMXResumeScannerError, jmxe);
+ ServerLogger.getDefault().log(getServer(), status);
+ } finally {
+ JMXClassLoaderRepository.getDefault().removeConcerned(getServer(), this);
+ }
}
- JMXClassLoaderRepository.getDefault().removeConcerned(getServer(), this);
super.publishFinish(monitor);
}
protected boolean shouldSuspendScanner() {
- if( getServer().getServerType().getId().equals("org.jboss.ide.eclipse.as.50"))
- return false;
+// if( getServer().getServerType().getId().equals("org.jboss.ide.eclipse.as.50"))
+// return false;
if( getServer().getServerState() != IServer.STATE_STARTED)
return false;
return true;
Modified: branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java
===================================================================
--- branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java 2009-05-29 02:25:21 UTC (rev 15590)
+++ branches/jbosstools-3.0.x/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/LogLabelProvider.java 2009-05-29 04:01:51 UTC (rev 15591)
@@ -17,6 +17,8 @@
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.views.ServerLogView.EventCategory;
+import sun.security.util.BitArray;
+
public class LogLabelProvider extends LabelProvider implements ITableLabelProvider {
public Image getImage(Object element) {
if( element instanceof EventCategory ) {
@@ -28,8 +30,17 @@
}
- if( element instanceof LogEntry) {
+ if( element instanceof LogEntry) {
int code = ((LogEntry)element).getCode();
+ int istatusCode = (code & IEventCodes.ISTATUS_MASK) >> 29;
+
+ if(istatusCode != 0 ) {
+ switch(istatusCode) {
+ case 1: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
+ case 2: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK);
+ case 3: return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ }
+ }
int majorType = code & IEventCodes.MAJOR_TYPE_MASK;
switch(majorType) {
case IEventCodes.POLLING_CODE:
17 years, 1 month
JBoss Tools SVN: r15590 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: icons/16 and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 22:25:21 -0400 (Thu, 28 May 2009)
New Revision: 15590
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/input.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/output.gif
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/InputParameterListTreeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/OutputParameterListTreeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ParameterTreeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SubprocessTaskTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddChildHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddInputParameterHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddOutputParameterHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/InputParameter.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/OutputParameter.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Parameter.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterExpressionSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterInnerVariableSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterLanguageSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterOuterVariableSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowOutcomeValueSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/SequenceFlowOutcomeValueFilter.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SubprocessTask.java
Log:
support subprocess elements (GPD-327)
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/input.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/input.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/output.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/icons/16/output.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-29 02:25:21 UTC (rev 15590)
@@ -258,6 +258,20 @@
label="event"
language="org.jboss.tools.flow.jpdl4">
</element>
+ <element
+ class="org.jboss.tools.flow.jpdl4.model.InputParameter"
+ figure="icons/16/input.gif"
+ id="org.jboss.tools.flow.jpdl4.inputParameter"
+ label="input parameter"
+ language="org.jboss.tools.flow.jpdl4">
+ </element>
+ <element
+ class="org.jboss.tools.flow.jpdl4.model.OutputParameter"
+ figure="icons/16/output.gif"
+ id="org.jboss.tools.flow.jpdl4.outputParameter"
+ label="output parameter"
+ language="org.jboss.tools.flow.jpdl4">
+ </element>
</extension>
<extension
point="org.eclipse.ui.newWizards">
@@ -438,6 +452,13 @@
<input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
</propertySection>
<propertySection
+ afterSection="org.jboss.tools.jpdl4.sequenceFlow.timer"
+ class="org.jboss.tools.flow.jpdl4.properties.SequenceFlowOutcomeValueSection"
+ filter="org.jboss.tools.jpdl4.properties.SequenceFlowOutcomeValueFilter"
+ id="org.jboss.tools.jpdl4.sequenceFlow.outcome"
+ tab="org.jboss.tools.jpdl4.general">
+ </propertySection>
+ <propertySection
afterSection="org.jboss.tools.jpdl4.name"
class="org.jboss.tools.flow.jpdl4.properties.JavaTaskClassSection"
id="org.jboss.tools.jpdl4.javaTask.class"
@@ -486,6 +507,60 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
</propertySection>
+ <propertySection
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterOuterVariableSection"
+ id="org.jboss.tools.jpdl4.inputParameter.outerVariable"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.InputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.inputParameter.outerVariable"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterInnerVariableSection"
+ id="org.jboss.tools.jpdl4.inputParameter.innerVariable"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.InputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.inputParameter.innerVariable"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterExpressionSection"
+ id="org.jboss.tools.jpdl4.inputParameter.expression"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.InputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.inputParameter.expression"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterLanguageSection"
+ id="org.jboss.tools.jpdl4.inputParameter.language"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.InputParameter"/>
+ </propertySection>
+ <propertySection
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterInnerVariableSection"
+ id="org.jboss.tools.jpdl4.outputParameter.innerVariable"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.OutputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.outputParameter.innerVariable"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterOuterVariableSection"
+ id="org.jboss.tools.jpdl4.outputParameter.outerVariable"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.OutputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.outputParameter.outerVariable"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterExpressionSection"
+ id="org.jboss.tools.jpdl4.outputParameter.expression"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.OutputParameter"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.outputParameter.expression"
+ class="org.jboss.tools.flow.jpdl4.properties.ParameterLanguageSection"
+ id="org.jboss.tools.jpdl4.outputParameter.language"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.OutputParameter"/>
+ </propertySection>
</propertySections>
</extension>
<extension
@@ -525,6 +600,18 @@
</command>
<command
categoryId="org.jboss.tools.flow.jpdl4"
+ defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddInputParameterHandler"
+ id="org.jboss.tools.flow.jpdl4.addInputParameter"
+ name="Add Input Parameter">
+ </command>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
+ defaultHandler="org.jboss.tools.flow.jpdl4.handler.AddOutputParameterHandler"
+ id="org.jboss.tools.flow.jpdl4.addOutputParameter"
+ name="Add Output Parameter">
+ </command>
+ <command
+ categoryId="org.jboss.tools.flow.jpdl4"
defaultHandler="org.jboss.tools.flow.jpdl4.handler.DeleteElementHandler"
id="org.jboss.tools.flow.jpdl4.delete"
name="Delete">
@@ -597,6 +684,44 @@
</iterate>
</visibleWhen>
</command>
+ <command
+ commandId="org.jboss.tools.flow.jpdl4.addInputParameter"
+ icon="icons/16/input.gif"
+ id="org.jboss.tools.flow.jpdl4.addInputParameter"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate>
+ <or>
+ <instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.SubprocessTaskTreeRootEditPart">
+ </instanceof>
+ <instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.InputParameterListTreeEditPart">
+ </instanceof>
+ </or>
+ </iterate>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.flow.jpdl4.addOutputParameter"
+ icon="icons/16/output.gif"
+ id="org.jboss.tools.flow.jpdl4.addOutputParameter"
+ style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <iterate>
+ <or>
+ <instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.SubprocessTaskTreeRootEditPart">
+ </instanceof>
+ <instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.OutputParameterListTreeEditPart">
+ </instanceof>
+ </or>
+ </iterate>
+ </visibleWhen>
+ </command>
<separator
name="org.jboss.tools.flow.jpdl4.details.separator1"
visible="true">
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -23,7 +23,10 @@
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
import org.jboss.tools.flow.jpdl4.model.HumanTask;
+import org.jboss.tools.flow.jpdl4.model.InputParameter;
import org.jboss.tools.flow.jpdl4.model.JavaTask;
+import org.jboss.tools.flow.jpdl4.model.OutputParameter;
+import org.jboss.tools.flow.jpdl4.model.Parameter;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.ScriptTask;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
@@ -173,6 +176,30 @@
}
}
+ class ParameterAttributeHandler extends DefaultAttributeDeserializer {
+ protected List<String> getAttributesToRead() {
+ List<String> result = super.getAttributesToRead();
+ result.add(Parameter.VAR);
+ result.add(Parameter.SUBVAR);
+ result.add(Parameter.EXPR);
+ result.add(Parameter.LANG);
+ return result;
+ }
+ protected String getXmlName(String attributeName) {
+ if (Parameter.VAR.equals(attributeName)) {
+ return "var";
+ } else if (Parameter.SUBVAR.equals(attributeName)) {
+ return "subvar";
+ } else if (Parameter.EXPR.equals(attributeName)) {
+ return "expr";
+ } else if (Parameter.LANG.equals(attributeName)) {
+ return "lang";
+ } else {
+ return super.getXmlName(attributeName);
+ }
+ }
+ }
+
class SubprocessTaskAttributeHandler extends NodeAttributeHandler {
protected List<String> getAttributesToRead() {
List<String> result = super.getAttributesToRead();
@@ -275,8 +302,17 @@
if (duedate != null && !("".equals(duedate))) {
parent.setPropertyValue(SequenceFlow.TIMER, duedate);
}
+ } else if ("outcome-value".equals(node.getNodeName())) {
+ NodeList nodeList = ((Element)node).getElementsByTagName("string");
+ if (nodeList.getLength() == 1) {
+ String value = ((Element)nodeList.item(0)).getAttribute("value");
+ if (value != null && !("".equals("value"))) {
+ parent.setPropertyValue(SequenceFlow.OUTCOME_VALUE, value);
+ }
+ }
+ } else {
+ result = createWrapper((Element)node);
}
- result = createWrapper((Element)node);
if (result == null) return null;
if (result instanceof Wrapper) {
if (result.getElement() instanceof EventListener) {
@@ -325,6 +361,19 @@
}
}
+ class SubprocessTaskChildNodeHandler extends NodeChildNodeHandler {
+ public Wrapper deserializeChildNode(Wrapper parent, Node node) {
+ Wrapper result = super.deserializeChildNode(parent, node);
+ if (result == null) return result;
+ if (result.getElement() instanceof InputParameter) {
+ parent.addChild(SubprocessTask.INPUT_PARAMETERS, result);
+ } else if (result.getElement() instanceof OutputParameter) {
+ parent.addChild(SubprocessTask.OUTPUT_PARAMETERS, result);
+ }
+ return result;
+ }
+ }
+
class EventListenerContainerChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
@@ -486,6 +535,8 @@
return new EventListenerContainerAttributeHandler();
} else if (element instanceof EventListener) {
return new EventListenerAttributeHandler();
+ } else if (element instanceof Parameter) {
+ return new ParameterAttributeHandler();
}
return null;
}
@@ -528,6 +579,8 @@
return new ExclusiveGateWayChildNodeHandler();
} else if (element instanceof ScriptTask) {
return new ScriptTaskChildNodeHandler();
+ } else if (element instanceof SubprocessTask) {
+ return new SubprocessTaskChildNodeHandler();
} else {
return new NodeChildNodeHandler();
}
@@ -563,6 +616,8 @@
else if ("timer".equals(nodeName)) return "org.jboss.tools.flow.jpdl4.timer";
else if ("on".equals(nodeName)) return "org.jboss.tools.flow.jpdl4.eventListenerContainer";
else if ("event-listener".equals(nodeName)) return "org.jboss.tools.flow.jpdl4.eventListener";
+ else if ("parameter-in".equals(nodeName)) return "org.jboss.tools.flow.jpdl4.inputParameter";
+ else if ("parameter-out".equals(nodeName)) return "org.jboss.tools.flow.jpdl4.outputParameter";
else return null;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlPaletteFactory.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -169,15 +169,15 @@
ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
);
entries.add(combined);
-// combined = new CombinedTemplateCreationEntry(
-// "sub-process",
-// "Create a new Subprocess",
-// "org.jboss.tools.flow.jpdl4.subprocess",
-// ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.subprocessTask"),
-// ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/16/task_empty.png")),
-// ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
-// );
-// entries.add(combined);
+ combined = new CombinedTemplateCreationEntry(
+ "sub-process",
+ "Create a new Subprocess",
+ "org.jboss.tools.flow.jpdl4.subprocess",
+ ElementRegistry.getCreationFactory("org.jboss.tools.flow.jpdl4.subprocessTask"),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/16/task_empty.png")),
+ ImageDescriptor.createFromURL(Activator.getDefault().getBundle().getEntry("icons/32/task_empty.png"))
+ );
+ entries.add(combined);
return entries;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -38,9 +38,12 @@
import org.jboss.tools.flow.jpdl4.model.ForkParallelGateway;
import org.jboss.tools.flow.jpdl4.model.HqlTask;
import org.jboss.tools.flow.jpdl4.model.HumanTask;
+import org.jboss.tools.flow.jpdl4.model.InputParameter;
import org.jboss.tools.flow.jpdl4.model.JavaTask;
import org.jboss.tools.flow.jpdl4.model.JoinParallelGateway;
import org.jboss.tools.flow.jpdl4.model.MailTask;
+import org.jboss.tools.flow.jpdl4.model.OutputParameter;
+import org.jboss.tools.flow.jpdl4.model.Parameter;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.ProcessNode;
import org.jboss.tools.flow.jpdl4.model.ScriptTask;
@@ -202,6 +205,8 @@
else if ("org.jboss.tools.flow.jpdl4.timer".equals(elementId)) return "timer";
else if ("org.jboss.tools.flow.jpdl4.eventListenerContainer".equals(elementId)) return "on";
else if ("org.jboss.tools.flow.jpdl4.eventListener".equals(elementId)) return "event-listener";
+ else if ("org.jboss.tools.flow.jpdl4.inputParameter".equals(elementId)) return "parameter-in";
+ else if ("org.jboss.tools.flow.jpdl4.outputParameter".equals(elementId)) return "parameter-out";
else return null;
}
@@ -272,6 +277,12 @@
appendPadding(buffer, level + 1);
buffer.append("<timer duedate=\"" + timer + "\"/>");
}
+ String outcome = (String)wrapper.getPropertyValue(SequenceFlow.OUTCOME_VALUE);
+ if (outcome != null && !("".equals(outcome))) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<outcome-value><string value=\"" + outcome + "\"/></outcome-value>");
+ }
List<Element> eventListeners = wrapper.getChildren("listener");
if (eventListeners != null) {
for (Element eventListener : eventListeners) {
@@ -506,9 +517,32 @@
}
}
+ class ParameterWrapperSerializer extends AbstractWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ ArrayList<String> result = new ArrayList<String>();
+ result.add("var");
+ result.add("subvar");
+ result.add("expr");
+ result.add("lang");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("var".equals(attributeName)) {
+ return Parameter.VAR;
+ } else if ("subvar".equals(attributeName)) {
+ return Parameter.SUBVAR;
+ } else if ("expr".equals(attributeName)) {
+ return Parameter.EXPR;
+ } else if ("lang".equals(attributeName)) {
+ return Parameter.LANG;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ }
+
class SubprocessTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
- ArrayList<String> result = new ArrayList<String>();
+ List<String> result = super.getAttributesToSave();
result.add("sub-process-id");
result.add("sub-process-key");
result.add("outcome");
@@ -524,6 +558,23 @@
}
return super.getPropertyName(attributeName);
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ List<Element> inputParameters = wrapper.getChildren(SubprocessTask.INPUT_PARAMETERS);
+ if (inputParameters != null) {
+ for (Element inputParameter : inputParameters) {
+ if (!(inputParameter instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)inputParameter, level+1);
+ }
+ }
+ List<Element> outputParameters = wrapper.getChildren(SubprocessTask.OUTPUT_PARAMETERS);
+ if (outputParameters != null) {
+ for (Element outputParameter : outputParameters) {
+ if (!(outputParameter instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)outputParameter, level+1);
+ }
+ }
+ super.appendBody(buffer, wrapper, level);
+ }
}
class EventListenerContainerWrapperSerializer extends AbstractWrapperSerializer {
@@ -712,6 +763,8 @@
new EventListenerContainerWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof EventListener) {
new EventListenerWrapperSerializer().appendOpening(buffer, wrapper, level);
+ } else if (element instanceof Parameter) {
+ new ParameterWrapperSerializer().appendOpening(buffer, wrapper, level);
}
}
@@ -812,7 +865,7 @@
buffer.append("</esb>");
} else if (element instanceof HumanTask) {
buffer.append("</task>");
- } else if (element instanceof HumanTask) {
+ } else if (element instanceof SubprocessTask) {
buffer.append("</sub-process>");
} else if (element instanceof ExclusiveGateway) {
buffer.append("</decision>");
@@ -830,6 +883,10 @@
buffer.append("</on>");
} else if (element instanceof EventListener) {
buffer.append("</event-listener>");
+ } else if (element instanceof InputParameter) {
+ buffer.append("</parameter-in>");
+ } else if (element instanceof OutputParameter) {
+ buffer.append("</parameter-out>");
}
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/InputParameterListTreeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/InputParameterListTreeEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/InputParameterListTreeEditPart.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,34 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.jpdl4.util.SharedImages;
+
+public class InputParameterListTreeEditPart extends JpdlTreeEditPart {
+
+ public InputParameterListTreeEditPart(List<Element> parameters) {
+ super(parameters);
+ }
+
+ protected Image getImage() {
+ String iconPath = "icons/16/input.gif";
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(
+ Platform.getBundle("org.jboss.tools.flow.jpdl4").getEntry(iconPath));
+ return SharedImages.INSTANCE.getImage(descriptor);
+ }
+
+ protected String getText() {
+ return "Input Parameters";
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<Object> getModelChildren() {
+ return (List<Object>)getModel();
+ }
+
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/InputParameterListTreeEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -9,6 +9,8 @@
import org.jboss.tools.flow.common.wrapper.Wrapper;
import org.jboss.tools.flow.jpdl4.model.EventListener;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
import org.jboss.tools.flow.jpdl4.model.Timer;
@@ -16,17 +18,24 @@
public EditPart createEditPart(EditPart context, Object model) {
if (model instanceof FlowWrapper && context == null) return new ProcessTreeRootEditPart((FlowWrapper)model);
- if (model instanceof NodeWrapper && context == null) return new TaskTreeRootEditPart((NodeWrapper)model);
+ if (model instanceof NodeWrapper && context == null) {
+ Element element = ((NodeWrapper)model).getElement();
+ if (element instanceof SubprocessTask) return new SubprocessTaskTreeRootEditPart((Wrapper)model);
+ return new TaskTreeRootEditPart((NodeWrapper)model);
+ }
if (model instanceof ConnectionWrapper && context == null) return new SequenceFlowTreeRootEditPart((ConnectionWrapper)model);
if (model instanceof Wrapper) {
Element element = ((Wrapper)model).getElement();
if (element instanceof Swimlane) return new SwimlaneTreeEditPart((Wrapper)model);
+ if (element instanceof Parameter) return new ParameterTreeEditPart((Wrapper)model);
if (element instanceof EventListenerContainer) return new EventListenerListTreeEditPart((Wrapper)model);
if (element instanceof EventListener) return new EventListenerTreeEditPart((Wrapper)model);
if (element instanceof Timer) return new TimerTreeEditPart((Wrapper)model);
return new NoDetailsTreeRootEditPart();
}
if (model instanceof SwimlaneListTreeEditPart) return (EditPart)model;
+ if (model instanceof InputParameterListTreeEditPart) return (EditPart)model;
+ if (model instanceof OutputParameterListTreeEditPart) return (EditPart)model;
if (model instanceof TimerListTreeEditPart) return (EditPart)model;
if (model instanceof ListenerListTreeEditPart) return (EditPart)model;
return new NoDetailsTreeRootEditPart();
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/OutputParameterListTreeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/OutputParameterListTreeEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/OutputParameterListTreeEditPart.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,34 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.jpdl4.util.SharedImages;
+
+public class OutputParameterListTreeEditPart extends JpdlTreeEditPart {
+
+ public OutputParameterListTreeEditPart(List<Element> parameters) {
+ super(parameters);
+ }
+
+ protected Image getImage() {
+ String iconPath = "icons/16/output.gif";
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(
+ Platform.getBundle("org.jboss.tools.flow.jpdl4").getEntry(iconPath));
+ return SharedImages.INSTANCE.getImage(descriptor);
+ }
+
+ protected String getText() {
+ return "Output Parameters";
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<Object> getModelChildren() {
+ return (List<Object>)getModel();
+ }
+
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/OutputParameterListTreeEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ParameterTreeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ParameterTreeEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ParameterTreeEditPart.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,49 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+import org.jboss.tools.flow.jpdl4.model.InputParameter;
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+import org.jboss.tools.flow.jpdl4.util.SharedImages;
+
+public class ParameterTreeEditPart extends JpdlTreeEditPart implements ElementTreeEditPart {
+
+ public ParameterTreeEditPart(Wrapper wrapper) {
+ super(wrapper);
+ }
+
+ protected Image getImage() {
+ Element element = ((Wrapper)getModel()).getElement();
+ String iconPath = element instanceof InputParameter ? "icons/16/input.gif" : "icons/16/output.gif";
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(
+ Platform.getBundle("org.jboss.tools.flow.jpdl4").getEntry(iconPath));
+ return SharedImages.INSTANCE.getImage(descriptor);
+ }
+
+ protected String getText() {
+ Element element = ((Wrapper)getModel()).getElement();
+ String property = element instanceof InputParameter ? Parameter.VAR : Parameter.SUBVAR;
+ String variable = (String)((Wrapper)getModel()).getPropertyValue(property);
+ return variable == null || "".equals(variable) ? "variable" : variable;
+ }
+
+ public void modelChanged(ModelEvent event) {
+ if (event.getChangeType() == Wrapper.CHANGE_PROPERTY) {
+ refreshVisuals();
+ }
+ }
+
+ public void activate() {
+ super.activate();
+ ((Wrapper)getModel()).addListener(this);
+ }
+
+ public void deactivate() {
+ ((Wrapper)getModel()).removeListener(this);
+ super.deactivate();
+ }
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ParameterTreeEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SubprocessTaskTreeRootEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SubprocessTaskTreeRootEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SubprocessTaskTreeRootEditPart.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,39 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
+
+public class SubprocessTaskTreeRootEditPart extends TaskTreeRootEditPart {
+
+ public SubprocessTaskTreeRootEditPart(Wrapper wrapper) {
+ super(wrapper);
+ }
+
+ protected List<Object> getModelChildren() {
+ List<Object> result = new ArrayList<Object>();
+ addInputParameters(result, (Wrapper)getModel());
+ addOutputParameters(result, (Wrapper)getModel());
+ result.addAll(super.getModelChildren());
+ return result;
+ }
+
+ private void addInputParameters(List<Object> list, Wrapper wrapper) {
+ List<Element> inputParameters = wrapper.getChildren(SubprocessTask.INPUT_PARAMETERS);
+ if (inputParameters != null && !inputParameters.isEmpty()) {
+ list.add(new InputParameterListTreeEditPart(inputParameters));
+ }
+ }
+
+ private void addOutputParameters(List<Object> list, Wrapper wrapper) {
+ List<Element> outputParameters = wrapper.getChildren(SubprocessTask.OUTPUT_PARAMETERS);
+ if (outputParameters != null && !outputParameters.isEmpty()) {
+ list.add(new OutputParameterListTreeEditPart(outputParameters));
+ }
+ }
+
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SubprocessTaskTreeRootEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddChildHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddChildHandler.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddChildHandler.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,58 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.commands.CommandStack;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.flow.common.command.AddChildCommand;
+import org.jboss.tools.flow.common.registry.ElementRegistry;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+
+public abstract class AddChildHandler extends AbstractHandler implements IHandler {
+
+ protected abstract String getChildId();
+ protected abstract String getChildType();
+
+ private Wrapper getParent(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage();
+ if (page == null) return null;
+ ISelection selection = page.getSelection();
+ if (!(selection instanceof IStructuredSelection)) return null;
+ IStructuredSelection structuredSelection = (IStructuredSelection)selection;
+ Object first = structuredSelection.getFirstElement();
+ if (!(first instanceof EditPart)) return null;
+ EditPart editPart = (EditPart)first;
+ while (editPart != null) {
+ Object model = editPart.getModel();
+ if (model != null && model instanceof Wrapper) {
+ return (Wrapper)model;
+ }
+ editPart = editPart.getParent();
+ }
+ return null;
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Wrapper parent = getParent(event);
+ IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
+ if (editorPart == null) return null;
+ Object object = editorPart.getAdapter(CommandStack.class);
+ if (object == null || !(object instanceof CommandStack)) return null;
+ CommandStack commandStack = (CommandStack)object;
+ AddChildCommand addChildCommand = new AddChildCommand();
+ Wrapper child = ElementRegistry.createWrapper(getChildId());
+ addChildCommand.setChild(child);
+ addChildCommand.setType(getChildType());
+ addChildCommand.setParent(parent);
+ commandStack.execute(addChildCommand);
+ return null;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddChildHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddInputParameterHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddInputParameterHandler.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddInputParameterHandler.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,17 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
+
+public class AddInputParameterHandler extends AddChildHandler {
+
+ @Override
+ protected String getChildId() {
+ return "org.jboss.tools.flow.jpdl4.inputParameter";
+ }
+
+ @Override
+ protected String getChildType() {
+ return SubprocessTask.INPUT_PARAMETERS;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddInputParameterHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddOutputParameterHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddOutputParameterHandler.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddOutputParameterHandler.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,17 @@
+package org.jboss.tools.flow.jpdl4.handler;
+
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
+
+public class AddOutputParameterHandler extends AddChildHandler {
+
+ @Override
+ protected String getChildId() {
+ return "org.jboss.tools.flow.jpdl4.outputParameter";
+ }
+
+ @Override
+ protected String getChildType() {
+ return SubprocessTask.OUTPUT_PARAMETERS;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddOutputParameterHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -19,7 +19,10 @@
import org.jboss.tools.flow.jpdl4.editpart.EventListenerListTreeEditPart;
import org.jboss.tools.flow.jpdl4.model.EventListener;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+import org.jboss.tools.flow.jpdl4.model.InputParameter;
+import org.jboss.tools.flow.jpdl4.model.OutputParameter;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
import org.jboss.tools.flow.jpdl4.model.Timer;
@@ -61,6 +64,10 @@
}
} else if (child.getElement() instanceof EventListenerContainer) {
deleteChildCommand.setType("eventListener");
+ } else if (child.getElement() instanceof InputParameter) {
+ deleteChildCommand.setType(SubprocessTask.INPUT_PARAMETERS);
+ } else if (child.getElement() instanceof OutputParameter) {
+ deleteChildCommand.setType(SubprocessTask.OUTPUT_PARAMETERS);
}
deleteChildCommand.setParent(parent);
if (deleteChildCommand.canExecute()) {
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/InputParameter.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/InputParameter.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/InputParameter.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,5 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+public class InputParameter extends Parameter {
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/InputParameter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/OutputParameter.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/OutputParameter.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/OutputParameter.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,5 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+public class OutputParameter extends Parameter {
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/OutputParameter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Parameter.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Parameter.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Parameter.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,107 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.jboss.tools.flow.common.model.DefaultElement;
+
+public class Parameter extends DefaultElement {
+
+ public static final String VAR = "org.jboss.tools.flow.jpdl4.model.parameter.var";
+ public static final String SUBVAR = "org.jboss.tools.flow.jpdl4.model.parameter.subvar";
+ public static final String EXPR = "org.jboss.tools.flow.jpdl4.model.parameter.expr";
+ public static final String LANG = "org.jboss.tools.flow.jpdl4.model.parameter.lang";
+
+ private String outerVariable;
+ private String innerVariable;
+ private String expression;
+ private String language;
+
+ public Parameter() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getOuterVariable() {
+ return outerVariable;
+ }
+
+ public void setOuterVariable(String outerVariable) {
+ this.outerVariable = outerVariable;
+ }
+
+ public String getInnerVariable() {
+ return innerVariable;
+ }
+
+ public void setInnerVariable(String innerVariable) {
+ this.innerVariable = innerVariable;
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ private class PropertySource implements IPropertySource {
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (VAR.equals(id)) {
+ return getOuterVariable();
+ } else if (SUBVAR.equals(id)) {
+ return getInnerVariable();
+ } else if (EXPR.equals(id)) {
+ return getExpression();
+ } else if (LANG.equals(id)) {
+ return getLanguage();
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (VAR.equals(id)) {
+ return getOuterVariable() != null;
+ } else if (SUBVAR.equals(id)) {
+ return getInnerVariable() != null;
+ } else if (EXPR.equals(id)) {
+ return getExpression() != null;
+ } else if (LANG.equals(id)) {
+ return getLanguage() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (VAR.equals(id)) {
+ setOuterVariable((String)value);
+ } else if (SUBVAR.equals(id)) {
+ setInnerVariable((String)value);
+ } else if (EXPR.equals(id)) {
+ setExpression((String)value);
+ } else if (LANG.equals(id)) {
+ setLanguage((String)value);
+ }
+ }
+
+ }
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/Parameter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -12,11 +12,13 @@
public class SequenceFlow extends DefaultConnection {
- public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.timer";
+ public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.sequenceFlow.timer";
+ public static final String OUTCOME_VALUE = "org.jboss.tools.flow.jpdl4.model.sequenceFlow.outcome";
private String name;
private boolean conditional = false;
private String timer;
+ private String outcomeValue;
public SequenceFlow() {
this(null, null);
@@ -43,6 +45,14 @@
this.timer = timer;
}
+ public String getOutcomeValue() {
+ return outcomeValue;
+ }
+
+ public void setOutcomeValue(String outcomeValue) {
+ this.outcomeValue = outcomeValue;
+ }
+
public void setConditional(boolean conditional) {
this.conditional = conditional;
}
@@ -85,6 +95,8 @@
return getName();
} else if (TIMER.equals(id)) {
return getTimer();
+ } else if (OUTCOME_VALUE.equals(id)) {
+ return getOutcomeValue();
}
return null;
}
@@ -94,6 +106,8 @@
return getName() != null;
} else if (TIMER.equals(id)) {
return getTimer() != null;
+ } else if (OUTCOME_VALUE.equals(id)) {
+ return getOutcomeValue() != null;
}
return false;
}
@@ -106,6 +120,8 @@
setName((String)value);
} else if (TIMER.equals(id)) {
setTimer((String)value);
+ } else if (OUTCOME_VALUE.equals(id)) {
+ setOutcomeValue((String)value);
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SubprocessTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SubprocessTask.java 2009-05-28 21:04:00 UTC (rev 15589)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SubprocessTask.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -1,5 +1,8 @@
package org.jboss.tools.flow.jpdl4.model;
+import java.util.ArrayList;
+import java.util.List;
+
import org.eclipse.ui.views.properties.IPropertyDescriptor;
import org.eclipse.ui.views.properties.IPropertySource;
import org.eclipse.ui.views.properties.TextPropertyDescriptor;
@@ -10,11 +13,15 @@
public final static String ID = "org.jboss.tools.flow.jpdl4.model.subprocess.id";
public final static String KEY = "org.jboss.tools.flow.jpdl4.model.subprocess.key";
- public final static String OUTCOME = "org.jboss.tools.flow.jpdl4.model.subprocess.outcome";
+ public final static String OUTCOME = "org.jboss.tools.flow.jpdl4.model.subprocess.outcome";
+ public final static String INPUT_PARAMETERS = "org.jboss.tools.flow.jpdl4.model.subprocess.inputParameters";
+ public final static String OUTPUT_PARAMETERS = "org.jboss.tools.flow.jpdl4.model.subprocess.outputParameters";
private String subprocessId;
private String key;
private String outcome;
+ private List<InputParameter> inputParameters = new ArrayList<InputParameter>();
+ private List<OutputParameter> outputParameters = new ArrayList<OutputParameter>();
public SubprocessTask() {
setMetaData("propertySource", new PropertySource());
@@ -83,6 +90,10 @@
return getKey() != null ? getKey() : "";
} else if (OUTCOME.equals(id)) {
return getOutcome() != null ? getOutcome() : "";
+ } else if (INPUT_PARAMETERS.equals(id)) {
+ return inputParameters;
+ } else if (OUTPUT_PARAMETERS.equals(id)) {
+ return outputParameters;
}
return null;
}
@@ -94,6 +105,10 @@
return getKey() != null;
} else if (OUTCOME.equals(id)) {
return getOutcome() != null;
+ } else if (INPUT_PARAMETERS.equals(id)) {
+ return true;
+ } else if (OUTPUT_PARAMETERS.equals(id)) {
+ return true;
}
return false;
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterExpressionSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterExpressionSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterExpressionSection.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+
+public class ParameterExpressionSection extends TextFieldPropertySection {
+
+ public ParameterExpressionSection() {
+ super(Parameter.EXPR, "Expression");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterExpressionSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterInnerVariableSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterInnerVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterInnerVariableSection.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+
+public class ParameterInnerVariableSection extends TextFieldPropertySection {
+
+ public ParameterInnerVariableSection() {
+ super(Parameter.SUBVAR, "Subprocess Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterInnerVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterLanguageSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterLanguageSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterLanguageSection.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+
+public class ParameterLanguageSection extends TextFieldPropertySection {
+
+ public ParameterLanguageSection() {
+ super(Parameter.LANG, "Language");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterLanguageSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterOuterVariableSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterOuterVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterOuterVariableSection.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.Parameter;
+
+public class ParameterOuterVariableSection extends TextFieldPropertySection {
+
+ public ParameterOuterVariableSection() {
+ super(Parameter.VAR, "Main Process Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ParameterOuterVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowOutcomeValueSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowOutcomeValueSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowOutcomeValueSection.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
+
+public class SequenceFlowOutcomeValueSection extends TextFieldPropertySection {
+
+ public SequenceFlowOutcomeValueSection() {
+ super(SequenceFlow.OUTCOME_VALUE, "Outcome Value");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowOutcomeValueSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/SequenceFlowOutcomeValueFilter.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/SequenceFlowOutcomeValueFilter.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/SequenceFlowOutcomeValueFilter.java 2009-05-29 02:25:21 UTC (rev 15590)
@@ -0,0 +1,19 @@
+package org.jboss.tools.jpdl4.properties;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.jface.viewers.IFilter;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
+import org.jboss.tools.flow.jpdl4.editpart.SequenceFlowGraphicalEditPart;
+import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
+
+public class SequenceFlowOutcomeValueFilter implements IFilter {
+
+ public boolean select(Object toTest) {
+ if (!(toTest instanceof SequenceFlowGraphicalEditPart)) return false;
+ SequenceFlowGraphicalEditPart editPart = (SequenceFlowGraphicalEditPart)toTest;
+ EditPart source = editPart.getSource();
+ Wrapper wrapper = (Wrapper)source.getModel();
+ return wrapper.getElement() instanceof SubprocessTask;
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/jpdl4/properties/SequenceFlowOutcomeValueFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15589 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 17:04:00 -0400 (Thu, 28 May 2009)
New Revision: 15589
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java
Log:
support script attributes and elements (GPD-329)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 21:04:00 UTC (rev 15589)
@@ -453,11 +453,39 @@
</propertySection>
<propertySection
afterSection="org.jboss.tools.jpdl4.javaTask.method"
- class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVarSection"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVariableSection"
id="org.jboss.tools.jpdl4.javaTask.var"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskExpressionSection"
+ id="org.jboss.tools.jpdl4.scriptTask.expr"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.expr"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskLanguageSection"
+ id="org.jboss.tools.jpdl4.scriptTask.lang"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.lang"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskVariableSection"
+ id="org.jboss.tools.jpdl4.scriptTask.var"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.scriptTask.var"
+ class="org.jboss.tools.flow.jpdl4.properties.ScriptTaskTextSection"
+ id="org.jboss.tools.jpdl4.scriptTask.text"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.ScriptTask"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -25,6 +25,7 @@
import org.jboss.tools.flow.jpdl4.model.HumanTask;
import org.jboss.tools.flow.jpdl4.model.JavaTask;
import org.jboss.tools.flow.jpdl4.model.Process;
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
@@ -111,6 +112,15 @@
}
}
+ class ScriptTaskAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ wrapper.setPropertyValue(ScriptTask.EXPR, element.getAttribute("expr"));
+ wrapper.setPropertyValue(ScriptTask.LANG, element.getAttribute("lang"));
+ wrapper.setPropertyValue(ScriptTask.VAR, element.getAttribute("var"));
+ }
+ }
+
class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
public void deserializeAttributes(Wrapper wrapper, Element element) {
super.deserializeAttributes(wrapper, element);
@@ -278,6 +288,21 @@
}
}
+ class ScriptTaskChildNodeHandler extends NodeChildNodeHandler {
+ public Wrapper deserializeChildNode(Wrapper parent, Node node) {
+ Wrapper result = null;
+ if (node instanceof Element && "text".equals(node.getNodeName())) {
+ String text = ((Element)node).getTextContent();
+ if (text != null && !("".equals(text))) {
+ parent.setPropertyValue(ScriptTask.TEXT, text);
+ }
+ } else {
+ result = super.deserializeChildNode(parent, node);
+ }
+ return result;
+ }
+ }
+
class ProcessChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
@@ -477,6 +502,8 @@
return new TerminateEndEventAttributeHandler();
} else if (element instanceof JavaTask) {
return new JavaTaskAttributeHandler();
+ } else if (element instanceof ScriptTask) {
+ return new ScriptTaskAttributeHandler();
} else {
return new NodeAttributeHandler();
}
@@ -499,6 +526,8 @@
Object element = wrapper.getElement();
if (element instanceof ExclusiveGateway) {
return new ExclusiveGateWayChildNodeHandler();
+ } else if (element instanceof ScriptTask) {
+ return new ScriptTaskChildNodeHandler();
} else {
return new NodeChildNodeHandler();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -382,6 +382,34 @@
}
}
+ class ScriptTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("expr");
+ result.add("lang");
+ result.add("var");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("expr".equals(attributeName)) {
+ return ScriptTask.EXPR;
+ } else if ("lang".equals(attributeName)) {
+ return ScriptTask.LANG;
+ } else if ("var".equals(attributeName)) {
+ return ScriptTask.VAR;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ String text = (String)wrapper.getPropertyValue(ScriptTask.TEXT);
+ if (text != null && !("".equals(text))) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<text>" + text + "</text>");
+ }
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -659,7 +687,7 @@
} else if (element instanceof JavaTask) {
new JavaTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new ScriptTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof MailTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ServiceTask) {
@@ -712,7 +740,7 @@
} else if (element instanceof JavaTask) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
- new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ new ScriptTaskWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof MailTask) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ServiceTask) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/ScriptTask.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -1,10 +1,111 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
public class ScriptTask extends Task {
+ public static final String EXPR = "org.jboss.tools.flow.jpdl4.model.scriptTask.expr";
+ public static final String LANG = "org.jboss.tools.flow.jpdl4.model.scriptTask.lang";
+ public static final String VAR = "org.jboss.tools.flow.jpdl4.model.javaTask.var";
+ public static final String TEXT = "org.jboss.tools.flow.jpdl4.model.javaTask.text";
+
+ private String expression;
+ private String language;
+ private String variableName;
+ private String text;
+
+ public ScriptTask() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getExpression() {
+ return expression;
+ }
+
+ public void setExpression(String expression) {
+ this.expression = expression;
+ }
+
+ public String getLanguage() {
+ return language;
+ }
+
+ public void setLanguage(String language) {
+ this.language = language;
+ }
+
+ public String getVariableName() {
+ return variableName;
+ }
+
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+
protected boolean isPropagationExclusive() {
return true;
}
+ private class PropertySource implements IPropertySource {
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (EXPR.equals(id)) {
+ return getExpression();
+ } else if (LANG.equals(id)) {
+ return getLanguage();
+ } else if (VAR.equals(id)) {
+ return getVariableName();
+ } else if (TEXT.equals(id)) {
+ return getText();
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (EXPR.equals(id)) {
+ return getExpression() != null;
+ } else if (LANG.equals(id)) {
+ return getLanguage() != null;
+ } else if (VAR.equals(id)) {
+ return getVariableName() != null;
+ } else if (TEXT.equals(id)) {
+ return getText() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (EXPR.equals(id)) {
+ setExpression((String)value);
+ } else if (LANG.equals(id)) {
+ setLanguage((String)value);
+ } else if (VAR.equals(id)) {
+ setVariableName((String)value);
+ } else if (TEXT.equals(id)) {
+ setText((String)value);
+ }
+ }
+
+ }
}
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 20:08:34 UTC (rev 15588)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -1,11 +0,0 @@
-package org.jboss.tools.flow.jpdl4.properties;
-
-import org.jboss.tools.flow.jpdl4.model.JavaTask;
-
-public class JavaTaskVarSection extends TextFieldPropertySection {
-
- public JavaTaskVarSection() {
- super(JavaTask.VAR, "Variable Name");
- }
-
-}
Copied: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java (from rev 15588, trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java)
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskVariableSection extends TextFieldPropertySection {
+
+ public JavaTaskVariableSection() {
+ super(JavaTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskExpressionSection extends TextFieldPropertySection {
+
+ public ScriptTaskExpressionSection() {
+ super(ScriptTask.EXPR, "Expression");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskExpressionSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskLanguageSection extends TextFieldPropertySection {
+
+ public ScriptTaskLanguageSection() {
+ super(ScriptTask.LANG, "Language");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskLanguageSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskTextSection extends TextFieldPropertySection {
+
+ public ScriptTaskTextSection() {
+ super(ScriptTask.TEXT, "Text");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskTextSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java 2009-05-28 21:04:00 UTC (rev 15589)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.ScriptTask;
+
+public class ScriptTaskVariableSection extends TextFieldPropertySection {
+
+ public ScriptTaskVariableSection() {
+ super(ScriptTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/ScriptTaskVariableSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15588 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 16:08:34 -0400 (Thu, 28 May 2009)
New Revision: 15588
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java
Log:
JavaTask attributes: class, method, var
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 20:08:34 UTC (rev 15588)
@@ -437,6 +437,27 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskClassSection"
+ id="org.jboss.tools.jpdl4.javaTask.class"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.javaTask.class"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskMethodSection"
+ id="org.jboss.tools.jpdl4.javaTask.method"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.javaTask.method"
+ class="org.jboss.tools.flow.jpdl4.properties.JavaTaskVarSection"
+ id="org.jboss.tools.jpdl4.javaTask.var"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.JavaTask"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -23,6 +23,7 @@
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
import org.jboss.tools.flow.jpdl4.model.HumanTask;
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
@@ -101,6 +102,15 @@
}
}
+ class JavaTaskAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ wrapper.setPropertyValue(JavaTask.CLASS, element.getAttribute("class"));
+ wrapper.setPropertyValue(JavaTask.METHOD, element.getAttribute("method"));
+ wrapper.setPropertyValue(JavaTask.VAR, element.getAttribute("var"));
+ }
+ }
+
class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
public void deserializeAttributes(Wrapper wrapper, Element element) {
super.deserializeAttributes(wrapper, element);
@@ -465,6 +475,8 @@
return new ExclusiveGatewayAttributeHandler();
} else if (element instanceof TerminateEndEvent) {
return new TerminateEndEventAttributeHandler();
+ } else if (element instanceof JavaTask) {
+ return new JavaTaskAttributeHandler();
} else {
return new NodeAttributeHandler();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -362,6 +362,26 @@
}
}
+ class JavaTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("class");
+ result.add("method");
+ result.add("var");
+ return result;
+ }
+ protected String getPropertyName(String attributeName) {
+ if ("class".equals(attributeName)) {
+ return JavaTask.CLASS;
+ } else if ("method".equals(attributeName)) {
+ return JavaTask.METHOD;
+ } else if ("var".equals(attributeName)) {
+ return JavaTask.VAR;
+ }
+ return super.getPropertyName(attributeName);
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -637,7 +657,7 @@
} else if (element instanceof SqlTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof JavaTask) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new JavaTaskWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ScriptTask) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof MailTask) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java 2009-05-28 19:39:25 UTC (rev 15587)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/JavaTask.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -1,10 +1,95 @@
package org.jboss.tools.flow.jpdl4.model;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
public class JavaTask extends Task {
+ public static final String CLASS = "org.jboss.tools.flow.jpdl4.model.javaTask.class";
+ public static final String METHOD = "org.jboss.tools.flow.jpdl4.model.javaTask.method";
+ public static final String VAR = "org.jboss.tools.flow.jpdl4.model.javaTask.var";
+
+ private String className;
+ private String methodName;
+ private String variableName;
+
+ public JavaTask() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getClassName() {
+ return className;
+ }
+
+ public void setClassName(String className) {
+ this.className = className;
+ }
+
+ public String getMethodName() {
+ return methodName;
+ }
+
+ public void setMethodName(String methodName) {
+ this.methodName = methodName;
+ }
+
+ public String getVariableName() {
+ return variableName;
+ }
+
+ public void setVariableName(String variableName) {
+ this.variableName = variableName;
+ }
+
protected boolean isPropagationExclusive() {
return true;
}
+ private class PropertySource implements IPropertySource {
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (CLASS.equals(id)) {
+ return getClassName();
+ } else if (METHOD.equals(id)) {
+ return getMethodName();
+ } else if (VAR.equals(id)) {
+ return getVariableName();
+ }
+ return null;
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (CLASS.equals(id)) {
+ return getClassName() != null;
+ } else if (METHOD.equals(id)) {
+ return getMethodName() != null;
+ } else if (VAR.equals(id)) {
+ return getVariableName() != null;
+ }
+ return false;
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (CLASS.equals(id)) {
+ setClassName((String)value);
+ } else if (METHOD.equals(id)) {
+ setMethodName((String)value);
+ } else if (VAR.equals(id)) {
+ setVariableName((String)value);
+ }
+ }
+
+ }
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskClassSection extends TextFieldPropertySection {
+
+ public JavaTaskClassSection() {
+ super(JavaTask.CLASS, "Class Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskClassSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskMethodSection extends TextFieldPropertySection {
+
+ public JavaTaskMethodSection() {
+ super(JavaTask.METHOD, "Method Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskMethodSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java 2009-05-28 20:08:34 UTC (rev 15588)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.JavaTask;
+
+public class JavaTaskVarSection extends TextFieldPropertySection {
+
+ public JavaTaskVarSection() {
+ super(JavaTask.VAR, "Variable Name");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/JavaTaskVarSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15587 - in trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet: src/org/jboss/tools/project/examples/cheatsheet/actions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2009-05-28 15:39:25 -0400 (Thu, 28 May 2009)
New Revision: 15587
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4180 We should have the projects featured in Seam tutorials available in Project Examples
Property changes on: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet
___________________________________________________________________
Name: svn:ignore
+ bin
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2009-05-28 18:55:41 UTC (rev 15586)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunOnServer.java 2009-05-28 19:39:25 UTC (rev 15587)
@@ -34,7 +34,7 @@
}
if (params[1] != null) {
IFile file = wRoot.getFile(new Path(params[1]));
- if (file != null || file.exists()) {
+ if (file != null && file.exists()) {
try {
SingleDeployableFactory.makeDeployable(file.getFullPath());
IServer[] deployableServersAsIServers = ServerConverter
17 years, 1 month
JBoss Tools SVN: r15586 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-28 14:55:41 -0400 (Thu, 28 May 2009)
New Revision: 15586
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
Log:
Timers on events and transitions (GPD-323)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-28 18:55:41 UTC (rev 15586)
@@ -350,7 +350,7 @@
</propertySection>
<propertySection
class="org.jboss.tools.flow.jpdl4.properties.EventTypeSection"
- id="org.jboss.tools.jpdl4.eventType"
+ id="org.jboss.tools.jpdl4.eventListenerContainer.eventType"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.EventListenerContainer"/>
</propertySection>
@@ -423,6 +423,20 @@
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.eventListenerContainer.eventType"
+ class="org.jboss.tools.flow.jpdl4.properties.EventListenerContainerTimerSection"
+ id="org.jboss.tools.jpdl4.eventListenerContainer.timer"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.EventListenerContainer"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.SequenceFlowTimerSection"
+ id="org.jboss.tools.jpdl4.sequenceFlow.timer"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.SequenceFlow"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -24,6 +24,7 @@
import org.jboss.tools.flow.jpdl4.model.ExclusiveGateway;
import org.jboss.tools.flow.jpdl4.model.HumanTask;
import org.jboss.tools.flow.jpdl4.model.Process;
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
@@ -249,6 +250,12 @@
if (!(parent instanceof ConnectionWrapper)) return result;
ConnectionWrapper connectionWrapper = (ConnectionWrapper)parent;
if (node instanceof Element) {
+ if ("timer".equals(node.getNodeName())) {
+ String duedate = ((Element)node).getAttribute("duedate");
+ if (duedate != null && !("".equals(duedate))) {
+ parent.setPropertyValue(SequenceFlow.TIMER, duedate);
+ }
+ }
result = createWrapper((Element)node);
if (result == null) return null;
if (result instanceof Wrapper) {
@@ -286,11 +293,20 @@
class EventListenerContainerChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
+ if (!(parent.getElement() instanceof EventListenerContainer)) return result;
if (node instanceof Element) {
- result = createWrapper((Element)node);
- if (result == null) return null;
- if (result.getElement() instanceof EventListener) {
- parent.addChild(EventListenerContainer.LISTENERS, result);
+ if ("timer".equals(node.getNodeName())) {
+ String duedate = ((Element)node).getAttribute("duedate");
+ if (duedate != null && !("".equals(duedate))) {
+ ((EventListenerContainer)parent.getElement()).setTimer(duedate);
+ }
+ } else {
+ result = createWrapper((Element)node);
+ if (result != null) {
+ if (result.getElement() instanceof EventListener) {
+ parent.addChild(EventListenerContainer.LISTENERS, result);
+ }
+ }
}
}
return result;
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -266,6 +266,12 @@
buffer.append("\"");
}
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ String timer = (String)wrapper.getPropertyValue(SequenceFlow.TIMER);
+ if (timer != null && !("".equals(timer))) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<timer duedate=\"" + timer + "\"/>");
+ }
List<Element> eventListeners = wrapper.getChildren("listener");
if (eventListeners != null) {
for (Element eventListener : eventListeners) {
@@ -485,6 +491,13 @@
return super.getPropertyName(attributeName);
}
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ EventListenerContainer eventListenerContainer = (EventListenerContainer)wrapper.getElement();
+ String timer = eventListenerContainer.getTimer();
+ if (timer != null && !"".equals(timer)) {
+ buffer.append("\n");
+ appendPadding(buffer, level + 1);
+ buffer.append("<timer duedate=\"" + timer + "\"/>");
+ }
List<Element> eventListeners = wrapper.getChildren(EventListenerContainer.LISTENERS);
if (eventListeners != null) {
for (Element eventListener : eventListeners) {
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/EventListenerContainer.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -13,7 +13,10 @@
public static final String LISTENERS = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.listeners";
public static final String EVENT_TYPE = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.eventType";
+ public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.timer";
+
private String eventType;
+ private String timer;
private List<EventListener> listeners = new ArrayList<EventListener>();
public EventListenerContainer() {
@@ -28,6 +31,14 @@
this.eventType = eventType;
}
+ public String getTimer() {
+ return timer;
+ }
+
+ public void setTimer(String timer) {
+ this.timer = timer;
+ }
+
public List<EventListener> getListeners() {
return listeners;
}
@@ -58,7 +69,9 @@
if (LISTENERS.equals(id)) {
return listeners;
} else if (EVENT_TYPE.equals(id)) {
- return getEventType() != null ? getEventType() : "";
+ return getEventType();
+ } else if (TIMER.equals(id)) {
+ return getTimer();
}
return null;
}
@@ -68,6 +81,8 @@
return true;
} else if (EVENT_TYPE.equals(id)) {
return getEventType() != null;
+ } else if (TIMER.equals(id)) {
+ return getTimer() != null;
}
return false;
}
@@ -77,10 +92,10 @@
public void setPropertyValue(Object id, Object value) {
if (EVENT_TYPE.equals(id)) {
- if (value == null || value instanceof String) {
- setEventType((String)value);
- }
- }
+ setEventType((String)value);
+ } else if (TIMER.equals(id)) {
+ setTimer((String)value);
+ }
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-28 16:11:13 UTC (rev 15585)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/SequenceFlow.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -12,8 +12,11 @@
public class SequenceFlow extends DefaultConnection {
+ public static final String TIMER = "org.jboss.tools.flow.jpdl4.model.eventListenerContainer.timer";
+
private String name;
private boolean conditional = false;
+ private String timer;
public SequenceFlow() {
this(null, null);
@@ -32,6 +35,14 @@
return name;
}
+ public String getTimer() {
+ return timer;
+ }
+
+ public void setTimer(String timer) {
+ this.timer = timer;
+ }
+
public void setConditional(boolean conditional) {
this.conditional = conditional;
}
@@ -71,7 +82,9 @@
public Object getPropertyValue(Object id) {
if (NAME.equals(id) || LABEL.equals(id)) {
- return getName() != null ? getName() : "";
+ return getName();
+ } else if (TIMER.equals(id)) {
+ return getTimer();
}
return null;
}
@@ -79,6 +92,8 @@
public boolean isPropertySet(Object id) {
if (NAME.equals(id) || LABEL.equals(id)) {
return getName() != null;
+ } else if (TIMER.equals(id)) {
+ return getTimer() != null;
}
return false;
}
@@ -88,10 +103,10 @@
public void setPropertyValue(Object id, Object value) {
if (NAME.equals(id) || LABEL.equals(id)) {
- if (value instanceof String) {
- setName((String)value);
- }
- }
+ setName((String)value);
+ } else if (TIMER.equals(id)) {
+ setTimer((String)value);
+ }
}
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+
+public class EventListenerContainerTimerSection extends TextFieldPropertySection {
+
+ public EventListenerContainerTimerSection() {
+ super(EventListenerContainer.TIMER, "Timer");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EventListenerContainerTimerSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java 2009-05-28 18:55:41 UTC (rev 15586)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
+
+public class SequenceFlowTimerSection extends TextFieldPropertySection {
+
+ public SequenceFlowTimerSection() {
+ super(SequenceFlow.TIMER, "Timer");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/SequenceFlowTimerSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15585 - trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 12:11:13 -0400 (Thu, 28 May 2009)
New Revision: 15585
Modified:
trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
Log:
https://jira.jboss.org/jira/browse/JBDS-359 - "nightly builds" lable is fixed for JBDS guides
Modified: trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css
===================================================================
--- trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-28 15:08:23 UTC (rev 15584)
+++ trunk/documentation/jbosstools-jdocbook-style/src/main/com/css/css/tools.css 2009-05-28 16:11:13 UTC (rev 15585)
@@ -3,7 +3,7 @@
/* -----Override jbossenterprise-single.css----- */
body {
-background-image:url(../images/richfaces_label2.png);
+background-image:url(../images/jbds_label2.png);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:top left;
17 years, 1 month
JBoss Tools SVN: r15584 - in trunk: documentation/guides/GettingStartedGuide/en/modules and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 11:08:23 -0400 (Thu, 28 May 2009)
New Revision: 15584
Modified:
trunk/documentation/guides/GettingStartedGuide/en/master.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
trunk/jmx/docs/reference/en/modules/introduction.xml
trunk/portlet/docs/reference/en/modules/installation.xml
trunk/seam/docs/reference/en/modules/intro.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-670 broken linkes are fixed
Modified: trunk/documentation/guides/GettingStartedGuide/en/master.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/master.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/master.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -29,6 +29,7 @@
<!ENTITY smookslink "../../jboss_smooks_plugin_ref_guide/html_single/index.html">
<!ENTITY droolslink "../../drools_tools_ref_guide/html_single/index.html">
<!ENTITY jmxlink "../../jmx_ref_guide/html_single/index.html">
+<!ENTITY guvnorlink "../../guvnor_tools_ref_guide/html_single/index.html">
]>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/further_reading.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -117,6 +117,16 @@
</listitem>
<listitem>
+ <para>
+ <emphasis role="bold">Eclipse Guvnor Tools Reference Guide</emphasis>
+ <ulink url="&guvnorlink;">(html)</ulink>
+ </para>
+ <para>The purpose of this guide is to describe briefly the functionality present in the Eclipse Guvnor Tools (EGT) for Drools 5.</para>
+ </listitem>
+
+
+
+ <listitem>
<para>
<emphasis role="bold">JSF Tools Tutorial</emphasis>
<ulink url="&jsftutoriallink;">(html)</ulink>
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -467,7 +467,7 @@
Instead we suggest that you download the full binary from <ulink url="http://www.eclipse.org/downloads/">here</ulink>.</para>
</tip>
- <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download/index.html#stable">JBoss Tools 2.1.2</ulink>, but
+ <para>If you can only use Eclipse 3.3 use <ulink url="http://www.jboss.org/tools/download.html">JBoss Tools 2.1.2</ulink>, but
JBoss Tools 2.x will not have any of the new features.</para>
<note>
Modified: trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml
===================================================================
--- trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/esb/docs/esb_ref_guide/en/modules/esb_support.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -24,7 +24,7 @@
<para>ESB Tools come as one module of JBoss Tools project. Since ESB Tools have a
dependence on other JBoss Tools modules we recommend you to install a bundle
- of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss
+ of all <ulink url="http://labs.jboss.com/tools/download.html">JBoss
Tools plug-ins</ulink>. You can find all necessary installation instructions on JBoss Wiki in the <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools"
>InstallingJBossTools</ulink> section.</para>
</section>
Modified: trunk/jmx/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/jmx/docs/reference/en/modules/introduction.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/jmx/docs/reference/en/modules/introduction.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -53,7 +53,7 @@
do depend on the JMX Tooling and even extend it. </para>
<para>You can find the <property>JBoss Tools</property> plugins over at the <ulink
- url="http://labs.jboss.com/tools/download/index.html">download pages</ulink>. The only
+ url="http://labs.jboss.com/tools/download.html">download pages</ulink>. The only
package you'll need to get is the JMX Tooling, however the <property>AS
Tools</property> would give you a more full experience when using JMX with JBoss Servers.
You can find further download and installation instructions on the JBoss Wiki in the <ulink
Modified: trunk/portlet/docs/reference/en/modules/installation.xml
===================================================================
--- trunk/portlet/docs/reference/en/modules/installation.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/portlet/docs/reference/en/modules/installation.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -20,7 +20,7 @@
<listitem>
<para>Next, download the JBoss Portal + JBoss AS bundle from <ulink
- url="http://www.jboss.org/jbossportal/download/index.html">JBoss Portal Download
+ url="http://www.jboss.org/jbossportal/download.html">JBoss Portal Download
page</ulink></para>
<note>
Modified: trunk/seam/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/intro.xml 2009-05-28 13:21:57 UTC (rev 15583)
+++ trunk/seam/docs/reference/en/modules/intro.xml 2009-05-28 15:08:23 UTC (rev 15584)
@@ -31,7 +31,7 @@
<para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
<para>Seam is a one module of JBoss Tools project. Since Seam has a dependence on other JBoss Tools modules we recommend you to install
- a bundle of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss Tools plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
+ a bundle of all <ulink url="http://labs.jboss.com/tools/download.html">JBoss Tools plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
</section>
17 years, 1 month
JBoss Tools SVN: r15583 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-05-28 09:21:57 -0400 (Thu, 28 May 2009)
New Revision: 15583
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
fixing errors in junit tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-28 12:53:45 UTC (rev 15582)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-28 13:21:57 UTC (rev 15583)
@@ -113,14 +113,17 @@
public void handleEvent(Event event) {
Display.getCurrent().asyncExec(new Thread(){
+ @Override
public void run(){
/*
* https://jira.jboss.org/jira/browse/JBIDE-3917
* Resizer should be updated together with selection rectangle.
* Otherwise after window maximizing/restoring resizer shows old position.
*/
- showResizer();
- showSelectionRectangle();
+ if(getBrowser()!=null && !getBrowser().isDisposed()) {
+ showResizer();
+ showSelectionRectangle();
+ }
}
});
}};
17 years, 1 month
JBoss Tools SVN: r15582 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-28 08:53:45 -0400 (Thu, 28 May 2009)
New Revision: 15582
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
Log:
Seam Context Variable Refactoring https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java 2009-05-28 12:07:34 UTC (rev 15581)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java 2009-05-28 12:53:45 UTC (rev 15582)
@@ -34,6 +34,12 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.common.el.core.model.ELInstance;
+import org.jboss.tools.common.el.core.model.ELInvocationExpression;
+import org.jboss.tools.common.el.core.model.ELModel;
+import org.jboss.tools.common.el.core.model.ELPropertyInvocation;
+import org.jboss.tools.common.el.core.parser.ELParser;
+import org.jboss.tools.common.el.core.parser.ELParserUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -51,6 +57,8 @@
private static final String XHTML_EXT = "xhtml"; //$NON-NLS-1$
private static final String JSP_EXT = "jsp"; //$NON-NLS-1$
private static final String PROPERTIES_EXT = "properties"; //$NON-NLS-1$
+
+ String selectedText = "";
/*
* (non-Javadoc)
*
@@ -72,9 +80,9 @@
if(sel instanceof TextSelection && editor.getEditorInput() instanceof FileEditorInput){
TextSelection selection = (TextSelection)sel;
- String text = selection.getText();
+ selectedText = selection.getText();
- System.out.println("Selection text - "+text);
+ System.out.println("Selection text - "+selectedText);
FileEditorInput input = (FileEditorInput)editor.getEditorInput();
@@ -88,11 +96,11 @@
SeamCorePlugin.getPluginLog().logError(e);
return null;
}
- if(ext.equalsIgnoreCase(JAVA_EXT)){
+ if(JAVA_EXT.equalsIgnoreCase(ext)){
findContextVariableInJava(file, content, selection);
- } else if(ext.equalsIgnoreCase(XML_EXT) || ext.equalsIgnoreCase(XHTML_EXT) || ext.equalsIgnoreCase(JSP_EXT))
+ } else if(XML_EXT.equalsIgnoreCase(ext) || XHTML_EXT.equalsIgnoreCase(ext) || JSP_EXT.equalsIgnoreCase(ext))
findContextVariableInDOM(file, content, selection);
- else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
+ else if(PROPERTIES_EXT.equalsIgnoreCase(ext))
findContextVariableInProperties(file, content, selection);
}
return null;
@@ -110,7 +118,7 @@
int offset = scaner.getTokenOffset();
String value = document.get(offset, length);
if(value.indexOf('{')>-1) {
- //scanString(file, value, offset);
+ scanString(file, value, offset);
}
}
token = scaner.nextToken();
@@ -120,6 +128,38 @@
}
}
+ private void scanString(IFile file, String string, int offset) {
+ int startEl = string.indexOf("#{"); //$NON-NLS-1$
+ if(startEl>-1) {
+ ELParser parser = ELParserUtil.getJbossFactory().createParser();
+ ELModel model = parser.parse(string);
+ for (ELInstance instance : model.getInstances()) {
+ for(ELInvocationExpression ie : instance.getExpression().getInvocations()){
+ ELPropertyInvocation pi = findComponentReference(ie);
+ if(pi != null){
+
+ }
+ }
+ }
+ }
+ }
+
+ private ELPropertyInvocation findComponentReference(ELInvocationExpression invocationExpression){
+ ELInvocationExpression invExp = invocationExpression;
+ while(invExp != null){
+ if(invExp instanceof ELPropertyInvocation){
+ if(((ELPropertyInvocation)invExp).getQualifiedName() != null && ((ELPropertyInvocation)invExp).getQualifiedName().equals(selectedText))
+ return (ELPropertyInvocation)invExp;
+ else
+ invExp = invExp.getLeft();
+
+ }else{
+ invExp = invExp.getLeft();
+ }
+ }
+ return null;
+ }
+
private void findContextVariableInDOM(IFile file, String content, TextSelection selection){
IModelManager manager = StructuredModelManager.getModelManager();
if(manager == null) {
17 years, 1 month
JBoss Tools SVN: r15581 - trunk/smooks/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2009-05-28 08:07:34 -0400 (Thu, 28 May 2009)
New Revision: 15581
Modified:
trunk/smooks/docs/reference/en/modules/introduction.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-670 broken linkes are fixed
Modified: trunk/smooks/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/smooks/docs/reference/en/modules/introduction.xml 2009-05-28 12:00:36 UTC (rev 15580)
+++ trunk/smooks/docs/reference/en/modules/introduction.xml 2009-05-28 12:07:34 UTC (rev 15581)
@@ -77,7 +77,7 @@
<para> The Smooks tools was included by the <property>JBoss Tools</property> since 3.0.0
Beta1 version. You can download the <property>JBoss Tools</property> from <ulink
- url="http://www.jboss.org/tools/download/index.html">JBoss download site</ulink>.</para>
+ url="http://jboss.org/tools/download.html">JBoss download site</ulink>.</para>
<para> Smooks tools (<property>JBoss Tools</property>) run with the latest Eclipse and
other required plug-ins (GEF, EMF, etc.).</para>
<para> You should download the latest IDE for Java EE developers from <ulink
17 years, 1 month
JBoss Tools SVN: r15580 - trunk/as/docs/reference/en/images/runtimes_servers.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-28 08:00:36 -0400 (Thu, 28 May 2009)
New Revision: 15580
Added:
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-732 -According to the new features of JBoss AS profile docs were updated. </p>
</body></html>
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4a.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4b.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
===================================================================
(Binary files differ)
Property changes on: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_4c.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 1 month
JBoss Tools SVN: r15578 - in trunk/jsf/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-28 06:51:21 -0400 (Thu, 28 May 2009)
New Revision: 15578
Modified:
trunk/jsf/docs/userguide/en/images/palette/palette_10.png
trunk/jsf/docs/userguide/en/images/palette/palette_6.png
trunk/jsf/docs/userguide/en/images/palette/palette_7.png
trunk/jsf/docs/userguide/en/modules/palette.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-707 - Visual Web Tools Reference Guide was updated with inline graphic . </p>
</body></html>
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_10.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_6.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/images/palette/palette_7.png
===================================================================
(Binary files differ)
Modified: trunk/jsf/docs/userguide/en/modules/palette.xml
===================================================================
--- trunk/jsf/docs/userguide/en/modules/palette.xml 2009-05-28 10:39:16 UTC (rev 15577)
+++ trunk/jsf/docs/userguide/en/modules/palette.xml 2009-05-28 10:51:21 UTC (rev 15578)
@@ -98,14 +98,9 @@
new one, as well.</para>
<para>To open the editor, click on the <emphasis>
<property>Palette Editor</property>
- </emphasis> icon: <figure>
- <title>Palette Editor Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_7.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </emphasis> icon(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_7.png"/>
+ </imageobject></inlinemediaobject>).
</para>
<para>The window has two parts. There is a reflected grouped list of components on the
left side of the palette editor. Each group is divided into multiple groups, every
@@ -331,17 +326,12 @@
<listitem>
<para>Click <emphasis>
<property>Show/Hide</property>
- </emphasis> button, at the top right side of the JBoss Tools Palette.</para>
+ </emphasis> button(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_10.png"/>
+ </imageobject></inlinemediaobject>), at the top right side of the JBoss Tools Palette.</para>
</listitem>
</itemizedlist>
- <figure>
- <title>Show/Hide Button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_10.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+
<itemizedlist>
<listitem>
<para>In the dialog Show/Hide Drawers check the groups the libraries of which
@@ -528,16 +518,10 @@
<title>Import Button</title>
<para>The same you can do with <emphasis>
<property>Import</property>
- </emphasis> button. You can see this button at the top right side of the JBoss
- Tools Palette.</para>
- <figure>
- <title>Import Button</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/palette/palette_6.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+ </emphasis> button(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/palette/palette_6.png"/>
+ </imageobject></inlinemediaobject>).You can see this button at the top right side of the JBoss Tools Palette.
+ </para>
<para>By clicking on the <emphasis>
<property>Import button</property>
</emphasis> you will see the Import Tag window a similar like in the <link
17 years, 1 month
JBoss Tools SVN: r15577 - in trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test: refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-28 06:39:16 -0400 (Thu, 28 May 2009)
New Revision: 15577
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
System out was commented https://jira.jboss.org/jira/browse/JBIDE-4386
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-28 10:09:22 UTC (rev 15576)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-28 10:39:16 UTC (rev 15577)
@@ -146,7 +146,7 @@
assertEquals("Problem marker was found in components.xml file", 1, number);
// Duplicate component name
- System.out.println("Test - Duplicate component name");
+ //System.out.println("Test - Duplicate component name");
IFile bbcComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/BbcComponent.2");
try{
@@ -171,7 +171,7 @@
assertEquals("Problem marker has wrong line number", 7, lineNumbers[0]);
// Stateful component does not contain @Remove method
- System.out.println("Test - Stateful component does not contain @Remove method");
+ //System.out.println("Test - Stateful component does not contain @Remove method");
IFile statefulComponentFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.2");
try{
@@ -194,7 +194,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Stateful component does not contain @Destroy method
- System.out.println("Test - Stateful component does not contain @Destroy method");
+ //System.out.println("Test - Stateful component does not contain @Destroy method");
IFile statefulComponentFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.3");
try{
@@ -217,7 +217,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Stateful component has wrong scope
- System.out.println("Test - Stateful component has wrong scope");
+ //System.out.println("Test - Stateful component has wrong scope");
IFile statefulComponentFile4 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.4");
try{
@@ -240,7 +240,7 @@
assertEquals("Problem marker has wrong line number", 16, lineNumbers[0]);
// Component class name cannot be resolved to a type
- System.out.println("Test - Component class name cannot be resolved to a type");
+ //System.out.println("Test - Component class name cannot be resolved to a type");
IFile componentsFile2 = project.getFile("WebContent/WEB-INF/components.2");
@@ -264,7 +264,7 @@
assertEquals("Problem marker has wrong line number", 15, lineNumbers[0]);
// Component class does not contain setter for property
- System.out.println("Test - Component class does not contain setter for property");
+ //System.out.println("Test - Component class does not contain setter for property");
IFile componentsFile3 = project.getFile("WebContent/WEB-INF/components.3");
@@ -313,7 +313,7 @@
assertTrue("Problem marker was found in abcEntity.java", number == 0);
// Entity component has wrong scope
- System.out.println("Test - Entity component has wrong scope");
+ //System.out.println("Test - Entity component has wrong scope");
IFile abcEntityFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.2");
try{
@@ -345,7 +345,7 @@
final String NEW_CONTENT_FILE_NAME6 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.6";
// Duplicate @Destroy method
- System.out.println("Test - Duplicate @Destroy method");
+ //System.out.println("Test - Duplicate @Destroy method");
refreshProject(project);
@@ -358,7 +358,7 @@
TARGET_FILE_NAME, ".*\"destroyMethod2\"", 39);
// Duplicate @Create method
- System.out.println("Test - Duplicate @Create method");
+ //System.out.println("Test - Duplicate @Create method");
final String NEW_CONTENT_FILE_NAME7 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.7";
@@ -368,7 +368,7 @@
TARGET_FILE_NAME, ".*(a)Create.*\"createMethod2\".*", 41);
// Duplicate @Unwrap method
- System.out.println("Test - Duplicate @Unwrap method");
+ //System.out.println("Test - Duplicate @Unwrap method");
final String NEW_CONTENT_FILE_NAME8 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.8";
assertMarkerIsCreated(
@@ -386,14 +386,14 @@
refreshProject(project);
// Only JavaBeans and stateful session beans support @Destroy methods
- System.out.println("Test - Only JavaBeans and stateful session beans support @Destroy methods");
+ //System.out.println("Test - Only JavaBeans and stateful session beans support @Destroy methods");
final String NEW_CONTENT_FILE_NAME9 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.9";
assertMarkerIsCreated(
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME9, ".*(a)Destroy.*\"destroyMethod\".*", 25);
// Only component class can have @Create method
- System.out.println("Test - Only component class can have @Create method");
+ //System.out.println("Test - Only component class can have @Create method");
final String NEW_CONTENT_FILE_NAME10 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.10";
@@ -401,7 +401,7 @@
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME10, ".*(a)Create.*\"createMethod\".*", 25);
// Only component class can have @Unwrap method
- System.out.println("Test - Only component class can have @Unwrap method");
+ //System.out.println("Test - Only component class can have @Unwrap method");
final String NEW_CONTENT_FILE_NAME11 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.11";
@@ -409,7 +409,7 @@
TARGET_FILE_NAME,NEW_CONTENT_FILE_NAME11, "Only component class can have @Unwrap method \"unwrapMethod\"", 26);
// Only component class can have @Observer method
- System.out.println("Test - Only component class can have @Observer method");
+ //System.out.println("Test - Only component class can have @Observer method");
final String NEW_CONTENT_FILE_NAME12 = "src/action/org/domain/SeamWebWarTestProject/session/StatefulComponent.12";
@@ -485,7 +485,7 @@
assertEquals("Problem marker was found in Component12.java", 0, number);
// Unknown factory name
- System.out.println("Test - Unknown factory name");
+ //System.out.println("Test - Unknown factory name");
IFile component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
try{
@@ -535,7 +535,7 @@
assertEquals("Problem marker was found in SelectionIndexTest.java", 0, number);
// Multiple data binder
- System.out.println("Test - Multiple data binder");
+ //System.out.println("Test - Multiple data binder");
IFile selectionTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.2");
try{
@@ -582,7 +582,7 @@
assertTrue("Problem marker has wrong line number", lineNumbers[0] == 21 || lineNumbers[0] == 24);
// Unknown @DataModel/@Out name
- System.out.println("Test - Unknown @DataModel/@Out name");
+ //System.out.println("Test - Unknown @DataModel/@Out name");
IFile selectionTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.3");
try{
@@ -626,7 +626,7 @@
public void testContextVariablesValidator() {
modifyPreferences();
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
- System.out.println("UNKNOWN_EL_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME));
+ //System.out.println("UNKNOWN_EL_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_NAME));
IFile contextVariableTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.java");
@@ -636,7 +636,7 @@
assertEquals("Problem marker was found in contextVariableTestFile.java", 0, number);
// Duplicate variable name
- System.out.println("Test - Duplicate variable name");
+ //System.out.println("Test - Duplicate variable name");
IFile contextVariableTestFile2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.2");
try{
@@ -661,7 +661,7 @@
assertTrue("Problem marker has wrong line number", (lineNumbers[i] == 36)||(lineNumbers[i] == 41));
// Unknown variable name
- System.out.println("Test - Unknown variable name");
+ //System.out.println("Test - Unknown variable name");
IFile contextVariableTestFile3 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/ContextVariableTest.3");
try{
@@ -689,9 +689,9 @@
public void testExpressionLanguageValidator() throws CoreException {
modifyPreferences();
IPreferenceStore store = SeamCorePlugin.getDefault().getPreferenceStore();
- System.out.println("UNKNOWN_EL_VARIABLE_PROPERTY_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME));
- System.out.println("UNKNOWN_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_VARIABLE_NAME));
- System.out.println("UNPAIRED_GETTER_OR_SETTER value- "+store.getString(SeamPreferences.UNPAIRED_GETTER_OR_SETTER));
+ //System.out.println("UNKNOWN_EL_VARIABLE_PROPERTY_NAME value- "+store.getString(SeamPreferences.UNKNOWN_EL_VARIABLE_PROPERTY_NAME));
+ //System.out.println("UNKNOWN_VARIABLE_NAME value- "+store.getString(SeamPreferences.UNKNOWN_VARIABLE_NAME));
+ //System.out.println("UNPAIRED_GETTER_OR_SETTER value- "+store.getString(SeamPreferences.UNPAIRED_GETTER_OR_SETTER));
IFile abcComponentXHTMLFile = project.getFile("WebContent/abcComponent.xhtml");
IFile abcComponentFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/AbcComponent.java");
@@ -705,7 +705,7 @@
assertEquals("Problem marker was found in AbcComponent.java", 0, number);
// Context variable cannot be resolved
- System.out.println("Test - Context variable cannot be resolved");
+ //System.out.println("Test - Context variable cannot be resolved");
IFile abcComponentXHTMLFile2 = project.getFile("WebContent/abcComponent.2");
try{
@@ -729,7 +729,7 @@
assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
// Property cannot be resolved
- System.out.println("Test - Property cannot be resolved");
+ //System.out.println("Test - Property cannot be resolved");
IFile abcComponentXHTMLFile3 = project.getFile("WebContent/abcComponent.3");
try{
@@ -753,7 +753,7 @@
assertEquals("Problem marker has wrong line number", 22, lineNumbers[0]);
// Unpaired Getter/Setter
- System.out.println("Test - Unpaired Getter/Setter");
+ //System.out.println("Test - Unpaired Getter/Setter");
IFile abcComponentXHTMLFile4 = project.getFile("WebContent/abcComponent.4");
try{
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-28 10:09:22 UTC (rev 15576)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-28 10:39:16 UTC (rev 15577)
@@ -53,7 +53,7 @@
private ISeamProject loadSeamProject(IProject project) throws CoreException {
JobUtils.waitForIdle();
- System.out.println("Project - "+project);
+ //System.out.println("Project - "+project);
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
assertNotNull("Seam project for " + project.getName() + " is null", seamProject);
@@ -138,7 +138,7 @@
IFile file = changeStructure.getProject().getFile(changeStructure.getFileName());
String content = null;
content = FileUtil.readStream(file.getContents());
- System.out.println("File - "+file.getName()+" offset - "+changeStructure.getOffset()+" expected - ["+changeStructure.getText()+"] actual - ["+content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength())+"]");
+ //System.out.println("File - "+file.getName()+" offset - "+changeStructure.getOffset()+" expected - ["+changeStructure.getText()+"] actual - ["+content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength())+"]");
assertEquals(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
}
}
17 years, 1 month
JBoss Tools SVN: r15576 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context: java and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-28 06:09:22 -0400 (Thu, 28 May 2009)
New Revision: 15576
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3507
Check @GenericGenerator.strategy is class,
the class implements interface org.hibernate.id.IdentifierGenerator.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-28 10:09:22 UTC (rev 15576)
@@ -23,5 +23,7 @@
String STRATEGY_CLASS_NOT_FOUND = "STRATEGY_CLASS_NOT_FOUND"; //$NON-NLS-1$
String STRATEGY_CANT_BE_EMPTY = "STRATEGY_CANT_BE_EMPTY"; //$NON-NLS-1$
+
+ String STRATEGY_INTERFACE = "STRATEGY_INTERFACE"; //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-28 10:09:22 UTC (rev 15576)
@@ -1,4 +1,5 @@
NOT_A_FILE= Resource \"{0}\" is not a file.
CONFIG_FILE_NOT_FOUND = Configuration file named \"{0}\" could not be found.
STRATEGY_CLASS_NOT_FOUND = Strategy class \"{0}\" could not be found.
-STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
\ No newline at end of file
+STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
+STRATEGY_INTERFACE = Strategy class \"{0}\" should implement interface \"org.hibernate.id.IdentifierGenerator\".
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-28 06:44:30 UTC (rev 15575)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-28 10:09:22 UTC (rev 15576)
@@ -11,6 +11,7 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.eclipse.jdt.core.IType;
@@ -23,17 +24,6 @@
import org.eclipse.jpt.core.utility.TextRange;
import org.eclipse.wst.validation.internal.provisional.core.IMessage;
import org.eclipse.wst.validation.internal.provisional.core.IReporter;
-import org.hibernate.id.Assigned;
-import org.hibernate.id.ForeignGenerator;
-import org.hibernate.id.GUIDGenerator;
-import org.hibernate.id.IdentityGenerator;
-import org.hibernate.id.IncrementGenerator;
-import org.hibernate.id.SelectGenerator;
-import org.hibernate.id.SequenceGenerator;
-import org.hibernate.id.SequenceHiLoGenerator;
-import org.hibernate.id.SequenceIdentityGenerator;
-import org.hibernate.id.TableHiLoGenerator;
-import org.hibernate.id.UUIDHexGenerator;
import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
@@ -51,7 +41,7 @@
private static List<String> generatorClasses = new ArrayList<String>();
//see org.hibernate.id.IdentifierGeneratorFactory.GENERATORS
- static{
+ static {
generatorClasses.add( "uuid");
generatorClasses.add( "hilo");
generatorClasses.add( "assigned");
@@ -165,38 +155,63 @@
validateStrategy(messages, reporter, astRoot);
}
+ /**
+ * Method validates GenericGenerator.strategy. Generator strategy either a predefined Hibernate
+ * strategy or a fully qualified class name.
+ *
+ * @param messages
+ * @param reporter
+ * @param astRoot
+ */
protected void validateStrategy(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot){
- if (strategy != null){
- if (strategy.trim().length() == 0){
- IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
- STRATEGY_CANT_BE_EMPTY, new String[]{}, getResource());
- if (getValidationTextRange(astRoot) != null){
- message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
- }
- messages.add(message);
- } else if (!generatorClasses.contains(strategy)){
+ if (strategy != null) {
+ int lineNum = getValidationTextRange(astRoot) == null ? 0 : getValidationTextRange(astRoot).getLineNumber();
+ if (strategy.trim().length() == 0) {
+ messages.add(creatErrorMessage(STRATEGY_CANT_BE_EMPTY, new String[]{}, lineNum));
+ } else if (!generatorClasses.contains(strategy)){
IType lwType = null;
try {
lwType = getJpaProject().getJavaProject().findType(strategy);
- if (lwType == null && strategy.indexOf('.') < 0
- && astRoot.getPackage() != null){
- String pack = astRoot.getPackage().getName().getFullyQualifiedName();
- if (pack != null && pack.length() > 0)
- lwType = getJpaProject().getJavaProject().findType(pack+'.'+strategy);
+ if (lwType == null || !lwType.isClass()){
+ messages.add(creatErrorMessage(STRATEGY_CLASS_NOT_FOUND, new String[]{strategy}, lineNum));
+ } else {
+ if (!isImplementsIdentifierInterface(lwType)){
+ messages.add(creatErrorMessage(STRATEGY_INTERFACE, new String[]{strategy}, lineNum));
+ }
}
} catch (JavaModelException e) {
// just ignore it!
}
- if (lwType == null){
- IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
- STRATEGY_CLASS_NOT_FOUND, new String[]{strategy}, getResource());
- if (getValidationTextRange(astRoot) != null){
- message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
- }
- messages.add(message);
- }
+
}
}
}
+
+ /**
+ *
+ * @param lwType
+ * @return <code>true</code> if type implements IdentifierGenerator interface.
+ * @throws JavaModelException
+ */
+ protected boolean isImplementsIdentifierInterface(IType type) throws JavaModelException{
+ if (type == null) return false;
+ String[] interfaces = type.getSuperInterfaceNames();
+ if (Arrays.binarySearch(interfaces, "org.hibernate.id.IdentifierGenerator") >= 0) {//$NON-NLS-1$
+ return true;
+ } else if (type.getSuperclassName() != null){
+ IType parentType = getJpaProject().getJavaProject().findType(type.getSuperclassName());
+ if (parentType != null){
+ return isImplementsIdentifierInterface(parentType);
+ }
+ }
+ return false;
+ }
+
+ protected IMessage creatErrorMessage(String strmessage, String[] params, int lineNum){
+ IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
+ strmessage, params, getResource());
+ message.setLineNo(lineNum);
+ return message;
+ }
}
17 years, 1 month
JBoss Tools SVN: r15575 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal: taglib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-05-28 02:44:30 -0400 (Thu, 28 May 2009)
New Revision: 15575
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-28 04:47:10 UTC (rev 15574)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/scanner/XMLScanner.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -29,6 +29,9 @@
import org.jboss.tools.jst.web.kb.internal.taglib.AbstractTagLib;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTag;
import org.jboss.tools.jst.web.kb.internal.taglib.FaceletTagLibrary;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigAttribute;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigComponent;
+import org.jboss.tools.jst.web.kb.internal.taglib.FacesConfigTagLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDAttribute;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDLibrary;
import org.jboss.tools.jst.web.kb.internal.taglib.TLDTag;
@@ -199,7 +202,39 @@
}
private void parseFacesConfig(XModelObject o, IPath source, IKbProject sp, LoadedDeclarations ds) {
+ FacesConfigTagLibrary library = new FacesConfigTagLibrary();
+ library.setId(o);
+ library.setURI("TODO"); //TODO what is the URI?
+ ds.getLibraries().add(library);
+
+ XModelObject componentFolder = o.getChildByPath("Components");
+ if(componentFolder == null) return;
+ XModelObject[] os = componentFolder.getChildren();
+ for (XModelObject c: os) {
+ FacesConfigComponent component = new FacesConfigComponent();
+ component.setId(c);
+ component.setName(new XMLValueInfo(c, "component-type"));
+ //TODO what else can we take for the name? only attribute 'component-type' is available
+
+ component.setComponentClass(new XMLValueInfo(c, "component-class"));
+ component.setComponentType(c.getAttributeValue("component-type"));
+ component.setDescription(new XMLValueInfo(c, "description"));
+
+ XModelObject[] as = c.getChildren();
+ for (XModelObject child: as) {
+ String entity = child.getModelEntity().getName();
+ if(entity.startsWith("JSFAttribute")) {
+ FacesConfigAttribute attr = new FacesConfigAttribute();
+
+ component.addAttribute(attr);
+ } else if(entity.startsWith("JSFFacet")) {
+ //TODO
+ }
+ }
+ library.addComponent(component);
+ }
+
}
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-28 04:47:10 UTC (rev 15574)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -351,6 +351,8 @@
AbstractAttribute c = null;
if(KbXMLStoreConstants.CLS_TLD_LIBRARY.equals(cls)) {
c = new TLDAttribute();
+ } else if(KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY.equals(cls)) {
+ c = new FacesConfigAttribute();
} else {
//consider other cases;
}
Added: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java 2009-05-28 06:44:30 UTC (rev 15575)
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jst.web.kb.internal.taglib;
+
+import java.util.Properties;
+
+import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.project.ext.store.XMLStoreConstants;
+import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
+import org.jboss.tools.jst.web.model.project.ext.store.XMLValueInfo;
+import org.w3c.dom.Element;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class FacesConfigAttribute extends AbstractAttribute {
+
+ public String getXMLClass() {
+ return KbXMLStoreConstants.CLS_FACESCONFIG_LIBRARY;
+ }
+
+ @Override
+ protected void loadAttributesInfo(Element element, Properties context) {
+ if(context.get(XMLStoreConstants.KEY_MODEL_OBJECT) == getId()) {
+ XModelObject a = (XModelObject)getId();
+ attributesInfo.put(XMLStoreConstants.ATTR_NAME, new XMLValueInfo(a, "attribute-name"));
+ //TODO how to define required?
+ attributesInfo.put(AbstractComponent.DESCRIPTION, new XMLValueInfo(a, AbstractComponent.DESCRIPTION));
+// attributesInfo.put(REQUIRED, new XMLValueInfo(a, REQUIRED));
+ } else {
+ super.loadAttributesInfo(element, context);
+ }
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/FacesConfigAttribute.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15574 - in trunk: common/plugins/org.jboss.tools.common.meta.ui/.settings and 14 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-05-28 00:47:10 -0400 (Thu, 28 May 2009)
New Revision: 15574
Added:
trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/
trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties
trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.model/.settings/
trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java
trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java
trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/Messages.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1,54 @@
+package org.jboss.tools.common.meta.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.meta.ui.messages"; //$NON-NLS-1$
+ public static String ActionListFormLayoutData_Action;
+ public static String ActionListFormLayoutData_ActionList;
+ public static String ActionListFormLayoutData_Advanced;
+ public static String ActionListFormLayoutData_EntityData;
+ public static String ActionListFormLayoutData_Items;
+ public static String AttributeFormLayoutData_Advanced;
+ public static String AttributeFormLayoutData_Attribute;
+ public static String AttributeFormLayoutData_AttributeReference;
+ public static String AttributeFormLayoutData_AttributesFolder;
+ public static String AttributeFormLayoutData_AttributesList;
+ public static String AttributeFormLayoutData_Constraint;
+ public static String AttributeFormLayoutData_ConstraintDefinitions;
+ public static String AttributeFormLayoutData_Editor;
+ public static String AttributeFormLayoutData_Items;
+ public static String EntityFormLayoutData_Advanced;
+ public static String EntityFormLayoutData_AttributesFolder;
+ public static String EntityFormLayoutData_ChildrenFolder;
+ public static String EntityFormLayoutData_ChildrenList;
+ public static String EntityFormLayoutData_Entity;
+ public static String ExtensionFormLayoutData_ActionList;
+ public static String ExtensionFormLayoutData_EntityExtension;
+ public static String GroupFormLayoutData_Entities;
+ public static String GroupFormLayoutData_Extensions;
+ public static String GroupFormLayoutData_MetaGroup;
+ public static String IconFormLayoutData_IconGroup;
+ public static String IconFormLayoutData_Icons;
+ public static String IconFormLayoutData_IconsDefinitions;
+ public static String IconFormLayoutData_Subgroups;
+ public static String MappingFormLayoutData_Items;
+ public static String MappingFormLayoutData_MappingDefinitions;
+ public static String MappingFormLayoutData_MappingsFolder;
+ public static String MappingFormLayoutData_MappingsList;
+ public static String MetaCompoundEditor_PageTitle;
+ public static String MetaSearchQuery_Label;
+ public static String MetaSearchResult_Label;
+ public static String MetaSearchResult_MetaSearchTextToFindNMatches;
+ public static String MetaSearchResult_Tooltip;
+ public static String MetaSearchResultPage_Label;
+ public static String MetaSearchResultPage_MetaAttributeLabel;
+ public static String MetaSearchResultPage_TextToFindNMatches;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/MetaCompoundEditor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -21,7 +21,7 @@
protected void doCreatePages() {
if(isAppropriateNature()) {
treeFormPage = createTreeFormPage();
- treeFormPage.setTitle("Meta Editor");
+ treeFormPage.setTitle(Messages.MetaCompoundEditor_PageTitle);
treeFormPage.initialize(object);
addFormPage(treeFormPage);
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/EditorListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -36,7 +36,7 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("AttributeEditor");
+ tags = h.getList("AttributeEditor"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/HandlerListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -38,9 +38,9 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("Handlers");
+ tags = h.getList("Handlers"); //$NON-NLS-1$
for (int i = 0; i < tags.length; i++) {
- tags[i] = "%" + tags[i] + "%";
+ tags[i] = "%" + tags[i] + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/ImplementationListAdapter.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -38,9 +38,9 @@
protected void loadTags() {
MappingHelper h = MappingHelper.getMappingHelper(model);
- tags = h.getList("Implementations");
+ tags = h.getList("Implementations"); //$NON-NLS-1$
for (int i = 0; i < tags.length; i++) {
- tags[i] = "%" + tags[i] + "%";
+ tags[i] = "%" + tags[i] + "%"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/attribute/editor/PropertiesStringFieldEditor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -48,7 +48,7 @@
public PropertiesStringFieldEditor(IWidgetSettings settings) {
super(settings);
- object = PreferenceModelUtilities.getPreferenceModel().createModelObject("FilePROPERTIES", null);
+ object = PreferenceModelUtilities.getPreferenceModel().createModelObject("FilePROPERTIES", null); //$NON-NLS-1$
table = new XChildrenEditorImpl();
table.setObject(object);
}
@@ -93,15 +93,15 @@
for (int i = 0; i < cs.length; i++) {
cs[i].removeFromParent();
}
- StringTokenizer st = new StringTokenizer(value, ",;");
+ StringTokenizer st = new StringTokenizer(value, ",;"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken();
int h = t.indexOf('=');
String n = (h < 0) ? t : t.substring(0, h);
String v = t.substring(h + 1);
- XModelObject p = object.getModel().createModelObject("Property", null);
- p.setAttributeValue("name", n);
- p.setAttributeValue("value", v);
+ XModelObject p = object.getModel().createModelObject("Property", null); //$NON-NLS-1$
+ p.setAttributeValue("name", n); //$NON-NLS-1$
+ p.setAttributeValue("value", v); //$NON-NLS-1$
object.addChild(p);
}
table.update();
@@ -164,7 +164,7 @@
return new Helper();
}
protected String getAddActionPath() {
- return "CreateActions.CreateProperty";
+ return "CreateActions.CreateProperty"; //$NON-NLS-1$
}
public void action(String command) {
super.action(command);
@@ -180,8 +180,8 @@
StringBuffer sb = new StringBuffer();
XModelObject[] os = object.getChildren();
for (int i = 0; i < os.length; i++) {
- String n = os[i].getAttributeValue("name");
- String v = os[i].getAttributeValue("value");
+ String n = os[i].getAttributeValue("name"); //$NON-NLS-1$
+ String v = os[i].getAttributeValue("value"); //$NON-NLS-1$
if(n.length() == 0 && v.length() == 0) continue;
if(sb.length() > 0) sb.append(';');
sb.append(n).append('=').append(v);
@@ -190,7 +190,7 @@
}
class Helper extends AbstractTableHelper {
- String[] HEADER = new String[]{"name", "value"};
+ String[] HEADER = new String[]{"name", "value"}; //$NON-NLS-1$ //$NON-NLS-2$
public String[] getHeader() {
return HEADER;
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateHelpKeysHandler.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -24,19 +24,19 @@
}
public void executeHandler(XModelObject object, Properties p) throws XModelException {
- defpath = action.getProperty("default");
+ defpath = action.getProperty("default"); //$NON-NLS-1$
XModelObject q = findOrCreateProperties(object);
- XModelObject[] fs = object.getChildren("FileMETA");
+ XModelObject[] fs = object.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < fs.length; i++) processFile(fs[i], q);
q.setModified(true);
}
private XModelObject findOrCreateProperties(XModelObject p) {
- XModelObject q = p.getChildByPath("keys.properties");
+ XModelObject q = p.getChildByPath("keys.properties"); //$NON-NLS-1$
if(q == null) {
- q = p.getModel().createModelObject("FilePROPERTIES", new Properties());
- q.setAttributeValue("name", "keys");
- q.setAttributeValue("extension", "properties");
+ q = p.getModel().createModelObject("FilePROPERTIES", new Properties()); //$NON-NLS-1$
+ q.setAttributeValue("name", "keys"); //$NON-NLS-1$ //$NON-NLS-2$
+ q.setAttributeValue("extension", "properties"); //$NON-NLS-1$ //$NON-NLS-2$
p.addChild(q);
}
return q;
@@ -44,21 +44,21 @@
private void validateProperty(XModelObject q, String name, String value) {
if(q.getChildByPath(name) != null) return;
- XModelObject v = q.getModel().createModelObject("Property", new Properties());
- v.setAttributeValue("name", name);
- if(value != null) v.setAttributeValue("value", value);
+ XModelObject v = q.getModel().createModelObject("Property", new Properties()); //$NON-NLS-1$
+ v.setAttributeValue("name", name); //$NON-NLS-1$
+ if(value != null) v.setAttributeValue("value", value); //$NON-NLS-1$
q.addChild(v);
}
private void processFile(XModelObject f, XModelObject q) {
- XModelObject[] es = f.getChildren("MetaEntity");
+ XModelObject[] es = f.getChildren("MetaEntity"); //$NON-NLS-1$
for (int i = 0; i < es.length; i++) processEntity(es[i], q);
- es = f.getChildren("MetaEntityExtension");
+ es = f.getChildren("MetaEntityExtension"); //$NON-NLS-1$
for (int i = 0; i < es.length; i++) processEntityExtension(es[i], q);
}
private void processEntity(XModelObject e, XModelObject q) {
- boolean impl = (e.getAttributeValue("implementation").length() > 0);
+ boolean impl = (e.getAttributeValue("implementation").length() > 0); //$NON-NLS-1$
if(impl) {
// validateProperty(q, e.getAttributeValue("name"), defpath);
}
@@ -71,7 +71,7 @@
private void processActions(XModelObject e, XModelObject q, boolean impl) {
XModelObject[] as = collectActions(e);
- String pref = e.getAttributeValue("name") + "_";
+ String pref = e.getAttributeValue("name") + "_"; //$NON-NLS-1$ //$NON-NLS-2$
for (int i = 0; i < as.length; i++) processAction(pref, as[i], q);
if(impl) {
// validateProperty(q, pref + "Properties", defpath);
@@ -85,82 +85,82 @@
}
private void collectActions(XModelObject e, ArrayList l) {
- XModelObject[] as = e.getChildren("MetaActionList");
+ XModelObject[] as = e.getChildren("MetaActionList"); //$NON-NLS-1$
for (int i = 0; i < as.length; i++) collectActions(as[i], l);
- as = e.getChildren("MetaAction");
+ as = e.getChildren("MetaAction"); //$NON-NLS-1$
for (int i = 0; i < as.length; i++) l.add(as[i]);
}
private void processAction(String pref, XModelObject a, XModelObject q) {
- String n = a.getAttributeValue("name");
- String dn = a.getAttributeValue("display name");
- if(dn.endsWith("...")) dn = dn.substring(0, dn.length() - 3);
- if(n.startsWith("Add") || n.startsWith("Create")) {
+ String n = a.getAttributeValue("name"); //$NON-NLS-1$
+ String dn = a.getAttributeValue("display name"); //$NON-NLS-1$
+ if(dn.endsWith("...")) dn = dn.substring(0, dn.length() - 3); //$NON-NLS-1$
+ if(n.startsWith("Add") || n.startsWith("Create")) { //$NON-NLS-1$ //$NON-NLS-2$
Properties p = getProperties(a);
- String key = p.getProperty("key");
+ String key = p.getProperty("key"); //$NON-NLS-1$
if(key == null) {
key = pref + n;
}
String wt = dn;
- if(!wt.startsWith("Add") && !wt.startsWith("New")) {
- wt = "Add " + wt;
+ if(!wt.startsWith("Add") && !wt.startsWith("New")) { //$NON-NLS-1$ //$NON-NLS-2$
+ wt = "Add " + wt; //$NON-NLS-1$
}
- validateProperty(q, key + ".WindowTitle", wt);
+ validateProperty(q, key + ".WindowTitle", wt); //$NON-NLS-1$
String on = getObjectName(a);
if(on == null) on = dn;
- validateProperty(q, key + ".Title", on);
- } else if(n.equals("Properties")) {
+ validateProperty(q, key + ".Title", on); //$NON-NLS-1$
+ } else if(n.equals("Properties")) { //$NON-NLS-1$
String key = pref + n;
// validateProperty(q, key + ".WindowTitle", "Properties");
XModelObject b = a;
- while(b != null && b.getModelEntity().getName().toLowerCase().indexOf("entity") < 0) {
+ while(b != null && b.getModelEntity().getName().toLowerCase().indexOf("entity") < 0) { //$NON-NLS-1$
b = b.getParent();
}
String on = (b == null) ? dn : getObjectName2(b);
if(on == null) on = dn;
- validateProperty(q, key + ".Title", on);
- } else if(a.getAttributeValue("wizard").length() > 0) {
+ validateProperty(q, key + ".Title", on); //$NON-NLS-1$
+ } else if(a.getAttributeValue("wizard").length() > 0) { //$NON-NLS-1$
Properties p = getProperties(a);
- String key = p.getProperty("key");
+ String key = p.getProperty("key"); //$NON-NLS-1$
if(key == null) {
key = pref + n;
}
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
- } else if(isSpecialWizard(a.getAttributeValue("handler"))) {
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if(isSpecialWizard(a.getAttributeValue("handler"))) { //$NON-NLS-1$
int m = a.getChildren().length;
for (int i = 0; i < m; i++) {
- String key = pref + n + "_" + i;
+ String key = pref + n + "_" + i; //$NON-NLS-1$
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
- } else if(n.indexOf("Edit") >= 0) {
+ } else if(n.indexOf("Edit") >= 0) { //$NON-NLS-1$
String key = pref + n;
// validateProperty(q, key, defpath);
- validateProperty(q, key + ".WindowTitle", dn);
- validateProperty(q, key + ".Title", "");
- validateProperty(q, key + ".Message", "");
+ validateProperty(q, key + ".WindowTitle", dn); //$NON-NLS-1$
+ validateProperty(q, key + ".Title", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ validateProperty(q, key + ".Message", ""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
private boolean isSpecialWizard(String s) {
- return s.equals("org.jboss.tools.common.meta.action.impl.handlers.DefaultSpecialHandler")
- || s.equals("%SpecialWizard%");
+ return s.equals("org.jboss.tools.common.meta.action.impl.handlers.DefaultSpecialHandler") //$NON-NLS-1$
+ || s.equals("%SpecialWizard%"); //$NON-NLS-1$
}
private String getObjectName(XModelObject a) {
XModelObject[] cs = a.getChildren();
if(cs == null || cs.length == 0) return null;
- String n = cs[0].getAttributeValue("entity name");
+ String n = cs[0].getAttributeValue("entity name"); //$NON-NLS-1$
return getObjectName(n);
}
private String getObjectName2(XModelObject a) {
- return getObjectName(a.getAttributeValue("name"));
+ return getObjectName(a.getAttributeValue("name")); //$NON-NLS-1$
}
private String getObjectName(String n) {
@@ -179,9 +179,9 @@
private Properties getProperties(XModelObject a) {
Properties p = new Properties();
- String ps = a.getAttributeValue("properties");
+ String ps = a.getAttributeValue("properties"); //$NON-NLS-1$
if(ps == null || ps.length() == 0) return p;
- StringTokenizer st = new StringTokenizer(ps, ";");
+ StringTokenizer st = new StringTokenizer(ps, ";"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken();
int i = t.indexOf('=');
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/GenerateKeysGloballyHandler.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -19,7 +19,7 @@
public class GenerateKeysGloballyHandler extends AbstractHandler {
//TODO ask in wizard
- String root = "C:/Documents and Settings/glory/RedHat-3.4";
+ String root = "C:/Documents and Settings/glory/RedHat-3.4"; //$NON-NLS-1$
public GenerateKeysGloballyHandler() {}
@@ -34,11 +34,11 @@
Set<String> allKeys = new HashSet<String>();
for (int i = 0; i < plugins.length; i++) {
if(!plugins[i].isDirectory()) continue;
- File pxml = new File(plugins[i], "plugin.xml");
+ File pxml = new File(plugins[i], "plugin.xml"); //$NON-NLS-1$
if(!pxml.isFile()) continue;
- File meta = new File(plugins[i], "resources/meta");
+ File meta = new File(plugins[i], "resources/meta"); //$NON-NLS-1$
if(!meta.isDirectory()) continue;
- File helpFolder = new File(plugins[i], "resources/help");
+ File helpFolder = new File(plugins[i], "resources/help"); //$NON-NLS-1$
if(!helpFolder.isDirectory()) {
//TODO create folder
@@ -51,18 +51,18 @@
PluginData pluginData = new PluginData();
pluginData.rootFolder = plugins[i];
pluginData.rootObject = parent;
- pluginData.metaFolder = parent.getChildByPath("resources/meta");
+ pluginData.metaFolder = parent.getChildByPath("resources/meta"); //$NON-NLS-1$
relevantPlugins.add(pluginData);
XModelObject[] cs = parent.getChildren();
if(!helpFolder.isDirectory()) {
- System.out.println("No help folder");
+ System.out.println("No help folder"); //$NON-NLS-1$
}
- XModelObject helpFolderObject = parent.getChildByPath("resources/help");
+ XModelObject helpFolderObject = parent.getChildByPath("resources/help"); //$NON-NLS-1$
if(helpFolderObject != null) {
- XModelObject[] hf = helpFolderObject.getChildren("FilePROPERTIES");
+ XModelObject[] hf = helpFolderObject.getChildren("FilePROPERTIES"); //$NON-NLS-1$
for (int j = 0; j < hf.length; j++) {
XModelObject[] ps = hf[j].getChildren();
- for (int k = 0; k < ps.length; k++) allKeys.add(ps[k].getAttributeValue("name"));
+ for (int k = 0; k < ps.length; k++) allKeys.add(ps[k].getAttributeValue("name")); //$NON-NLS-1$
}
}
}
@@ -70,7 +70,7 @@
}
- System.out.println("Total keys count = " + allKeys.size());
+ System.out.println("Total keys count = " + allKeys.size()); //$NON-NLS-1$
generateAttributeNameKeys(allKeys, relevantPlugins);
@@ -79,29 +79,29 @@
private void generateAttributeNameKeys(Set<String> allKeys, List<PluginData> relevantPlugins) throws XModelException {
for (PluginData d: relevantPlugins) {
- XModelObject[] ms = d.metaFolder.getChildren("FileMETA");
+ XModelObject[] ms = d.metaFolder.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < ms.length; i++) {
- XModelObject version = ms[i].getChildByPath("Version");
- String module = version.getAttributeValue("module");
+ XModelObject version = ms[i].getChildByPath("Version"); //$NON-NLS-1$
+ String module = version.getAttributeValue("module"); //$NON-NLS-1$
- String attrKeysFileName = "keys-" + module.toLowerCase() + "-attrs";
+ String attrKeysFileName = "keys-" + module.toLowerCase() + "-attrs"; //$NON-NLS-1$ //$NON-NLS-2$
XModelObject attrKeys = findOrCreatePropertiesFile(d.rootObject, attrKeysFileName);
if(attrKeys == null) {
continue;
}
- XModelObject[] es = ms[i].getChildren("MetaEntity");
+ XModelObject[] es = ms[i].getChildren("MetaEntity"); //$NON-NLS-1$
for (int j = 0; j < es.length; j++) {
- XModelObject[] as = es[j].getChildByPath("Attributes").getChildren();
+ XModelObject[] as = es[j].getChildByPath("Attributes").getChildren(); //$NON-NLS-1$
for (int k = 0; k < as.length; k++) {
- if(as[k].getModelEntity().getName().equals("MetaAttribute")) {
+ if(as[k].getModelEntity().getName().equals("MetaAttribute")) { //$NON-NLS-1$
addAttributeFieldDisplayName(attrKeys, module, allKeys, es[j], as[k]);
}
}
}
if(attrKeys.getChildren().length > 0) {
- System.out.println(attrKeysFileName + " " + attrKeys.getChildren().length);
+ System.out.println(attrKeysFileName + " " + attrKeys.getChildren().length); //$NON-NLS-1$
((FolderImpl)attrKeys.getParent()).saveChild(attrKeys);
}
}
@@ -109,19 +109,19 @@
}
private void addAttributeFieldDisplayName(XModelObject attrKeys, String module, Set<String> allKeys, XModelObject ent, XModelObject attr) throws XModelException {
- String name = attr.getAttributeValue("name");
- String key_att_1 = ent.getAttributeValue("name") + "_" + name.replace(' ', '_');
+ String name = attr.getAttributeValue("name"); //$NON-NLS-1$
+ String key_att_1 = ent.getAttributeValue("name") + "_" + name.replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$
if(allKeys.contains(key_att_1)) {
// System.out.println("--->" + key_att_1);
return;
}
- key_att_1 = ent.getAttributeValue("name") + "." + name.replace(' ', '_');
+ key_att_1 = ent.getAttributeValue("name") + "." + name.replace(' ', '_'); //$NON-NLS-1$ //$NON-NLS-2$
if(allKeys.contains(key_att_1)) {
// System.out.println("--->" + key_att_1);
return;
}
- String key_att_2 = module + "." + name.replace(' ', '_').replace(':', '_');
- boolean invisible = "false".equals(attr.getAttributeValue("visibility"));
+ String key_att_2 = module + "." + name.replace(' ', '_').replace(':', '_'); //$NON-NLS-1$
+ boolean invisible = "false".equals(attr.getAttributeValue("visibility")); //$NON-NLS-1$ //$NON-NLS-2$
if(attrKeys.getChildByPath(key_att_2) != null) {
if(invisible) {
// DefaultRemoveHandler.removeFromParent(attrKeys.getChildByPath(key_att_2));
@@ -129,68 +129,68 @@
return;
}
if(invisible) return;
- XModelObject po = attrKeys.getModel().createModelObject("Property", new Properties());
- po.setAttributeValue("name", key_att_2);
- po.setAttributeValue("value", WizardKeys.toDisplayName(name));
+ XModelObject po = attrKeys.getModel().createModelObject("Property", new Properties()); //$NON-NLS-1$
+ po.setAttributeValue("name", key_att_2); //$NON-NLS-1$
+ po.setAttributeValue("value", WizardKeys.toDisplayName(name)); //$NON-NLS-1$
DefaultCreateHandler.addCreatedObject(attrKeys, po, 2);
}
private void generateMenuNameKeys(Set<String> allKeys, List<PluginData> relevantPlugins) throws XModelException {
Set<String> mk = new HashSet<String>(); //Temp
for (PluginData d: relevantPlugins) {
- XModelObject[] ms = d.metaFolder.getChildren("FileMETA");
+ XModelObject[] ms = d.metaFolder.getChildren("FileMETA"); //$NON-NLS-1$
for (int i = 0; i < ms.length; i++) {
- XModelObject version = ms[i].getChildByPath("Version");
- String module = version.getAttributeValue("module");
+ XModelObject version = ms[i].getChildByPath("Version"); //$NON-NLS-1$
+ String module = version.getAttributeValue("module"); //$NON-NLS-1$
- String menuKeysFileName = "keys-" + module.toLowerCase() + "-menu";
+ String menuKeysFileName = "keys-" + module.toLowerCase() + "-menu"; //$NON-NLS-1$ //$NON-NLS-2$
XModelObject menuKeys = findOrCreatePropertiesFile(d.rootObject, menuKeysFileName);
if(menuKeys == null) {
continue;
}
- XModelObject[] es = ms[i].getChildren("MetaEntity");
+ XModelObject[] es = ms[i].getChildren("MetaEntity"); //$NON-NLS-1$
for (int j = 0; j < es.length; j++) {
- XModelObject list = es[j].getChildByPath("ActionList");
+ XModelObject list = es[j].getChildByPath("ActionList"); //$NON-NLS-1$
if(list != null) {
generateMenuNameKeys(allKeys, menuKeys, list, mk);
}
}
if(menuKeys.getChildren().length > 0) {
- System.out.println(menuKeysFileName + " " + menuKeys.getChildren().length);
+ System.out.println(menuKeysFileName + " " + menuKeys.getChildren().length); //$NON-NLS-1$
((FolderImpl)menuKeys.getParent()).saveChild(menuKeys);
}
}
}
- System.out.println("action menu names " + mk.size());
+ System.out.println("action menu names " + mk.size()); //$NON-NLS-1$
for (String s: mk) System.out.println(s);
}
private void generateMenuNameKeys(Set<String> allKeys, XModelObject menuKeys, XModelObject list, Set<String> mk) throws XModelException {
- String n = list.getAttributeValue("name");
- String g = list.getAttributeValue("group");
- if("1".equals(g)) {
+ String n = list.getAttributeValue("name"); //$NON-NLS-1$
+ String g = list.getAttributeValue("group"); //$NON-NLS-1$
+ if("1".equals(g)) { //$NON-NLS-1$
mk.add(n);
}
XModelObject[] cs = list.getChildren();
for (int i = 0; i < cs.length; i++) {
String entity = cs[i].getModelEntity().getName();
- if("MetaActionList".equals(entity)) {
+ if("MetaActionList".equals(entity)) { //$NON-NLS-1$
generateMenuNameKeys(allKeys, menuKeys, cs[i], mk);
} else {
- String na = cs[i].getAttributeValue("name");
+ String na = cs[i].getAttributeValue("name"); //$NON-NLS-1$
mk.add(na);
}
}
}
private XModelObject findOrCreatePropertiesFile(XModelObject root, String name) {
- XModelObject parent = root.getChildByPath("resources/help");
+ XModelObject parent = root.getChildByPath("resources/help"); //$NON-NLS-1$
if(parent == null) return null;
- XModelObject o = parent.getChildByPath(name + ".properties");
+ XModelObject o = parent.getChildByPath(name + ".properties"); //$NON-NLS-1$
if(o == null) {
- o = parent.getModel().createModelObject("FilePROPERTIES", new Properties());
- o.setAttributeValue("name", name);
+ o = parent.getModel().createModelObject("FilePROPERTIES", new Properties()); //$NON-NLS-1$
+ o.setAttributeValue("name", name); //$NON-NLS-1$
parent.addChild(o);
parent.setModified(true);
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MappingHelper.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public class MappingHelper {
public static MappingHelper getMappingHelper(XModel model) {
- MappingHelper h = (MappingHelper)model.getManager("MappingHelper");
+ MappingHelper h = (MappingHelper)model.getManager("MappingHelper"); //$NON-NLS-1$
if(h == null) {
h = new MappingHelper();
h.setModel(model);
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaAttributeDataImpl() {}
public String name() {
- return (String)properties.get("AttributeName");
+ return (String)properties.get("AttributeName"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaAttributeEditorImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaAttributeEditorImpl() {}
public String getPathPart() {
- return "Editor";
+ return "Editor"; //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public MetaElementImpl() {}
public String name() {
- return (String)properties.get("name");
+ return (String)properties.get("name"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaElementOrderedImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -18,7 +18,7 @@
public MetaElementOrderedImpl() {}
public String name() {
- return (String)properties.get("name");
+ return (String)properties.get("name"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaEntityDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,7 +16,7 @@
public MetaEntityDataImpl() {}
public String name() {
- return (String)properties.get("EntityName");
+ return (String)properties.get("EntityName"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaIconTypeImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,6 +16,6 @@
public MetaIconTypeImpl() {}
public String name() {
- return (String)properties.get("type");
+ return (String)properties.get("type"); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/editor/MetaLoaderUtil.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -20,7 +20,7 @@
public MetaLoaderUtil() {
Hashtable _singular = new Hashtable();
- _singular.put("kind", "kind");
+ _singular.put("kind", "kind"); //$NON-NLS-1$ //$NON-NLS-2$
setup(_singular, false);
}
@@ -100,9 +100,9 @@
private static String calculateEntity(Element element, String def) {
String entity = getModelEntityAttribute(element);
if(entity != null) return entity;
- if(def.equals("MetaActionList")) {
- String k = element.getAttribute("kind");
- if("action".equals(k)) return "MetaAction";
+ if(def.equals("MetaActionList")) { //$NON-NLS-1$
+ String k = element.getAttribute("kind"); //$NON-NLS-1$
+ if("action".equals(k)) return "MetaAction"; //$NON-NLS-1$ //$NON-NLS-2$
}
return def;
}
@@ -114,8 +114,8 @@
boolean needToSave(XModelObject o) {
if(o == null) return false;
String entity = o.getModelEntity().getName();
- if("MetaAttributeConstraint".equals(entity)
- || "MetaAttributeEditor".equals(entity)) {
+ if("MetaAttributeConstraint".equals(entity) //$NON-NLS-1$
+ || "MetaAttributeEditor".equals(entity)) { //$NON-NLS-1$
return (hasSetAttributes(o)
|| o.getChildren().length > 0
);
@@ -128,11 +128,11 @@
for (int i = 0; i < as.length; i++) {
String xml = as[i].getXMLName();
// it would be more safe to check isSavable
- if(xml == null || xml.length() == 0 || "NAME".equals(xml)) continue;
+ if(xml == null || xml.length() == 0 || "NAME".equals(xml)) continue; //$NON-NLS-1$
String v = o.getAttributeValue(as[i].getName());
if(v != null && v.length() > 0 && !v.equals(as[i].getDefaultValue())) return true;
}
- String finalComment = o.get("#final-comment");
+ String finalComment = o.get("#final-comment"); //$NON-NLS-1$
if(finalComment != null && finalComment.length() > 0) return true;
return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ActionListFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,16 +20,16 @@
private final static IFormData[] ACTION_LIST_DEFINITIONS = new IFormData[] {
new FormData(
- "Action List",
- "", //"Description
+ Messages.ActionListFormLayoutData_ActionList,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ACTION_LIST_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
)
};
@@ -38,20 +39,20 @@
private final static IFormData[] ACTION_DEFINITIONS = new IFormData[] {
new FormData(
- "Action",
- "", //"Description
+ Messages.ActionListFormLayoutData_Action,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ACTION_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("entity name", 70), new FormAttributeData("mandatory", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("entity name", 70), new FormAttributeData("mandatory", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ENTITY_DATA_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaEntityData")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaEntityData") //$NON-NLS-1$
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.ActionListFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ACTION_ENTITY)
),
};
@@ -62,16 +63,16 @@
private final static IFormData[] ENTITY_DATA_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity Data",
- "", //"Description
+ Messages.ActionListFormLayoutData_EntityData,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ENTITY_DATA_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("attribute name", 70), new FormAttributeData("mandatory", 30)},
+ Messages.ActionListFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("attribute name", 70), new FormAttributeData("mandatory", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ATTRIBUTE_DATA_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaAttributeData")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMetaAttributeData") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/AttributeFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,53 +20,53 @@
private final static IFormData[] ATTRIBUTE_DEFINITIONS = new IFormData[] {
new FormData(
- "Attribute",
- "", //"Description
+ Messages.AttributeFormLayoutData_Attribute,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_ENTITY)
),
new FormData(
- "Constraint",
- "", //"Description
- "Constraint",
+ Messages.AttributeFormLayoutData_Constraint,
+ "", //"Description //$NON-NLS-1$
+ "Constraint", //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_CONSTRAINT_ENTITY)
),
new FormData(
- "Editor",
- "", //"Description
- "Editor",
+ Messages.AttributeFormLayoutData_Editor,
+ "", //"Description //$NON-NLS-1$
+ "Editor", //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_EDITOR_ENTITY)
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.AttributeFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ATTRIBUTE_ENTITY)
),
};
private final static IFormData[] ATTRIBUTE_REF_DEFINITIONS = new IFormData[] {
new FormData(
- "Attribute Reference",
- "", //"Description
+ Messages.AttributeFormLayoutData_AttributeReference,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_REF_ENTITY)
),
};
final static IFormData ATTRIBUTES_FOLDER_DEFINITION = new FormData(
- "Attributes",
- "", //"Description,
- "Attributes",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.AttributeFormLayoutData_AttributesFolder,
+ "", //"Description, //$NON-NLS-1$
+ "Attributes", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ATTRIBUTE_ENTITY,ATTRIBUTE_REF_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute") //$NON-NLS-1$
);
final static IFormData ATTRIBUTES_LIST_DEFINITION = new FormData(
- "Attributes",
- "", //"Description,
+ Messages.AttributeFormLayoutData_AttributesList,
+ "", //"Description, //$NON-NLS-1$
ATTRIBUTES_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ATTRIBUTE_ENTITY,ATTRIBUTE_REF_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateAttribute") //$NON-NLS-1$
);
final static IFormData ATTRIBUTE_DEFINITION = new FormData(
@@ -78,16 +79,16 @@
private final static IFormData[] ATTRIBUTE_CONSTRAINT_DEFINITIONS = new IFormData[] {
new FormData(
- "Constraint",
- "", //"Description
+ Messages.AttributeFormLayoutData_ConstraintDefinitions,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ATTRIBUTE_CONSTRAINT_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.AttributeFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CONSTRAINT_ITEM_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateConstraintItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateConstraintItem") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/EntityFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -18,42 +19,42 @@
public class EntityFormLayoutData implements MetaConstants {
final static IFormData CHILDREN_FOLDER_DEFINITION = new FormData(
- "Children",
- "", //"Description
- "Children",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.EntityFormLayoutData_ChildrenFolder,
+ "", //"Description //$NON-NLS-1$
+ "Children", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CHILD_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild") //$NON-NLS-1$
);
final static IFormData CHILDREN_LIST_DEFINITION = new FormData(
- "Children",
- "", //"Description
+ Messages.EntityFormLayoutData_ChildrenList,
+ "", //"Description //$NON-NLS-1$
CHILDREN_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{CHILD_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateChild") //$NON-NLS-1$
);
private final static IFormData[] ENTITY_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity",
- "", //"Description
+ Messages.EntityFormLayoutData_Entity,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ENTITY_ENTITY)
),
CHILDREN_FOLDER_DEFINITION,
AttributeFormLayoutData.ATTRIBUTES_FOLDER_DEFINITION,
new FormData(
- "Action List",
- "", //"Description
- "ActionList",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.EntityFormLayoutData_AttributesFolder,
+ "", //"Description //$NON-NLS-1$
+ "ActionList", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
),
new FormData(
- "Advanced",
- "", //"Description
+ Messages.EntityFormLayoutData_Advanced,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createAdvancedFormAttributeData(ENTITY_ENTITY)
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/ExtensionFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,18 +20,18 @@
private final static IFormData[] EXTENSION_DEFINITIONS = new IFormData[] {
new FormData(
- "Entity Extension",
- "", //"Description
+ Messages.ExtensionFormLayoutData_EntityExtension,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(EXTENSION_ENTITY)
),
EntityFormLayoutData.CHILDREN_FOLDER_DEFINITION,
new FormData(
- "Action List",
- "", //"Description
- "ActionList",
- new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)},
+ Messages.ExtensionFormLayoutData_ActionList,
+ "", //"Description //$NON-NLS-1$
+ "ActionList", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 70), new FormAttributeData("element type", 30)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ACTION_LIST_ENTITY, ACTION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.AddItem") //$NON-NLS-1$
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/GroupFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,23 +20,23 @@
private final static IFormData[] GROUP_DEFINITIONS = new IFormData[] {
new FormData(
- "Meta Group",
- "", //"Description
+ Messages.GroupFormLayoutData_MetaGroup,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(GROUP_ENTITY)
),
new FormData(
- "Entities",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.GroupFormLayoutData_Entities,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ENTITY_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntity")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntity") //$NON-NLS-1$
),
new FormData(
- "Extensions",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.GroupFormLayoutData_Extensions,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{EXTENSION_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntityExtension")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateEntityExtension") //$NON-NLS-1$
),
MappingFormLayoutData.MAPPING_FOLDER_DEFINITION
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/IconFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -19,23 +20,23 @@
private final static IFormData[] ICON_GROUP_DEFINITIONS = new IFormData[] {
new FormData(
- "Icon Group",
- "", //"Description
+ Messages.IconFormLayoutData_IconGroup,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(ICON_GROUP_ENTITY)
),
new FormData(
- "Subgroups",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.IconFormLayoutData_Subgroups,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ICON_GROUP_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup") //$NON-NLS-1$
),
new FormData(
- "Icons",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("path", 70)},
+ Messages.IconFormLayoutData_Icons,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("path", 70)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{ICON_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIcon")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIcon") //$NON-NLS-1$
)
};
@@ -45,11 +46,11 @@
private final static IFormData[] ICONS_DEFINITIONS = new IFormData[] {
new FormData(
- "Icon Groups",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.IconFormLayoutData_IconsDefinitions,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{ICON_GROUP_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateIconGroup") //$NON-NLS-1$
),
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MappingFormLayoutData.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.form;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.forms.FormAttributeData;
import org.jboss.tools.common.model.ui.forms.FormData;
import org.jboss.tools.common.model.ui.forms.FormLayoutDataUtil;
@@ -18,35 +19,35 @@
public class MappingFormLayoutData implements MetaConstants {
final static IFormData MAPPING_FOLDER_DEFINITION = new FormData(
- "Mappings",
- "", //"Description
- "Mappings",
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ Messages.MappingFormLayoutData_MappingsFolder,
+ "", //"Description //$NON-NLS-1$
+ "Mappings", //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{MAPPING_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping") //$NON-NLS-1$
);
final static IFormData MAPPING_LIST_DEFINITION = new FormData(
- "Mappings",
- "", //"Description
+ Messages.MappingFormLayoutData_MappingsList,
+ "", //"Description //$NON-NLS-1$
MAPPINGS_ENTITY,
- new FormAttributeData[]{new FormAttributeData("name", 100)},
+ new FormAttributeData[]{new FormAttributeData("name", 100)}, //$NON-NLS-1$
new String[]{MAPPING_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateMapping") //$NON-NLS-1$
);
private final static IFormData[] MAPPING_DEFINITIONS = new IFormData[] {
new FormData(
- "Mapping",
- "", //"Description
+ Messages.MappingFormLayoutData_MappingDefinitions,
+ "", //"Description //$NON-NLS-1$
FormLayoutDataUtil.createGeneralFormAttributeData(MAPPING_ENTITY)
),
new FormData(
- "Items",
- "", //"Description
- new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("value", 70)},
+ Messages.MappingFormLayoutData_Items,
+ "", //"Description //$NON-NLS-1$
+ new FormAttributeData[]{new FormAttributeData("name", 30), new FormAttributeData("value", 70)}, //$NON-NLS-1$ //$NON-NLS-2$
new String[]{MAPPING_ITEM_ENTITY},
- FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateItem")
+ FormLayoutDataUtil.createDefaultFormActionData("CreateActions.CreateItem") //$NON-NLS-1$
)
};
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/form/MetaConstants.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -11,25 +11,25 @@
package org.jboss.tools.common.meta.ui.form;
public interface MetaConstants {
- String GROUP_ENTITY = "FileMETA";
- String ENTITY_ENTITY = "MetaEntity";
- String EXTENSION_ENTITY = "MetaEntityExtension";
- String CHILDREN_ENTITY = "MetaChildren";
- String CHILD_ENTITY = "MetaChild";
- String ATTRIBUTE_ENTITY = "MetaAttribute";
- String ATTRIBUTE_REF_ENTITY = "MetaAttributeReference";
- String ATTRIBUTES_ENTITY = "MetaAttributes";
- String ACTION_ENTITY = "MetaAction";
- String ACTION_LIST_ENTITY = "MetaActionList";
- String ATTRIBUTE_CONSTRAINT_ENTITY = "MetaAttributeConstraint";
- String CONSTRAINT_ITEM_ENTITY = "MetaConstraintItem";
- String ATTRIBUTE_EDITOR_ENTITY = "MetaAttributeEditor";
- String ENTITY_DATA_ENTITY = "MetaEntityData";
- String ATTRIBUTE_DATA_ENTITY = "MetaAttributeData";
- String MAPPINGS_ENTITY = "MetaMappings";
- String MAPPING_ENTITY = "MetaMapping";
- String MAPPING_ITEM_ENTITY = "MetaMappingItem";
- String ICONS_ENTITY = "MetaIcons";
- String ICON_GROUP_ENTITY = "MetaIconGroup";
- String ICON_ENTITY = "MetaIcon";
+ String GROUP_ENTITY = "FileMETA"; //$NON-NLS-1$
+ String ENTITY_ENTITY = "MetaEntity"; //$NON-NLS-1$
+ String EXTENSION_ENTITY = "MetaEntityExtension"; //$NON-NLS-1$
+ String CHILDREN_ENTITY = "MetaChildren"; //$NON-NLS-1$
+ String CHILD_ENTITY = "MetaChild"; //$NON-NLS-1$
+ String ATTRIBUTE_ENTITY = "MetaAttribute"; //$NON-NLS-1$
+ String ATTRIBUTE_REF_ENTITY = "MetaAttributeReference"; //$NON-NLS-1$
+ String ATTRIBUTES_ENTITY = "MetaAttributes"; //$NON-NLS-1$
+ String ACTION_ENTITY = "MetaAction"; //$NON-NLS-1$
+ String ACTION_LIST_ENTITY = "MetaActionList"; //$NON-NLS-1$
+ String ATTRIBUTE_CONSTRAINT_ENTITY = "MetaAttributeConstraint"; //$NON-NLS-1$
+ String CONSTRAINT_ITEM_ENTITY = "MetaConstraintItem"; //$NON-NLS-1$
+ String ATTRIBUTE_EDITOR_ENTITY = "MetaAttributeEditor"; //$NON-NLS-1$
+ String ENTITY_DATA_ENTITY = "MetaEntityData"; //$NON-NLS-1$
+ String ATTRIBUTE_DATA_ENTITY = "MetaAttributeData"; //$NON-NLS-1$
+ String MAPPINGS_ENTITY = "MetaMappings"; //$NON-NLS-1$
+ String MAPPING_ENTITY = "MetaMapping"; //$NON-NLS-1$
+ String MAPPING_ITEM_ENTITY = "MetaMappingItem"; //$NON-NLS-1$
+ String ICONS_ENTITY = "MetaIcons"; //$NON-NLS-1$
+ String ICON_GROUP_ENTITY = "MetaIconGroup"; //$NON-NLS-1$
+ String ICON_ENTITY = "MetaIcon"; //$NON-NLS-1$
}
Added: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/messages.properties 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1,40 @@
+ActionListFormLayoutData_Action=Action
+ActionListFormLayoutData_ActionList=Action List
+ActionListFormLayoutData_Advanced=Advanced
+ActionListFormLayoutData_EntityData=Entity Data
+ActionListFormLayoutData_Items=Items
+AttributeFormLayoutData_Advanced=Advanced
+AttributeFormLayoutData_Attribute=Attribute
+AttributeFormLayoutData_AttributeReference=Attribute Reference
+AttributeFormLayoutData_AttributesFolder=Attributes
+AttributeFormLayoutData_AttributesList=Attributes
+AttributeFormLayoutData_Constraint=Constraint
+AttributeFormLayoutData_ConstraintDefinitions=Constraint
+AttributeFormLayoutData_Editor=Editor
+AttributeFormLayoutData_Items=Items
+EntityFormLayoutData_Advanced=Advanced
+EntityFormLayoutData_AttributesFolder=Action List
+EntityFormLayoutData_ChildrenFolder=Children
+EntityFormLayoutData_ChildrenList=Children
+EntityFormLayoutData_Entity=Entity
+ExtensionFormLayoutData_ActionList=Action List
+ExtensionFormLayoutData_EntityExtension=Entity Extension
+GroupFormLayoutData_Entities=Entities
+GroupFormLayoutData_Extensions=Extensions
+GroupFormLayoutData_MetaGroup=Meta Group
+IconFormLayoutData_IconGroup=Icon Group
+IconFormLayoutData_Icons=Icons
+IconFormLayoutData_IconsDefinitions=Icon Groups
+IconFormLayoutData_Subgroups=Subgroups
+MappingFormLayoutData_Items=Items
+MappingFormLayoutData_MappingDefinitions=Mapping
+MappingFormLayoutData_MappingsFolder=Mappings
+MappingFormLayoutData_MappingsList=Mappings
+MetaCompoundEditor_PageTitle=Meta Editor
+MetaSearchQuery_Label=Meta Search
+MetaSearchResult_Label=Meta Search
+MetaSearchResult_MetaSearchTextToFindNMatches=Meta Search - ''{0}'' - {1} matches
+MetaSearchResult_Tooltip=Meta Search
+MetaSearchResultPage_Label=Meta Search
+MetaSearchResultPage_MetaAttributeLabel={0} - entity {1} - {2}
+MetaSearchResultPage_TextToFindNMatches="{0}" - {1} matches
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchPage.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -58,10 +58,11 @@
}
private XEntityData getSearchEntityData() {
- String[][] ds = new String[][]{{"SearchValue", "yes"},
- {"text to find", "yes"},
- {"property name", "no"},
- {"ignore case", "no"}};
+ // TODO might need to make use of setDisplayName if these strings appear in the UI
+ String[][] ds = new String[][]{{"SearchValue", "yes"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"text to find", "yes"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"property name", "no"}, //$NON-NLS-1$//$NON-NLS-2$
+ {"ignore case", "no"}}; //$NON-NLS-1$//$NON-NLS-2$
XEntityData d = XEntityDataImpl.create(ds);
XAttributeData[] as = d.getAttributeData();
for (int i = 0; i < as.length; i++) {
@@ -95,9 +96,9 @@
org.eclipse.search.ui.NewSearchUI.activateSearchResultView();
MetaSearchQuery wsJob = new MetaSearchQuery();
- wsJob.setTextToFind(data.getValue("text to find"));
- wsJob.setIgnoreCase("true".equals(data.getValue("ignore case")));
- wsJob.setAttributeMask(data.getValue("property name"));
+ wsJob.setTextToFind(data.getValue("text to find")); //$NON-NLS-1$
+ wsJob.setIgnoreCase("true".equals(data.getValue("ignore case"))); //$NON-NLS-1$ //$NON-NLS-2$
+ wsJob.setAttributeMask(data.getValue("property name")); //$NON-NLS-1$
wsJob.setScope(scope);
if (forground) {
IStatus status= NewSearchUI.runQueryInForeground(getRunnableContext(), wsJob);
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchQuery.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -16,14 +16,15 @@
import org.eclipse.search.ui.*;
import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
public class MetaSearchQuery implements ISearchQuery {
MetaSearchResult result;
- String text = "=";
+ String text = "="; //$NON-NLS-1$
boolean ignoreCase = true;
- String attributeMask = "*";
+ String attributeMask = "*"; //$NON-NLS-1$
List scope = new ArrayList();
public void setScope(List scope) {
@@ -54,7 +55,7 @@
for (int i = 0; i < rs.length; i++) {
processResource(rs[i]);
}
- return new Status(IStatus.OK, "org.jboss.common.meta.ui", 0, "", null);
+ return new Status(IStatus.OK, "org.jboss.common.meta.ui", 0, "", null); //$NON-NLS-1$//$NON-NLS-2$
}
private void processResource(IResource resource) {
@@ -65,7 +66,7 @@
if(rs != null) for (int i = 0; i < rs.length; i++) processResource(rs[i]);
} else if(resource instanceof IFile) {
IFile f = (IFile)resource;
- if(!f.getName().endsWith(".meta")) return;
+ if(!f.getName().endsWith(".meta")) return; //$NON-NLS-1$
XModelObject o = EclipseResourceUtil.getObjectByResource(f);
if(o == null) o = EclipseResourceUtil.createObjectForResource(f);
if(o == null) return;
@@ -78,7 +79,7 @@
for (int i = 0; i < as.length; i++) {
if(!as[i].isVisible()) continue;
String n = as[i].getName();
- if(!attributeMask.equals("*") && attributeMask.length() > 0 && !attributeMask.equals(n)) continue;
+ if(!attributeMask.equals("*") && attributeMask.length() > 0 && !attributeMask.equals(n)) continue; //$NON-NLS-1$
String v = o.getAttributeValue(n);
if(v == null) continue;
if(ignoreCase) {
@@ -96,7 +97,7 @@
}
public String getLabel() {
- return "Meta Search";
+ return Messages.MetaSearchQuery_Label;
}
public boolean canRerun() {
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResult.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,9 +10,11 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.search;
+import java.text.MessageFormat;
import java.util.*;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.search.ui.*;
+import org.jboss.tools.common.meta.ui.Messages;
public class MetaSearchResult implements ISearchResult {
Set listeners = new HashSet();
@@ -35,13 +37,14 @@
public String getLabel() {
if(query instanceof MetaSearchQuery) {
MetaSearchQuery q = (MetaSearchQuery)query;
- return "Meta Search - '" + q.getTextToFind() + "' - " + objects.size() + " matches";
+ return MessageFormat.format(Messages.MetaSearchResult_MetaSearchTextToFindNMatches,
+ q.getTextToFind(), objects.size());
}
- return "Meta Search";
+ return Messages.MetaSearchResult_Label;
}
public String getTooltip() {
- return "Meta Search";
+ return Messages.MetaSearchResult_Tooltip;
}
public ImageDescriptor getImageDescriptor() {
Modified: trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.meta.ui/src/org/jboss/tools/common/meta/ui/search/MetaSearchResultPage.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.common.meta.ui.search;
+import java.text.MessageFormat;
+
+import org.jboss.tools.common.meta.ui.Messages;
import org.jboss.tools.common.model.ui.navigator.NavigatorLabelProvider;
import org.eclipse.jface.viewers.*;
import org.eclipse.search.ui.*;
@@ -75,10 +78,11 @@
ISearchQuery query = search.getQuery();
if(query instanceof MetaSearchQuery) {
MetaSearchQuery q = (MetaSearchQuery)query;
- return "\"" + q.getTextToFind() + "\"" + " - " + search.getObjects().size() + " matches";
+ return MessageFormat.format(Messages.MetaSearchResultPage_TextToFindNMatches, q.getTextToFind(),
+ search.getObjects().size());
}
}
- return "Meta Search";
+ return Messages.MetaSearchResultPage_Label;
}
public IPageSite getSite() {
@@ -183,15 +187,16 @@
XModelObject o = (XModelObject)element;
XModelObject f = o;
while(f != null && f.getFileType() == XModelObject.NONE) f = f.getParent();
- String file = f == null ? "" : FileAnyImpl.toFileName(f);
+ String file = f == null ? "" : FileAnyImpl.toFileName(f); //$NON-NLS-1$
String entity = o.getModelEntity().getName();
- if("MetaEntity".equals(entity)) {
- return super.getText(element) + " - " + file;
- } else if("MetaAttribute".equals(entity)) {
+ if("MetaEntity".equals(entity)) { //$NON-NLS-1$
+ return super.getText(element) + " - " + file; //$NON-NLS-1$
+ } else if("MetaAttribute".equals(entity)) { //$NON-NLS-1$
XModelObject p = o.getParent().getParent();
- return super.getText(element) + " - entity " + p.getPresentationString() + " - " + file;
+ return MessageFormat.format(Messages.MetaSearchResultPage_MetaAttributeLabel,
+ super.getText(element), p.getPresentationString(), file);
} else {
- return super.getText(element) + " - " + file;
+ return super.getText(element) + " - " + file; //$NON-NLS-1$
}
}
return super.getText(element);
Added: trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XAttributeDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -61,12 +61,12 @@
}
public void load(Element el) {
- attributename = el.getAttribute("AttributeName");
- entityname = ((Element)el.getParentNode()).getAttribute("EntityName");
- String m = el.getAttribute("Mandatory");
- mandatory = "yes".equals(m) || "".equals(m);
- m = el.getAttribute("Advanced");
- isAdvanced = "yes".equals(m);
+ attributename = el.getAttribute("AttributeName"); //$NON-NLS-1$
+ entityname = ((Element)el.getParentNode()).getAttribute("EntityName"); //$NON-NLS-1$
+ String m = el.getAttribute("Mandatory"); //$NON-NLS-1$
+ mandatory = "yes".equals(m) || "".equals(m); //$NON-NLS-1$//$NON-NLS-2$
+ m = el.getAttribute("Advanced"); //$NON-NLS-1$
+ isAdvanced = "yes".equals(m); //$NON-NLS-1$
}
public String getAttributeName() {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/action/impl/XEntityDataImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -48,9 +48,9 @@
}
public void load(Element el) {
- entityname = el.getAttribute("EntityName");
- mandatory = "yes".equals(el.getAttribute("Mandatory"));
- Element[] cs = XMetaDataLoader.getChildrenElements(el, "AttributeData");
+ entityname = el.getAttribute("EntityName"); //$NON-NLS-1$
+ mandatory = "yes".equals(el.getAttribute("Mandatory")); //$NON-NLS-1$ //$NON-NLS-2$
+ Element[] cs = XMetaDataLoader.getChildrenElements(el, "AttributeData"); //$NON-NLS-1$
attributes = new XAttributeDataImpl[cs.length];
for (int i = 0; i < cs.length; i++) {
attributes[i] = new XAttributeDataImpl();
@@ -65,12 +65,12 @@
public static XEntityDataImpl create(String[][] data) {
XEntityDataImpl impl = new XEntityDataImpl();
impl.entityname = data[0][0];
- impl.mandatory = data[0].length > 1 && "yes".equals(data[0][1]);
+ impl.mandatory = data[0].length > 1 && "yes".equals(data[0][1]); //$NON-NLS-1$
impl.attributes = new XAttributeDataImpl[data.length - 1];
for (int i = 0; i < impl.attributes.length; i++) {
impl.attributes[i] = XAttributeDataImpl.create(impl.entityname,
data[i + 1][0],
- (data[i + 1].length > 1 && "yes".equals(data[i + 1][1])));
+ (data[i + 1].length > 1 && "yes".equals(data[i + 1][1]))); //$NON-NLS-1$
}
return impl;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/meta/impl/XAttributeImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -77,7 +77,7 @@
}
public void setDefaultValue(String value) {
- m_DefValue = replace(value, "%cr%", "\n");
+ m_DefValue = replace(value, "%cr%", "\n"); //$NON-NLS-1$//$NON-NLS-2$
}
public boolean isTrimmable() {
@@ -125,7 +125,7 @@
}
public boolean isFake() {
- return "FAKE".equals(m_XMLName);
+ return "FAKE".equals(m_XMLName); //$NON-NLS-1$
}
public void load(Element el){
@@ -144,8 +144,8 @@
setDefaultValue(el.getAttribute(DEFAULT_VALUE));
setXMLName(el.getAttribute(XML_NAME));
loadAdapter(el);
- trimmable = !"no".equals(el.getAttribute("TRIM"));
- copyable = !"no".equals(el.getAttribute("COPYABLE"));
+ trimmable = !"no".equals(el.getAttribute("TRIM")); //$NON-NLS-1$//$NON-NLS-2$
+ copyable = !"no".equals(el.getAttribute("COPYABLE")); //$NON-NLS-1$//$NON-NLS-2$
loadProperties(el);
}
@@ -153,27 +153,27 @@
return getName();
}
- public static final String LOADER = "loader";
+ public static final String LOADER = "loader"; //$NON-NLS-1$
public static final String CONSTRAINT_PREFIX =
- "org.jboss.tools.common.meta.constraint.impl.XAttributeConstraint";
+ "org.jboss.tools.common.meta.constraint.impl.XAttributeConstraint"; //$NON-NLS-1$
public static final String ATTRIBUTE_PREFIX =
- "org.jboss.tools.common.meta.impl.adapters.XAdapter";
+ "org.jboss.tools.common.meta.impl.adapters.XAdapter"; //$NON-NLS-1$
public void loadConstraint(Element element) {
if(element == null) return;
String loader = element.getAttribute(LOADER);
if(!XMetaDataLoader.hasAttribute(element, LOADER) || loader.trim().length() == 0) {
- loader = "";
+ loader = ""; //$NON-NLS-1$
}
- if(loader != null && loader.startsWith("%")) {
- loader = expand(loader, "AttributeConstraints");
+ if(loader != null && loader.startsWith("%")) { //$NON-NLS-1$
+ loader = expand(loader, "AttributeConstraints"); //$NON-NLS-1$
}
constraint.init(loader, element);
}
public void loadAdapter(Element element) {
String loader = element.getAttribute(LOADER);
- if(loader.length() == 0 && getXMLName().length() > 0) loader = "ModelElement";
+ if(loader.length() == 0 && getXMLName().length() > 0) loader = "ModelElement"; //$NON-NLS-1$
adapter.init(this, loader, element);
loadValueListeners(element);
}
@@ -239,7 +239,7 @@
adapter = (XAdapter)ModelFeatureFactory.getInstance().createFeatureInstance(clsname);
}
} catch (ClassCastException e) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadAdapter:" + e.getMessage());
+ ModelPlugin.getPluginLog().logError("XAttributeImpl:loadAdapter:" + e.getMessage()); //$NON-NLS-1$
}
}
if(adapter == null) adapter = new XAdapter();
@@ -287,7 +287,7 @@
constraint = (XAttributeConstraint)ModelFeatureFactory.getInstance().createFeatureInstance(clsname);
}
} catch (ClassCastException e) {
- ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + e.getMessage(), e);
+ ModelPlugin.getPluginLog().logError("XAttributeImpl:loadConstraint:" + e.getMessage(), e); //$NON-NLS-1$
}
if(constraint == null) constraint = new XAttributeConstraintImpl();
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/AbstractXMLFileImpl.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -32,7 +32,7 @@
public final static boolean turnOffDTDCheck = true;
public boolean isIncorrect() {
- return ("yes".equals(get("isIncorrect")));
+ return ("yes".equals(get("isIncorrect"))); //$NON-NLS-1$//$NON-NLS-2$
}
public AbstractXMLFileImpl() {
@@ -67,16 +67,16 @@
for (int i = 0; i < errors.length; i++) {
String er = errors[i];
int q = er.lastIndexOf(':');
- String pos = (q < 0) ? "" : er.substring(q + 1);
+ String pos = (q < 0) ? "" : er.substring(q + 1); //$NON-NLS-1$
if(q >= 0) er = er.substring(0, q);
q = er.lastIndexOf(':');
- String ln = (q < 0) ? "" : er.substring(q + 1), ln1 = ln;
+ String ln = (q < 0) ? "" : er.substring(q + 1), ln1 = ln; //$NON-NLS-1$
if(q >= 0) er = er.substring(0, q);
int iln = -1;
try {
if(q >= 0 && ln1.length() > 0) {
iln = Integer.parseInt(ln1);
- ln1 = "" + (iln - 1);
+ ln1 = "" + (iln - 1); //$NON-NLS-1$
}
} catch (NumberFormatException e) {
ModelPlugin.getPluginLog().logError(e);
@@ -88,17 +88,17 @@
this.errors[i] = ep;
}
String s = sb.toString();
- if(s.equals(get("errors"))) return;
- super.set("incorrectBody", body);
- set("errors", s);
- setAttributeValue("isIncorrect", (errors.length == 0 && loaderError == null) ? "no" : "yes");
+ if(s.equals(get("errors"))) return; //$NON-NLS-1$
+ super.set("incorrectBody", body); //$NON-NLS-1$
+ set("errors", s); //$NON-NLS-1$
+ setAttributeValue("isIncorrect", (errors.length == 0 && loaderError == null) ? "no" : "yes"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
if(!isOverlapped()) markers.update();
}
protected boolean isOverlapped() {
XModelObject p = getParent();
- while(p != null && !"true".equals(p.get("overlapped"))) p = p.getParent();
+ while(p != null && !"true".equals(p.get("overlapped"))) p = p.getParent(); //$NON-NLS-1$ //$NON-NLS-2$
return (p != null);
}
@@ -109,7 +109,7 @@
}
protected String[] getErrors() {
if(!isIncorrect()) return new String[0];
- String es = (String)get("errors");
+ String es = (String)get("errors"); //$NON-NLS-1$
if(es == null || es.length() == 0) return new String[0];
return errors;
}
Added: trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-28 04:47:10 UTC (rev 15574)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/forms/Form.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -175,7 +175,7 @@
public void initialize(Object model) {
this.xmo = (XModelObject)model;
if(xmo == null) {
- ModelUIPlugin.getPluginLog().logInfo( "Error to create form "+formData.getHeader()+". Model object cannot be null.", new IllegalArgumentException("Parameter cannot be null"));
+ ModelUIPlugin.getPluginLog().logInfo( "Error to create form "+formData.getHeader()+". Model object cannot be null.", new IllegalArgumentException("Parameter cannot be null")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return;
}
this.model = xmo.getModel();
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JSPDialogCellEditorContentAssistProcessor.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -75,9 +75,9 @@
ValueHelper valueHelper = new ValueHelper();
WtpKbConnector wtpKbConnector = valueHelper.getPageConnector();
if(wtpKbConnector == null) return;
- Node node = (Node)context.get("node");
- String tagName = "" + context.getProperty("nodeName");
- String attributeName = "" + context.getProperty("attributeName");
+ Node node = (Node)context.get("node"); //$NON-NLS-1$
+ String tagName = "" + context.getProperty("nodeName"); //$NON-NLS-1$ //$NON-NLS-2$
+ String attributeName = "" + context.getProperty("attributeName"); //$NON-NLS-1$ //$NON-NLS-2$
String currentValue = text;
String strippedValue = null;
String matchString = null;
@@ -85,7 +85,7 @@
matchString = currentValue.substring(0, offset);
strippedValue = currentValue;
- String elProposalPrefix = "";
+ String elProposalPrefix = ""; //$NON-NLS-1$
ELParser p = ELParserUtil.getJbossFactory().createParser();
ELModel model = p.parse(matchString);
@@ -144,13 +144,13 @@
}
if(is1 == null || is1.getCloseInstanceToken() == null) {
- replacementString += "}";
+ replacementString += "}"; //$NON-NLS-1$
}
int cursorPosition = kbProposal.getPosition() + cursorPositionDelta;
String displayString = elProposalPrefix == null || elProposalPrefix.length() == 0 ?
kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) :
- elProposalPrefix + kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) + "}" ;
+ elProposalPrefix + kbProposal.getReplacementString().substring(2,kbProposal.getReplacementString().length() - 1) + "}" ; //$NON-NLS-1$
Image image = kbProposal.hasImage() ?
kbProposal.getImage() :
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/CssReferencesComposite.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -19,7 +19,7 @@
public class CssReferencesComposite extends VpeResourceReferencesComposite {
protected String getEntity() {
- return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt";
+ return (file != null) ? "VPECSSReference" : "VPECSSReferenceExt"; //$NON-NLS-1$ //$NON-NLS-2$
}
protected ResourceReferencesTableProvider createTableProvider(List dataList) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java 2009-05-27 23:26:39 UTC (rev 15573)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.resref/src/org/jboss/tools/vpe/resref/core/ElVariablesComposite.java 2009-05-28 04:47:10 UTC (rev 15574)
@@ -34,7 +34,7 @@
*/
@Override
protected String getEntity() {
- return "VPEElReference";
+ return "VPEElReference"; //$NON-NLS-1$
}
/**c
17 years, 1 month
JBoss Tools SVN: r15573 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:26:39 -0400 (Wed, 27 May 2009)
New Revision: 15573
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:24:06 UTC (rev 15572)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:26:39 UTC (rev 15573)
@@ -3,8 +3,8 @@
<name>Test1-ear</name>
<comment></comment>
<projects>
- <project>seamtestproject-ejb</project>
- <project>seamtestproject</project>
+ <project>Test1-ejb</project>
+ <project>Test1</project>
</projects>
<buildSpec>
<buildCommand>
17 years, 1 month
JBoss Tools SVN: r15572 - in trunk/seam/tests/org.jboss.tools.seam.core.test: projects/Test1 and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:24:06 -0400 (Wed, 27 May 2009)
New Revision: 15572
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/META-INF/MANIFEST.MF 2009-05-27 23:24:06 UTC (rev 15572)
@@ -35,5 +35,6 @@
org.eclipse.jst.jsf.core,
org.eclipse.wst.validation,
org.eclipse.jdt.launching,
- org.eclipse.jdt.ui
+ org.eclipse.jdt.ui,
+ org.eclipse.jst.j2ee;bundle-version="1.1.300"
Bundle-Localization: plugin
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -22,10 +22,10 @@
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+ <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
- <nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.jsf.jsfnature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
</natures>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -3,8 +3,8 @@
<name>Test1-ear</name>
<comment></comment>
<projects>
- <project>Test1-ejb</project>
- <project>Test1</project>
+ <project>seamtestproject-ejb</project>
+ <project>seamtestproject</project>
</projects>
<buildSpec>
<buildCommand>
@@ -12,15 +12,9 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
- <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
</natures>
-</projectDescription>
+</projectDescription>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ear/EarContent/META-INF/application.xml 2009-05-27 23:24:06 UTC (rev 15572)
@@ -3,54 +3,23 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"
version="5">
-
+
<display-name>t2</display-name>
-
+
<module>
<web>
<web-uri>Test1.war</web-uri>
<context-root>/Test1</context-root>
</web>
</module>
-
+
<module>
<ejb>Test1-ejb.jar</ejb>
</module>
-
+
<!-- Seam and EL -->
<module>
<java>jboss-seam.jar</java>
</module>
- <!-- jBPM -->
- <module>
- <java>jbpm-3.1.4.jar</java>
- </module>
-
- <!-- Drools and dependencies -->
- <module>
- <java>drools-core-3.0.5.jar</java>
- </module>
- <module>
- <java>drools-compiler-3.0.5.jar</java>
- </module>
- <module>
- <java>janino-2.4.3.jar</java>
- </module>
- <module>
- <java>antlr-2.7.6.jar</java>
- </module>
- <module>
- <java>antlr-3.0ea8.jar</java>
- </module>
- <module>
- <java>commons-jci-core-1.0-406301.jar</java>
- </module>
- <module>
- <java>commons-jci-janino-2.4.3.jar</java>
- </module>
- <module>
- <java>stringtemplate-2.3b6.jar</java>
- </module>
-
-</application>
+</application>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.classpath 2009-05-27 23:24:06 UTC (rev 15572)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="ejbModule"/>
- <classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
+ <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/JBoss 4.2 Runtime"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="build/classes"/>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-27 23:24:06 UTC (rev 15572)
@@ -16,22 +16,22 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
+ <name>org.jboss.tools.seam.core.seambuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.tools.seam.core.seambuilder</name>
+ <name>org.hibernate.eclipse.console.hibernateBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
- <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
+ <nature>org.hibernate.eclipse.console.hibernateNature</nature>
</natures>
-</projectDescription>
+</projectDescription>
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -482,7 +482,7 @@
refreshProject(project);
int number = getMarkersNumber(component12File);
- assertTrue("Problem marker was found in Component12.java", number == 0);
+ assertEquals("Problem marker was found in Component12.java", 0, number);
// Unknown factory name
System.out.println("Test - Unknown factory name");
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -9,6 +9,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
@@ -27,55 +28,52 @@
static IProject ejbProject;
static ISeamProject seamWarProject;
static ISeamProject seamEjbProject;
-
+
public SeamComponentRefactoringTest(){
super("Seam Component Refactoring Test");
}
-
+
protected void setUp() throws Exception {
- if(warProject==null) {
- warProject = ProjectImportTestSetup.loadProject(warProjectName);
- }
- if(seamWarProject==null) {
- seamWarProject = loadSeamProject(warProject);
- }
-
- if(earProject==null) {
- earProject = ProjectImportTestSetup.loadProject(earProjectName);
- }
-
- if(ejbProject==null) {
- ejbProject = ProjectImportTestSetup.loadProject(ejbProjectName);
- }
- if(seamEjbProject==null) {
- seamEjbProject = loadSeamProject(ejbProject);
- }
+ loadProjects();
+ List<IProject> projectList = new ArrayList<IProject>();
+ projectList.add(ejbProject);
+ projectList.add(warProject);
+ J2EEComponentClasspathUpdater.getInstance().forceUpdate(projectList);
+ loadProjects();
}
-
+
+ private void loadProjects() throws Exception {
+ earProject = ProjectImportTestSetup.loadProject(earProjectName);
+ ejbProject = ProjectImportTestSetup.loadProject(ejbProjectName);
+ warProject = ProjectImportTestSetup.loadProject(warProjectName);
+ seamEjbProject = loadSeamProject(ejbProject);
+ seamWarProject = loadSeamProject(warProject);
+ }
+
private ISeamProject loadSeamProject(IProject project) throws CoreException {
JobUtils.waitForIdle();
System.out.println("Project - "+project);
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
assertNotNull("Seam project for " + project.getName() + " is null", seamProject);
-
+
return seamProject;
}
-
+
public void testSeamComponentRename() throws CoreException {
ArrayList<TestChangeStructure> list = new ArrayList<TestChangeStructure>();
-
+
TestChangeStructure structure = new TestChangeStructure(ejbProject.getProject(), "/ejbModule/org/domain/"+warProjectName+"/session/TestComponent.java",
89, 6, "\"best\"");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
1106, 4, "best");
list.add(structure);
structure = new TestChangeStructure(warProject, "/WebContent/WEB-INF/components.xml",
1934, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
420, 11, "@In(\"best\")");
list.add(structure);
@@ -91,26 +89,26 @@
structure = new TestChangeStructure(ejbProject, "/ejbModule/org/domain/"+warProjectName+"/session/TestSeamComponent.java",
589, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(ejbProject, "/ejbModule/seam.properties",
0, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.xhtml",
1088, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.jsp",
227, 4, "best");
list.add(structure);
-
+
structure = new TestChangeStructure(warProject, "/WebContent/test.properties",
29, 4, "best");
list.add(structure);
-
+
renameComponent(seamEjbProject, "test", "best", list);
}
-
+
private void renameComponent(ISeamProject seamProject, String componentName, String newName, List<TestChangeStructure> changeList) throws CoreException{
// Test before renaming
ISeamComponent component = seamProject.getComponent(componentName);
@@ -129,10 +127,10 @@
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
CompositeChange rootChange = (CompositeChange)processor.createChange(new NullProgressMonitor());
-
+
rootChange.perform(new NullProgressMonitor());
JobUtils.waitForIdle();
-
+
// Test results
assertNull(seamProject.getComponent(componentName));
assertNotNull(seamProject.getComponent(newName));
@@ -144,14 +142,14 @@
assertEquals(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
}
}
-
+
class TestChangeStructure{
private IProject project;
private String fileName;
private int offset;
private int length;
private String text;
-
+
public TestChangeStructure(IProject project, String fileName, int offset, int length, String text){
this.project = project;
this.fileName = fileName;
@@ -159,25 +157,25 @@
this.length = length;
this.text = text;
}
-
+
public IProject getProject(){
return project;
}
-
+
public String getFileName(){
return fileName;
}
-
+
public int getOffset(){
return offset;
}
-
+
public int getLength(){
return length;
}
-
+
public String getText(){
return text;
}
}
-}
+}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java 2009-05-27 23:04:09 UTC (rev 15571)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamRefactoringAllTests.java 2009-05-27 23:24:06 UTC (rev 15572)
@@ -28,8 +28,8 @@
new String[]{"RefactoringTestProject-war", "RefactoringTestProject-ejb", "RefactoringTestProject-test"}));
suite.addTest(new ProjectImportTestSetup(new TestSuite(SeamComponentRefactoringTest.class),
"org.jboss.tools.seam.core.test",
- new String[]{"projects/Test1","projects/Test1-ear","projects/Test1-ejb"},
- new String[]{"Test1","Test1-ear","Test1-ejb"}));
+ new String[]{"projects/Test1-ear","projects/Test1-ejb","projects/Test1"},
+ new String[]{"Test1-ear","Test1-ejb","Test1"}));
return suite;
}
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15571 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 19:04:09 -0400 (Wed, 27 May 2009)
New Revision: 15571
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-27 22:40:42 UTC (rev 15570)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/RenameComponentProcessor.java 2009-05-27 23:04:09 UTC (rev 15571)
@@ -146,11 +146,11 @@
SeamCorePlugin.getPluginLog().logError(e);
return;
}
- if(ext.equalsIgnoreCase(JAVA_EXT)){
+ if(JAVA_EXT.equalsIgnoreCase(ext)){
scanJava(file, content);
- } else if(ext.equalsIgnoreCase(XML_EXT) || ext.equalsIgnoreCase(XHTML_EXT) || ext.equalsIgnoreCase(JSP_EXT))
+ } else if(XML_EXT.equalsIgnoreCase(ext) || XHTML_EXT.equalsIgnoreCase(ext) || JSP_EXT.equalsIgnoreCase(ext))
scanDOM(file, content);
- else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
+ else if(PROPERTIES_EXT.equalsIgnoreCase(ext))
scanProperties(file, content);
}
17 years, 1 month
JBoss Tools SVN: r15570 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 18:40:42 -0400 (Wed, 27 May 2009)
New Revision: 15570
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4351
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-27 21:24:00 UTC (rev 15569)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SerializationTest.java 2009-05-27 22:40:42 UTC (rev 15570)
@@ -124,7 +124,7 @@
System.out.print("Reloaded " + components + " components in " + time + " ms");
float timePerComponent = 1f * time / components;
- assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 10.0f);
+ assertTrue("Loading time per component is too large: " + timePerComponent + " ms.", timePerComponent < 20.0f);
}
17 years, 1 month
JBoss Tools SVN: r15569 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-27 17:24:00 -0400 (Wed, 27 May 2009)
New Revision: 15569
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
Removed:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
Log:
support end event attributes (GPD-326)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-27 21:24:00 UTC (rev 15569)
@@ -391,24 +391,38 @@
<propertySection
afterSection="org.jboss.tools.jpdl4.name"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayLanguageSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.language"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.language"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.exclusivegateway.language"
+ afterSection="org.jboss.tools.jpdl4.exclusiveGateway.language"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayExpressionSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.expression"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.expression"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
<propertySection
- afterSection="org.jboss.tools.jpdl4.exclusivegateway.expression"
+ afterSection="org.jboss.tools.jpdl4.exclusiveGateway.expression"
class="org.jboss.tools.flow.jpdl4.properties.ExclusiveGatewayClassNameSection"
- id="org.jboss.tools.jpdl4.exclusivegateway.classname"
+ id="org.jboss.tools.jpdl4.exclusiveGateway.classname"
tab="org.jboss.tools.jpdl4.general">
<input type="org.jboss.tools.flow.jpdl4.model.ExclusiveGateway"/>
</propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.name"
+ class="org.jboss.tools.flow.jpdl4.properties.EndEventEndsSection"
+ id="org.jboss.tools.jpdl4.endEvent.ends"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
+ </propertySection>
+ <propertySection
+ afterSection="org.jboss.tools.jpdl4.endEvent.ends"
+ class="org.jboss.tools.flow.jpdl4.properties.EndEventStateSection"
+ id="org.jboss.tools.jpdl4.endEvent.state"
+ tab="org.jboss.tools.jpdl4.general">
+ <input type="org.jboss.tools.flow.jpdl4.model.TerminateEndEvent"/>
+ </propertySection>
</propertySections>
</extension>
<extension
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -26,6 +26,7 @@
import org.jboss.tools.flow.jpdl4.model.Process;
import org.jboss.tools.flow.jpdl4.model.SubprocessTask;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
import org.jboss.tools.flow.jpdl4.model.Timer;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -99,6 +100,16 @@
}
}
+ class TerminateEndEventAttributeHandler extends NodeAttributeHandler {
+ public void deserializeAttributes(Wrapper wrapper, Element element) {
+ super.deserializeAttributes(wrapper, element);
+ if (!(wrapper.getElement() instanceof TerminateEndEvent)) return;
+ TerminateEndEvent terminateEndEvent = (TerminateEndEvent)wrapper.getElement();
+ terminateEndEvent.setEnds(element.getAttribute("ends"));
+ terminateEndEvent.setState(element.getAttribute("state"));
+ }
+ }
+
class HumanTaskAttributeHandler extends NodeAttributeHandler {
AssignmentAttributeHandler assignmentAttributeHandler = new AssignmentAttributeHandler();
public void deserializeAttributes(Wrapper wrapper, Element element) {
@@ -436,6 +447,8 @@
return new SubprocessTaskAttributeHandler();
} else if (element instanceof ExclusiveGateway) {
return new ExclusiveGatewayAttributeHandler();
+ } else if (element instanceof TerminateEndEvent) {
+ return new TerminateEndEventAttributeHandler();
} else {
return new NodeAttributeHandler();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -335,14 +335,6 @@
result.add("lang");
return result;
}
- protected String getPropertyName(String attributeName) {
- if ("expr".equals(attributeName)) {
- return ExclusiveGateway.EXPR;
- } else if ("repeat".equals(attributeName)) {
- return ExclusiveGateway.LANG;
- }
- return super.getPropertyName(attributeName);
- }
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
ExclusiveGateway exclusiveGateway = (ExclusiveGateway)wrapper.getElement();
String handler = exclusiveGateway.getHandler();
@@ -355,6 +347,15 @@
}
}
+ class TerminateEndEventWrapperSerializer extends ProcessNodeWrapperSerializer {
+ protected List<String> getAttributesToSave() {
+ List<String> result = super.getAttributesToSave();
+ result.add("ends");
+ result.add("state");
+ return result;
+ }
+ }
+
class HumanTaskWrapperSerializer extends ProcessNodeWrapperSerializer {
protected List<String> getAttributesToSave() {
List<String> result = super.getAttributesToSave();
@@ -607,7 +608,7 @@
if (element instanceof SequenceFlow) {
new SequenceFlowWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof TerminateEndEvent) {
- new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
+ new TerminateEndEventWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof ErrorEndEvent) {
new ProcessNodeWrapperSerializer().appendOpening(buffer, wrapper, level);
} else if (element instanceof CancelEndEvent) {
@@ -660,7 +661,7 @@
if (element instanceof SequenceFlow) {
new SequenceFlowWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof TerminateEndEvent) {
- new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
+ new TerminateEndEventWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof ErrorEndEvent) {
new ProcessNodeWrapperSerializer().appendBody(buffer, wrapper, level);
} else if (element instanceof CancelEndEvent) {
Deleted: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 18:02:25 UTC (rev 15568)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -1,6 +0,0 @@
-package org.jboss.tools.flow.jpdl4.model;
-
-
-public class TerminateEndEvent extends EndEvent {
-
-}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,79 @@
+package org.jboss.tools.flow.jpdl4.model;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+
+public class TerminateEndEvent extends EndEvent {
+
+ public final static String ENDS = "ends";
+ public final static String STATE = "state";
+
+ private String ends;
+ private String state;
+
+ public TerminateEndEvent() {
+ setMetaData("propertySource", new PropertySource());
+ }
+
+ public String getEnds() {
+ return ends;
+ }
+
+ public void setEnds(String ends) {
+ this.ends = ends;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ private class PropertySource implements IPropertySource {
+
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[0];
+ }
+
+ public Object getPropertyValue(Object id) {
+ if (ENDS.equals(id)) {
+ return getEnds();
+ } else if (STATE.equals(id)) {
+ return getState();
+ } else {
+ return null;
+ }
+ }
+
+ public boolean isPropertySet(Object id) {
+ if (ENDS.equals(id)) {
+ return getEnds() != null;
+ } else if (STATE.equals(id)) {
+ return getState() != null;
+ } else {
+ return false;
+ }
+ }
+
+ public void resetPropertyValue(Object id) {
+ }
+
+ public void setPropertyValue(Object id, Object value) {
+ if (ENDS.equals(id)) {
+ setEnds((String)value);
+ } else if (STATE.equals(id)) {
+ setState((String)value);
+ }
+ }
+
+ public Object getEditableValue() {
+ return null;
+ }
+
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/model/TerminateEndEvent.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
+
+public class EndEventEndsSection extends TextFieldPropertySection {
+
+ public EndEventEndsSection() {
+ super(TerminateEndEvent.ENDS, "Ends");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventEndsSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java 2009-05-27 21:24:00 UTC (rev 15569)
@@ -0,0 +1,11 @@
+package org.jboss.tools.flow.jpdl4.properties;
+
+import org.jboss.tools.flow.jpdl4.model.TerminateEndEvent;
+
+public class EndEventStateSection extends TextFieldPropertySection {
+
+ public EndEventStateSection() {
+ super(TerminateEndEvent.STATE, "State");
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/properties/EndEventStateSection.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15568 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 14:02:25 -0400 (Wed, 27 May 2009)
New Revision: 15568
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-27 17:08:06 UTC (rev 15567)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-27 18:02:25 UTC (rev 15568)
@@ -81,20 +81,70 @@
* @see org.jboss.tools.jst.web.kb.taglib.TagLibrary#getComponents(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.PageContext)
*/
public IComponent[] getComponents(KbQuery query, IPageContext context) {
- String tagName = null;
+ String prefix = getPrefix(query, context);
+ return getComponents(query, prefix, context);
+ }
+
+ private String getPrefix(KbQuery query, IPageContext context) {
+ String prefix = null;
+ Map<String, INameSpace> nameSpaces = context.getNameSpaces(query.getOffset());
+ if(nameSpaces!=null) {
+ INameSpace nameSpace = nameSpaces.get(getURI());
+ if(nameSpace!=null) {
+ prefix = nameSpace.getPrefix();
+ }
+ }
+ return prefix;
+ }
+
+ private static final IComponent[] EMPTY_ARRAY = new IComponent[0];
+
+ private IComponent[] getComponents(KbQuery query, String prefix, IPageContext context) {
+ String fullTagName = null;
boolean mask = false;
if(query.getType()==KbQuery.Type.TAG_NAME) {
- tagName = query.getValue();
+ fullTagName = query.getValue();
mask = query.isMask();
} else {
- tagName = query.getLastParentTag();
+ fullTagName = query.getLastParentTag();
}
- if(tagName == null) {
+ if(fullTagName == null) {
return null;
}
if(mask) {
- return getComponents(tagName);
+ if(fullTagName.length()==0) {
+ return getComponents();
+ }
+ if(prefix==null) {
+ return getComponents(fullTagName);
+ }
}
+ String tagName = fullTagName;
+ int prefixIndex = fullTagName.indexOf(':');
+ String queryPrefix = null;
+ if(prefix!=null && prefixIndex>-1) {
+ queryPrefix = fullTagName.substring(0, prefixIndex);
+ if(prefixIndex<fullTagName.length()-1) {
+ tagName = fullTagName.substring(prefixIndex+1);
+ } else {
+ tagName = null;
+ }
+ }
+ if(mask) {
+ if(prefixIndex<0) {
+ if(prefix.startsWith(tagName)) {
+ return getComponents();
+ }
+ return EMPTY_ARRAY;
+ }
+ if(prefix.equals(queryPrefix)) {
+ if(tagName == null) {
+ return getComponents();
+ }
+ return getComponents(tagName);
+ }
+ return EMPTY_ARRAY;
+ }
return new IComponent[]{getComponent(tagName)};
}
@@ -173,21 +223,13 @@
attributesInfo.put(URI, s);
}
-
/* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.ProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.PageContext)
*/
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
- String prefix = null;
- Map<String, INameSpace> nameSpaces = context.getNameSpaces(query.getOffset());
- if(nameSpaces!=null) {
- INameSpace nameSpace = nameSpaces.get(getURI());
- if(nameSpace!=null) {
- prefix = nameSpace.getPrefix();
- }
- }
+ String prefix = getPrefix(query, context);
List<TextProposal> proposals = new ArrayList<TextProposal>();
- IComponent[] components = getComponents(query, context);
+ IComponent[] components = getComponents(query, prefix, context);
if(query.getType() == KbQuery.Type.TAG_NAME) {
for (int i = 0; i < components.length; i++) {
TextProposal proposal = new TextProposal();
@@ -296,5 +338,4 @@
protected void loadAttributeValues(Element element) {
setURI(attributesInfo.get(URI));
}
-
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15567 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/refactoring and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-27 13:08:06 -0400 (Wed, 27 May 2009)
New Revision: 15567
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamAbstractHandler.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
Log:
Seam Context Variable Refactoring https://jira.jboss.org/jira/browse/JBIDE-1077
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-05-27 15:57:47 UTC (rev 15566)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2009-05-27 17:08:06 UTC (rev 15567)
@@ -553,6 +553,13 @@
style="push"
tooltip="Rename Seam Component">
</command>
+ <command
+ commandId="org.jboss.tools.seam.ui.refactoring.variable"
+ id="org.jboss.tools.seam.ui.open.component.submenu2"
+ label="Rename Seam Context Variable"
+ style="push"
+ tooltip="Rename Seam Context Variable">
+ </command>
</menu>
</menuContribution>
</extension>
@@ -564,6 +571,11 @@
description="Seam Component Renaming"
name="Seam Component Renaming">
</command>
+ <command
+ id="org.jboss.tools.seam.ui.refactoring.variable"
+ description="Seam Context Variable Renaming"
+ name="Seam Context Variable Renaming">
+ </command>
</extension>
<extension
@@ -571,6 +583,9 @@
<handler
commandId="org.jboss.tools.seam.ui.refactoring.component"
class="org.jboss.tools.seam.ui.refactoring.SeamComponentRenameHandler"/>
+ <handler
+ commandId="org.jboss.tools.seam.ui.refactoring.variable"
+ class="org.jboss.tools.seam.ui.refactoring.SeamContextVariableRenameHandler"/>
</extension>
<extension
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamAbstractHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamAbstractHandler.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamAbstractHandler.java 2009-05-27 17:08:06 UTC (rev 15567)
@@ -0,0 +1,19 @@
+package org.jboss.tools.seam.ui.refactoring;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.jobs.Job;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
+
+public abstract class SeamAbstractHandler extends AbstractHandler {
+ protected static void saveAndBuild(){
+ if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
+ return;
+
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+ }
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamAbstractHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-27 15:57:47 UTC (rev 15566)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-27 17:08:06 UTC (rev 15567)
@@ -12,14 +12,11 @@
import java.util.Set;
-import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
@@ -32,14 +29,13 @@
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.internal.core.refactoring.RenameComponentProcessor;
import org.jboss.tools.seam.internal.core.refactoring.RenameComponentRefactoring;
-import org.jboss.tools.seam.ui.SeamGuiPlugin;
import org.jboss.tools.seam.ui.SeamUIMessages;
import org.jboss.tools.seam.ui.wizard.RenameComponentWizard;
/**
* @author Alexey Kazakov
*/
-public class SeamComponentRenameHandler extends AbstractHandler {
+public class SeamComponentRenameHandler extends SeamAbstractHandler {
/*
* (non-Javadoc)
@@ -94,15 +90,4 @@
// operation was canceled
}
}
-
- private static void saveAndBuild(){
- if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
- return;
-
- try {
- Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
- } catch (InterruptedException e) {
- // do nothing
- }
- }
}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java 2009-05-27 17:08:06 UTC (rev 15567)
@@ -0,0 +1,169 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.refactoring;
+
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.internal.ui.text.FastJavaPartitionScanner;
+import org.eclipse.jdt.ui.text.IJavaPartitions;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.Document;
+import org.eclipse.jface.text.TextSelection;
+import org.eclipse.jface.text.rules.IToken;
+import org.eclipse.jface.text.rules.Token;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMDocument;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.refactoring.RenameComponentProcessor;
+import org.jboss.tools.seam.internal.core.refactoring.RenameComponentRefactoring;
+import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.wizard.RenameComponentWizard;
+
+/**
+ * @author Daniel Azarov
+ */
+public class SeamContextVariableRenameHandler extends SeamAbstractHandler {
+ private static final String JAVA_EXT = "java"; //$NON-NLS-1$
+ private static final String XML_EXT = "xml"; //$NON-NLS-1$
+ private static final String XHTML_EXT = "xhtml"; //$NON-NLS-1$
+ private static final String JSP_EXT = "jsp"; //$NON-NLS-1$
+ private static final String PROPERTIES_EXT = "properties"; //$NON-NLS-1$
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.
+ * ExecutionEvent)
+ */
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IEditorPart editor = HandlerUtil.getActiveEditor(event);
+ Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ saveAndBuild();
+
+ ISelection sel = editor.getEditorSite().getSelectionProvider().getSelection();
+
+ if(sel == null || sel.isEmpty())
+ invokeRenameWizard(null, activeShell);
+
+ if(sel instanceof TextSelection && editor.getEditorInput() instanceof FileEditorInput){
+ TextSelection selection = (TextSelection)sel;
+
+ String text = selection.getText();
+
+ System.out.println("Selection text - "+text);
+
+ FileEditorInput input = (FileEditorInput)editor.getEditorInput();
+
+ IFile file = input.getFile();
+
+ String ext = file.getFileExtension();
+ String content = null;
+ try {
+ content = FileUtil.readStream(file.getContents());
+ } catch (CoreException e) {
+ SeamCorePlugin.getPluginLog().logError(e);
+ return null;
+ }
+ if(ext.equalsIgnoreCase(JAVA_EXT)){
+ findContextVariableInJava(file, content, selection);
+ } else if(ext.equalsIgnoreCase(XML_EXT) || ext.equalsIgnoreCase(XHTML_EXT) || ext.equalsIgnoreCase(JSP_EXT))
+ findContextVariableInDOM(file, content, selection);
+ else if(ext.equalsIgnoreCase(PROPERTIES_EXT))
+ findContextVariableInProperties(file, content, selection);
+ }
+ return null;
+ }
+
+ private void findContextVariableInJava(IFile file, String content, TextSelection selection){
+ try {
+ FastJavaPartitionScanner scaner = new FastJavaPartitionScanner();
+ Document document = new Document(content);
+ scaner.setRange(document, 0, document.getLength());
+ IToken token = scaner.nextToken();
+ while(token!=null && token!=Token.EOF) {
+ if(IJavaPartitions.JAVA_STRING.equals(token.getData())) {
+ int length = scaner.getTokenLength();
+ int offset = scaner.getTokenOffset();
+ String value = document.get(offset, length);
+ if(value.indexOf('{')>-1) {
+ //scanString(file, value, offset);
+ }
+ }
+ token = scaner.nextToken();
+ }
+ } catch (BadLocationException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ }
+ }
+
+ private void findContextVariableInDOM(IFile file, String content, TextSelection selection){
+ IModelManager manager = StructuredModelManager.getModelManager();
+ if(manager == null) {
+ return;
+ }
+ IStructuredModel model = null;
+ try {
+ model = manager.getModelForRead(file);
+ if (model instanceof IDOMModel) {
+ IDOMModel domModel = (IDOMModel) model;
+ IDOMDocument document = domModel.getDocument();
+ //scanChildNodes(file, document);
+ }
+ } catch (CoreException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ } catch (IOException e) {
+ SeamCorePlugin.getDefault().logError(e);
+ } finally {
+ if (model != null) {
+ model.releaseFromRead();
+ }
+ }
+ }
+
+ private void findContextVariableInProperties(IFile file, String content, TextSelection selection){
+
+ }
+
+
+
+ public static void invokeRenameWizard(ISeamComponent component, Shell activeShell) {
+ saveAndBuild();
+
+ RenameComponentProcessor processor = new RenameComponentProcessor(component);
+ RenameComponentRefactoring refactoring = new RenameComponentRefactoring(processor);
+ RenameComponentWizard wizard = new RenameComponentWizard(refactoring, component);
+ RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
+ try {
+ String titleForFailedChecks = SeamUIMessages.SEAM_COMPONENT_RENAME_HANDLER_ERROR;
+ op.run(activeShell, titleForFailedChecks);
+ } catch (final InterruptedException irex) {
+ // operation was canceled
+ }
+ }
+
+
+}
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamContextVariableRenameHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15566 - in trunk/hibernatetools: plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-05-27 11:57:47 -0400 (Wed, 27 May 2009)
New Revision: 15566
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeTreeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeTreeEditPart.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.veditor.test/src/org/jboss/tools/hibernate/ui/veditor/editors/model/test/OrmDiagramTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4361 - refactoring -> javaProject should not be a member of OrmDiagram.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/VisualEditor.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -146,7 +146,7 @@
if (obj instanceof RootClass) {
RootClass rootClass = (RootClass)obj;
setPartName(UIVEditorMessages.VisualEditor_diagram_for + rootClass.getEntityName());
- ormDiagram = new OrmDiagram(configuration, rootClass, objectEditorInput.getJavaProject());
+ ormDiagram = new OrmDiagram(configuration, rootClass);
}
else if (obj instanceof RootClass[]) {
RootClass[] rootClasses = (RootClass[])obj;
@@ -155,7 +155,7 @@
name += " & " + rootClasses[i].getEntityName(); //$NON-NLS-1$
}
setPartName(UIVEditorMessages.VisualEditor_diagram_for + name);
- ormDiagram = new OrmDiagram(configuration, rootClasses, objectEditorInput.getJavaProject());
+ ormDiagram = new OrmDiagram(configuration, rootClasses);
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/OrmDiagram.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -30,6 +30,7 @@
import org.eclipse.jdt.core.IJavaProject;
import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
+import org.hibernate.eclipse.console.utils.ProjectUtils;
import org.hibernate.mapping.Collection;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
@@ -56,20 +57,16 @@
private String childrenLocations[];
private HashMap<String,OrmShape> elements = new HashMap<String,OrmShape>();
private RootClass[] ormElements;
- private Configuration configuration;
- private ConsoleConfiguration consoleConfiguration;
- private IJavaProject javaProject;
+ private ConsoleConfiguration consoleConfig;
private String[] entityNames;
public static final String HIBERNATE_MAPPING_LAYOUT_FOLDER_NAME = "hibernateMapping"; //$NON-NLS-1$
- public OrmDiagram(ConsoleConfiguration configuration, RootClass ioe, IJavaProject javaProject) {
- consoleConfiguration = configuration;
- this.configuration = configuration.getConfiguration();
+ public OrmDiagram(ConsoleConfiguration consoleConfig, RootClass ioe) {
+ this.consoleConfig = consoleConfig;
ormElements = new RootClass[1];
ormElements[0] = ioe;
entityNames = new String[1];
entityNames[0] = ioe.getEntityName();
- this.javaProject = javaProject;
childrenLocations = new String[]{new String("")}; //$NON-NLS-1$
@@ -79,16 +76,14 @@
setDirty(false);
}
- public OrmDiagram(ConsoleConfiguration configuration, RootClass[] ioe, IJavaProject javaProject) {
- consoleConfiguration = configuration;
- this.configuration = configuration.getConfiguration();
+ public OrmDiagram(ConsoleConfiguration consoleConfig, RootClass[] ioe) {
+ this.consoleConfig = consoleConfig;
ormElements = new RootClass[ioe.length];
System.arraycopy(ioe, 0, ormElements, 0, ioe.length);
entityNames = new String[ioe.length];
for (int i = 0; i < ormElements.length; i++) {
entityNames[i] = ormElements[i].getEntityName();
}
- this.javaProject = javaProject;
childrenLocations = new String[]{new String("")}; //$NON-NLS-1$
for (int i = 0; i < ormElements.length; i++) {
getOrCreatePersistentClass(ormElements[i], null);
@@ -100,6 +95,7 @@
public IPath getStoreFolderPath() {
IPath storePath = null;
+ IJavaProject javaProject = ProjectUtils.findJavaProject(consoleConfig);
if (javaProject != null && javaProject.getProject() != null) {
storePath = javaProject.getProject().getLocation();
}
@@ -118,7 +114,7 @@
for (int i = 1; i < ormElements.length; i++) {
name += "_" + ormElements[i].getClassName(); //$NON-NLS-1$
}
- return consoleConfiguration.getName() + "_" + name; //$NON-NLS-1$
+ return consoleConfig.getName() + "_" + name; //$NON-NLS-1$
}
@SuppressWarnings("unchecked")
@@ -139,9 +135,9 @@
public void refresh() {
boolean bRefresh = false;
+ final Configuration config = consoleConfig.getConfiguration();
for (int i = 0; i < ormElements.length; i++) {
- RootClass newOrmElement = (RootClass) consoleConfiguration
- .getConfiguration().getClassMapping(entityNames[i]);
+ RootClass newOrmElement = (RootClass)config.getClassMapping(entityNames[i]);
if (ormElements[i].equals(newOrmElement)) {
continue;
}
@@ -352,7 +348,8 @@
tableShape = elements.get(tableName);
if(tableShape == null) {
tableShape = createShape(databaseTable);
- Iterator iterator = getConfiguration().getClassMappings();
+ final Configuration config = consoleConfig.getConfiguration();
+ Iterator iterator = config.getClassMappings();
while (iterator.hasNext()) {
Object clazz = iterator.next();
if (clazz instanceof RootClass) {
@@ -440,7 +437,8 @@
Type type = ((Property)element).getType();
if (type.isEntityType()) {
EntityType et = (EntityType) type;
- Object clazz = getConfiguration().getClassMapping(et.getAssociatedEntityName());
+ final Configuration config = consoleConfig.getConfiguration();
+ Object clazz = config.getClassMapping(et.getAssociatedEntityName());
if (clazz instanceof RootClass) {
RootClass rootClass = (RootClass)clazz;
s = getOrCreatePersistentClass(rootClass, null);
@@ -469,11 +467,6 @@
public void update(){
firePropertyChange(REFRESH, null, null);
}
-
- protected Configuration getConfiguration() {
- return configuration;
- }
-
@SuppressWarnings("unchecked")
protected void refreshComponentReferences(ComponentShape componentShape) {
@@ -811,11 +804,7 @@
return getState(properties, getKey(shape)+".state"); //$NON-NLS-1$
}
- public IJavaProject getJavaProject() {
- return javaProject;
+ public ConsoleConfiguration getConsoleConfig() {
+ return consoleConfig;
}
-
- public ConsoleConfiguration getConsoleConfiguration() {
- return consoleConfiguration;
- }
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/Shape.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -186,7 +186,7 @@
return ((Property) getOrmElement()).getType().getReturnedClass().getName();
}
else if (getOrmElement() instanceof Column) {
- String type = ormModelNameVisitor.getColumnSqlType((Column) getOrmElement(), getOrmDiagram().getConsoleConfiguration());
+ String type = ormModelNameVisitor.getColumnSqlType((Column) getOrmElement(), getOrmDiagram().getConsoleConfig());
Column column = (Column) getOrmElement();
StringBuffer name = new StringBuffer();
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/model/SpecialOrmShape.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -16,7 +16,6 @@
import org.hibernate.console.execution.ExecutionContext.Command;
import org.hibernate.mapping.Property;
import org.hibernate.mapping.RootClass;
-import org.hibernate.mapping.SimpleValue;
import org.hibernate.type.Type;
import org.jboss.tools.hibernate.ui.veditor.VisualEditorPlugin;
@@ -47,7 +46,7 @@
try {
Type type = null;
if (getOrmDiagram() != null){
- ConsoleConfiguration cfg = getOrmDiagram().getConsoleConfiguration();
+ ConsoleConfiguration cfg = getOrmDiagram().getConsoleConfig();
final Property fField = field;
type = (Type) cfg.execute(new Command(){
public Object execute() {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeTreeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeTreeEditPart.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ExpandeableShapeTreeEditPart.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -62,7 +62,7 @@
Shape model = (Shape) getModel();
Object element = model.getOrmElement();
- ConsoleConfiguration cfg = model.getOrmDiagram().getConsoleConfiguration();
+ ConsoleConfiguration cfg = model.getOrmDiagram().getConsoleConfig();
setWidgetImage(ormLabelProvider.getImage(element));
setWidgetText(ormLabelProvider.getText(element, cfg));
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeEditPart.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -31,7 +31,6 @@
import org.eclipse.gef.editpolicies.SelectionEditPolicy;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
-import org.hibernate.cfg.Configuration;
import org.hibernate.console.ConsoleConfiguration;
import org.hibernate.mapping.Column;
import org.hibernate.mapping.Component;
@@ -39,7 +38,6 @@
import org.hibernate.mapping.OneToMany;
import org.hibernate.mapping.PersistentClass;
import org.hibernate.mapping.Property;
-import org.hibernate.mapping.RootClass;
import org.hibernate.mapping.SimpleValue;
import org.hibernate.mapping.Table;
import org.jboss.tools.hibernate.ui.veditor.editors.figures.TitleFigure;
@@ -48,7 +46,6 @@
import org.jboss.tools.hibernate.ui.veditor.editors.model.ModelElement;
import org.jboss.tools.hibernate.ui.veditor.editors.model.OrmDiagram;
import org.jboss.tools.hibernate.ui.veditor.editors.model.Shape;
-import org.jboss.tools.hibernate.ui.veditor.editors.model.SpecialRootClass;
import org.jboss.tools.hibernate.ui.view.views.OrmLabelProvider;
import org.jboss.tools.hibernate.ui.view.views.OrmModelImageVisitor;
import org.jboss.tools.hibernate.ui.view.views.OrmModelNameVisitor;
@@ -74,7 +71,7 @@
}
ConsoleConfiguration cfg = null;
if (model instanceof OrmDiagram) {
- cfg = ((OrmDiagram) model).getConsoleConfiguration();
+ cfg = ((OrmDiagram) model).getConsoleConfig();
}
label.setText(ormLabelProvider.getText(getElement(), cfg));
label.setBackgroundColor(getColor());
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeTreeEditPart.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeTreeEditPart.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/parts/ShapeTreeEditPart.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -62,7 +62,7 @@
Shape model = (Shape) getModel();
Object element = model.getOrmElement();
- ConsoleConfiguration cfg = model.getOrmDiagram().getConsoleConfiguration();
+ ConsoleConfiguration cfg = model.getOrmDiagram().getConsoleConfig();
setWidgetImage(ormLabelProvider.getImage(element));
setWidgetText(ormLabelProvider.getText(element, cfg));
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/ObjectEditorInput.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.hibernate.ui.view.views;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
@@ -21,16 +20,14 @@
protected Object fObject;
protected ConsoleConfiguration configuration;
- protected IJavaProject javaProject;
public ObjectEditorInput(Object object) {
fObject = object;
}
- public ObjectEditorInput(ConsoleConfiguration configuration, Object object, IJavaProject proj) {
+ public ObjectEditorInput(ConsoleConfiguration configuration, Object object) {
fObject = object;
this.configuration = configuration;
- javaProject = proj;
}
public Object getObject() {
@@ -72,10 +69,6 @@
return configuration;
}
- public IJavaProject getJavaProject() {
- return javaProject;
- }
-
public boolean equals(Object obj) {
return (obj instanceof ObjectEditorInput && ((ObjectEditorInput)obj).fObject == fObject);
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.view/src/org/jboss/tools/hibernate/ui/view/views/OpenDiagramActionDelegate.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -66,12 +66,8 @@
public IEditorPart openEditor(PersistentClass persClass,
ConsoleConfiguration consoleConfiguration) throws PartInitException {
ObjectEditorInput input = hashMap.get(persClass.getRootClass());
-
-
- IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
-
if(input == null) {
- input = new ObjectEditorInput(consoleConfiguration, persClass.getRootClass(), proj);
+ input = new ObjectEditorInput(consoleConfiguration, persClass.getRootClass());
hashMap.put(persClass.getRootClass(), input);
}
@@ -93,12 +89,9 @@
id += "@" + persClass.toString(); //$NON-NLS-1$
rcArr[i++] = persClass.getRootClass();
}
-
ObjectEditorInput input = hashMap.get(id);
- IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
-
if (null == input) {
- input = new ObjectEditorInput(consoleConfiguration, rcArr, proj);
+ input = new ObjectEditorInput(consoleConfiguration, rcArr);
hashMap.put(id, input);
}
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.veditor.test/src/org/jboss/tools/hibernate/ui/veditor/editors/model/test/OrmDiagramTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.veditor.test/src/org/jboss/tools/hibernate/ui/veditor/editors/model/test/OrmDiagramTest.java 2009-05-27 15:51:53 UTC (rev 15565)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.veditor.test/src/org/jboss/tools/hibernate/ui/veditor/editors/model/test/OrmDiagramTest.java 2009-05-27 15:57:47 UTC (rev 15566)
@@ -43,8 +43,7 @@
public void testLoadAndSave() {
- final ConsoleConfiguration consoleConfiguration = context.mock(ConsoleConfiguration.class);
- final Configuration configuration = context.mock(Configuration.class);
+ final ConsoleConfiguration consoleConfig = context.mock(ConsoleConfiguration.class);
final RootClass ioe = context.mock(RootClass.class);
final IJavaProject javaProject = context.mock(IJavaProject.class);
final List<Object> emptyList = new ArrayList<Object>();
@@ -53,9 +52,6 @@
context.checking(new Expectations() {
{
- oneOf(consoleConfiguration).getConfiguration();
- will(returnValue(configuration));
-
oneOf(ioe).getEntityName();
will(returnValue("testEntityName")); //$NON-NLS-1$
@@ -95,14 +91,14 @@
allowing(ioe).getClassName();
will(returnValue("ClassName")); //$NON-NLS-1$
- allowing(consoleConfiguration).getName();
+ allowing(consoleConfig).getName();
will(returnValue("CCName")); //$NON-NLS-1$
allowing(ioe).getEntityName();
will(returnValue("")); //$NON-NLS-1$
}
});
- final OrmDiagram ormDiagram = new OrmDiagram(consoleConfiguration, ioe, javaProject);
+ final OrmDiagram ormDiagram = new OrmDiagram(consoleConfig, ioe);
ormDiagram.save();
// test is the folder created
File folder = new File(ormDiagram.getStoreFolderPath().toOSString());
17 years, 1 month
JBoss Tools SVN: r15565 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-27 11:51:53 -0400 (Wed, 27 May 2009)
New Revision: 15565
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 15:44:49 UTC (rev 15564)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 15:51:53 UTC (rev 15565)
@@ -48,7 +48,7 @@
proposals.add(libProposals[j]);
}
}
- if(query.getType() == KbQuery.Type.ATTRIBUTE_VALUE || query.getType() == KbQuery.Type.TEXT) {
+ if(query.getType() == KbQuery.Type.ATTRIBUTE_VALUE || ((query.getType() == KbQuery.Type.TEXT )&& context instanceof IFaceletPageContext)) {
String value = query.getValue();
//TODO convert value to EL string.
String elString = value;
17 years, 1 month
JBoss Tools SVN: r15564 - in trunk/struts/docs/struts_tools_tutorial/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-27 11:44:49 -0400 (Wed, 27 May 2009)
New Revision: 15564
Modified:
trunk/struts/docs/struts_tools_tutorial/en/images/struts_validation/struts_validation_1.png
trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml
trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-725 -Removed seam runtime warning. Seam guide, 9.1. General Preferences section was updated with the new info about the warnings shown while deleting a runtime that is in use.</p>
</body></html>
Modified: trunk/struts/docs/struts_tools_tutorial/en/images/struts_validation/struts_validation_1.png
===================================================================
(Binary files differ)
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml 2009-05-27 15:43:26 UTC (rev 15563)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/struts_application.xml 2009-05-27 15:44:49 UTC (rev 15564)
@@ -255,19 +255,15 @@
<property>inputname.jsp</property></emphasis> page to the action.</para>
<itemizedlist>
<listitem>
- <para>On the left-hand side of the diagram in the column of icons, click on this
- icon:</para>
+ <para>On the left-hand side of the diagram in the column of icons, click on the Create New Connection
+ icon( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_application/struts_application_1.png"/>
+ </imageobject>
+ </inlinemediaobject>).</para>
</listitem>
</itemizedlist>
- <figure>
- <title>Create New Connection Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts_application/struts_application_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
- <itemizedlist>
+ <itemizedlist>
<listitem>
<para>In the connect-the-components mode you are in now, click on the <emphasis>
<property>/pages/inputname.jsp</property>
@@ -283,18 +279,16 @@
<para>Next, we are going to create a forward for the action.</para>
<itemizedlist>
<listitem>
- <para>On the left-hand side of the diagram in the column of icons, click on this
- icon, again:</para>
+ <para>On the left-hand side of the diagram in the column of icons, click on
+ the Create New Connection
+ icon( <inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/struts_application/struts_application_1.png"/>
+ </imageobject>
+ </inlinemediaobject>), again.</para>
</listitem>
</itemizedlist>
- <figure>
- <title>Create New Connection Icon</title>
- <mediaobject>
- <imageobject>
- <imagedata fileref="images/struts_application/struts_application_1.png"/>
- </imageobject>
- </mediaobject>
- </figure>
+
<itemizedlist>
<listitem>
<para>Click on the <emphasis>
Modified: trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml
===================================================================
--- trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml 2009-05-27 15:43:26 UTC (rev 15563)
+++ trunk/struts/docs/struts_tools_tutorial/en/modules/struts_validation.xml 2009-05-27 15:44:49 UTC (rev 15564)
@@ -116,16 +116,11 @@
<itemizedlist>
<listitem><para>Select<emphasis><property> File > Save </property></emphasis>from the menu bar</para></listitem>
<listitem><para>Start JBoss Application Server by clicking on its icon (a right-pointing arrow) in the toolbar</para></listitem>
-<listitem><para>Click the Run icon or right click your project folder and select <emphasis><property>Run As > Run on Server</property></emphasis></para></listitem>
+ <listitem><para>Click the Run icon(<inlinemediaobject> <imageobject>
+ <imagedata fileref="images/struts_validation/struts_validation_1.png"/>
+ </imageobject></inlinemediaobject>) or right click your project folder and select <emphasis><property>Run As > Run on Server</property></emphasis></para></listitem>
</itemizedlist>
-<figure>
- <title>Run Icon</title>
-<mediaobject>
- <imageobject>
- <imagedata fileref="images/struts_validation/struts_validation_1.png"/>
- </imageobject>
-</mediaobject>
-</figure>
+
<itemizedlist><listitem><para>In the browser window, click on the "Say Hello!" button without having entered any name in the form</para></listitem></itemizedlist>
<para>A JavaScript error message should be displayed in an alert box.</para>
</section>
17 years, 1 month
JBoss Tools SVN: r15563 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-27 11:43:26 -0400 (Wed, 27 May 2009)
New Revision: 15563
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
getProposals() method is fixed: Wrong indexing in adding proposals
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 15:18:22 UTC (rev 15562)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 15:43:26 UTC (rev 15563)
@@ -45,7 +45,7 @@
for (int i = 0; libs != null && i < libs.length; i++) {
TextProposal[] libProposals = libs[i].getProposals(query, context);
for (int j = 0; libProposals != null && j < libProposals.length; j++) {
- proposals.add(libProposals[i]);
+ proposals.add(libProposals[j]);
}
}
if(query.getType() == KbQuery.Type.ATTRIBUTE_VALUE || query.getType() == KbQuery.Type.TEXT) {
17 years, 1 month
JBoss Tools SVN: r15562 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-27 11:18:22 -0400 (Wed, 27 May 2009)
New Revision: 15562
Modified:
trunk/jmx/releng/testing.properties
Log:
comment out core test due to failure
Modified: trunk/jmx/releng/testing.properties
===================================================================
--- trunk/jmx/releng/testing.properties 2009-05-27 15:01:16 UTC (rev 15561)
+++ trunk/jmx/releng/testing.properties 2009-05-27 15:18:22 UTC (rev 15562)
@@ -2,10 +2,10 @@
#csv list of test plugins to run
testPluginsToRun=\
-org.jboss.tools.jmx.core.test,\
org.jboss.tools.jmx.ui.test
+#org.jboss.tools.jmx.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.jmx.core.test.suite=org.jboss.tools.jmx.core.JMXCoreAllTests
-org.jboss.tools.jmx.ui.test.suite=org.jboss.tools.jmx.ui.JMXUIAllTests
\ No newline at end of file
+org.jboss.tools.jmx.ui.test.suite=org.jboss.tools.jmx.ui.JMXUIAllTests
+#org.jboss.tools.jmx.core.test.suite=org.jboss.tools.jmx.core.JMXCoreAllTests
17 years, 1 month
JBoss Tools SVN: r15561 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-05-27 11:01:16 -0400 (Wed, 27 May 2009)
New Revision: 15561
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4384 - enhance "Hibernate Criteria Editor" context assist, when there is no project associated with a console configuration
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2009-05-27 14:29:59 UTC (rev 15560)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/JavaCompletionProcessor.java 2009-05-27 15:01:16 UTC (rev 15561)
@@ -92,26 +92,27 @@
return new ICompletionProposal[0];
}
String prefix = HibernateConsoleMessages.JavaCompletionProcessor_session_session; // has to do this because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=141518
-
- try {
- IJavaProject javaProject = ProjectUtils.findJavaProject( editor.getConsoleConfiguration() );
+
+ IJavaCompletionProposal[] results = new IJavaCompletionProposal[0];
+ IJavaProject[] projects = ProjectUtils.findJavaProjects(editor.getConsoleConfiguration());
+ for (int i = 0; i < projects.length && results.length <= 0; i++) {
+ IJavaProject javaProject = projects[i];
collector = new CompletionProposalCollector( javaProject );
collector.acceptContext( new CompletionContext() );
-
- editor.codeComplete( prefix, collector, position, javaProject );
+ try {
+ editor.codeComplete( prefix, collector, position, javaProject );
+ }
+ catch (JavaModelException x) {
+ Shell shell = viewer.getTextWidget().getShell();
+ ErrorDialog
+ .openError(
+ shell,
+ HibernateConsoleMessages.JavaCompletionProcessor_error, HibernateConsoleMessages.JavaCompletionProcessor_error_while_performing_code_completion, x.getStatus() );
+ HibernateConsolePlugin.getDefault().log( x );
+ }
+ results = collector.getJavaCompletionProposals();
}
- catch (JavaModelException x) {
- Shell shell = viewer.getTextWidget().getShell();
- ErrorDialog
- .openError(
- shell,
- HibernateConsoleMessages.JavaCompletionProcessor_error, HibernateConsoleMessages.JavaCompletionProcessor_error_while_performing_code_completion, x.getStatus() );
- HibernateConsolePlugin.getDefault().log( x );
- }
-
- IJavaCompletionProposal[] results = collector
- .getJavaCompletionProposals();
-
+
Arrays.sort( results, comparator );
CompletionHelper.transpose( null, -prefix.length(), results );
return results;
17 years, 1 month
JBoss Tools SVN: r15560 - in trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context: java and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-05-27 10:29:59 -0400 (Wed, 27 May 2009)
New Revision: 15560
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntity.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3507
Check @GenericGenerator strategy.
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/HibernatePersistenceUnit.java 2009-05-27 14:29:59 UTC (rev 15560)
@@ -92,9 +92,9 @@
*/
static public class LocalMessage extends Message {
- public LocalMessage(String name, int highSeverity, String notAFile,
+ public LocalMessage(String name, int severity, String message,
String[] strings, IResource resource) {
- super(name, highSeverity, notAFile, strings, resource);
+ super(name, severity, message, strings, resource);
}
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.java 2009-05-27 14:29:59 UTC (rev 15560)
@@ -19,5 +19,9 @@
String NOT_A_FILE = "NOT_A_FILE"; //$NON-NLS-1$
String CONFIG_FILE_NOT_FOUND = "CONFIG_FILE_NOT_FOUND"; //$NON-NLS-1$
+
+ String STRATEGY_CLASS_NOT_FOUND = "STRATEGY_CLASS_NOT_FOUND"; //$NON-NLS-1$
+
+ String STRATEGY_CANT_BE_EMPTY = "STRATEGY_CANT_BE_EMPTY"; //$NON-NLS-1$
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/Messages.properties 2009-05-27 14:29:59 UTC (rev 15560)
@@ -1,2 +1,4 @@
NOT_A_FILE= Resource \"{0}\" is not a file.
-CONFIG_FILE_NOT_FOUND = Configuration file named \"{0}\" could not be found.
\ No newline at end of file
+CONFIG_FILE_NOT_FOUND = Configuration file named \"{0}\" could not be found.
+STRATEGY_CLASS_NOT_FOUND = Strategy class \"{0}\" could not be found.
+STRATEGY_CANT_BE_EMPTY = Strategy could not be empty.
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntity.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntity.java 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaEntity.java 2009-05-27 14:29:59 UTC (rev 15560)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.context.java.JavaGenerator;
@@ -20,6 +21,8 @@
import org.eclipse.jpt.core.resource.java.JavaResourcePersistentType;
import org.eclipse.jpt.utility.Filter;
import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
import org.jboss.tools.hibernate.jpt.core.internal.context.basic.Hibernate;
@@ -126,7 +129,22 @@
}
}
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.context.java.AbstractJavaEntity#validate(java.util.List, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
@Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ validateGenericGenerator(messages, reporter, astRoot);
+ }
+
+ protected void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ if (genericGenerator != null){
+ genericGenerator.validate(messages, reporter, astRoot);
+ }
+ }
+
+ @Override
public Iterator<String> javaCompletionProposals(int pos, Filter<String> filter,
CompilationUnit astRoot) {
Iterator<String> result = super.javaCompletionProposals(pos, filter, astRoot);
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernateJavaIdMapping.java 2009-05-27 14:29:59 UTC (rev 15560)
@@ -11,14 +11,19 @@
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
import java.util.Iterator;
+import java.util.List;
+import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.context.java.JavaGenerator;
import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
import org.eclipse.jpt.core.internal.context.java.GenericJavaIdMapping;
import org.eclipse.jpt.utility.internal.iterators.CompositeIterator;
import org.eclipse.jpt.utility.internal.iterators.EmptyIterator;
import org.eclipse.jpt.utility.internal.iterators.SingleElementIterator;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
import org.jboss.tools.hibernate.jpt.core.internal.HibernateJpaFactory;
+import org.logicalcobwebs.cglib.reflect.FastClass.Generator;
/**
* @author Dmitry Geraskov
@@ -123,5 +128,20 @@
}
}
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.context.java.GenericJavaIdMapping#validate(java.util.List, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ validateGenericGenerator(messages, reporter, astRoot);
+ }
+
+ protected void validateGenericGenerator(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ if (genericGenerator != null){
+ genericGenerator.validate(messages, reporter, astRoot);
+ }
+ }
}
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-27 13:57:48 UTC (rev 15559)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/JavaGenericGeneratorImpl.java 2009-05-27 14:29:59 UTC (rev 15560)
@@ -10,23 +10,61 @@
******************************************************************************/
package org.jboss.tools.hibernate.jpt.core.internal.context.java;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.core.context.Generator;
import org.eclipse.jpt.core.context.java.JavaJpaContextNode;
import org.eclipse.jpt.core.internal.context.java.AbstractJavaGenerator;
import org.eclipse.jpt.core.resource.java.GeneratorAnnotation;
import org.eclipse.jpt.core.utility.TextRange;
+import org.eclipse.wst.validation.internal.provisional.core.IMessage;
+import org.eclipse.wst.validation.internal.provisional.core.IReporter;
+import org.hibernate.id.Assigned;
+import org.hibernate.id.ForeignGenerator;
+import org.hibernate.id.GUIDGenerator;
+import org.hibernate.id.IdentityGenerator;
+import org.hibernate.id.IncrementGenerator;
+import org.hibernate.id.SelectGenerator;
+import org.hibernate.id.SequenceGenerator;
+import org.hibernate.id.SequenceHiLoGenerator;
+import org.hibernate.id.SequenceIdentityGenerator;
+import org.hibernate.id.TableHiLoGenerator;
+import org.hibernate.id.UUIDHexGenerator;
+import org.jboss.tools.hibernate.jpt.core.internal.context.Messages;
+import org.jboss.tools.hibernate.jpt.core.internal.context.HibernatePersistenceUnit.LocalMessage;
/**
* @author Dmitry Geraskov
*
*/
public class JavaGenericGeneratorImpl extends AbstractJavaGenerator
- implements JavaGenericGenerator {
+ implements JavaGenericGenerator, Messages {
private String strategy;
protected GeneratorAnnotation generatorResource;
+
+ private static List<String> generatorClasses = new ArrayList<String>();
+
+ //see org.hibernate.id.IdentifierGeneratorFactory.GENERATORS
+ static{
+ generatorClasses.add( "uuid");
+ generatorClasses.add( "hilo");
+ generatorClasses.add( "assigned");
+ generatorClasses.add( "identity");
+ generatorClasses.add( "select");
+ generatorClasses.add( "sequence");
+ generatorClasses.add( "seqhilo");
+ generatorClasses.add( "increment");
+ generatorClasses.add( "foreign");
+ generatorClasses.add( "guid");
+ generatorClasses.add( "uuid.hex");
+ generatorClasses.add( "sequence-identity");
+ }
/**
* @param parent
@@ -117,5 +155,48 @@
protected String getSchema() {
return null;
}
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jpt.core.internal.context.java.AbstractJavaJpaContextNode#validate(java.util.List, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.eclipse.jdt.core.dom.CompilationUnit)
+ */
+ @Override
+ public void validate(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot) {
+ super.validate(messages, reporter, astRoot);
+ validateStrategy(messages, reporter, astRoot);
+ }
+
+ protected void validateStrategy(List<IMessage> messages, IReporter reporter, CompilationUnit astRoot){
+ if (strategy != null){
+ if (strategy.trim().length() == 0){
+ IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
+ STRATEGY_CANT_BE_EMPTY, new String[]{}, getResource());
+ if (getValidationTextRange(astRoot) != null){
+ message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
+ }
+ messages.add(message);
+ } else if (!generatorClasses.contains(strategy)){
+ IType lwType = null;
+ try {
+ lwType = getJpaProject().getJavaProject().findType(strategy);
+ if (lwType == null && strategy.indexOf('.') < 0
+ && astRoot.getPackage() != null){
+ String pack = astRoot.getPackage().getName().getFullyQualifiedName();
+ if (pack != null && pack.length() > 0)
+ lwType = getJpaProject().getJavaProject().findType(pack+'.'+strategy);
+ }
+ } catch (JavaModelException e) {
+ // just ignore it!
+ }
+ if (lwType == null){
+ IMessage message = new LocalMessage(Messages.class.getName(), IMessage.HIGH_SEVERITY,
+ STRATEGY_CLASS_NOT_FOUND, new String[]{strategy}, getResource());
+ if (getValidationTextRange(astRoot) != null){
+ message.setLineNo(getValidationTextRange(astRoot).getLineNumber());
+ }
+ messages.add(message);
+ }
+ }
+ }
+ }
}
17 years, 1 month
JBoss Tools SVN: r15559 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-27 09:57:48 -0400 (Wed, 27 May 2009)
New Revision: 15559
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
NameSpaces calculation is corrected for xmlns-attributes
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-27 13:55:17 UTC (rev 15558)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-27 13:57:48 UTC (rev 15559)
@@ -17,6 +17,7 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMElement;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.jst.web.kb.IFaceletPageContext;
@@ -100,18 +101,24 @@
final String uri = a.getValue();
if (prefix != null && prefix.trim().length() > 0 &&
uri != null && uri.trim().length() > 0) {
+
+ int start = ((IndexedRegion)n).getStartOffset();
+ int length = ((IndexedRegion)n).getLength();
+
+ IDOMElement domElement = (n instanceof IDOMElement ? (IDOMElement)n : null);
+ if (domElement != null) {
+ start = domElement.getStartOffset();
+ length = (domElement.hasEndTag() ?
+ domElement.getEndStructuredDocumentRegion().getEnd() :
+ domElement.getLength());
- // TODO: Check the IRegion instance creation
- IRegion region = new Region(
- ((IndexedRegion)n).getStartOffset(),
- ((IndexedRegion)n).getLength());
-
+ }
+
+ Region region = new Region(start, length);
INameSpace nameSpace = new INameSpace(){
-
public String getURI() {
return uri.trim();
}
-
public String getPrefix() {
return prefix.trim();
}
17 years, 1 month
JBoss Tools SVN: r15558 - in trunk: as/docs/reference/en/modules and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-05-27 09:55:17 -0400 (Wed, 27 May 2009)
New Revision: 15558
Modified:
trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_7.png
trunk/as/docs/reference/en/modules/runtimes_servers.xml
trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_15.png
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-732 -According to the new features of JBoss AS profile docs were updated. </p>
</body></html>
Modified: trunk/as/docs/reference/en/images/runtimes_servers/runtimes_servers_7.png
===================================================================
(Binary files differ)
Modified: trunk/as/docs/reference/en/modules/runtimes_servers.xml
===================================================================
--- trunk/as/docs/reference/en/modules/runtimes_servers.xml 2009-05-27 12:44:53 UTC (rev 15557)
+++ trunk/as/docs/reference/en/modules/runtimes_servers.xml 2009-05-27 13:55:17 UTC (rev 15558)
@@ -160,17 +160,22 @@
wizard allows to create only a new configuration instead.</para>
</entry>
</row>
-
+
<row>
<entry>
+ <para>Directory</para>
+ </entry>
+ <entry>
+ <para>The path to a directory where the configurations are installed.</para>
+ </entry>
+ </row>
+ <row>
+ <entry>
<para>Configuration</para>
</entry>
<entry>
<para>The list of configurations (all, default, minimal) that is updated as soon as
- you browse to a valid runtime installation folder. After the runtime is created
- the configuration becomes an unchanging property of that runtime. To compile
- against a different configuration's jars, you will need to create a new runtime
- from that configuration.</para>
+ you browse to a valid runtime installation folder.</para>
</entry>
</row>
@@ -181,14 +186,74 @@
<para>As a result of having each runtime represent a specific configuration rather than the
server installation as a whole, it is very likely you'll create several different
runtimes to test each of your configurations. It becomes important to ensure your runtimes,
- and later your servers, are given descriptive names that help you remember which is
+ and later your servers, are given descriptive names that help you to remember which is
which.</para>
<para>Press <emphasis>
<property>Finish</property>
- </emphasis> to see your new runtime in the list.</para>
+ </emphasis> to see your new runtime in the list.</para>
+ <note>
+ <title>Note:</title>
+ <para>If you edit the configuration of a runtime, the changes don't affect the settings of the servers that currently use the runtime.
+ To apply the changes to them also,you should double right click the server, <emphasis>
+ <property>Overview>Runtime Environment</property> </emphasis>
+ ,make sure that necessary configuration is chosen,click <emphasis><property>Finish</property> </emphasis> and then <emphasis><property>Save</property></emphasis> button.</para>
+ </note>
</section>
-
+ <section id="CopyRuntime">
+ <title>Copying the existing runtime configuration</title>
+ <para>While installing a new runtime you can copy the configuration from the existing one.
+ To do this you should perform all the steps in the <link linkend="InstNewRuntime">previous</link> section except pressing <emphasis>
+ <property>Finish</property></emphasis>
+ in the New Server Runtime Environment menu .
+ </para>
+ <para>Make sure that you browse to a valid runtime folder and can see the list of configurations (all, default, minimal) in the Configuration section .
+ Then choose necessary Configuration from the list and click <emphasis>
+ <property>Copy</property></emphasis>.The next dialog should appear.
+ </para>
+ <figure>
+ <title>Copy the existing configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_4a.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Change the name Click on <emphasis>
+ <property>Browse</property></emphasis> and select your configuration location or leave as it's if you want it to be located together with other runtime configurations.
+ </para>
+ <figure>
+ <title>Copy the existing configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_4b.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+
+ <para>Click<emphasis>
+ <property> Ok </property></emphasis>and you should see the next wizard with the just added copied configuration.
+
+ </para>
+ <figure>
+ <title>Runtime with copied configuration</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/runtimes_servers/runtimes_servers_4c.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para> Press <emphasis>
+ <property>Finish</property>
+ </emphasis> and you will see your new runtime in the list.
+ </para>
+ <para>You can also change a configuration of existing runtime to a copied one in the same way from the <emphasis>
+ <property> Window > Preferences </property></emphasis>
+ menu <emphasis>
+ <property>Server > Runtime Environments </property></emphasis>
+ and clicking <emphasis>
+ <property>Edit</property></emphasis>.
+ </para>
</section>
<section>
@@ -227,7 +292,7 @@
runtime that matches your needs just press the <emphasis>
<property>Add...</property>
</emphasis> link nearby to bring up the wizard for creating a new runtime (see the <link
- linkend="add_runtime_figure">previous section</link>). To configure the already installed
+ linkend="add_runtime_figure">Installing a New Runtime section</link>). To configure the already installed
runtimes you should go to server preferences that you can easily do by pressing the <emphasis>
<property>Configure runtime environments...</property></emphasis> link.</para>
@@ -268,7 +333,7 @@
<para>We hope, this guide helped you to get started with the JBoss Tools server manager. Besides, for additional information you are welcome on <ulink
url="http://www.jboss.com/index.html?module=bb&op=viewforum&f=201">JBoss forum</ulink>.</para>
</section>
-
+ </section>
</section>
</chapter>
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/manage/manage_15.png
===================================================================
(Binary files differ)
17 years, 1 month
JBoss Tools SVN: r15557 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-27 08:44:53 -0400 (Wed, 27 May 2009)
New Revision: 15557
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
getProposals() method is fixed: Yet another NullPointerException.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 12:33:53 UTC (rev 15556)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-27 12:44:53 UTC (rev 15557)
@@ -44,7 +44,7 @@
ITagLibrary[] libs = context.getLibraries();
for (int i = 0; libs != null && i < libs.length; i++) {
TextProposal[] libProposals = libs[i].getProposals(query, context);
- for (int j = 0; j < libProposals.length; j++) {
+ for (int j = 0; libProposals != null && j < libProposals.length; j++) {
proposals.add(libProposals[i]);
}
}
17 years, 1 month
JBoss Tools SVN: r15556 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-05-27 08:33:53 -0400 (Wed, 27 May 2009)
New Revision: 15556
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4383 - fix for - "Open Source File" doesn't open right source file for class properties which are in the base class
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-05-27 11:05:13 UTC (rev 15555)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-05-27 12:33:53 UTC (rev 15556)
@@ -99,11 +99,13 @@
IJavaProject[] projs = ProjectUtils.findJavaProjects(consoleConfig);
String remainder = null;
IType type = null;
+ IJavaProject proj = null;
if (fullyQualifiedName.indexOf("$") > 0) { //$NON-NLS-1$
remainder = fullyQualifiedName.substring(fullyQualifiedName.indexOf("$") + 1); //$NON-NLS-1$
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$")); //$NON-NLS-1$
for (int i = 0; i < projs.length && type == null; i++) {
- type = projs[i].findType(fullyQualifiedName);
+ proj = projs[i];
+ type = proj.findType(fullyQualifiedName);
}
while ( remainder.indexOf("$") > 0 ){ //$NON-NLS-1$
String subtype = remainder.substring(0, fullyQualifiedName.indexOf("$")); //$NON-NLS-1$
@@ -113,22 +115,45 @@
type = type.getType(remainder);
} else {
for (int i = 0; i < projs.length && type == null; i++) {
- type = projs[i].findType(fullyQualifiedName);
+ proj = projs[i];
+ type = proj.findType(fullyQualifiedName);
}
}
-
+ IJavaElement jElement = null;
+ if (selection instanceof Property){
+ final String selectionName =((Property)selection).getName();
+ final IType typeSave = type;
+ while (true) {
+ jElement = type.getField(selectionName);
+ if (jElement != null && jElement.exists()) {
+ break;
+ }
+ String parentClassName = ProjectUtils.getParentTypename(proj, type.getFullyQualifiedName());
+ if (parentClassName == null) {
+ break;
+ }
+ type = proj.findType(parentClassName);
+ for (int i = 0; i < projs.length && type == null; i++) {
+ proj = projs[i];
+ type = proj.findType(fullyQualifiedName);
+ }
+ if (type == null) {
+ break;
+ }
+ };
+ // do not find element - restore type
+ if (jElement == null || !jElement.exists()) {
+ type = typeSave;
+ }
+ }
+ if (jElement == null) {
+ jElement = type;
+ }
IEditorPart editorPart = JavaUI.openInEditor(type);
if (editorPart instanceof JavaEditor) {
- IJavaElement jElement = null;
- if (selection instanceof Property){
- jElement = type.getField(((Property)selection).getName());
- } else {
- jElement = type;
- }
- JavaEditor jEditor = (JavaEditor) editorPart;
+ JavaEditor jEditor = (JavaEditor)editorPart;
selectionToEditor(jElement, jEditor);
}
-
if (editorPart == null) {
String out = NLS.bind(HibernateConsoleMessages.OpenSourceAction_source_file_for_class_not_found, fullyQualifiedName);
throw new FileNotFoundException(out);
17 years, 1 month
JBoss Tools SVN: r15555 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components: panelMenu and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-05-27 07:05:13 -0400 (Wed, 27 May 2009)
New Revision: 15555
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu/JBIDE3740.xhtml.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4345 Minor. RichFacesAllTests are fixed: tags <BR _MOZ_DIRTY="" TYPE="_moz" /> are removed from the tests.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2009-05-27 11:03:52 UTC (rev 15554)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/columns.xhtml.xml 2009-05-27 11:05:13 UTC (rev 15555)
@@ -26,8 +26,6 @@
<SPAN CLASS="vpe-text">
Cars Available
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
<TR CLASS="dr-table-subheader rich-table-subheader">
@@ -41,7 +39,6 @@
<IMG
SRC="/.*resources/column/sortable.gif/"
STYLE="vertical-align: middle;" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
@@ -58,8 +55,6 @@
<SPAN STYLE="font-style: italic;">
#{model[ind].price}$
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
</TABLE>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu/JBIDE3740.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu/JBIDE3740.xhtml.xml 2009-05-27 11:03:52 UTC (rev 15554)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/panelMenu/JBIDE3740.xhtml.xml 2009-05-27 11:05:13 UTC (rev 15555)
@@ -26,20 +26,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -54,20 +54,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -82,27 +82,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -115,14 +115,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -140,11 +140,11 @@
should be applied for
rich:panelMenuGroup inside rich:panelMenuGroup as for items
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -170,20 +170,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -198,20 +198,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -226,27 +226,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -259,14 +259,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -283,12 +283,10 @@
<SPAN CLASS="vpe-text">
isn't applied correctly
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
<TR STYLE="-moz-user-modify: read-write;">
@@ -315,20 +313,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -343,20 +341,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -371,27 +369,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -404,14 +402,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -436,11 +434,11 @@
<SPAN CLASS="vpe-text">
interaction (it's incorrect, too)
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -468,19 +466,19 @@
<TD>
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
>
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -495,19 +493,19 @@
<TD>
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
>
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -522,26 +520,26 @@
<TD>
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
>
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -554,14 +552,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -591,11 +589,11 @@
change disabled style of a component. Names of groups become black
color again.
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -621,20 +619,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -649,20 +647,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -677,27 +675,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -710,14 +708,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -732,11 +730,11 @@
should work only for rich:panelMenuGroup
inside rich:panelMenuGroup
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -764,20 +762,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -792,20 +790,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -820,27 +818,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -853,14 +851,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -890,11 +888,11 @@
<SPAN CLASS="vpe-text">
interaction
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -925,19 +923,19 @@
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/grid.gif/"
CLASS="rich-pmenu-item-icon rich-pmenu-top-item-icon" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-item-label rich-pmenu-top-item-label">
Item 0.0
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="" CLASS="dr-pmenu-nowrap">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuItem/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -952,20 +950,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -980,20 +978,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1008,27 +1006,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -1041,14 +1039,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -1113,11 +1111,11 @@
doesn't
work correctly, it mustn't be applied for topItems.
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1148,18 +1146,18 @@
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/chevron.gif/"
/>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;" >
Item 0.0
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="" >
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuItem/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1174,19 +1172,19 @@
<TD>
<IMG
SRC="/.*ve/unresolved_image.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
>
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1201,20 +1199,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1229,27 +1227,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -1262,14 +1260,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -1283,11 +1281,11 @@
<SPAN CLASS="vpe-text">
doesn't work.
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1319,18 +1317,18 @@
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/chevron.gif/"
/>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;" >
Item 0.0
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="" >
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuItem/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1345,19 +1343,19 @@
<TD>
<IMG
SRC="/.*ve/unresolved_image.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
>
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1372,20 +1370,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1400,27 +1398,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -1433,14 +1431,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -1455,11 +1453,11 @@
isn't applied correctly for top
groups
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1490,18 +1488,18 @@
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/chevron.gif/"
/>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;" >
Item 0.0
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="" >
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuItem/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1516,18 +1514,18 @@
<TD>
<IMG
SRC="/.*ve/unresolved_image.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;">
Group 1
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD>
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1542,20 +1540,20 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 2
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
@@ -1570,27 +1568,27 @@
CLASS="rich-pmenu-group-self-icon rich-pmenu-top-group-self-icon">
<IMG
SRC="/.*resources/panelMenuGroup/chevronDown.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="width: 100%;"
CLASS="rich-pmenu-top-group-self-label">
Group 3
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD
CLASS="rich-pmenu-top-group-self-icon">
<IMG WIDTH="16" VSPACE="0" HSPACE="0" HEIGHT="16"
SRC="/.*resources/panelMenuGroup/spacer.gif/" />
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD CLASS="cols">
@@ -1603,14 +1601,14 @@
</DIV>
</DIV>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
</TBODY>
</TABLE>
</FORM>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
<TD STYLE="-moz-user-modify: read-write;">
@@ -1625,11 +1623,11 @@
isn't applied correctly for top
groups
</SPAN>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</LI>
</UL>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
+
</TD>
</TR>
17 years, 1 month
JBoss Tools SVN: r15554 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration: editors/uitls and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-05-27 07:03:52 -0400 (Wed, 27 May 2009)
New Revision: 15554
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.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/xsl/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/DuplicatedBeanIDValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
Log:
JBIDE-4232
Add BindTo bean ID into the BeanID Ref context for the content assist
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -47,9 +47,9 @@
*/
@Override
protected boolean isBeanIDRefFieldFeature(EAttribute attribute) {
- if (attribute == FreemarkerPackage.eINSTANCE.getBindTo_Id()) {
- return true;
- }
+// if (attribute == FreemarkerPackage.eINSTANCE.getBindTo_Id()) {
+// return true;
+// }
return super.isBeanIDRefFieldFeature(attribute);
}
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -89,16 +89,16 @@
public String getLabel() {
String name = "";
if(type == BINDINGS){
- name = "Java Object";
+ name = "Bean";
}
if(type == PROPERTIES){
name = "Value Binding";
}
if(type == WIRTINGS){
- name = "Wiring";
+ name = "Bean Binding";
}
if(type == EXPRESSIONS){
- name = "Expression";
+ name = "Expression Binding";
}
if(name.length() != 0 && content != null){
return content + " - ( " + name + " )";
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -33,12 +33,20 @@
private List<BindingsType> bindingsList = null;
- private List<String> bindingsIDList = null;
+ private List<String> bindingsIDList = new ArrayList<String>();
public BindingsContextProposalProvider(SmooksResourceListType listType, Text textControl) {
this.textControl = textControl;
bindingsList = SmooksUIUtils.getBeanIdList(listType);
- bindingsIDList = SmooksUIUtils.getBeanIdStringList(listType);
+ if(bindingsList != null){
+ for (Iterator<?> iterator = bindingsList.iterator(); iterator.hasNext();) {
+ BindingsType bindings = (BindingsType) iterator.next();
+ String beanId = bindings.getBeanId();
+ if(beanId != null){
+ bindingsIDList.add(beanId);
+ }
+ }
+ }
}
/*
@@ -49,9 +57,6 @@
* .lang.String, int)
*/
public IContentProposal[] getProposals(String contents, int position) {
- if (contents.length() == 2) {
- System.out.println();
- }
if (bindingsList == null || bindingsList.isEmpty()) {
return new IContentProposal[] {};
}
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-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -115,14 +115,17 @@
import org.jboss.tools.smooks.configuration.editors.javabean.JavaMethodsSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaPropertiesSelectionDialog;
import org.jboss.tools.smooks.core.SmooksCoreActivator;
+import org.jboss.tools.smooks.model.freemarker.BindTo;
+import org.jboss.tools.smooks.model.freemarker.Freemarker;
+import org.jboss.tools.smooks.model.freemarker.Use;
import org.jboss.tools.smooks.model.graphics.ext.DocumentRoot;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl;
import org.jboss.tools.smooks.model.javabean.BindingsType;
-import org.jboss.tools.smooks.model.javabean.provider.Javabean1EditPlugin;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
import org.jboss.tools.smooks.model.smooks.ConditionType;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
+import org.jboss.tools.smooks.model.xsl.Xsl;
import org.jboss.tools.smooks10.model.smooks.util.SmooksModelUtils;
/**
@@ -167,8 +170,37 @@
String beanId = ((BindingsType) abstractResourceConfig).getBeanId();
if (beanId == null)
continue;
- beanIdList.add(beanId);
+ if (!beanIdList.contains(beanId))
+ beanIdList.add(beanId);
}
+ if (abstractResourceConfig instanceof Freemarker) {
+ Use use = ((Freemarker) abstractResourceConfig).getUse();
+ if (use != null) {
+ BindTo bindTo = use.getBindTo();
+ if (bindTo != null) {
+ String beanId = ((BindTo) bindTo).getId();
+ if (beanId == null)
+ continue;
+ if (!beanIdList.contains(beanId))
+ beanIdList.add(beanId);
+ }
+ }
+
+ }
+ if (abstractResourceConfig instanceof Xsl) {
+ org.jboss.tools.smooks.model.xsl.Use use = ((Xsl) abstractResourceConfig).getUse();
+ if (use != null) {
+ org.jboss.tools.smooks.model.xsl.BindTo bindTo = use.getBindTo();
+ if (bindTo != null) {
+ String beanId = ((org.jboss.tools.smooks.model.xsl.BindTo) bindTo).getId();
+ if (beanId == null)
+ continue;
+ if (!beanIdList.contains(beanId))
+ beanIdList.add(beanId);
+ }
+ }
+
+ }
}
return beanIdList;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -46,9 +46,9 @@
*/
@Override
protected boolean isBeanIDRefFieldFeature(EAttribute attribute) {
- if (attribute == XslPackage.eINSTANCE.getBindTo_Id()) {
- return true;
- }
+// if (attribute == XslPackage.eINSTANCE.getBindTo_Id()) {
+// return true;
+// }
return super.isBeanIDRefFieldFeature(attribute);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/DuplicatedBeanIDValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/DuplicatedBeanIDValidator.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/DuplicatedBeanIDValidator.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -18,8 +18,11 @@
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.EditingDomain;
+import org.jboss.tools.smooks.model.freemarker.BindTo;
+import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
import org.jboss.tools.smooks.model.javabean.BindingsType;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
+import org.jboss.tools.smooks.model.xsl.XslPackage;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -39,7 +42,7 @@
@Override
public List<Diagnostic> validate(Collection<?> selectedObjects, EditingDomain editingDomain) {
beanIdList.clear();
- findDuplicatedBeanId(selectedObjects);
+ findDuplicatedBeanId(selectedObjects , new ArrayList<String>());
if(beanIdList.isEmpty()){
return null;
}
@@ -66,14 +69,29 @@
}
continue;
}
+ if (object instanceof BindTo) {
+ String beanId = ((BindTo) object).getId();
+ if(isDuplicateBeanId(beanId)){
+ list.add(newWaringDiagnostic("Duplicated beanId : " + beanId, object,
+ FreemarkerPackage.Literals.BIND_TO__ID));
+ }
+ continue;
+ }
+ if (object instanceof org.jboss.tools.smooks.model.xsl.BindTo) {
+ String beanId = ((org.jboss.tools.smooks.model.xsl.BindTo) object).getId();
+ if(isDuplicateBeanId(beanId)){
+ list.add(newWaringDiagnostic("Duplicated beanId : " + beanId, object,
+ XslPackage.Literals.BIND_TO__ID));
+ }
+ continue;
+ }
if (object instanceof EObject) {
validateModel(((EObject) object).eContents() , list);
}
}
}
- protected void findDuplicatedBeanId(Collection<?> selectedObjects) {
- List<String> idlist = new ArrayList<String>();
+ protected void findDuplicatedBeanId(Collection<?> selectedObjects , List<String> idlist) {
for (Iterator<?> iterator = selectedObjects.iterator(); iterator.hasNext();) {
Object object = (Object) iterator.next();
if (object instanceof BindingsType) {
@@ -90,8 +108,36 @@
}
continue;
}
+ if(object instanceof BindTo){
+ String beanId = ((BindTo) object).getId();
+ if (beanId != null) {
+ beanId = beanId.trim();
+ }
+ if (idlist.contains(beanId)) {
+ if (!beanIdList.contains(beanId)) {
+ beanIdList.add(beanId);
+ }
+ } else {
+ idlist.add(beanId);
+ }
+ continue;
+ }
+ if(object instanceof org.jboss.tools.smooks.model.xsl.BindTo){
+ String beanId = ((org.jboss.tools.smooks.model.xsl.BindTo) object).getId();
+ if (beanId != null) {
+ beanId = beanId.trim();
+ }
+ if (idlist.contains(beanId)) {
+ if (!beanIdList.contains(beanId)) {
+ beanIdList.add(beanId);
+ }
+ } else {
+ idlist.add(beanId);
+ }
+ continue;
+ }
if (object instanceof EObject) {
- findDuplicatedBeanId(((EObject) object).eContents());
+ findDuplicatedBeanId(((EObject) object).eContents(),idlist);
}
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-05-27 10:53:38 UTC (rev 15553)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/wizards/SmooksConfigurationFileNewWizard.java 2009-05-27 11:03:52 UTC (rev 15554)
@@ -183,9 +183,9 @@
if (SmooksConstants.VERSION_1_1.equals(version)) {
contents = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" //$NON-NLS-1$
+ "<smooks-resource-list xmlns=\"http://www.milyn.org/xsd/smooks-1.1.xsd\">\n"//$NON-NLS-1$
- + " <resource-config selector=\"global-parameters\">\n"//$NON-NLS-1$
+ + " <params>\n"//$NON-NLS-1$
+ " <param name=\"stream.filter.type\">SAX</param>\n"//$NON-NLS-1$
- + " </resource-config>\n"//$NON-NLS-1$
+ + " </params>\n"//$NON-NLS-1$
+ "</smooks-resource-list>"; //$NON-NLS-1$
}
return new ByteArrayInputStream(contents.getBytes());
17 years, 1 month
JBoss Tools SVN: r15553 - in trunk/hibernatetools: plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2009-05-27 06:53:38 -0400 (Wed, 27 May 2009)
New Revision: 15553
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4363 - fix for - "Open Source File" breaks when there are no project associated with a console configuration
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenMappingAction.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -64,7 +64,7 @@
TreePath path = paths[i];
ConsoleConfiguration consoleConfig = (ConsoleConfiguration)(path.getSegment(0));
try {
- run(path, consoleConfig);
+ run(consoleConfig, path);
} catch (JavaModelException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenMappingAction_cannot_find_mapping_file, e);
} catch (PartInitException e) {
@@ -83,7 +83,8 @@
* @throws JavaModelException
* @throws FileNotFoundException
*/
- public static IEditorPart run(TreePath path, ConsoleConfiguration consoleConfig) throws PartInitException, JavaModelException, FileNotFoundException {
+ public static IEditorPart run(ConsoleConfiguration consoleConfig, TreePath path)
+ throws PartInitException, JavaModelException, FileNotFoundException {
boolean isPropertySel = (path.getLastSegment().getClass() == Property.class);
if (isPropertySel) {
Property propertySel = (Property)path.getLastSegment();
@@ -92,21 +93,21 @@
|| (RootClass.class.isAssignableFrom(persClass.getClass())
&& persClass.getClass() != RootClass.class)) {
Property parentProp = (Property)path.getParentPath().getLastSegment();
- return run(propertySel, parentProp, consoleConfig);
+ return run(consoleConfig, propertySel, parentProp);
}
}
- return run(path.getLastSegment(), consoleConfig);
+ return run(consoleConfig, path.getLastSegment());
}
/**
- * @param selection
* @param consoleConfig
+ * @param selection
* @throws JavaModelException
* @throws PartInitException
* @throws PresistanceClassNotFoundException
* @throws FileNotFoundException
*/
- public static IEditorPart run(Object selection, ConsoleConfiguration consoleConfig) throws PartInitException, JavaModelException, FileNotFoundException {
+ public static IEditorPart run(ConsoleConfiguration consoleConfig, Object selection) throws PartInitException, JavaModelException, FileNotFoundException {
IEditorPart editorPart = null;
IFile file = null;
if (selection instanceof Property) {
@@ -140,9 +141,7 @@
if (rootClass != null){
if (OpenMappingUtils.hasConfigXMLMappingClassAnnotation(consoleConfig, rootClass)) {
String fullyQualifiedName = rootClass.getClassName();
- // TODO: get rid of this - JBIDE-4363
- IJavaProject proj = ProjectUtils.findJavaProject(consoleConfig);
- editorPart = OpenSourceAction.run(selection, proj, fullyQualifiedName);
+ editorPart = OpenSourceAction.run(consoleConfig, selection, fullyQualifiedName);
}
}
else {
@@ -154,15 +153,16 @@
}
/**
+ * @param consoleConfig
* @param compositeProperty
* @param parentProperty
- * @param consoleConfig
* @throws JavaModelException
* @throws PartInitException
* @throws FileNotFoundException
* @throws BadLocationException
*/
- public static IEditorPart run(Property compositeProperty, Property parentProperty, ConsoleConfiguration consoleConfig) throws PartInitException, JavaModelException, FileNotFoundException{
+ public static IEditorPart run(ConsoleConfiguration consoleConfig, Property compositeProperty, Property parentProperty)
+ throws PartInitException, JavaModelException, FileNotFoundException {
PersistentClass rootClass = parentProperty.getPersistentClass();
IFile file = OpenMappingUtils.searchFileToOpen(consoleConfig, rootClass);
IEditorPart editorPart = null;
@@ -173,9 +173,7 @@
if (editorPart == null && parentProperty.isComposite()) {
if (OpenMappingUtils.hasConfigXMLMappingClassAnnotation(consoleConfig, rootClass)) {
String fullyQualifiedName =((Component)parentProperty.getValue()).getComponentClassName();
- // TODO: get rid of this - JBIDE-4363
- IJavaProject proj = ProjectUtils.findJavaProject(consoleConfig);
- editorPart = OpenSourceAction.run(compositeProperty, proj, fullyQualifiedName);
+ editorPart = OpenSourceAction.run(consoleConfig, compositeProperty, fullyQualifiedName);
}
}
if (editorPart == null) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/actions/OpenSourceAction.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -51,56 +51,60 @@
public void run() {
IStructuredSelection sel = getStructuredSelection();
- if (sel instanceof TreeSelection){
- for (int i = 0; i < ((TreeSelection)sel).getPaths().length; i++) {
- TreePath path = ((TreeSelection)sel).getPaths()[i];
- Object lastSegment = path.getLastSegment();
- PersistentClass persClass = getPersistentClass(lastSegment);
- ConsoleConfiguration consoleConfiguration = (ConsoleConfiguration)(path.getSegment(0));
- IJavaProject proj = ProjectUtils.findJavaProject(consoleConfiguration);
+ if (!(sel instanceof TreeSelection)) {
+ return;
+ }
+ TreePath[] paths = ((TreeSelection)sel).getPaths();
+ for (int i = 0; i < paths.length; i++) {
+ TreePath path = paths[i];
+ Object lastSegment = path.getLastSegment();
+ PersistentClass persClass = getPersistentClass(lastSegment);
+ ConsoleConfiguration consoleConfig = (ConsoleConfiguration)(path.getSegment(0));
- String fullyQualifiedName = null;
- if (lastSegment instanceof Property){
- Object prevSegment = path.getParentPath().getLastSegment();
- if (prevSegment instanceof Property
- && ((Property)prevSegment).isComposite()){
- fullyQualifiedName =((Component)((Property) prevSegment).getValue()).getComponentClassName();
- }
+ String fullyQualifiedName = null;
+ if (lastSegment instanceof Property){
+ Object prevSegment = path.getParentPath().getLastSegment();
+ if (prevSegment instanceof Property
+ && ((Property)prevSegment).isComposite()){
+ fullyQualifiedName =((Component)((Property) prevSegment).getValue()).getComponentClassName();
}
- if (fullyQualifiedName == null && persClass != null){
- fullyQualifiedName = persClass.getClassName();
- }
+ }
+ if (fullyQualifiedName == null && persClass != null){
+ fullyQualifiedName = persClass.getClassName();
+ }
- try {
- run(lastSegment, proj, fullyQualifiedName);
- } catch (JavaModelException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_find_source_file, e);
- } catch (PartInitException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_open_source_file, e);
- } catch (FileNotFoundException e) {
- HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_find_source_file, e);
- }
+ try {
+ run(consoleConfig, lastSegment, fullyQualifiedName);
+ } catch (JavaModelException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_find_source_file, e);
+ } catch (PartInitException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_open_source_file, e);
+ } catch (FileNotFoundException e) {
+ HibernateConsolePlugin.getDefault().logErrorMessage(HibernateConsoleMessages.OpenSourceAction_cannot_find_source_file, e);
}
}
}
/**
+ * @param consoleConfig
* @param selection
- * @param proj
* @param fullyQualifiedName
* @throws JavaModelException
* @throws PartInitException
* @throws FileNotFoundException
*/
- public static IEditorPart run(Object selection, IJavaProject proj,
+ public static IEditorPart run(ConsoleConfiguration consoleConfig, Object selection,
String fullyQualifiedName) throws JavaModelException, PartInitException, FileNotFoundException {
if (fullyQualifiedName == null) return null;
+ IJavaProject[] projs = ProjectUtils.findJavaProjects(consoleConfig);
String remainder = null;
IType type = null;
if (fullyQualifiedName.indexOf("$") > 0) { //$NON-NLS-1$
remainder = fullyQualifiedName.substring(fullyQualifiedName.indexOf("$") + 1); //$NON-NLS-1$
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$")); //$NON-NLS-1$
- type = proj.findType(fullyQualifiedName);
+ for (int i = 0; i < projs.length && type == null; i++) {
+ type = projs[i].findType(fullyQualifiedName);
+ }
while ( remainder.indexOf("$") > 0 ){ //$NON-NLS-1$
String subtype = remainder.substring(0, fullyQualifiedName.indexOf("$")); //$NON-NLS-1$
type = type.getType(subtype);
@@ -108,7 +112,9 @@
}
type = type.getType(remainder);
} else {
- type = proj.findType(fullyQualifiedName);
+ for (int i = 0; i < projs.length && type == null; i++) {
+ type = projs[i].findType(fullyQualifiedName);
+ }
}
IEditorPart editorPart = JavaUI.openInEditor(type);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/KnownConfigurationsView.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -183,10 +183,10 @@
TreePath[] paths = ((TreeSelection)selection).getPaths();
TreePath path = paths[0];
Object last = path.getLastSegment();
- ConsoleConfiguration consoleConfiguration = (ConsoleConfiguration)(path.getSegment(0));
+ ConsoleConfiguration consoleConfig = (ConsoleConfiguration)(path.getSegment(0));
if (last instanceof PersistentClass || last.getClass() == Property.class){
try {
- OpenMappingAction.run(path, consoleConfiguration);
+ OpenMappingAction.run(consoleConfig, path);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage("Can't find mapping file.", e); //$NON-NLS-1$
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenMappingAction.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -43,9 +43,7 @@
public void run() {
ObjectEditorInput objectEditorInput = (ObjectEditorInput)((VisualEditor)getWorkbenchPart()).getEditorInput();
- ConsoleConfiguration consoleConfiguration = objectEditorInput.getConfiguration();
- //java.io.File configXMLFile = consoleConfiguration.getPreferences().getConfigXMLFile();
- //IJavaProject proj = objectEditorInput.getJavaProject();
+ ConsoleConfiguration consoleConfig = objectEditorInput.getConfiguration();
VisualEditor part = (VisualEditor)getWorkbenchPart();
Set selectedElements = part.getSelectedElements();
@@ -58,7 +56,7 @@
Property compositSel = ((Property)selection);
Property parentProperty = ((SpecialRootClass)((Property)selection).getPersistentClass()).getProperty();
try {
- org.hibernate.eclipse.console.actions.OpenMappingAction.run(compositSel, parentProperty, consoleConfiguration);
+ org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, compositSel, parentProperty);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(UIVEditorMessages.OpenMappingAction_canot_find_or_open_mapping_file, e);
} catch (JavaModelException e) {
@@ -72,7 +70,7 @@
selection = ((SpecialRootClass)selection).getProperty();
}
try {
- org.hibernate.eclipse.console.actions.OpenMappingAction.run(selection, consoleConfiguration);
+ org.hibernate.eclipse.console.actions.OpenMappingAction.run(consoleConfig, selection);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(UIVEditorMessages.OpenMappingAction_open_mapping_file, e);
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.ui.veditor/src/org/jboss/tools/hibernate/ui/veditor/editors/actions/OpenSourceAction.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -6,7 +6,6 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.gef.ui.actions.SelectionAction;
-import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
@@ -35,8 +34,7 @@
public void run() {
ObjectEditorInput objectEditorInput = (ObjectEditorInput)((VisualEditor)getWorkbenchPart()).getEditorInput();
- ConsoleConfiguration consoleConfiguration = objectEditorInput.getConfiguration();
- IJavaProject proj = objectEditorInput.getJavaProject();
+ ConsoleConfiguration consoleConfig = objectEditorInput.getConfiguration();
VisualEditor part = (VisualEditor)getWorkbenchPart();
Set selectedElements = part.getSelectedElements();
@@ -58,7 +56,7 @@
fullyQualifiedName = fullyQualifiedName.substring(0, fullyQualifiedName.indexOf("$"));
}*/
try {
- new org.hibernate.eclipse.console.actions.OpenSourceAction().run(selection, proj, fullyQualifiedName);
+ new org.hibernate.eclipse.console.actions.OpenSourceAction().run(consoleConfig, selection, fullyQualifiedName);
} catch (PartInitException e) {
HibernateConsolePlugin.getDefault().logErrorMessage(UIVEditorMessages.OpenSourceAction_canot_open_source_file, e);
} catch (JavaModelException e) {
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenMappingFileTest.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -85,7 +85,7 @@
IEditorPart editor = null;
Throwable ex = null;
try {
- editor = OpenMappingAction.run(compositeProperty, parentProperty, consCFG);
+ editor = OpenMappingAction.run(consCFG, compositeProperty, parentProperty);
boolean highlighted = ProjectUtil.checkHighlighting(editor);
if (!highlighted) {
String out = NLS.bind(ConsoleTestMessages.OpenMappingFileTest_highlighted_region_for_property_is_empty_package,
@@ -118,7 +118,7 @@
IEditorPart editor = null;
Throwable ex = null;
try {
- editor = OpenMappingAction.run(selection, consCFG);
+ editor = OpenMappingAction.run(consCFG, selection);
boolean highlighted = ProjectUtil.checkHighlighting(editor);
if (!highlighted) {
String out = NLS.bind(ConsoleTestMessages.OpenMappingFileTest_highlighted_region_for_is_empty_package,
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2009-05-27 10:23:40 UTC (rev 15552)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.console.test/src/org/hibernate/eclipse/console/test/mappingproject/OpenSourceFileTest.java 2009-05-27 10:53:38 UTC (rev 15553)
@@ -91,8 +91,7 @@
IEditorPart editor = null;
Throwable ex = null;
try {
- editor = OpenSourceAction.run(selection, MappingTestProject.getTestProject().getIJavaProject(),
- fullyQualifiedName);
+ editor = OpenSourceAction.run(consCFG, selection, fullyQualifiedName);
boolean highlighted = ProjectUtil.checkHighlighting(editor);
if (!highlighted) {
String out = NLS.bind(ConsoleTestMessages.OpenSourceFileTest_highlighted_region_for_is_empty, selection);
17 years, 1 month
JBoss Tools SVN: r15552 - in trunk/jst/plugins: org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-05-27 06:23:40 -0400 (Wed, 27 May 2009)
New Revision: 15552
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4370
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-27 09:40:38 UTC (rev 15551)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/AbstractCSSDialog.java 2009-05-27 10:23:40 UTC (rev 15552)
@@ -186,7 +186,7 @@
} else {
setPreviewContent(text);
}
-
+
browser.setText(generateBrowserPage());
previewText.setVisible(false);
browser.setVisible(true);
@@ -209,11 +209,11 @@
}
protected void handleStatusChanged(IStatus newStatus) {
- if (newStatus.isOK() && !status.isOK())
+ if (newStatus.isOK() && !status.isOK()) {
setErrorMessage(null);
- else if (newStatus.getSeverity() == IStatus.ERROR)
+ } else if (newStatus.getSeverity() == IStatus.ERROR) {
setErrorMessage(newStatus.getMessage());
-
+ }
if (newStatus.getSeverity() != status.getSeverity()) {
getButton(OK).setEnabled(newStatus.isOK());
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-27 09:40:38 UTC (rev 15551)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-27 10:23:40 UTC (rev 15552)
@@ -307,6 +307,7 @@
cssModel.setFile(file);
cssModel.reinit();
preview.reinit(cssModel);
+ getStyleComposite().clearStyleComposite();
updateControlPane();
}
@@ -360,4 +361,17 @@
applyButton.setEnabled(false);
}
+
+ protected Button getApplyButton() {
+ return applyButton;
+ }
+
+ protected Button getAddNewClassButton() {
+ return addNewClassButton;
+ }
+
+ protected Combo getClassCombo() {
+ return classCombo;
+ }
+
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2009-05-27 09:40:38 UTC (rev 15551)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/css/NewCSSClassWizard.java 2009-05-27 10:23:40 UTC (rev 15552)
@@ -189,6 +189,7 @@
selection) {
protected void handleStatusChanged(
IStatus newStatus) {
+
if (newStatus.isOK()
&& !getStatus().isOK()) {
NewCSSClassWizardPage.this
@@ -201,6 +202,26 @@
canFinish = false;
}
+ if (newStatus.getSeverity() != getStatus()
+ .getSeverity()) {
+ if (!getApplyButton().isDisposed()) {
+ getApplyButton().setEnabled(
+ newStatus.isOK());
+ }
+ if (!getClassCombo().isDisposed()) {
+ getClassCombo().setEnabled(
+ newStatus.isOK());
+ }
+ if (!getAddNewClassButton()
+ .isDisposed()) {
+ getAddNewClassButton()
+ .setEnabled(newStatus
+ .isOK());
+ }
+ }
+ if (getContainer() != null) {
+ getContainer().updateButtons();
+ }
setStatus(newStatus);
};
};
@@ -220,7 +241,6 @@
setControl(container);
}
-
}
}
17 years, 1 month
JBoss Tools SVN: r15551 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/provider and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-05-27 05:40:38 -0400 (Wed, 27 May 2009)
New Revision: 15551
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/provider/BindToItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/xsl/provider/BindToItemProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
Log:
JBIDE-4232
Modify some treeitem text
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-27 09:04:09 UTC (rev 15550)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-27 09:40:38 UTC (rev 15551)
@@ -96,7 +96,7 @@
_UI_SetOffType_type = Set Off
_UI_SetOnType_type = Set On
_UI_SmooksResourceListType_type = Resource List
-_UI_BindTo_id_feature = Id
+_UI_BindTo_id_feature = Bean Id
_UI_DocumentRoot_freemarker_feature = Freemarker
_UI_Freemarker_template_feature = Template
_UI_Freemarker_use_feature = Use
@@ -180,11 +180,11 @@
_UI_InlineDirective_replace_literal = replace
_UI_InlineDirective_insertbefore_literal = insertbefore
_UI_InlineDirective_insertafter_literal = insertafter
-_UI_BindingsType_type = Java Object
+_UI_BindingsType_type = Bean
_UI_DecodeParamType_type = Decode Param
-_UI_ExpressionType_type = Expression
+_UI_ExpressionType_type = Expression Binding
_UI_ValueType_type = Value Binding
-_UI_WiringType_type = Wiring
+_UI_WiringType_type = Bean Binding
_UI_BindingsType_group_feature = Group
_UI_BindingsType_value_feature = Value
_UI_BindingsType_wiring_feature = Wiring
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/provider/BindToItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/provider/BindToItemProvider.java 2009-05-27 09:04:09 UTC (rev 15550)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/freemarker/provider/BindToItemProvider.java 2009-05-27 09:40:38 UTC (rev 15551)
@@ -111,7 +111,7 @@
String label = ((BindTo)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_BindTo_type") :
- getString("_UI_BindTo_type") + " " + label;
+ getString("_UI_BindTo_type") + " (" + label+")";
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/xsl/provider/BindToItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/xsl/provider/BindToItemProvider.java 2009-05-27 09:04:09 UTC (rev 15550)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/xsl/provider/BindToItemProvider.java 2009-05-27 09:40:38 UTC (rev 15551)
@@ -111,7 +111,7 @@
String label = ((BindTo)object).getId();
return label == null || label.length() == 0 ?
getString("_UI_BindTo_type") :
- getString("_UI_BindTo_type") + " " + label;
+ getString("_UI_BindTo_type") + " (" + label + ")";
}
/**
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-05-27 09:04:09 UTC (rev 15550)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/BindToUICreator.java 2009-05-27 09:40:38 UTC (rev 15551)
@@ -42,4 +42,14 @@
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.PropertyUICreator#isBeanIDRefFieldFeature(org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ protected boolean isBeanIDRefFieldFeature(EAttribute attribute) {
+ if (attribute == FreemarkerPackage.eINSTANCE.getBindTo_Id()) {
+ return true;
+ }
+ return super.isBeanIDRefFieldFeature(attribute);
+ }
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-05-27 09:04:09 UTC (rev 15550)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/xsl/BindToUICreator.java 2009-05-27 09:40:38 UTC (rev 15551)
@@ -41,4 +41,17 @@
return super.createPropertyUI(toolkit, parent, propertyDescriptor, model, feature, formEditor);
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.smooks.configuration.editors.PropertyUICreator#isBeanIDRefFieldFeature(org.eclipse.emf.ecore.EAttribute)
+ */
+ @Override
+ protected boolean isBeanIDRefFieldFeature(EAttribute attribute) {
+ if (attribute == XslPackage.eINSTANCE.getBindTo_Id()) {
+ return true;
+ }
+ return super.isBeanIDRefFieldFeature(attribute);
+ }
+
+
+
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15550 - trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-05-27 05:04:09 -0400 (Wed, 27 May 2009)
New Revision: 15550
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/insert.xhtml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4373, JUnits for openOn mechanism were added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/insert.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/templates/insert.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
17 years, 1 month
JBoss Tools SVN: r15549 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test: src/org/jboss/tools/jsf/vpe/jsf/test/jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-05-27 05:02:30 -0400 (Wed, 27 May 2009)
New Revision: 15549
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/a4j-include.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/c-import.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/import.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-directive-include-relative.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include-relative.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/s-decorate.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-decorate.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-define.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-include-relative.xhtml
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4373, JUnits for openOn mechanism were added.
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/a4j-include.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/a4j-include.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/c-import.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/c-import.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/import.html
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/import.html (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/import.html 2009-05-27 09:02:30 UTC (rev 15549)
@@ -0,0 +1,9 @@
+<html>
+<body>
+<ol>
+<li> first </li>
+<li> second </li>
+<li> third </li>
+</ol>
+</body>
+</html>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/import.html
___________________________________________________________________
Name: svn:mime-type
+ text/html
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-directive-include-relative.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-directive-include-relative.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-directive-include-relative.jsp 2009-05-27 09:02:30 UTC (rev 15549)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+ <jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8" />
+ <![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
+ <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">]]>
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>jsp:directive.include test with relative path</title>
+ </head>
+ <body>
+ <h1>jsp:directive.include test with relative path</h1>
+ <jsp:directive.include file="./jsp-include.jsp"/>
+ </body>
+ </html>
+</jsp:root>
+
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-directive-include-relative.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include-relative.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include-relative.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include-relative.jsp 2009-05-27 09:02:30 UTC (rev 15549)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
+ <jsp:directive.page contentType="application/xhtml+xml; charset=UTF-8" />
+ <![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]>
+ <![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">]]>
+ <html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <title>jsp:include test with relative path</title>
+ </head>
+ <body>
+ <h1>jsp:include test with relative path</h1>
+ <jsp:include page="./jsp-include.jsp"/>
+ </body>
+ </html>
+</jsp:root>
+
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include-relative.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include.jsp 2009-05-27 09:02:30 UTC (rev 15549)
@@ -0,0 +1,6 @@
+<div>
+jsp-include
+<jsp:expression>
+ new java.util.Date()
+</jsp:expression>
+</div>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/jsp-include.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/s-decorate.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/s-decorate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-decorate.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-decorate.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-define.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-define.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-include-relative.xhtml
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/customFaceletsTestProject/WebContent/pages/ui-include-relative.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java 2009-05-27 08:13:55 UTC (rev 15548)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE4373Test.java 2009-05-27 09:02:30 UTC (rev 15549)
@@ -79,6 +79,8 @@
}
/**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in facelets' ui:composition template (VpeCompositionTemplate).
*
* @throws CoreException
*/
@@ -91,4 +93,129 @@
IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertEquals("facelets.taglib.xml file should be opened","common.xhtml", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
}
+
+ /**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in facelets' ui:decorate template (VpeDecorateTemplate).
+ *
+ * @throws CoreException
+ */
+ public void testOpenOnForUiDecorate() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "ui-decorate.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 11, 33);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/templates/insert.xhtml file should be opened","insert.xhtml", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in facelets' ui:define template (VpeDefineTemplate).
+ *
+ * @throws CoreException
+ */
+ public void testOpenOnForUiDefine() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "ui-define.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 6, 40);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/templates/insert.xhtml file should be opened","insert.xhtml", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in JSTL's c:import template (JstlImportTemplate).
+ *
+ * @throws CoreException
+ */
+ public void _testOpenOnForCImport() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "c-import.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 12, 25);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("import.html file should be opened","import.html", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeDefineContainerTemplate
+ * in Seam's s:decorate template (SeamDecorateTemplate).
+ *
+ * @throws CoreException
+ */
+ public void testOpenOnForSDecorate() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "s-decorate.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 11, 33);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/templates/insert.xhtml file should be opened","insert.xhtml", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeIncludeTemplate in ajax4jsf a4j:include.
+ *
+ * @throws CoreException
+ */
+ public void testOpenOnForA4JInclude() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "a4j-include.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 15, 55);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/pages/import.html file should be opened","import.html", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeIncludeTemplate in facelets' ui:include.
+ *
+ * @throws CoreException
+ */
+ public void testOpenOnForUiInclude() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "ui-include-relative.xhtml"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 13, 27);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("/pages/import.html file should be opened","import.html", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeIncludeTemplate in jsp's jsp:directive.include.
+ *
+ * @throws CoreException
+ */
+ public void _testOpenOnForJspDirectiveInclude() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "jsp-directive-include-relative.jsp"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 13, 46);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("jsp-include.jsp file should be opened","jsp-include.jsp", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * Test openOn mechanism for VpeIncludeTemplate in jsp's jsp:include.
+ *
+ * @throws CoreException
+ */
+ public void _testOpenOnForJspInclude() throws CoreException {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_CUSTOM_FACELETS_PROJECT, "jsp-include-relative.jsp"); //$NON-NLS-1$
+ int position = TestUtil.getLinePositionOffcet(vpeController.getSourceEditor().getTextViewer(), 13, 36);
+ Node sourceNode = SelectionUtil.getNodeBySourcePosition(vpeController.getSourceEditor(), position);
+ nsIDOMNode domNode = vpeController.getDomMapping().getNearVisualNode(sourceNode);
+ vpeController.getSourceBuilder().openOn(domNode);
+ IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ assertEquals("jsp-include.jsp file should be opened","jsp-include.jsp", activeEditor.getEditorInput().getName()); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
}
17 years, 1 month
JBoss Tools SVN: r15548 - in branches/jbosstools-3.0.x: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-05-27 04:13:55 -0400 (Wed, 27 May 2009)
New Revision: 15548
Added:
branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/
branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml
branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java
Modified:
branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
branches/jbosstools-3.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3969, fix applied to branch
Added: branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml
===================================================================
--- branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml (rev 0)
+++ branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml 2009-05-27 08:13:55 UTC (rev 15548)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:composition template="">
+<h:selectOneMenu value="#{test.test}">
+<div>a<div>t</div></div>
+</h:selectOneMenu>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-27 06:43:21 UTC (rev 15547)
+++ branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-27 08:13:55 UTC (rev 15548)
@@ -53,6 +53,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3632Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3650Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3734Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3969Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE788Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE924Test;
@@ -131,6 +132,7 @@
suite.addTestSuite(JBIDE3482Test.class);
suite.addTestSuite(JBIDE3632Test.class);
suite.addTestSuite(JBIDE3650Test.class);
+ suite.addTestSuite(JBIDE3969Test.class);
// $JUnit-END$
// added by Max Areshkau
Added: branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java
===================================================================
--- branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java (rev 0)
+++ branches/jbosstools-3.0.x/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java 2009-05-27 08:13:55 UTC (rev 15548)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE3969Test extends VpeTest{
+
+ public JBIDE3969Test(String name) {
+ super(name);
+ }
+
+ public void testCorrectCustomElements() throws Throwable {
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath("JBIDE/3969/jbide3969.xhtml",
+ JsfAllTests.IMPORT_PROJECT_NAME);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ checkSourceSelection(part);
+
+ // check exception
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+}
Modified: branches/jbosstools-3.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- branches/jbosstools-3.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-27 06:43:21 UTC (rev 15547)
+++ branches/jbosstools-3.0.x/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-27 08:13:55 UTC (rev 15548)
@@ -383,7 +383,7 @@
}else {
getIFlasher().setColor(flasherHiddentElementColor);
}
- getIFlasher().drawElementOutline(element);
+ drawElementOutline(element);
}else {
getIFlasher().setColor(flasherHiddentElementColor);
@@ -391,7 +391,7 @@
if(domElement!=null) {
- getIFlasher().drawElementOutline(domElement);
+ drawElementOutline(domElement);
}
}
@@ -548,17 +548,17 @@
getIFlasher().setColor(flasherHiddentElementColor);
}
- getIFlasher().drawElementOutline(getLastSelectedElement());
+ drawElementOutline(getLastSelectedElement());
}else {
getIFlasher().setColor(flasherHiddentElementColor);
nsIDOMElement domElement = findVisbleParentElement(getLastSelectedElement());
if(domElement!=null) {
- getIFlasher().drawElementOutline(domElement);
+ drawElementOutline(domElement);
}
}
- } else if(getIFlasher()!=null&&Platform.getOSArch().equals(Platform.OS_MACOSX)){
+ } else if(getIFlasher()!=null&&Platform.OS_MACOSX.equals(Platform.getOS())){
//Max Areshkau (bug on Mac OS X, when we switch to preview from other view, selection rectangle doesn't disappear
//TODO Max Areshkau (may be exist passability not draw selection on resize event when we switches to other view)
try {
@@ -641,6 +641,34 @@
return null;
}
+ /**
+ * Decorator
+ * @author mareshkau
+ * @param domElement arround which border will be shown
+ *
+ */
+ private void drawElementOutline(nsIDOMElement domElement) {
+ //fix for JBIDE-3969
+ if(Platform.OS_MACOSX.equals(Platform.getOS())&&hasSelectInParenNodes(domElement.getParentNode())) {
+ return;
+ }
+ getIFlasher().drawElementOutline(domElement);
+ }
+ /**
+ * Checks if node has select in parent node, if has it's cause crash
+ * on OSX and xulrunner 1.8.1.3
+ * @param domElement
+ * @return
+ */
+ private boolean hasSelectInParenNodes(nsIDOMNode domNode){
+ if(domNode==null) {
+ return false;
+ }else if("select".equalsIgnoreCase(domNode.getNodeName())){
+ return true;
+ } else {
+ return hasSelectInParenNodes(domNode.getParentNode());
+ }
+ }
}
17 years, 1 month
JBoss Tools SVN: r15547 - in trunk/common/plugins: org.jboss.tools.common.gef/.settings and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-05-27 02:43:21 -0400 (Wed, 27 May 2009)
New Revision: 15547
Added:
trunk/common/plugins/org.jboss.tools.common.gef/.settings/
trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties
trunk/common/plugins/org.jboss.tools.common.kb/.settings/
trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added: trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.gef/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:43:21 UTC (rev 15547)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -80,11 +80,11 @@
protected static final int PALETTE_MIN_SIZE = 23;
- private static final QualifiedName PALETTE_SIZE_KEY = new QualifiedName("",
- "palette_size");
+ private static final QualifiedName PALETTE_SIZE_KEY = new QualifiedName("", //$NON-NLS-1$
+ "palette_size"); //$NON-NLS-1$
- private static final QualifiedName ZOOM_SIZE_KEY = new QualifiedName("",
- "zoom_size");
+ private static final QualifiedName ZOOM_SIZE_KEY = new QualifiedName("", //$NON-NLS-1$
+ "zoom_size"); //$NON-NLS-1$
protected int lastPaletteLayout = -1;
@@ -460,7 +460,7 @@
return;
}
try {
- String s = "" + fixedSise;
+ String s = "" + fixedSise; //$NON-NLS-1$
file.setPersistentProperty(PALETTE_SIZE_KEY, s);
} catch (CoreException e) {
CommonPlugin.getPluginLog().logError(e);
@@ -492,7 +492,7 @@
return;
}
try {
- String s = "" + zoom;
+ String s = "" + zoom; //$NON-NLS-1$
file.setPersistentProperty(ZOOM_SIZE_KEY, s);
} catch (CoreException e) {
CommonPlugin.getPluginLog().logError(e);
Added: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/Messages.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -0,0 +1,19 @@
+package org.jboss.tools.common.gef;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.gef.messages"; //$NON-NLS-1$
+ public static String DefaultPaletteCustomizer_ErrorMessage;
+ public static String DiagramCopyAction_AcceleratorText;
+ public static String DiagramCutAction_AcceleratorText;
+ public static String DiagramPasteAction_AcceleratorText;
+ public static String PrintRetargetAction_Name;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/ActionRegistrySupport.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -79,7 +79,7 @@
}
public void contributeGEFToToolBar(IToolBarManager tbm) {
- tbm.add(getAction("Print_Diagram"));
+ tbm.add(getAction(PrintRetargetAction.ACTION_ID));
tbm.add(new Separator());
tbm.add(getAction(GEFActionConstants.ALIGN_LEFT));
tbm.add(getAction(GEFActionConstants.ALIGN_CENTER));
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCopyAction.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -15,6 +15,7 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.gef.internal.GEFMessages;
+import org.jboss.tools.common.gef.Messages;
/**
@@ -43,7 +44,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_COPY_DISABLED));
- setAccelerator(convertAccelerator("CTRL+C"));
+ setAccelerator(convertAccelerator(Messages.DiagramCopyAction_AcceleratorText));
setEnabled(false);
}
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramCutAction.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -14,6 +14,7 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
+import org.jboss.tools.common.gef.Messages;
public abstract class DiagramCutAction extends DiagramSelectionAction {
@@ -38,7 +39,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_CUT_DISABLED));
- setAccelerator(convertAccelerator("CTRL+X"));
+ setAccelerator(convertAccelerator(Messages.DiagramCutAction_AcceleratorText));
setEnabled(false);
}
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/DiagramPasteAction.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -15,6 +15,7 @@
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.internal.WorkbenchImages;
import org.eclipse.gef.internal.GEFMessages;
+import org.jboss.tools.common.gef.Messages;
/**
* An action to delete selected objects.
@@ -43,7 +44,7 @@
setDisabledImageDescriptor(
WorkbenchImages.getImageDescriptor(
ISharedImages.IMG_TOOL_PASTE_DISABLED));
- setAccelerator(convertAccelerator("CTRL+V"));
+ setAccelerator(convertAccelerator(Messages.DiagramPasteAction_AcceleratorText));
setEnabled(false);
}
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/action/PrintRetargetAction.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -13,15 +13,18 @@
import org.eclipse.jface.resource.ImageDescriptor;
+import org.jboss.tools.common.gef.Messages;
public class PrintRetargetAction extends RetargetAction{
+ static final String ACTION_ID = "Print_Diagram"; //$NON-NLS-1$
+
public PrintRetargetAction() {
- super("Print_Diagram","Print Diagram");
- setToolTipText("Print Diagram");
- setImageDescriptor(ImageDescriptor.createFromFile(getClass(), "icons/print.gif"));
+ super(ACTION_ID,Messages.PrintRetargetAction_Name);
+ setToolTipText(Messages.PrintRetargetAction_Name);
+ setImageDescriptor(ImageDescriptor.createFromFile(getClass(), "icons/print.gif")); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/editor/xpl/DefaultPaletteCustomizer.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -17,6 +17,7 @@
import org.eclipse.gef.ui.palette.customize.DefaultEntryPage;
import org.eclipse.gef.ui.palette.customize.DrawerEntryPage;
import org.eclipse.gef.ui.palette.customize.EntryPage;
+import org.jboss.tools.common.gef.Messages;
/**
*
@@ -25,7 +26,7 @@
*/
public class DefaultPaletteCustomizer extends PaletteCustomizer {
- protected static final String ERROR_MESSAGE = "Error";
+ protected static final String ERROR_MESSAGE = Messages.DefaultPaletteCustomizer_ErrorMessage;
/**
* @see org.eclipse.gef.ui.palette.PaletteCustomizer#getPropertiesPage(PaletteEntry)
Added: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/messages.properties 2009-05-27 06:43:21 UTC (rev 15547)
@@ -0,0 +1,5 @@
+DefaultPaletteCustomizer_ErrorMessage=Error
+DiagramCopyAction_AcceleratorText=CTRL+C
+DiagramCutAction_AcceleratorText=CTRL+X
+DiagramPasteAction_AcceleratorText=CTRL+V
+PrintRetargetAction_Name=Print Diagram
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/outline/xpl/DiagramContentOutlinePage.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -41,8 +41,8 @@
public class DiagramContentOutlinePage extends ContentOutlinePage implements IAdaptable {
//Warning: these icons may be moved from xpl!
- private static String OUTLINE_ICON_PATH = "outline.gif";
- private static String OVERVIEW_ICON_PATH = "overview.gif";
+ private static String OUTLINE_ICON_PATH = "outline.gif"; //$NON-NLS-1$
+ private static String OVERVIEW_ICON_PATH = "overview.gif"; //$NON-NLS-1$
private org.eclipse.ui.views.contentoutline.ContentOutlinePage poutline;
private GraphicalViewer graphicalViewer;
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/xpl/GEFSplitter.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -25,7 +25,7 @@
private static final int SASH_WIDTH = 5;
private static final int FIXED_DRAG_MINIMUM = 62;
private static final int OTHER_DRAG_MINIMUM = 0;
- private static final String MAINTAIN_SIZE = "maintain size";
+ private static final String MAINTAIN_SIZE = "maintain size"; //$NON-NLS-1$
private int fixedSize = 150;
private int fixedDragMinimum;
Added: trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.kb/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:43:21 UTC (rev 15547)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDinamicResource.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -19,19 +19,19 @@
*/
public interface KbDinamicResource extends KbResource {
- String BUNDLE_PROPERTY_TYPE = "bundleProperty";
- String BEAN_PROPERTY_TYPE = "beanProperty";
- String BEAN_METHOD_BY_SYGNATURE_TYPE = "beanMethodBySignature";
- String JSP_PATH_TYPE = "jspPath";
- String BUNDLE_NAME_TYPE = "bundleName";
- String VIEW_ACTIONS_TYPE = "viewActions";
- String IMAGE_FILE_TYPE = "file";
- String ENUMERATION_TYPE = "enumeration";
- String JSF_VARIABLES_TYPE = "jsfVariables";
- String FACELETS_JSFC_TYPE = "faceletsJsfCTags";
- String MANAGED_BEAN_NAME_TYPE = "managedBeanName";
- String JSF_ID = "jsfID";
- String TAGLIB_TYPE = "taglib";
+ String BUNDLE_PROPERTY_TYPE = "bundleProperty"; //$NON-NLS-1$
+ String BEAN_PROPERTY_TYPE = "beanProperty"; //$NON-NLS-1$
+ String BEAN_METHOD_BY_SYGNATURE_TYPE = "beanMethodBySignature"; //$NON-NLS-1$
+ String JSP_PATH_TYPE = "jspPath"; //$NON-NLS-1$
+ String BUNDLE_NAME_TYPE = "bundleName"; //$NON-NLS-1$
+ String VIEW_ACTIONS_TYPE = "viewActions"; //$NON-NLS-1$
+ String IMAGE_FILE_TYPE = "file"; //$NON-NLS-1$
+ String ENUMERATION_TYPE = "enumeration"; //$NON-NLS-1$
+ String JSF_VARIABLES_TYPE = "jsfVariables"; //$NON-NLS-1$
+ String FACELETS_JSFC_TYPE = "faceletsJsfCTags"; //$NON-NLS-1$
+ String MANAGED_BEAN_NAME_TYPE = "managedBeanName"; //$NON-NLS-1$
+ String JSF_ID = "jsfID"; //$NON-NLS-1$
+ String TAGLIB_TYPE = "taglib"; //$NON-NLS-1$
/**
* Sets a parameter for resource.
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbDocumentBuilderFactory.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -31,7 +31,7 @@
try {
return new DocumentBuilderCreator().createDocumentBuilder(validating);
} catch (InterruptedException t) {
- KbPlugin.getPluginLog().logError("Cannot create document builder.", t);
+ KbPlugin.getPluginLog().logError("Cannot create document builder.", t); //$NON-NLS-1$
return null;
}
}
@@ -58,8 +58,8 @@
if(!validate) {
documentBuilder.setEntityResolver(new EntityResolver() {
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException {
- if((systemId != null) && systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD
- return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
+ if((systemId != null) && systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD //$NON-NLS-1$
+ return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
} else {
return null;
}
@@ -67,7 +67,7 @@
});
}
} catch (ParserConfigurationException t) {
- KbPlugin.getPluginLog().logError("Document builder creation failed.", t);
+ KbPlugin.getPluginLog().logError("Document builder creation failed.", t); //$NON-NLS-1$
}
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbHtmlStore.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -127,7 +127,7 @@
String strQuery = cleanQuery(query);
if(strQuery == null) {
- String errorMessage = "ERROR: Bad query: \"" + query.getQuery() + "\". Query must starts with \"" + KbQuery.TAG_SEPARATOR + "\"";
+ String errorMessage = "ERROR: Bad query: \"" + query.getQuery() + "\". Query must starts with \"" + KbQuery.TAG_SEPARATOR + "\""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// KbPlugin.log(errorMessage);
throw new IllegalArgumentException(errorMessage);
}
@@ -138,7 +138,7 @@
int lastTagSeparator = strQuery.lastIndexOf(KbQuery.TAG_SEPARATOR);
String firstTag = null;
- String tagMask = "";
+ String tagMask = ""; //$NON-NLS-1$
if(lastTagSeparator > firstTagSeparator) {
firstTag = strQuery.substring(firstTagSeparator + KbQuery.TAG_SEPARATOR.length(), lastTagSeparator);
if(lastTagSeparator + KbQuery.TAG_SEPARATOR.length() < strQuery.length()) {
@@ -237,18 +237,18 @@
private KbProposal getEndTagProposal(KbQuery kbQuery) {
String query = kbQuery.getQuery();
- String mask = "";
+ String mask = ""; //$NON-NLS-1$
int lastSeparator = query.lastIndexOf(KbQuery.TAG_SEPARATOR);
if((lastSeparator!=-1)&&(lastSeparator + KbQuery.TAG_SEPARATOR.length()<query.length())) {
mask = query.substring(lastSeparator + KbQuery.TAG_SEPARATOR.length());
}
String lastTag = kbQuery.getLastTag();
- if((lastTag != null)&&(((mask.indexOf(KbQuery.DONT_FILTER_END_TAG_CHAR)!=-1)&&(KbQuery.DONT_FILTER_END_TAG_CHAR + lastTag).startsWith(mask))||(mask.equals("")))) {
+ if((lastTag != null)&&(((mask.indexOf(KbQuery.DONT_FILTER_END_TAG_CHAR)!=-1)&&(KbQuery.DONT_FILTER_END_TAG_CHAR + lastTag).startsWith(mask))||(mask.equals("")))) { //$NON-NLS-1$
if(checkNonRefusedEndTag(lastTag)) {
KbProposal proposal = new KbProposal();
- proposal.setLabel("/" + lastTag);
- proposal.setReplacementString("/" + lastTag);
+ proposal.setLabel("/" + lastTag); //$NON-NLS-1$
+ proposal.setReplacementString("/" + lastTag); //$NON-NLS-1$
return proposal;
}
}
@@ -338,7 +338,7 @@
String tagName = tagMask.substring(0, startAttributeName);
startAttributeName+=KbQuery.ATTRIBUTE_SEPARATOR.length();
if(startAttributeName == tagMask.length()) {
- return getAttributes(tagName, "");
+ return getAttributes(tagName, ""); //$NON-NLS-1$
}
int startAttributeValue = tagMask.indexOf(KbQuery.ENUMERATION_SEPARATOR);
@@ -349,15 +349,15 @@
String attributeName = tagMask.substring(startAttributeName, startAttributeValue);
startAttributeValue+=KbQuery.ENUMERATION_SEPARATOR.length();
if(startAttributeValue == tagMask.length()) {
- return getEnumeration(tagName, attributeName, "");
+ return getEnumeration(tagName, attributeName, ""); //$NON-NLS-1$
}
return getEnumeration(tagName, attributeName, KbQuery.decode(tagMask.substring(startAttributeValue)));
}
private synchronized boolean activateHtmlSchema() {
- String ERR_CANNNOT_LOAD_SCHEME = "Can't load HTML schema ''{0}''"; //$NON-NLS-N$
- String ERR_EXCEPTION_DURING_PARSING = "Exception happend during parsing ''{0}''"; //$NON-NLS-N$
+ String ERR_CANNNOT_LOAD_SCHEME = "Can't load HTML schema ''{0}''"; //$NON-NLS-1$
+ String ERR_EXCEPTION_DURING_PARSING = "Exception happend during parsing ''{0}''"; //$NON-NLS-1$
if(htmlSchemaIsActivating()) {
return false;
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbPlugin.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -29,7 +29,7 @@
*/
public class KbPlugin extends BaseUIPlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.common.kb";
+ public static final String PLUGIN_ID = "org.jboss.tools.common.kb"; //$NON-NLS-1$
private File location;
// The shared instance
@@ -38,7 +38,7 @@
// A Map to save a descriptor for each image
private HashMap fImageDescRegistry = null;
- public static final String CA_ENUMERATION_IMAGE_PATH = "images/ca/icons_Enumeration.gif";
+ public static final String CA_ENUMERATION_IMAGE_PATH = "images/ca/icons_Enumeration.gif"; //$NON-NLS-1$
public KbPlugin() {
}
@@ -61,7 +61,7 @@
if(!isLocationSet) {
try {
isLocationSet = true;
- location = new File(FileLocator.resolve(KbPlugin.getDefault().getBundle().getEntry("/")).getPath());
+ location = new File(FileLocator.resolve(KbPlugin.getDefault().getBundle().getEntry("/")).getPath()); //$NON-NLS-1$
} catch (IOException e) {
getPluginLog().logError(e);
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbProposal.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -192,7 +192,7 @@
* @return
*/
public boolean isCloseTag() {
- return label != null && label.startsWith("/");
+ return label != null && label.startsWith("/"); //$NON-NLS-1$
}
/**
@@ -200,11 +200,11 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("label: ");
+ buffer.append("label: "); //$NON-NLS-1$
buffer.append(label);
- buffer.append("\ncontextInfo: ");
+ buffer.append("\ncontextInfo: "); //$NON-NLS-1$
buffer.append(contextInfo);
- buffer.append("\nreplacementString: ");
+ buffer.append("\nreplacementString: "); //$NON-NLS-1$
buffer.append(replacementString);
return buffer.toString();
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbQuery.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -21,17 +21,17 @@
*/
public class KbQuery {
- public static final String XML_DECLARATION_QUERY = "?";
- public static final String TAG_SEPARATOR = "/";
- public static final String ATTRIBUTE_SEPARATOR = "@";
- public static final String PREFIX_SEPARATOR = ":";
- public static final String ENUMERATION_SEPARATOR = "=";
- public static final String DONT_FILTER_END_TAG_CHAR = "^";
- public static final String JSP_DIRECTIVE_QUERY = "@";
+ public static final String XML_DECLARATION_QUERY = "?"; //$NON-NLS-1$
+ public static final String TAG_SEPARATOR = "/"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_SEPARATOR = "@"; //$NON-NLS-1$
+ public static final String PREFIX_SEPARATOR = ":"; //$NON-NLS-1$
+ public static final String ENUMERATION_SEPARATOR = "="; //$NON-NLS-1$
+ public static final String DONT_FILTER_END_TAG_CHAR = "^"; //$NON-NLS-1$
+ public static final String JSP_DIRECTIVE_QUERY = "@"; //$NON-NLS-1$
private static final char START_CODE_CHAR = '%';
private static final char END_CODE_CHAR = ';';
- private String query = "";
+ private String query = ""; //$NON-NLS-1$
private Collection resources = new ArrayList();
private Collection dinamicResources = new ArrayList();
@@ -75,11 +75,11 @@
*/
public String toString() {
StringBuffer result = new StringBuffer();
- result.append("Query string = [");
+ result.append("Query string = ["); //$NON-NLS-1$
result.append(query);
- result.append("]; Resources size = [");
+ result.append("]; Resources size = ["); //$NON-NLS-1$
result.append(resources.size());
- result.append("];");
+ result.append("];"); //$NON-NLS-1$
return result.toString();
}
@@ -144,8 +144,8 @@
return str;
}
StringBuffer result = new StringBuffer(str.length());
- StringTokenizer st = new StringTokenizer(str, "" + START_CODE_CHAR, false);
- if((!str.startsWith("" + START_CODE_CHAR))&&(st.hasMoreElements())) {
+ StringTokenizer st = new StringTokenizer(str, "" + START_CODE_CHAR, false); //$NON-NLS-1$
+ if((!str.startsWith("" + START_CODE_CHAR))&&(st.hasMoreElements())) { //$NON-NLS-1$
result.append(st.nextElement());
}
while(st.hasMoreElements()) {
@@ -160,7 +160,7 @@
result.append(s.substring(endCode));
}
} catch(NumberFormatException e) {
- String message = "ERROR: can't decode string=" + s;
+ String message = "ERROR: can't decode string=" + s; //$NON-NLS-1$
KbPlugin.getPluginLog().logError(message, e);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbSchemaUtil.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -105,7 +105,7 @@
String name = attributeType.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
attributes.append(' ');
attributes.append(name);
- attributes.append("=\"");
+ attributes.append("=\""); //$NON-NLS-1$
attributes.append('"');
}
return attributes.toString();
@@ -173,7 +173,7 @@
}
}
}
- return "";
+ return ""; //$NON-NLS-1$
}
/**
@@ -209,9 +209,9 @@
attributesD.remove(typeLow);
attributesI.add(typeLow);
} else if(attributesI.contains(typeLow)) {
- KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type + " is declared more than once in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type + " is declared more than once in element " + elementName + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else if(!attributesI.contains(typeLow)) {
- KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type + " is never used by an attribute in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type " + type + " is never used by an attribute in element " + elementName + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
}
@@ -236,7 +236,7 @@
Iterator it = attributesD.iterator();
while(it.hasNext()) {
String a = it.next().toString();
- KbPlugin.getPluginLog().logWarning("Warning: attribute type is not defined for attribute " + a + " in element " + elementName + ".");
+ KbPlugin.getPluginLog().logWarning("Warning: attribute type is not defined for attribute " + a + " in element " + elementName + "."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldConvertor.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -39,16 +39,16 @@
*/
public class KbTldConvertor implements KbSchemaConvertor {
- private final static String TAG_ELEMENT_NAME = "tag";
- private final static String NAME_ELEMENT_NAME = "name";
- private final static String DESCRIPTION_ELEMENT_NAME = "description";
- private final static String ATTRIBUTE_ELEMENT_NAME = "attribute";
- private final static String REQUIRED_ELEMENT_NAME = "required";
- private final static String BODYCONTENT_ELEMENT_NAME_1_1 = "bodycontent";
- private final static String BODYCONTENT_ELEMENT_NAME_1_2 = "body-content";
- private final static String EMPTY_BODYCONTENT_TYPE = "empty";
- private final static String SHORT_NAME_1_1 = "shortname";
- private final static String SHORT_NAME_1_2 = "short-name";
+ private final static String TAG_ELEMENT_NAME = "tag"; //$NON-NLS-1$
+ private final static String NAME_ELEMENT_NAME = "name"; //$NON-NLS-1$
+ private final static String DESCRIPTION_ELEMENT_NAME = "description"; //$NON-NLS-1$
+ private final static String ATTRIBUTE_ELEMENT_NAME = "attribute"; //$NON-NLS-1$
+ private final static String REQUIRED_ELEMENT_NAME = "required"; //$NON-NLS-1$
+ private final static String BODYCONTENT_ELEMENT_NAME_1_1 = "bodycontent"; //$NON-NLS-1$
+ private final static String BODYCONTENT_ELEMENT_NAME_1_2 = "body-content"; //$NON-NLS-1$
+ private final static String EMPTY_BODYCONTENT_TYPE = "empty"; //$NON-NLS-1$
+ private final static String SHORT_NAME_1_1 = "shortname"; //$NON-NLS-1$
+ private final static String SHORT_NAME_1_2 = "short-name"; //$NON-NLS-1$
private static final KbTldConvertor INSTANCE = new KbTldConvertor();
@@ -76,11 +76,11 @@
if(resource instanceof KbTldResource) {
tldResource = (KbTldResource)resource;
} else {
- throw new IllegalArgumentException("KbTldConvertor.convertToSchema(KbResource resource): resource must be instance of KbTldResource");
+ throw new IllegalArgumentException("KbTldConvertor.convertToSchema(KbResource resource): resource must be instance of KbTldResource"); //$NON-NLS-1$
}
Properties attributes = new Properties();
attributes.put(SchemaNodeFactory.LOCATION_ATTRIBUTE, tldResource.getTldLocation());
- attributes.put(SchemaNodeFactory.JSF_ATTRIBUTE, "" + tldResource.isJsfResource());
+ attributes.put(SchemaNodeFactory.JSF_ATTRIBUTE, "" + tldResource.isJsfResource()); //$NON-NLS-1$
if(tldResource.getUri()!=null) {
attributes.put(SchemaNodeFactory.URI_ATTRIBUTE, tldResource.getUri());
}
@@ -89,7 +89,7 @@
InputStream is = tldResource.getInputStream();
if(is==null) {
if(KbPlugin.isDebugEnabled()) {
- KbPlugin.getPluginLog().logWarning(" WARNING! Can't get InputSource from resource (location: " + tldResource.getTldLocation() + ").");
+ KbPlugin.getPluginLog().logWarning(" WARNING! Can't get InputSource from resource (location: " + tldResource.getTldLocation() + ")."); //$NON-NLS-1$ //$NON-NLS-2$
}
return null;
}
@@ -145,7 +145,7 @@
*/
public Document convertToSchema(InputStream inputStream, Properties attributes, boolean jsfTld) {
- final String ERR_CANNOT_PARSE_TLD = "ERROR: Can't parse TLD file for converting to the Schema."; //$NON-NLS-N$
+ final String ERR_CANNOT_PARSE_TLD = "ERROR: Can't parse TLD file for converting to the Schema."; //$NON-NLS-1$
Document tldDocument = null;
Document schema = null;
@@ -235,7 +235,7 @@
Element attributeType = SchemaNodeFactory.getInstance().createAttributeType(schemaElement, attributes);
SchemaNodeFactory.getInstance().createDescription(attributeType, description);
- if(jsfTld || tldAttribute.getElementsByTagName("deferred-value").getLength()>0) {
+ if(jsfTld || tldAttribute.getElementsByTagName("deferred-value").getLength()>0) { //$NON-NLS-1$
// Add default proposals
Element[] proposals = createDefaultELProposals(schemaElement.getOwnerDocument());
for(int i=0; i<proposals.length; i++) {
@@ -259,19 +259,19 @@
String methodName = null;
Element proposal = null;
ArrayList<String> paramTypes = new ArrayList<String>();
- StringTokenizer st = new StringTokenizer(signature.trim(), " ()", false);
+ StringTokenizer st = new StringTokenizer(signature.trim(), " ()", false); //$NON-NLS-1$
if(st.hasMoreTokens()) {
- returnType = st.nextToken(" ");
+ returnType = st.nextToken(" "); //$NON-NLS-1$
if(st.hasMoreTokens()) {
- methodName = st.nextToken("(");
+ methodName = st.nextToken("("); //$NON-NLS-1$
if(methodName!=null) {
methodName = methodName.trim();
}
}
if(st.hasMoreTokens()) {
- String params = st.nextToken("()");
+ String params = st.nextToken("()"); //$NON-NLS-1$
if(params!=null) {
- StringTokenizer stParams = new StringTokenizer(params, ",", false);
+ StringTokenizer stParams = new StringTokenizer(params, ",", false); //$NON-NLS-1$
while(stParams.hasMoreTokens()) {
String param = stParams.nextToken().trim();
if(param.length()>0) {
@@ -283,17 +283,17 @@
}
if(returnType!=null && methodName!=null) {
- proposal = document.createElement("proposal");
- proposal.setAttribute("type", "beanMethodBySignature");
- Element param = document.createElement("param");
- param.setAttribute("name", "returnType");
- param.setAttribute("value", returnType);
+ proposal = document.createElement("proposal"); //$NON-NLS-1$
+ proposal.setAttribute("type", "beanMethodBySignature"); //$NON-NLS-1$ //$NON-NLS-2$
+ Element param = document.createElement("param"); //$NON-NLS-1$
+ param.setAttribute("name", "returnType"); //$NON-NLS-1$ //$NON-NLS-2$
+ param.setAttribute("value", returnType); //$NON-NLS-1$
proposal.appendChild(param);
for(int i=0; i<paramTypes.size(); i++) {
- param = document.createElement("param");
- param.setAttribute("name", "paramType");
- param.setAttribute("value", paramTypes.get(i).toString());
+ param = document.createElement("param"); //$NON-NLS-1$
+ param.setAttribute("name", "paramType"); //$NON-NLS-1$ //$NON-NLS-2$
+ param.setAttribute("value", paramTypes.get(i).toString()); //$NON-NLS-1$
proposal.appendChild(param);
}
}
@@ -302,23 +302,23 @@
}
private Element[] createDefaultELProposals(Document document) {
- Element jsfBeanProperty = document.createElement("proposal");
- jsfBeanProperty.setAttribute("type", "beanProperty");
+ Element jsfBeanProperty = document.createElement("proposal"); //$NON-NLS-1$
+ jsfBeanProperty.setAttribute("type", "beanProperty"); //$NON-NLS-1$ //$NON-NLS-2$
- Element jsfBundleProperty = document.createElement("proposal");
- jsfBundleProperty.setAttribute("type", "bundleProperty");
+ Element jsfBundleProperty = document.createElement("proposal"); //$NON-NLS-1$
+ jsfBundleProperty.setAttribute("type", "bundleProperty"); //$NON-NLS-1$ //$NON-NLS-2$
- Element jsfVariables = document.createElement("proposal");
- jsfVariables.setAttribute("type", "jsfVariables");
+ Element jsfVariables = document.createElement("proposal"); //$NON-NLS-1$
+ jsfVariables.setAttribute("type", "jsfVariables"); //$NON-NLS-1$ //$NON-NLS-2$
return new Element[]{jsfBeanProperty, jsfBundleProperty, jsfVariables};
}
private static String getDeferredMethodSignature(Element tldAttribute) {
- NodeList deferredMethods = tldAttribute.getElementsByTagName("deferred-method");
+ NodeList deferredMethods = tldAttribute.getElementsByTagName("deferred-method"); //$NON-NLS-1$
for(int i=0; i<deferredMethods.getLength(); i++) {
Element deferredMethod = (Element)deferredMethods.item(i);
- return getChildElementBody(deferredMethod, "method-signature");
+ return getChildElementBody(deferredMethod, "method-signature"); //$NON-NLS-1$
}
return null;
}
@@ -377,7 +377,7 @@
}
return sb.toString();
} else {
- return "";
+ return ""; //$NON-NLS-1$
}
}
@@ -414,8 +414,8 @@
* @return
*/
public OutputFormat createOutputFormat() {
- OutputFormat format = new OutputFormat("xml", "UTF-8", true);
- format.setLineSeparator("\r\n");
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true); //$NON-NLS-1$ //$NON-NLS-2$
+ format.setLineSeparator("\r\n"); //$NON-NLS-1$
format.setIndent(4);
return format;
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldResource.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -107,13 +107,13 @@
}
private InputStream getInputStreamFromTldLocation() {
- final String ERR_TLD_FILE_DOSENT_EXIST = "ERROR: TLD file ''{0}'' doesn't exist!";
+ final String ERR_TLD_FILE_DOSENT_EXIST = "ERROR: TLD file ''{0}'' doesn't exist!"; //$NON-NLS-1$
InputStream is = null;
if (tldLocation == null) {
return null;
}
try {
- if (tldLocation.indexOf(":/") < 2) {
+ if (tldLocation.indexOf(":/") < 2) { //$NON-NLS-1$
File file = new File(tldLocation);
if (!file.exists()) {
return null;
@@ -121,7 +121,7 @@
is = new BufferedInputStream(new FileInputStream(file));
} else {
URL url = new URL(tldLocation);
- if("jar".equals(url.getProtocol()) || "file".equals(url.getProtocol())) {
+ if("jar".equals(url.getProtocol()) || "file".equals(url.getProtocol())) { //$NON-NLS-1$ //$NON-NLS-2$
is = url.openStream(); // Bug 8385 -fixed
}
}
@@ -308,17 +308,17 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("[TLDlocation=\"");
+ buffer.append("[TLDlocation=\""); //$NON-NLS-1$
buffer.append(tldLocation);
- buffer.append("\" SchemaLocation=\"");
+ buffer.append("\" SchemaLocation=\""); //$NON-NLS-1$
buffer.append(schemaLocation);
- buffer.append("\"");
- buffer.append(" Prefixes=\"");
+ buffer.append("\""); //$NON-NLS-1$
+ buffer.append(" Prefixes=\""); //$NON-NLS-1$
buffer.append(prefixes);
- buffer.append("\"");
- buffer.append(" uri=\"");
+ buffer.append("\""); //$NON-NLS-1$
+ buffer.append(" uri=\""); //$NON-NLS-1$
buffer.append(uri);
- buffer.append("\"]");
+ buffer.append("\"]"); //$NON-NLS-1$
return buffer.toString();
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/KbTldStore.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -149,7 +149,7 @@
String key = needResources.hashCode() + cleanQuary;
- boolean faceletsHtml = cleanQuary.indexOf("0fHP:")>-1;
+ boolean faceletsHtml = cleanQuary.indexOf("0fHP:")>-1; //$NON-NLS-1$
Object o = faceletsHtml?getFaceletsHtmlTagInfoCache().get(key):getTagInfoCache().get(key);
if(o!=null) {
return (TagDescriptor)o;
@@ -254,7 +254,7 @@
}
if(strQuery.length() == KbQuery.TAG_SEPARATOR.length()) {
- return getTags(needResources, "");
+ return getTags(needResources, ""); //$NON-NLS-1$
}
int startTagName = strQuery.indexOf(KbQuery.PREFIX_SEPARATOR);
@@ -268,7 +268,7 @@
if(startAttributeName < 0){
String tagName = strQuery.substring(startTagName);
boolean tagMask = true;
- if(tagName.endsWith("/")) {
+ if(tagName.endsWith("/")) { //$NON-NLS-1$
tagMask = false;
tagName = tagName.substring(0, tagName.length()-1);
}
@@ -282,7 +282,7 @@
String tagName = strQuery.substring(startTagName, startAttributeName);
startAttributeName+=KbQuery.ATTRIBUTE_SEPARATOR.length();
if(startAttributeName == strQuery.length()) {
- return getAttributes(needResources, prefixName, tagName, "");
+ return getAttributes(needResources, prefixName, tagName, ""); //$NON-NLS-1$
}
int startAttributeValue = strQuery.indexOf(KbQuery.ENUMERATION_SEPARATOR);
@@ -296,7 +296,7 @@
// Collection needDinamicResources = convertQueryDinamicResourceToRegistretedDinamicResource(query.getDinamicResources());
Collection needDinamicResources = query.getDinamicResources();
if(startAttributeValue == strQuery.length()) {
- return getAttributeValue(needResources, needDinamicResources, prefixName, tagName, attributeName, "");
+ return getAttributeValue(needResources, needDinamicResources, prefixName, tagName, attributeName, ""); //$NON-NLS-1$
}
return getAttributeValue(needResources, needDinamicResources, prefixName, tagName, attributeName, KbQuery.decode(strQuery.substring(startAttributeValue)));
@@ -366,7 +366,7 @@
// return registerDinamicResource((KbDinamicResource)resource);
return (KbDinamicResource)resource;
} else {
- throw new IllegalArgumentException("KbTldStore.registerResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("KbTldStore.registerResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource"); //$NON-NLS-1$
}
}
@@ -445,7 +445,7 @@
// TODO Stop loading and registration resource
}
} else {
- throw new IllegalArgumentException("KbTldStore.unregisterResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("KbTldStore.unregisterResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource"); //$NON-NLS-1$
}
}
@@ -566,7 +566,7 @@
File schemaLocation = regResource.getSchemaLocation();
if((schemaLocation == null)||(!schemaLocation.exists())) {
if(KbPlugin.isDebugEnabled()) {
- KbPlugin.getPluginLog().logWarning("WARNING: Schema (location: " + schemaLocation + ") for resource (" + regResource +") does not exist!");
+ KbPlugin.getPluginLog().logWarning("WARNING: Schema (location: " + schemaLocation + ") for resource (" + regResource +") does not exist!"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
return;
}
@@ -616,23 +616,23 @@
private void loadRegistratedResources() {
// Get the schemas from extention point.
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.kb.tldResource");
+ IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.kb.tldResource"); //$NON-NLS-1$
IExtension[] extensions = extensionPoint.getExtensions();
for (int i=0; i<extensions.length; i++) {
IExtension extension = extensions[i];
IConfigurationElement[] elements = extension.getConfigurationElements();
for(int j=0; j<elements.length; j++) {
- String uri = elements[j].getAttribute("uri");
- String location = elements[j].getAttribute("schema-location");
- String version = elements[j].getAttribute("version");
- String jsf = elements[j].getAttribute("jsf");
+ String uri = elements[j].getAttribute("uri"); //$NON-NLS-1$
+ String location = elements[j].getAttribute("schema-location"); //$NON-NLS-1$
+ String version = elements[j].getAttribute("version"); //$NON-NLS-1$
+ String jsf = elements[j].getAttribute("jsf"); //$NON-NLS-1$
if(uri==null || uri.length()==0 || location==null || location.length()==0) {
continue;
}
Bundle sourcePlugin = Platform.getBundle(elements[j].getNamespaceIdentifier());
File shemaLocation = null;
try {
- shemaLocation = new File(FileLocator.resolve(sourcePlugin.getEntry("/")).getPath(), location);
+ shemaLocation = new File(FileLocator.resolve(sourcePlugin.getEntry("/")).getPath(), location); //$NON-NLS-1$
} catch (IOException e) {
KbPlugin.getPluginLog().logError(e);
continue;
@@ -644,10 +644,10 @@
resource.setVersion(version);
}
resource.setCustomTld(false);
- resource.setJsfResource("true".equals(jsf));
+ resource.setJsfResource("true".equals(jsf)); //$NON-NLS-1$
registratedResources.put(resource, resource);
} else {
- String message = "Can't load KB schema: " + shemaLocation;
+ String message = "Can't load KB schema: " + shemaLocation; //$NON-NLS-1$
KbPlugin.getDefault().getLog().log(new Status(IStatus.WARNING, KbPlugin.PLUGIN_ID, IStatus.WARNING, message, null));
}
}
@@ -677,10 +677,10 @@
continue;
}
} catch (IOException e) {
- KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")", e));
+ KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")", e)); //$NON-NLS-1$ //$NON-NLS-2$
continue;
} catch (SAXException e) {
- KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")", e));
+ KbPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, KbPlugin.PLUGIN_ID, IStatus.OK, "Can't parse Schema (location: " + schemas[i] + ")", e)); //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
// String tldLocation = schemas[i].getAbsolutePath();
@@ -704,7 +704,7 @@
resource.setTldContent(tldContent);
resource.setSchemaLocation(schemas[i]);
resource.setCustomTld(true);
- resource.setJsfResource("true".equals(jsf));
+ resource.setJsfResource("true".equals(jsf)); //$NON-NLS-1$
registratedResources.put(resource, resource);
}
}
@@ -713,7 +713,7 @@
* @return
*/
public KbResource getJspResource() {
- return getRegistratedResource(new KbTldResource("http://java.sun.com/JSP/Page", "", "jsp", null));
+ return getRegistratedResource(new KbTldResource("http://java.sun.com/JSP/Page", "", "jsp", null)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
private ArrayList<KbProposal> getTags(Collection resources, String prefixMask) {
@@ -818,14 +818,14 @@
boolean ignoreCase = false;
String attr = element.getOwnerDocument().getDocumentElement().getAttribute(SchemaNodeFactory.IGNORE_CASE_ATTRIBUTE);
- ignoreCase = attr!=null && attr.equals("true");
+ ignoreCase = attr!=null && attr.equals("true"); //$NON-NLS-1$
ArrayList attributeTypes = KbSchemaUtil.getAttributeTypes(element);
for(int i=0; i<attributeTypes.size(); i++) {
Element attributeType = (Element)attributeTypes.get(i);
String attributeTypeName = attributeType.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
- boolean endsWithWildCard = attributeTypeName.endsWith("" + SchemaNodeFactory.WILD_CARD_CHAR);
+ boolean endsWithWildCard = attributeTypeName.endsWith("" + SchemaNodeFactory.WILD_CARD_CHAR); //$NON-NLS-1$
if(endsWithWildCard) {
attributeTypeName = attributeTypeName.substring(0, attributeTypeName.length() - 1);
}
@@ -868,7 +868,7 @@
String label = element.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
if(label == null || label.indexOf(SchemaNodeFactory.WILD_CARD_CHAR) >= 0) continue;
- String endTag = SchemaNodeFactory.REFUSED_BODY_CONTENT_TYPE.equals(element.getAttribute(SchemaNodeFactory.BODY_CONTENT_ATTRIBUTE))?" /":"";
+ String endTag = SchemaNodeFactory.REFUSED_BODY_CONTENT_TYPE.equals(element.getAttribute(SchemaNodeFactory.BODY_CONTENT_ATTRIBUTE))?" /":""; //$NON-NLS-1$ //$NON-NLS-2$
StringBuffer lb = new StringBuffer();
lb.append(prefix);
lb.append(KbQuery.PREFIX_SEPARATOR);
@@ -936,8 +936,8 @@
}
private HashMap<String,TldElement> getTldElementsByPrefix(Collection resources, String prefix, boolean mask) {
- String cacheKey = resources.hashCode() + "/" + prefix + "/" + mask;
- boolean faceletsHtml = prefix.equals("0fHP");
+ String cacheKey = resources.hashCode() + "/" + prefix + "/" + mask; //$NON-NLS-1$ //$NON-NLS-2$
+ boolean faceletsHtml = prefix.equals("0fHP"); //$NON-NLS-1$
HashMap<String,TldElement> o = faceletsHtml?getFaceletsHtmlTldElementsByPrefix().get(cacheKey):getTldElementsByPrefix().get(cacheKey);
if(o != null) return o;
@@ -993,7 +993,7 @@
}
private ArrayList<TldElement> getTldElementsByName(Collection resources, String prefixName, String name, boolean mask) {
- String cacheKey = resources.hashCode() + "/" + prefixName + "/" + name + "/" + mask;
+ String cacheKey = resources.hashCode() + "/" + prefixName + "/" + name + "/" + mask; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
ArrayList<TldElement> o = getTldElementsByName().get(cacheKey);
if(o != null) {
return o;
@@ -1003,7 +1003,7 @@
HashMap tldElementTypes = getTldElementsByPrefix(resources, prefixName, false);
if(!mask) {
- TldElement tldElementType = "0fHP".equals(prefixName)?(TldElement)tldElementTypes.get(name.toUpperCase()):(TldElement)tldElementTypes.get(name);
+ TldElement tldElementType = "0fHP".equals(prefixName)?(TldElement)tldElementTypes.get(name.toUpperCase()):(TldElement)tldElementTypes.get(name); //$NON-NLS-1$
if(tldElementType!=null) {
tldElementType.setElementType(TldElementType.TAG);
tldElements.add(tldElementType);
@@ -1017,7 +1017,7 @@
Element element = tldElementType.getElement();
if(i==0) {
String attr = element.getOwnerDocument().getDocumentElement().getAttribute(SchemaNodeFactory.IGNORE_CASE_ATTRIBUTE);
- ignoreCase = attr!=null && attr.equals("true");
+ ignoreCase = attr!=null && attr.equals("true"); //$NON-NLS-1$
}
String schemaTagName = element.getAttribute(SchemaNodeFactory.NAME_ATTRIBUTE);
boolean match = false;
@@ -1057,7 +1057,7 @@
public void run() {
loadingResources.put(resource, resource);
- String uniqFileName = "schema";
+ String uniqFileName = "schema"; //$NON-NLS-1$
Document document = KbTldConvertor.getInstance().convertToSchema(resource);
// KbPlugin.log("document: " + KbTldConvertor.getInstance().serialize(document.getDocumentElement()));
@@ -1071,10 +1071,10 @@
File schemaFolder = new File(schemaLocation);
schemaFolder.mkdirs();
- File schemaFile = new File(schemaLocation + "/" + uniqFileName + ".xml");
+ File schemaFile = new File(schemaLocation + "/" + uniqFileName + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
int i=1;
while(schemaFile.exists()) {
- schemaFile = new File(schemaLocation + "/" + uniqFileName + i++ + ".xml");
+ schemaFile = new File(schemaLocation + "/" + uniqFileName + i++ + ".xml"); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
@@ -1112,8 +1112,8 @@
}
public OutputFormat createOutputFormat() {
- OutputFormat format = new OutputFormat("xml", "UTF-8", true);
- format.setLineSeparator("\r\n");
+ OutputFormat format = new OutputFormat("xml", "UTF-8", true); //$NON-NLS-1$ //$NON-NLS-2$
+ format.setLineSeparator("\r\n"); //$NON-NLS-1$
format.setIndent(2);
return format;
}
@@ -1183,15 +1183,15 @@
public String toString() {
StringBuffer result = new StringBuffer();
- result.append("Element: [");
+ result.append("Element: ["); //$NON-NLS-1$
result.append(element);
- result.append("]; Type: [");
+ result.append("]; Type: ["); //$NON-NLS-1$
result.append(elementType);
- result.append("]; Resource: [");
+ result.append("]; Resource: ["); //$NON-NLS-1$
result.append(resource);
- result.append("]; Prefix: [");
+ result.append("]; Prefix: ["); //$NON-NLS-1$
result.append(prefix);
- result.append("]");
+ result.append("]"); //$NON-NLS-1$
return result.toString();
}
@@ -1209,9 +1209,9 @@
return type;
}
- public static final TldElementType PREFIX = new TldElementType("Prefix");
- public static final TldElementType TAG = new TldElementType("Tag");
- public static final TldElementType ATTRIBUTE = new TldElementType("Attribute");
- public static final TldElementType ATTRIBUTE_VALUE = new TldElementType("Attribute value");
+ public static final TldElementType PREFIX = new TldElementType("Prefix"); //$NON-NLS-1$
+ public static final TldElementType TAG = new TldElementType("Tag"); //$NON-NLS-1$
+ public static final TldElementType ATTRIBUTE = new TldElementType("Attribute"); //$NON-NLS-1$
+ public static final TldElementType ATTRIBUTE_VALUE = new TldElementType("Attribute value"); //$NON-NLS-1$
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/SchemaNodeFactory.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -24,48 +24,48 @@
*/
public class SchemaNodeFactory {
- public static final String SCHEMA_NODE = "schema";
- public static final String ELEMENT_TYPE_NODE = "element-type";
- public static final String ATTRIBUTE_TYPE_NODE = "attribute-type";
- public static final String TLD_CONTENT_NODE = "tld-content";
- public static final String ELEMENT_NODE = "element";
- public static final String ATTRIBUTE_NODE = "attribute";
- public static final String PARAM_NODE = "param";
- public static final String GROUP_NODE = "group";
- public static final String DESCRIPTION_NODE = "description";
- public static final String PREFIX_ATTRIBUTE = "prefix";
- public static final String NAME_ATTRIBUTE = "name";
- public static final String IGNORE_CASE_ATTRIBUTE = "ignore-case";
- public static final String TYPE_ATTRIBUTE = "type";
- public static final String PROPOSAL_NODE = "proposal";
- public static final String CONTENT_ATTRIBUTE = "content";
- public static final String DEFAULT_ATTRIBUTE = "default";
- public static final String REQUIRED_ATTRIBUTE = "required";
- public static final String PREFERABLE_ATTRIBUTE = "preferable";
- public static final String URI_ATTRIBUTE = "uri";
- public static final String URL_ATTRIBUTE = "url";
- public static final String VERSION_ATTRIBUTE = "version";
- public static final String JSF_ATTRIBUTE = "jsf";
- public static final String LOCATION_ATTRIBUTE = "location";
- public static final String ROOT_ELEMENT_ATTRIBUTE = "root-element";
- public static final String VALUES_ATTRIBUTE = "values";
- public static final String VALUE_ATTRIBUTE = "value";
- public static final String ENUMERATION_TYPE = "enumeration";
+ public static final String SCHEMA_NODE = "schema"; //$NON-NLS-1$
+ public static final String ELEMENT_TYPE_NODE = "element-type"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_TYPE_NODE = "attribute-type"; //$NON-NLS-1$
+ public static final String TLD_CONTENT_NODE = "tld-content"; //$NON-NLS-1$
+ public static final String ELEMENT_NODE = "element"; //$NON-NLS-1$
+ public static final String ATTRIBUTE_NODE = "attribute"; //$NON-NLS-1$
+ public static final String PARAM_NODE = "param"; //$NON-NLS-1$
+ public static final String GROUP_NODE = "group"; //$NON-NLS-1$
+ public static final String DESCRIPTION_NODE = "description"; //$NON-NLS-1$
+ public static final String PREFIX_ATTRIBUTE = "prefix"; //$NON-NLS-1$
+ public static final String NAME_ATTRIBUTE = "name"; //$NON-NLS-1$
+ public static final String IGNORE_CASE_ATTRIBUTE = "ignore-case"; //$NON-NLS-1$
+ public static final String TYPE_ATTRIBUTE = "type"; //$NON-NLS-1$
+ public static final String PROPOSAL_NODE = "proposal"; //$NON-NLS-1$
+ public static final String CONTENT_ATTRIBUTE = "content"; //$NON-NLS-1$
+ public static final String DEFAULT_ATTRIBUTE = "default"; //$NON-NLS-1$
+ public static final String REQUIRED_ATTRIBUTE = "required"; //$NON-NLS-1$
+ public static final String PREFERABLE_ATTRIBUTE = "preferable"; //$NON-NLS-1$
+ public static final String URI_ATTRIBUTE = "uri"; //$NON-NLS-1$
+ public static final String URL_ATTRIBUTE = "url"; //$NON-NLS-1$
+ public static final String VERSION_ATTRIBUTE = "version"; //$NON-NLS-1$
+ public static final String JSF_ATTRIBUTE = "jsf"; //$NON-NLS-1$
+ public static final String LOCATION_ATTRIBUTE = "location"; //$NON-NLS-1$
+ public static final String ROOT_ELEMENT_ATTRIBUTE = "root-element"; //$NON-NLS-1$
+ public static final String VALUES_ATTRIBUTE = "values"; //$NON-NLS-1$
+ public static final String VALUE_ATTRIBUTE = "value"; //$NON-NLS-1$
+ public static final String ENUMERATION_TYPE = "enumeration"; //$NON-NLS-1$
public static final String BUNDLE_NAME_TYPE = KbDinamicResource.BUNDLE_NAME_TYPE;
- public static final String ENUMERATION_SEPARATOR = ",";
- public static final String ATTRIBUTE_TYPE_SEPARATOR = ",";
- public static final String CONTENT_TYPE_MIXED = "mixed";
- public static final String TRUE_REQUIRED_ATTRIBUTE = "true";
- public static final String FALSE_REQUIRED_ATTRIBUTE = "false";
- public static final String START_TAG_ATTRIBUTE = "start-tag";
- public static final String END_TAG_ATTRIBUTE = "end-tag";
- public static final String OPTIONAL_TAG_TYPE = "optional";
- public static final String REQUIRED_TAG_TYPE = "required";
- public static final String REFUSED_TAG_TYPE = "refused";
- public static final String BODY_CONTENT_ATTRIBUTE = "body-content";
- public static final String ALLOWED_BODY_CONTENT_TYPE = "allowed";
- public static final String REFUSED_BODY_CONTENT_TYPE = "refused";
- public static final String OPTIONAL_BODY_CONTENT_TYPE = "optional";
+ public static final String ENUMERATION_SEPARATOR = ","; //$NON-NLS-1$
+ public static final String ATTRIBUTE_TYPE_SEPARATOR = ","; //$NON-NLS-1$
+ public static final String CONTENT_TYPE_MIXED = "mixed"; //$NON-NLS-1$
+ public static final String TRUE_REQUIRED_ATTRIBUTE = "true"; //$NON-NLS-1$
+ public static final String FALSE_REQUIRED_ATTRIBUTE = "false"; //$NON-NLS-1$
+ public static final String START_TAG_ATTRIBUTE = "start-tag"; //$NON-NLS-1$
+ public static final String END_TAG_ATTRIBUTE = "end-tag"; //$NON-NLS-1$
+ public static final String OPTIONAL_TAG_TYPE = "optional"; //$NON-NLS-1$
+ public static final String REQUIRED_TAG_TYPE = "required"; //$NON-NLS-1$
+ public static final String REFUSED_TAG_TYPE = "refused"; //$NON-NLS-1$
+ public static final String BODY_CONTENT_ATTRIBUTE = "body-content"; //$NON-NLS-1$
+ public static final String ALLOWED_BODY_CONTENT_TYPE = "allowed"; //$NON-NLS-1$
+ public static final String REFUSED_BODY_CONTENT_TYPE = "refused"; //$NON-NLS-1$
+ public static final String OPTIONAL_BODY_CONTENT_TYPE = "optional"; //$NON-NLS-1$
public static final char WILD_CARD_CHAR = '*';
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/TagDescriptor.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -58,13 +58,13 @@
*/
public String toString() {
StringBuffer sb = new StringBuffer();
- sb.append("[tagName=")
+ sb.append("[tagName=") //$NON-NLS-1$
.append(tagName)
- .append("; hasBody=")
+ .append("; hasBody=") //$NON-NLS-1$
.append(hasBody)
- .append("; hasClosingTag=")
+ .append("; hasClosingTag=") //$NON-NLS-1$
.append(hasClosingTag)
- .append(";]");
+ .append(";]"); //$NON-NLS-1$
return sb.toString();
}
@@ -156,7 +156,7 @@
public KbProposal generateProposal() {
KbProposal proposal = new KbProposal();
- String endTag = hasBody()?"":" /";
+ String endTag = hasBody()?"":" /"; //$NON-NLS-1$ //$NON-NLS-2$
StringBuffer lb = new StringBuffer();
if(prefix!=null && prefix.length()>0) {
lb.append(prefix);
@@ -171,7 +171,7 @@
for(int i=0; i<attributeList.size(); i++) {
AttributeDescriptor attribute = (AttributeDescriptor)attributeList.get(i);
if(attribute.isRequired()) {
- attributes.append(" ").append(attribute.getName()).append("=\"\"");
+ attributes.append(" ").append(attribute.getName()).append("=\"\""); //$NON-NLS-1$ //$NON-NLS-2$
}
}
lb.append(attributes);
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfiguration.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -15,15 +15,15 @@
*/
public interface KbConfiguration {
- public static final String SCHEMA_FOLDER_NAME = "schemas";
- public static final String SCHEMA_DTD_FOLDER_NAME = "dtd";
- public static final String SCHEMA_TLD_FOLDER_NAME = "tld";
- public static final String SCHEMA_HTML_FOLDER_NAME = "html";
- public static final String SCHEMA_JSP_FOLDER_NAME = "jsp";
- public static final String SCHEMA_HTML_FILE_NAME = "htmlschema.xml";
- public static final String SCHEMA_JSP_FILE_NAME = "jspschema.xml";
- public static final String SCHEMA_JSP_DIRECTIVE_FILE_NAME = "jspdirectiveschema.xml";
- public static final String HTML_MAP_FILE_NAME = "htmlmap.object";
+ public static final String SCHEMA_FOLDER_NAME = "schemas"; //$NON-NLS-1$
+ public static final String SCHEMA_DTD_FOLDER_NAME = "dtd"; //$NON-NLS-1$
+ public static final String SCHEMA_TLD_FOLDER_NAME = "tld"; //$NON-NLS-1$
+ public static final String SCHEMA_HTML_FOLDER_NAME = "html"; //$NON-NLS-1$
+ public static final String SCHEMA_JSP_FOLDER_NAME = "jsp"; //$NON-NLS-1$
+ public static final String SCHEMA_HTML_FILE_NAME = "htmlschema.xml"; //$NON-NLS-1$
+ public static final String SCHEMA_JSP_FILE_NAME = "jspschema.xml"; //$NON-NLS-1$
+ public static final String SCHEMA_JSP_DIRECTIVE_FILE_NAME = "jspdirectiveschema.xml"; //$NON-NLS-1$
+ public static final String HTML_MAP_FILE_NAME = "htmlmap.object"; //$NON-NLS-1$
/**
*
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbConfigurationFactory.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -15,10 +15,10 @@
*/
public class KbConfigurationFactory {
- public static final String CONFIGURATION_SYSTEM_PROPERTY_NAME = "org.jboss.tools.common.kb.configuration";
+ public static final String CONFIGURATION_SYSTEM_PROPERTY_NAME = "org.jboss.tools.common.kb.configuration"; //$NON-NLS-1$
- public static final String TEST_CONFIGURATION = "test";
- public static final String PLUGIN_CONFIGURATION = "plugin";
+ public static final String TEST_CONFIGURATION = "test"; //$NON-NLS-1$
+ public static final String PLUGIN_CONFIGURATION = "plugin"; //$NON-NLS-1$
private static final KbConfigurationFactory INSTANCE = new KbConfigurationFactory();
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/configuration/KbPluginConfiguration.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -24,7 +24,7 @@
public static final String CUSTOM_SCHEMA_LOCATION = copyKbSchemasFromPluginToWorkSpace();
public static final String CUSTOM_SCHEMA_DTD_LOCATION = CUSTOM_SCHEMA_LOCATION + File.separator + SCHEMA_DTD_FOLDER_NAME;
- public static final String CUSTOM_SCHEMA_TLD_LOCATION = CUSTOM_SCHEMA_LOCATION + File.separator + "custom" + File.separator + SCHEMA_TLD_FOLDER_NAME;
+ public static final String CUSTOM_SCHEMA_TLD_LOCATION = CUSTOM_SCHEMA_LOCATION + File.separator + "custom" + File.separator + SCHEMA_TLD_FOLDER_NAME; //$NON-NLS-1$
public static final String SCHEMA_HTML_FILE_LOCATION = KbPlugin.getDefault().getLocation() + File.separator + SCHEMA_FOLDER_NAME + File.separator + SCHEMA_HTML_FOLDER_NAME + File.separator + SCHEMA_HTML_FILE_NAME;
public static final String SCHEMA_JSP_FILE_LOCATION = KbPlugin.getDefault().getLocation() + File.separator + SCHEMA_FOLDER_NAME + File.separator + SCHEMA_JSP_FOLDER_NAME + File.separator + SCHEMA_JSP_FILE_NAME;
public static final String CUSTOM_SCHEMA_JSP_DIRECTIVE_FILE_LOCATION = CUSTOM_SCHEMA_LOCATION + File.separator + SCHEMA_JSP_FOLDER_NAME + File.separator + SCHEMA_JSP_DIRECTIVE_FILE_NAME;
@@ -36,7 +36,7 @@
}
private static String copyKbSchemasFromPluginToWorkSpace() {
- IPath path = Platform.getLocation().append(".metadata/.plugins/").append(KbPlugin.PLUGIN_ID).append(SCHEMA_FOLDER_NAME);
+ IPath path = Platform.getLocation().append(".metadata/.plugins/").append(KbPlugin.PLUGIN_ID).append(SCHEMA_FOLDER_NAME); //$NON-NLS-1$
File workSpaceCustomSchemaLocation = path.toFile();
return workSpaceCustomSchemaLocation.toString();
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/JspWtpKbConnector.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -104,7 +104,7 @@
*/
public JspWtpKbConnector() {
jspResource = KbTldStore.getInstance().getJspResource();
- ((KbTldResource)jspResource).addPrefix("jsp");
+ ((KbTldResource)jspResource).addPrefix("jsp"); //$NON-NLS-1$
registerResources = new ArrayList<KbResource>();
registerJspResource();
registretedDinamicResources = new ArrayList<KbDinamicResource>();
@@ -135,8 +135,8 @@
* @see org.jboss.tools.common.kb.wtp.WtpKbConnector#getProposal(java.lang.String)
*/
public KbProposal getProposal(String query) throws KbException {
- if(!query.endsWith("/")) {
- query = query + "/";
+ if(!query.endsWith("/")) { //$NON-NLS-1$
+ query = query + "/"; //$NON-NLS-1$
}
// tracing would be fine here
// KbPlugin.log(query);
@@ -216,7 +216,7 @@
*/
public Collection<KbProposal> getProposals(String query) throws KbException {
boolean emptyQuery = false;
- if(query.equals("/")) {
+ if(query.equals("/")) { //$NON-NLS-1$
emptyQuery = true;
}
if(emptyQuery) {
@@ -301,7 +301,7 @@
registretedDinamicResources.add((KbDinamicResource)resource);
KbTldStore.getInstance().registerResource(resource);
} else {
- throw new IllegalArgumentException("JspWtpKbConnector.registerResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("JspWtpKbConnector.registerResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource"); //$NON-NLS-1$
}
if(clearCash) {
clearCache(modified, false);
@@ -326,7 +326,7 @@
}
KbTldStore store = KbTldStore.getInstance();
- KbTldResource resource = new KbTldResource(uri, "", "", version);
+ KbTldResource resource = new KbTldResource(uri, "", "", version); //$NON-NLS-1$ //$NON-NLS-2$
List<String> result = store.getAllTagNamesFromResource(resource);
getTagNamesCache().put(key, result);
return result;
@@ -356,7 +356,7 @@
KbTldStore.getInstance().unregisterResource(resource);
registretedDinamicResources.remove(resource);
} else {
- throw new IllegalArgumentException("JspKbConnector.unregisterResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource");
+ throw new IllegalArgumentException("JspKbConnector.unregisterResource(KbResource resource): resource must be instance of KbTldResource or KbDinamicResource"); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2009-05-27 06:37:36 UTC (rev 15546)
+++ trunk/common/plugins/org.jboss.tools.common.kb/src/org/jboss/tools/common/kb/wtp/WtpKbConnector.java 2009-05-27 06:43:21 UTC (rev 15547)
@@ -22,7 +22,7 @@
* @author Igels
*/
public interface WtpKbConnector extends KbConnector {
- public static String ADD_HTML_PREFIX = "4YTR:";
+ public static String ADD_HTML_PREFIX = "4YTR:"; //$NON-NLS-1$
/**
*
17 years, 1 month
JBoss Tools SVN: r15546 - in trunk/smooks/plugins: org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2009-05-27 02:37:36 -0400 (Wed, 27 May 2009)
New Revision: 15546
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertiesProposalProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/MultiTextContentAdapter.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodContentProposal.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodProposalProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/XMLStructuredModelProposal.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksCoreActivator.java
trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/esbrouting/provider/RouteBeanItemProvider.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.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BeanIdRefProposalProvider.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertyUtils.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SelectorContentProposalProvider.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/validate/AbstractValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/BeanIdRefValidator.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java
Log:
JBIDE-4232
1.Fix a bug (set Text value to CDATA , there is a superfluous '\r')
2.Re-design the details page of Wiring and Value Binding
3.Add content assist for "SetterMethod" and "Property" text control.
4.Add content assist for "Expression". ( I like this feature)
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/plugin.properties 2009-05-27 06:37:36 UTC (rev 15546)
@@ -180,7 +180,7 @@
_UI_InlineDirective_replace_literal = replace
_UI_InlineDirective_insertbefore_literal = insertbefore
_UI_InlineDirective_insertafter_literal = insertafter
-_UI_BindingsType_type = Bindings
+_UI_BindingsType_type = Java Object
_UI_DecodeParamType_type = Decode Param
_UI_ExpressionType_type = Expression
_UI_ValueType_type = Value Binding
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksCoreActivator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksCoreActivator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/core/SmooksCoreActivator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -1,5 +1,6 @@
package org.jboss.tools.smooks.core;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -47,4 +48,15 @@
return plugin;
}
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#initializeImageRegistry(org.eclipse.jface.resource.ImageRegistry)
+ */
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+ reg.put("BindingsType",imageDescriptorFromPlugin(PLUGIN_ID, "/icons/full/obj16/BindingsType.gif"));
+ reg.put("ExpressionType",imageDescriptorFromPlugin(PLUGIN_ID, "/icons/full/obj16/ExpressionType.gif"));
+ reg.put("ValueType",imageDescriptorFromPlugin(PLUGIN_ID, "/icons/full/obj16/ValueType.gif"));
+ reg.put("WiringType",imageDescriptorFromPlugin(PLUGIN_ID, "/icons/full/obj16/WiringType.gif"));
+ }
}
\ No newline at end of file
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/esbrouting/provider/RouteBeanItemProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/esbrouting/provider/RouteBeanItemProvider.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/esbrouting/provider/RouteBeanItemProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -246,10 +246,19 @@
*/
@Override
public String getText(Object object) {
+
String label = ((RouteBean)object).getToServiceName();
- return label == null || label.length() == 0 ?
- getString("_UI_RouteBean_type") :
- getString("_UI_RouteBean_type") + " " + label;
+ String categoryName = ((RouteBean)object).getToServiceCategory();
+ boolean returnServiceName = false;
+ if(label != null && label.length() != 0 && categoryName != null && categoryName.length() != 0){
+ returnServiceName = true;
+ }
+ if(returnServiceName){
+ return getString("_UI_RouteBean_type") + " (" + label+" : " + categoryName + ")";
+ }else{
+ return getString("_UI_RouteBean_type");
+ }
+
}
/**
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-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.core/src/org/jboss/tools/smooks/model/javabean/impl/JavabeanPackageImpl.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -890,7 +890,7 @@
source,
new String[] {
"name", "expression_._type",
- "kind", "simple"
+ "kind", "mixed"
});
addAnnotation
(getExpressionType_Value(),
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/PropertyUICreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -243,7 +243,7 @@
if (editValue != null) {
combo.setText(editValue.toString());
}
- List<String> list = SmooksUIUtils.getBeanIdList(smooksResourceList);
+ List<String> list = SmooksUIUtils.getBeanIdStringList(smooksResourceList);
for (Iterator<String> iterator = list.iterator(); iterator.hasNext();) {
String beanId = (String) iterator.next();
combo.add(beanId);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SelectoreSelectionDialog.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -255,8 +255,8 @@
if (model != null) {
list.add(model);
}
- } finally {
-
+ }catch(Throwable t){
+ // ignore
}
}
if (SmooksModelUtils.INPUT_TYPE_XML.equals(type)) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/SmooksStuffPropertyDetailPage.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -124,6 +124,7 @@
if (list != null) {
for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
AttributeFieldEditPart attributeFieldEditPart = (AttributeFieldEditPart) iterator.next();
+ if(attributeFieldEditPart == null) continue;
Object attribute = attributeFieldEditPart.getAttribute();
if (attribute != null && attributeFieldEditPart != null) {
currentPropertyUIMap.put(attribute, attributeFieldEditPart);
@@ -158,6 +159,7 @@
if (list != null) {
for (Iterator<?> iterator = list.iterator(); iterator.hasNext();) {
AttributeFieldEditPart attributeFieldEditPart = (AttributeFieldEditPart) iterator.next();
+ if(attributeFieldEditPart == null) continue;
Object attribute = attributeFieldEditPart.getAttribute();
if (attribute != null && attributeFieldEditPart != null) {
currentPropertyUIMap.put(attribute, attributeFieldEditPart);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/freemarker/TemplateUICreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -14,16 +14,21 @@
import java.util.List;
import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.xml.type.AnyType;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.actions.OpenEditorEditInnerContentsAction;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.FieldAssistDisposer;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.freemarker.FreemarkerPackage;
@@ -60,6 +65,26 @@
AttributeFieldEditPart cdatatext = SmooksUIUtils.createCDATAFieldEditor("Inline Template", editingdomain,
toolkit, parent, model, openCDATAEditorAction, true);
+ Control c = cdatatext.getContentControl();
+
+ if (c instanceof Text) {
+ final FieldAssistDisposer disposer = SmooksUIUtils.addBindingsContextAssistToText((Text) c, SmooksUIUtils
+ .getSmooks11ResourceListType((EObject) model));
+ c.addDisposeListener(new DisposeListener() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.DisposeListener#widgetDisposed(org
+ * .eclipse.swt.events.DisposeEvent)
+ */
+ public void widgetDisposed(DisposeEvent e) {
+ disposer.dispose();
+ }
+
+ });
+ }
list.add(cdatatext);
// AttributeFieldEditPart commenttext =
// SmooksUIUtils.createCommentFieldEditor("Template Contents(Comment)",
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaMethodsSelectionDialog.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -63,13 +63,16 @@
MethodSelectionDialog dialog = new MethodSelectionDialog(shell, resource, clazz);
if (dialog.open() == Dialog.OK) {
Method pd = (Method) dialog.getCurrentSelection();
+ if(pd == null){
+ return null;
+ }
return pd.getName();
}else{
return null;
}
}
MessageDialog.openInformation(shell, "Can't open dialog",
- "Can't open java methods selection dialog.");
+ "Can't open java methods selection dialog.Please check the 'class' value of Java Object.");
return null;
}
@@ -103,7 +106,7 @@
fl.marginHeight = 10;
fl.marginWidth = 10;
composite.setLayout(fl);
- viewer = new TableViewer(composite, SWT.BORDER);
+ viewer = new TableViewer(composite, SWT.BORDER|SWT.FULL_SELECTION);
Table table = viewer.getTable();
TableColumn nameColumn = new TableColumn(table, SWT.NONE);
nameColumn.setWidth(100);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaPropertiesSelectionDialog.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -10,9 +10,10 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
-import java.beans.PropertyDescriptor;
+import java.lang.reflect.Array;
import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.DoubleClickEvent;
@@ -39,7 +40,7 @@
import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.configuration.editors.uitls.IFieldDialog;
import org.jboss.tools.smooks.configuration.editors.uitls.IModelProcsser;
-import org.jboss.tools.smooks.configuration.editors.uitls.JavaPropertyUtils;
+import org.jboss.tools.smooks.configuration.editors.uitls.ProjectClassLoader;
/**
* @author Dart (dpeng(a)redhat.com)
@@ -48,28 +49,54 @@
*/
public class JavaPropertiesSelectionDialog implements IFieldDialog {
- private IJavaProject resource;
+ private IJavaProject project;
- private Class<?> clazz;
+ private String className;
- public JavaPropertiesSelectionDialog(IJavaProject resource, Class<?> clazz) {
+ public JavaPropertiesSelectionDialog(IJavaProject resource, String className) {
super();
- this.resource = resource;
- this.clazz = clazz;
+ this.project = resource;
+ this.className = className;
}
public Object open(Shell shell) {
- if (resource != null && clazz != null) {
- PropertySelectionDialog dialog = new PropertySelectionDialog(shell, resource, clazz);
- if (dialog.open() == Dialog.OK) {
- PropertyDescriptor pd = (PropertyDescriptor) dialog.getCurrentSelection();
- return pd.getName();
- }else{
- return null;
+ String errorMessage = "";
+ if(project == null){
+ errorMessage = "Please make sure the project is the 'Java Project'";
+ }
+ try {
+ if (project != null && className != null) {
+ Class<?> clazz = null;
+ ProjectClassLoader classLoader;
+
+ classLoader = new ProjectClassLoader(project);
+
+ if (className.endsWith("[]")) {
+ String arrayClassName = className.substring(0, className.length() - 2);
+ clazz = classLoader.loadClass(arrayClassName);
+ Object arrayInstance = Array.newInstance(clazz, 0);
+ clazz = arrayInstance.getClass();
+ } else {
+ clazz = classLoader.loadClass(className);
+ }
+ JavaBeanModel beanModel = JavaBeanModelFactory.getJavaBeanModel(clazz);
+ PropertySelectionDialog dialog = new PropertySelectionDialog(shell, project, beanModel);
+ if (dialog.open() == Dialog.OK) {
+ JavaBeanModel pd = (JavaBeanModel) dialog.getCurrentSelection();
+ if(pd == null){
+ return null;
+ }
+ return pd.getName();
+ } else {
+ return null;
+ }
}
+ } catch (JavaModelException e) {
+ errorMessage = "";
+ } catch (ClassNotFoundException e) {
+ errorMessage = "'" + className + "' can't be found.";
}
- MessageDialog.openInformation(shell, "Can't open dialog",
- "Can't open java properties selection dialog.");
+ MessageDialog.openInformation(shell, "Can't open dialog", "Can't get properties of '" + className + "'.\n" + errorMessage);
return null;
}
@@ -77,19 +104,17 @@
private TableViewer viewer;
- private Class<?> clazz;
-
private Object currentSelection;
-
-
+ private JavaBeanModel beanModel = null;
+
public PropertySelectionDialog(IShellProvider parentShell) {
super(parentShell);
}
- public PropertySelectionDialog(Shell parentShell, IJavaProject project, Class<?> clazz) {
+ public PropertySelectionDialog(Shell parentShell, IJavaProject project, JavaBeanModel beanModel) {
super(parentShell);
- this.clazz = clazz;
+ this.beanModel = beanModel;
}
@Override
@@ -103,7 +128,7 @@
fl.marginHeight = 10;
fl.marginWidth = 10;
composite.setLayout(fl);
- viewer = new TableViewer(composite, SWT.BORDER);
+ viewer = new TableViewer(composite, SWT.BORDER|SWT.FULL_SELECTION);
Table table = viewer.getTable();
TableColumn nameColumn = new TableColumn(table, SWT.NONE);
nameColumn.setWidth(100);
@@ -114,9 +139,8 @@
table.setHeaderVisible(true);
viewer.setContentProvider(new PropertyDescriptorContentProvider());
viewer.setLabelProvider(new PropertyDescriptorLabelProvider());
- PropertyDescriptor[] pds = JavaPropertyUtils.getPropertyDescriptor(clazz);
- viewer.setInput(pds);
- viewer.addDoubleClickListener(new IDoubleClickListener(){
+ viewer.setInput(beanModel);
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
public void doubleClick(DoubleClickEvent event) {
okPressed();
}
@@ -126,7 +150,7 @@
currentSelection = ((IStructuredSelection) event.getSelection()).getFirstElement();
}
});
- getShell().setText(clazz.getSimpleName() + "'s Properties");
+ getShell().setText(beanModel.getName() + "'s Properties");
return composite;
}
@@ -142,6 +166,9 @@
private class PropertyDescriptorContentProvider implements IStructuredContentProvider {
public Object[] getElements(Object inputElement) {
+ if (inputElement instanceof JavaBeanModel) {
+ return ((JavaBeanModel) inputElement).getChildren().toArray();
+ }
if (inputElement.getClass().isArray()) {
return (Object[]) inputElement;
}
@@ -168,17 +195,13 @@
}
public String getColumnText(Object element, int columnIndex) {
- if (element instanceof PropertyDescriptor) {
- PropertyDescriptor p = (PropertyDescriptor) element;
+ if (element instanceof JavaBeanModel) {
+ JavaBeanModel p = (JavaBeanModel) element;
switch (columnIndex) {
case 0:
return p.getName();
case 1:
- Class<?> cla = p.getPropertyType();
- if(cla.isArray()){
- return cla.getComponentType().getName() + "[]";
- }
- return cla.getName();
+ return p.getBeanClassString();
}
}
return getText(element);
@@ -192,6 +215,6 @@
public void setModelProcesser(IModelProcsser processer) {
// TODO Auto-generated method stub
-
+
}
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanExpressionUICreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -14,17 +14,19 @@
import java.util.List;
import org.eclipse.emf.ecore.EAttribute;
-import org.eclipse.emf.ecore.xml.type.AnyType;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
-import org.jboss.tools.smooks.configuration.actions.OpenEditorEditInnerContentsAction;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
import org.jboss.tools.smooks.configuration.editors.IPropertyUICreator;
-import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.FieldAssistDisposer;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.javabean.JavabeanPackage;
@@ -32,7 +34,8 @@
* @author Dart (dpeng(a)redhat.com)
*
*/
-public class JavabeanExpressionUICreator extends PropertyUICreator implements IPropertyUICreator {
+public class JavabeanExpressionUICreator extends PropertiesAndSetterMethodSearchFieldEditorCreator implements
+ IPropertyUICreator {
/*
* (non-Javadoc)
@@ -45,34 +48,50 @@
* org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
*/
@Override
- public List<AttributeFieldEditPart> createExtendUIOnBottom(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+ public List<AttributeFieldEditPart> createExtendUIOnBottom(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, SmooksMultiFormEditor formEditor) {
List<AttributeFieldEditPart> list = new ArrayList<AttributeFieldEditPart>();
- OpenEditorEditInnerContentsAction openCDATAEditorAction = new OpenEditorEditInnerContentsAction(editingdomain,
- (AnyType) model, SmooksUIUtils.VALUE_TYPE_TEXT, "txt");
+ AttributeFieldEditPart cdatatext = SmooksUIUtils.createCDATAFieldEditor("Expression", editingdomain, toolkit,
+ parent, model, null, true);
+ if (cdatatext != null) {
+ list.add(cdatatext);
+
+ Control c = cdatatext.getContentControl();
+
+ if(c instanceof Text){
+ final FieldAssistDisposer disposer = SmooksUIUtils.addBindingsContextAssistToText((Text)c, SmooksUIUtils.getSmooks11ResourceListType((EObject)model));
+ c.addDisposeListener(new DisposeListener(){
- AttributeFieldEditPart cdatatext = SmooksUIUtils.createStringFieldEditor("Expression", parent, editingdomain,
- toolkit, null, model, true, false, false, 300, null, SmooksUIUtils.VALUE_TYPE_TEXT,
- openCDATAEditorAction);
-
- if(cdatatext != null){
- list.add(cdatatext);
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
+ */
+ public void widgetDisposed(DisposeEvent e) {
+ disposer.dispose();
+ }
+
+ });
+ }
}
- openCDATAEditorAction.setRelateText((Text)cdatatext.getContentControl());
-
return list;
}
-
- public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- List<AttributeFieldEditPart> list = createElementSelectionSection("Execute On Element", editingdomain, toolkit,
- parent, model, formEditor, JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT,
- JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS);
-
+
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+
+ List<AttributeFieldEditPart> list = new ArrayList<AttributeFieldEditPart>();
+
+ AttributeFieldEditPart pEditPart = createPropertiesSearchFieldEditor(toolkit, parent, getPropertyDescriptor(
+ editingdomain, JavabeanPackage.Literals.EXPRESSION_TYPE__PROPERTY, model), model);
+ AttributeFieldEditPart mEditPart = createMethodsSearchFieldEditor(toolkit, parent, getPropertyDescriptor(
+ editingdomain, JavabeanPackage.Literals.EXPRESSION_TYPE__SETTER_METHOD, model), model);
+ list.add(pEditPart);
+ list.add(mEditPart);
+ list.addAll(createElementSelectionSection("Execute On Element", editingdomain, toolkit, parent, model,
+ formEditor, JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT,
+ JavabeanPackage.Literals.EXPRESSION_TYPE__EXEC_ON_ELEMENT_NS));
+
return list;
}
-
-
/*
* (non-Javadoc)
@@ -92,6 +111,12 @@
if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__VALUE) {
return true;
}
+ if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__PROPERTY) {
+ return true;
+ }
+ if (feature == JavabeanPackage.Literals.EXPRESSION_TYPE__SETTER_METHOD) {
+ return true;
+ }
return super.ignoreProperty(feature);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavabeanWiringUICreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.smooks.configuration.editors.javabean;
+import java.util.ArrayList;
import java.util.List;
import org.eclipse.emf.ecore.EAttribute;
@@ -28,17 +29,18 @@
@Override
protected boolean canCreatePropertiesSearchFieldEditor(EAttribute feature) {
- if (feature == JavabeanPackage.eINSTANCE.getWiringType_Property()) {
- return true;
- }
+ // if (feature == JavabeanPackage.eINSTANCE.getWiringType_Property()) {
+ // return true;
+ // }
return false;
}
@Override
protected boolean canCreateMethodsSearchFieldEditor(EAttribute feature) {
- if (feature == JavabeanPackage.eINSTANCE.getWiringType_SetterMethod()) {
- return true;
- }
+ // if (feature ==
+ // JavabeanPackage.eINSTANCE.getWiringType_SetterMethod()) {
+ // return true;
+ // }
return super.canCreateMethodsSearchFieldEditor(feature);
}
@@ -57,6 +59,12 @@
if (feature == JavabeanPackage.eINSTANCE.getWiringType_WireOnElementNS()) {
return true;
}
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_Property()) {
+ return true;
+ }
+ if (feature == JavabeanPackage.eINSTANCE.getWiringType_SetterMethod()) {
+ return true;
+ }
return super.ignoreProperty(feature);
}
@@ -71,11 +79,21 @@
* org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor)
*/
@Override
- public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit,
- Composite parent, Object model, SmooksMultiFormEditor formEditor) {
- return createElementSelectionSection("Wrie On Element", editingdomain, toolkit, parent, model, formEditor,
+ public List<AttributeFieldEditPart> createExtendUIOnTop(AdapterFactoryEditingDomain editingdomain,
+ FormToolkit toolkit, Composite parent, Object model, SmooksMultiFormEditor formEditor) {
+
+ List<AttributeFieldEditPart> list = new ArrayList<AttributeFieldEditPart>();
+
+ AttributeFieldEditPart pEditPart = createPropertiesSearchFieldEditor(toolkit, parent, getPropertyDescriptor(
+ editingdomain, JavabeanPackage.eINSTANCE.getWiringType_Property(), model), model);
+ AttributeFieldEditPart mEditPart = createMethodsSearchFieldEditor(toolkit, parent, getPropertyDescriptor(
+ editingdomain, JavabeanPackage.eINSTANCE.getWiringType_SetterMethod(), model), model);
+ list.add(pEditPart);
+ list.add(mEditPart);
+ list.addAll(createElementSelectionSection("Wrie On Element", editingdomain, toolkit, parent, model, formEditor,
JavabeanPackage.eINSTANCE.getWiringType_WireOnElement(),
- JavabeanPackage.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS);
+ JavabeanPackage.Literals.WIRING_TYPE__WIRE_ON_ELEMENT_NS));
+ return list;
}
@Override
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/PropertiesAndSetterMethodSearchFieldEditorCreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -47,11 +47,11 @@
}
protected String getPropertiesSearchButtonName(){
- return "Search property";
+ return "Browse";
}
protected String getMethodsSearchButtonName(){
- return "Search setter method";
+ return "Browse";
}
protected AttributeFieldEditPart createPropertiesSearchFieldEditor(FormToolkit toolkit, Composite parent,
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/smooks/ConditionTypeUICreator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -13,15 +13,21 @@
import java.util.ArrayList;
import java.util.List;
+
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.jboss.tools.smooks.configuration.editors.AttributeFieldEditPart;
import org.jboss.tools.smooks.configuration.editors.PropertyUICreator;
import org.jboss.tools.smooks.configuration.editors.SmooksMultiFormEditor;
+import org.jboss.tools.smooks.configuration.editors.uitls.FieldAssistDisposer;
import org.jboss.tools.smooks.configuration.editors.uitls.SmooksUIUtils;
import org.jboss.tools.smooks.model.smooks.SmooksPackage;
@@ -69,8 +75,23 @@
public List<AttributeFieldEditPart> createExtendUIOnBottom(AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model, SmooksMultiFormEditor formEditor) {
List<AttributeFieldEditPart> list = new ArrayList<AttributeFieldEditPart>();
- AttributeFieldEditPart cdatatext = SmooksUIUtils.createCDATAFieldEditor("Condition Value", editingdomain,
+ AttributeFieldEditPart cdatatext = SmooksUIUtils.createCDATAFieldEditor("Inline Condition", editingdomain,
toolkit, parent, model, null,true);
+ Control c = cdatatext.getContentControl();
+
+ if(c instanceof Text){
+ final FieldAssistDisposer disposer = SmooksUIUtils.addBindingsContextAssistToText((Text)c, SmooksUIUtils.getSmooks11ResourceListType((EObject)model));
+ c.addDisposeListener(new DisposeListener(){
+
+ /* (non-Javadoc)
+ * @see org.eclipse.swt.events.DisposeListener#widgetDisposed(org.eclipse.swt.events.DisposeEvent)
+ */
+ public void widgetDisposed(DisposeEvent e) {
+ disposer.dispose();
+ }
+
+ });
+ }
list.add(cdatatext);
return list;
}
@@ -87,6 +108,12 @@
if (feature == SmooksPackage.eINSTANCE.getConditionType_Value()) {
return true;
}
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_Evaluator()) {
+ return true;
+ }
+ if (feature == SmooksPackage.eINSTANCE.getConditionType_Id()) {
+ return true;
+ }
return super.ignoreProperty(feature);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BeanIdRefProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BeanIdRefProposalProvider.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BeanIdRefProposalProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -37,7 +37,7 @@
List<IContentProposal> proposalList = new ArrayList<IContentProposal>();
SmooksResourceListType listType = getSmooksResourceList(model);
if(listType != null){
- List<String> idList = SmooksUIUtils.getBeanIdList(listType);
+ List<String> idList = SmooksUIUtils.getBeanIdStringList(listType);
for (Iterator<String> iterator = idList.iterator(); iterator.hasNext();) {
String id = (String) iterator.next();
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,109 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import org.eclipse.jface.fieldassist.IContentProposal;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class BindingsContextContentProposal implements IContentProposal {
+
+ private int startIndex = 0;
+
+ private String content = null;
+
+ public static final int BINDINGS = 1;
+
+ public static final int PROPERTIES = 2;
+
+ public static final int WIRTINGS = 3;
+
+ public static final int EXPRESSIONS = 4;
+
+ private int type = BINDINGS;
+
+ public BindingsContextContentProposal(int type , String content,int startIndex){
+ this.startIndex = startIndex;
+ this.content = content;
+ this.type = type;
+ }
+
+
+ /**
+ * @return the type
+ */
+ public int getType() {
+ return type;
+ }
+
+
+
+ /**
+ * @param type the type to set
+ */
+ public void setType(int type) {
+ this.type = type;
+ }
+
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getContent()
+ */
+ public String getContent() {
+ // TODO Auto-generated method stub
+ return content;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getCursorPosition()
+ */
+ public int getCursorPosition() {
+ if(content != null){
+ return getContent().length() + startIndex ;
+ }
+ return startIndex;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getDescription()
+ */
+ public String getDescription() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getLabel()
+ */
+ public String getLabel() {
+ String name = "";
+ if(type == BINDINGS){
+ name = "Java Object";
+ }
+ if(type == PROPERTIES){
+ name = "Value Binding";
+ }
+ if(type == WIRTINGS){
+ name = "Wiring";
+ }
+ if(type == EXPRESSIONS){
+ name = "Expression";
+ }
+ if(name.length() != 0 && content != null){
+ return content + " - ( " + name + " )";
+ }
+ return content;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextContentProposal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,215 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
+import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.javabean.ExpressionType;
+import org.jboss.tools.smooks.model.javabean.ValueType;
+import org.jboss.tools.smooks.model.javabean.WiringType;
+import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class BindingsContextProposalProvider implements IContentProposalProvider {
+
+ private Text textControl;
+
+ private List<BindingsType> bindingsList = null;
+
+ private List<String> bindingsIDList = null;
+
+ public BindingsContextProposalProvider(SmooksResourceListType listType, Text textControl) {
+ this.textControl = textControl;
+ bindingsList = SmooksUIUtils.getBeanIdList(listType);
+ bindingsIDList = SmooksUIUtils.getBeanIdStringList(listType);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.IContentProposalProvider#getProposals(java
+ * .lang.String, int)
+ */
+ public IContentProposal[] getProposals(String contents, int position) {
+ if (contents.length() == 2) {
+ System.out.println();
+ }
+ if (bindingsList == null || bindingsList.isEmpty()) {
+ return new IContentProposal[] {};
+ }
+ String content = textControl.getText(0, textControl.getCaretPosition() - 1);
+
+ ContextString currentContextString = loadContextString(content);
+
+ char dotChar = currentContextString.getEndChar();
+ int endIndex = currentContextString.getEndIndex();
+ String replaceContent = currentContextString.getContent();
+ List<IContentProposal> plist = new ArrayList<IContentProposal>();
+ if (dotChar == '.') {
+
+ BindingsType bindings = loadContextBindings(textControl.getText(0, endIndex - 1));
+ if (bindings != null) {
+ List<ValueType> valueList = bindings.getValue();
+ for (Iterator<?> iterator = valueList.iterator(); iterator.hasNext();) {
+ ValueType valueType = (ValueType) iterator.next();
+ String property = valueType.getProperty();
+ if (property != null) {
+ if (property.toLowerCase().startsWith(replaceContent.toLowerCase())) {
+ plist.add(new BindingsContextContentProposal(BindingsContextContentProposal.PROPERTIES,
+ property, position - replaceContent.length()));
+ }
+ }
+ }
+ List<WiringType> wiringList = bindings.getWiring();
+ for (Iterator<?> iterator = wiringList.iterator(); iterator.hasNext();) {
+ WiringType wiringType = (WiringType) iterator.next();
+ String property = wiringType.getProperty();
+ if (property != null) {
+ if (property.toLowerCase().startsWith(replaceContent.toLowerCase())) {
+ plist.add(new BindingsContextContentProposal(BindingsContextContentProposal.WIRTINGS,
+ property, position - replaceContent.length()));
+ }
+ }
+ }
+
+ List<ExpressionType> expressionList = bindings.getExpression();
+ for (Iterator<?> iterator = expressionList.iterator(); iterator.hasNext();) {
+ ExpressionType wiringType = (ExpressionType) iterator.next();
+ String property = wiringType.getProperty();
+ if (property != null) {
+ if (property.toLowerCase().startsWith(replaceContent.toLowerCase())) {
+ plist.add(new BindingsContextContentProposal(BindingsContextContentProposal.EXPRESSIONS,
+ property, position - replaceContent.length()));
+ }
+ }
+ }
+ }
+ } else {
+ for (Iterator<String> iterator = bindingsIDList.iterator(); iterator.hasNext();) {
+ String id = (String) iterator.next();
+ if (id.toLowerCase().startsWith(replaceContent.toLowerCase())) {
+ plist.add(new BindingsContextContentProposal(BindingsContextContentProposal.BINDINGS, id, position
+ - replaceContent.length()));
+ }
+ }
+ }
+
+ return plist.toArray(new IContentProposal[] {});
+ }
+
+ private BindingsType loadContextBindings(String content) {
+ ContextString cs = loadContextString(content);
+ // if (cs.endChar != '.') {
+ String name = cs.getContent();
+
+ for (Iterator<?> iterator = bindingsList.iterator(); iterator.hasNext();) {
+ BindingsType bindings = (BindingsType) iterator.next();
+ String id = bindings.getBeanId();
+ if (id != null) {
+ if (id.equalsIgnoreCase(name)) {
+ return bindings;
+ }
+ }
+ }
+ // }
+ return null;
+ }
+
+ private ContextString loadContextString(String content) {
+ char[] chars = content.toCharArray();
+ char dotChar = ' ';
+ int endIndex = 0;
+ for (int i = chars.length - 1; i > 0; i--) {
+ char c = chars[i];
+ if (c != ' ' && c != '\r' && c != '\n' && c != '\t' && Character.isLetterOrDigit(c)) {
+ continue;
+ }
+ dotChar = c;
+ endIndex = i;
+ break;
+ }
+ ContextString cs = new ContextString();
+ cs.setEndChar(dotChar);
+ if (content.length() == 0) {
+ cs.setContent(content);
+ } else {
+ cs.setContent(content.substring(endIndex + 1, content.length()));
+ }
+ if (endIndex == 0) {
+ cs.setContent(content.substring(endIndex, content.length()));
+ }
+ cs.setEndIndex(endIndex);
+ return cs;
+ }
+
+ private class ContextString {
+ char endChar = ' ';
+ String content = null;
+ int endIndex = 0;
+
+ /**
+ * @return the endIndex
+ */
+ public int getEndIndex() {
+ return endIndex;
+ }
+
+ /**
+ * @param endIndex
+ * the endIndex to set
+ */
+ public void setEndIndex(int endIndex) {
+ this.endIndex = endIndex;
+ }
+
+ /**
+ * @return the endChar
+ */
+ public char getEndChar() {
+ return endChar;
+ }
+
+ /**
+ * @param endChar
+ * the endChar to set
+ */
+ public void setEndChar(char endChar) {
+ this.endChar = endChar;
+ }
+
+ /**
+ * @return the content
+ */
+ public String getContent() {
+ return content;
+ }
+
+ /**
+ * @param content
+ * the content to set
+ */
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/BindingsContextProposalProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertiesProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertiesProposalProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertiesProposalProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModelFactory;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class JavaPropertiesProposalProvider implements IContentProposalProvider {
+
+ private JavaBeanModel beanModel;
+
+ public JavaPropertiesProposalProvider(IProject project,String className){
+ try {
+ if (project != null && className != null) {
+ Class<?> clazz = null;
+ ProjectClassLoader classLoader;
+
+ classLoader = new ProjectClassLoader(JavaCore.create(project));
+
+ if (className.endsWith("[]")) {
+ String arrayClassName = className.substring(0, className.length() - 2);
+ clazz = classLoader.loadClass(arrayClassName);
+ Object arrayInstance = Array.newInstance(clazz, 0);
+ clazz = arrayInstance.getClass();
+ } else {
+ clazz = classLoader.loadClass(className);
+ }
+ beanModel = JavaBeanModelFactory.getJavaBeanModel(clazz);
+ }
+ } catch (JavaModelException e) {
+ } catch (ClassNotFoundException e) {
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposalProvider#getProposals(java.lang.String, int)
+ */
+ public IContentProposal[] getProposals(String contents, int position) {
+ if(beanModel == null){
+ return new IContentProposal[]{};
+ }
+ List<IContentProposal> list = new ArrayList<IContentProposal>();
+ List<IXMLStructuredObject> children = beanModel.getChildren();
+ for (Iterator<?> iterator = children.iterator(); iterator.hasNext();) {
+ IXMLStructuredObject structuredObject = (IXMLStructuredObject) iterator.next();
+ if(structuredObject != null && structuredObject instanceof JavaBeanModel){
+ String name = ((JavaBeanModel)structuredObject).getName();
+ if(name != null){
+ if(name.toLowerCase().startsWith(contents.toLowerCase())){
+ list.add(new XMLStructuredModelProposal(structuredObject));
+ }
+ }
+ }
+ }
+
+ return list.toArray(new IContentProposal[]{});
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertiesProposalProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertyUtils.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertyUtils.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/JavaPropertyUtils.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -26,6 +26,9 @@
}
public static Method[] getSetterMethods(Class<?> clazz){
+ if(clazz == null){
+ return new Method[]{};
+ }
Method[] methods = clazz.getMethods();
List<Method> mlist = new ArrayList<Method>();
for (int i = 0; i < methods.length; i++) {
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/MultiTextContentAdapter.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/MultiTextContentAdapter.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/MultiTextContentAdapter.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import org.eclipse.jface.fieldassist.TextContentAdapter;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class MultiTextContentAdapter extends TextContentAdapter {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#getControlContents(org
+ * .eclipse.swt.widgets.Control)
+ */
+ @Override
+ public String getControlContents(Control control) {
+ // TODO Auto-generated method stub
+ return super.getControlContents(control);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#getCursorPosition(org
+ * .eclipse.swt.widgets.Control)
+ */
+ @Override
+ public int getCursorPosition(Control control) {
+ // TODO Auto-generated method stub
+ return super.getCursorPosition(control);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#getInsertionBounds(org
+ * .eclipse.swt.widgets.Control)
+ */
+ @Override
+ public Rectangle getInsertionBounds(Control control) {
+ // TODO Auto-generated method stub
+ Rectangle re = super.getInsertionBounds(control);
+ return re;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#getSelection(org.eclipse
+ * .swt.widgets.Control)
+ */
+ @Override
+ public Point getSelection(Control control) {
+ // TODO Auto-generated method stub
+ return super.getSelection(control);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#insertControlContents
+ * (org.eclipse.swt.widgets.Control, java.lang.String, int)
+ */
+ @Override
+ public void insertControlContents(Control control, String text, int cursorPosition) {
+ Text te = (Text) control;
+ int caretPosition = te.getCaretPosition() - 1;
+ if (caretPosition < 0) {
+ caretPosition = 0;
+ }
+ String content = te.getText(0, caretPosition);
+ char[] chars = content.toCharArray();
+ int endIndex = 0;
+ for (int i = chars.length - 1; i > 0; i--) {
+ char c = chars[i];
+ if (c != ' ' && c != '\r' && c != '\n' && c != '\t' && Character.isLetterOrDigit(c)) {
+ continue;
+ }
+ endIndex = i;
+ break;
+ }
+ if (content.length() == 0) {
+ } else {
+ content = content.substring(endIndex + 1, content.length());
+ }
+ String all = te.getText();
+ String first="";
+ if(all.length() != 0){
+ first = all.substring(0, endIndex + 1);
+ }
+ if (endIndex == 0) {
+ first = "";
+ }
+ String second = "";
+ if(all.length() != 0){
+ second = all.substring(endIndex + 1 + content.length(), all.length());
+ }
+ if (all.length() == 1) {
+ second = "";
+ }
+ all = first + text + second;
+ te.setText(all);
+ ((Text) control).setSelection(cursorPosition, cursorPosition);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#setControlContents(org
+ * .eclipse.swt.widgets.Control, java.lang.String, int)
+ */
+ @Override
+ public void setControlContents(Control control, String text, int cursorPosition) {
+ super.setControlContents(control, text, cursorPosition);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#setCursorPosition(org
+ * .eclipse.swt.widgets.Control, int)
+ */
+ @Override
+ public void setCursorPosition(Control control, int position) {
+ // TODO Auto-generated method stub
+ super.setCursorPosition(control, position);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.fieldassist.TextContentAdapter#setSelection(org.eclipse
+ * .swt.widgets.Control, org.eclipse.swt.graphics.Point)
+ */
+ @Override
+ public void setSelection(Control control, Point range) {
+ // TODO Auto-generated method stub
+ super.setSelection(control, range);
+ }
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/MultiTextContentAdapter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SelectorContentProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SelectorContentProposalProvider.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SelectorContentProposalProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -40,6 +40,9 @@
* .lang.String, int)
*/
public IContentProposal[] getProposals(String contents, int position) {
+ if(contents.indexOf("h") != -1){
+ System.out.println();
+ }
List<Object> list = SelectoreSelectionDialog.generateInputData(extType);
if(list == null || list.isEmpty()){
return new IContentProposal[]{};
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodContentProposal.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodContentProposal.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodContentProposal.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import java.lang.reflect.Method;
+
+import org.eclipse.jface.fieldassist.IContentProposal;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class SetterMethodContentProposal implements IContentProposal {
+
+
+ private String content = null;
+
+ public SetterMethodContentProposal(Method method){
+ content = method.getName();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getContent()
+ */
+ public String getContent() {
+ return content;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getCursorPosition()
+ */
+ public int getCursorPosition() {
+ if(content != null){
+ return content.length();
+ }
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getDescription()
+ */
+ public String getDescription() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getLabel()
+ */
+ public String getLabel() {
+ return content;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodContentProposal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodProposalProvider.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodProposalProvider.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodProposalProvider.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class SetterMethodProposalProvider implements IContentProposalProvider {
+
+
+ private Method[] settMethods = null;
+
+ public SetterMethodProposalProvider(Class<?> clazz){
+ settMethods = JavaPropertyUtils.getSetterMethods(clazz);
+ }
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposalProvider#getProposals(java.lang.String, int)
+ */
+ public IContentProposal[] getProposals(String contents, int position) {
+ if(settMethods == null || settMethods.length == 0){
+ return new IContentProposal[]{};
+ }
+
+ List<IContentProposal> list = new ArrayList<IContentProposal>();
+ for (int i = 0; i < settMethods.length; i++) {
+ Method m = settMethods[i];
+ String n = m.getName();
+ if(n != null){
+ if(n.toLowerCase().startsWith(contents)){
+ list.add(new SetterMethodContentProposal(m));
+ }
+ }
+ }
+ return list.toArray(new IContentProposal[]{});
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SetterMethodProposalProvider.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
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-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/SmooksUIUtils.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -52,6 +52,7 @@
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
+import org.eclipse.jface.fieldassist.IContentProposal;
import org.eclipse.jface.fieldassist.IContentProposalListener;
import org.eclipse.jface.fieldassist.IContentProposalListener2;
import org.eclipse.jface.fieldassist.IContentProposalProvider;
@@ -105,16 +106,20 @@
import org.jboss.tools.smooks.configuration.editors.CurrentProjecViewerFilter;
import org.jboss.tools.smooks.configuration.editors.FieldMarkerComposite;
import org.jboss.tools.smooks.configuration.editors.FileSelectionWizard;
+import org.jboss.tools.smooks.configuration.editors.GraphicsConstants;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
import org.jboss.tools.smooks.configuration.editors.OpenFileHyperLinkListener;
import org.jboss.tools.smooks.configuration.editors.SelectorAttributes;
import org.jboss.tools.smooks.configuration.editors.SelectoreSelectionDialog;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaMethodsSelectionDialog;
import org.jboss.tools.smooks.configuration.editors.javabean.JavaPropertiesSelectionDialog;
+import org.jboss.tools.smooks.core.SmooksCoreActivator;
import org.jboss.tools.smooks.model.graphics.ext.DocumentRoot;
import org.jboss.tools.smooks.model.graphics.ext.SmooksGraphicsExtType;
import org.jboss.tools.smooks.model.graphics.ext.util.SmooksGraphicsExtResourceFactoryImpl;
import org.jboss.tools.smooks.model.javabean.BindingsType;
+import org.jboss.tools.smooks.model.javabean.provider.Javabean1EditPlugin;
import org.jboss.tools.smooks.model.smooks.AbstractResourceConfig;
import org.jboss.tools.smooks.model.smooks.ConditionType;
import org.jboss.tools.smooks.model.smooks.SmooksResourceListType;
@@ -150,7 +155,10 @@
public static final String[] SELECTOR_SPERATORS = new String[] { " ", "/" };
- public static List<String> getBeanIdList(SmooksResourceListType resourceList) {
+ public static List<String> getBeanIdStringList(SmooksResourceListType resourceList) {
+ if (resourceList == null) {
+ return null;
+ }
List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
List<String> beanIdList = new ArrayList<String>();
for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
@@ -165,6 +173,21 @@
return beanIdList;
}
+ public static List<BindingsType> getBeanIdList(SmooksResourceListType resourceList) {
+ if (resourceList == null) {
+ return null;
+ }
+ List<AbstractResourceConfig> rlist = resourceList.getAbstractResourceConfig();
+ List<BindingsType> beanIdList = new ArrayList<BindingsType>();
+ for (Iterator<?> iterator = rlist.iterator(); iterator.hasNext();) {
+ AbstractResourceConfig abstractResourceConfig = (AbstractResourceConfig) iterator.next();
+ if (abstractResourceConfig instanceof BindingsType) {
+ beanIdList.add((BindingsType) abstractResourceConfig);
+ }
+ }
+ return beanIdList;
+ }
+
public static void createMixedTextFieldEditor(String label, AdapterFactoryEditingDomain editingdomain,
FormToolkit toolkit, Composite parent, Object model, boolean linkLabel, IHyperlinkListener listener) {
createMixedTextFieldEditor(label, editingdomain, toolkit, parent, model, false, 0, linkLabel, false, listener,
@@ -564,9 +587,9 @@
}
if (editValue != null && valueIsSet) {
valueText.setText(editValue);
-// if (editValue.length() > 0 && section != null) {
-// section.setExpanded(true);
-// }
+ // if (editValue.length() > 0 && section != null) {
+ // section.setExpanded(true);
+ // }
}
if (valueType == VALUE_TYPE_TEXT && model instanceof AnyType && fEditingDomain != null) {
valueText.addModifyListener(new ModifyListener() {
@@ -579,7 +602,11 @@
SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, null);
} else {
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, valueText.getText());
+ String vt = valueText.getText();
+ if (vt != null) {
+ vt = vt.replaceAll("\r", "");
+ }
+ SmooksModelUtils.setTextToSmooksType(fEditingDomain, (AnyType) fm, vt);
}
}
}
@@ -596,7 +623,11 @@
SmooksModelUtils.setCommentToSmooksType(fEditingDomain, (AnyType) fm, null);
} else {
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setCommentToSmooksType(fEditingDomain, (AnyType) fm, valueText.getText());
+ String vt = valueText.getText();
+ if (vt != null) {
+ vt = vt.replaceAll("\r", "");
+ }
+ SmooksModelUtils.setCommentToSmooksType(fEditingDomain, (AnyType) fm, vt);
}
}
}
@@ -613,7 +644,11 @@
SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, null);
} else {
if (!valueText.getText().equals(text)) {
- SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, valueText.getText());
+ String vt = valueText.getText();
+ if (vt != null) {
+ vt = vt.replaceAll("\r", "");
+ }
+ SmooksModelUtils.setCDATAToSmooksType(fEditingDomain, (AnyType) fm, vt);
}
}
}
@@ -720,12 +755,12 @@
return createStringFieldEditor(label, parent, editingdomain, toolkit, null, model, true, true, false, 300,
null, VALUE_TYPE_CDATA, action);
}
-
+
public static AttributeFieldEditPart createCDATAFieldEditor(String label,
AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent, Object model,
- OpenEditorEditInnerContentsAction action,boolean expanedEditor) {
+ OpenEditorEditInnerContentsAction action, boolean expanedEditor) {
return createStringFieldEditor(label, parent, editingdomain, toolkit, null, model, true, true, false, 300,
- null, VALUE_TYPE_CDATA, action,expanedEditor);
+ null, VALUE_TYPE_CDATA, action, expanedEditor);
}
public static AttributeFieldEditPart createCommentFieldEditor(String label,
@@ -734,12 +769,12 @@
return createStringFieldEditor(label, parent, editingdomain, toolkit, null, model, true, true, false, 300,
null, VALUE_TYPE_COMMENT, action);
}
-
+
public static AttributeFieldEditPart createCommentFieldEditor(String label,
AdapterFactoryEditingDomain editingdomain, FormToolkit toolkit, Composite parent, Object model,
- OpenEditorEditInnerContentsAction action,boolean expandEditor) {
+ OpenEditorEditInnerContentsAction action, boolean expandEditor) {
return createStringFieldEditor(label, parent, editingdomain, toolkit, null, model, true, true, false, 300,
- null, VALUE_TYPE_COMMENT, action,expandEditor);
+ null, VALUE_TYPE_COMMENT, action, expandEditor);
}
public static AttributeFieldEditPart createJavaTypeSearchFieldEditor(Composite parent, FormToolkit toolkit,
@@ -784,8 +819,7 @@
notificationComposite.setLayoutData(gd);
editpart.setFieldMarker(notificationComposite);
- final SearchComposite searchComposite = new SearchComposite(tcom, toolkit, "Search Class", dialog,
- SWT.NONE);
+ final SearchComposite searchComposite = new SearchComposite(tcom, toolkit, "Browse", dialog, SWT.NONE);
gd = new GridData(GridData.FILL_HORIZONTAL);
searchComposite.setLayoutData(gd);
Object editValue = getEditValue(propertyDescriptor, model);
@@ -874,7 +908,11 @@
}
public static IResource getResource(EObject model) {
+ if (model == null)
+ return null;
final Resource resource = ((EObject) model).eResource();
+ if (resource == null)
+ return null;
URI uri = resource.getURI();
IResource workspaceResource = null;
if (uri.isPlatformResource()) {
@@ -898,16 +936,40 @@
final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
+ Class<?> clazz = null;
try {
ProjectClassLoader classLoader = new ProjectClassLoader(project);
- Class<?> clazz = classLoader.loadClass(classString);
- JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
- return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select method", dialog,
- (EObject) model);
+ clazz = classLoader.loadClass(classString);
} catch (Exception e) {
// ignore
}
- return null;
+ JavaMethodsSelectionDialog dialog = new JavaMethodsSelectionDialog(project, clazz);
+ AttributeFieldEditPart editPart = SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
+ buttonName, dialog, (EObject) model);
+
+ Control c = editPart.getContentControl();
+ if (c instanceof SearchComposite) {
+ Text text = ((SearchComposite) c).getText();
+ IResource resource = getResource(model);
+ if (resource != null) {
+ final FieldAssistDisposer disposer = addJavaSetterMethodFieldAssistToText(text, clazz);
+ text.addDisposeListener(new DisposeListener() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.DisposeListener#widgetDisposed
+ * (org.eclipse.swt.events.DisposeEvent)
+ */
+ public void widgetDisposed(DisposeEvent e) {
+ disposer.dispose();
+ }
+
+ });
+ }
+ }
+ return editPart;
}
public static String generateFullPath(IXMLStructuredObject node, final String sperator) {
@@ -1095,16 +1157,33 @@
final EObject model) {
String classString = ((BindingsType) container).getClass_();
IJavaProject project = getJavaProject(container);
- try {
- ProjectClassLoader classLoader = new ProjectClassLoader(project);
- Class<?> clazz = classLoader.loadClass(classString);
- JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, clazz);
- return SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor, "Select property",
- dialog, (EObject) model);
- } catch (Exception e) {
- // ignore
+ JavaPropertiesSelectionDialog dialog = new JavaPropertiesSelectionDialog(project, classString);
+ AttributeFieldEditPart editPart = SmooksUIUtils.createDialogFieldEditor(parent, toolkit, propertyDescriptor,
+ buttonName, dialog, (EObject) model);
+ Control c = editPart.getContentControl();
+ if (c instanceof SearchComposite) {
+ Text text = ((SearchComposite) c).getText();
+ IResource resource = getResource(model);
+ if (resource != null) {
+ final FieldAssistDisposer disposer = addJavaPropertiesFieldAssistToText(text, resource.getProject(),
+ classString);
+ text.addDisposeListener(new DisposeListener() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.swt.events.DisposeListener#widgetDisposed
+ * (org.eclipse.swt.events.DisposeEvent)
+ */
+ public void widgetDisposed(DisposeEvent e) {
+ disposer.dispose();
+ }
+
+ });
+ }
}
- return null;
+ return editPart;
}
public static Object getEditValue(IItemPropertyDescriptor propertyDescriptor, Object model) {
@@ -1382,6 +1461,169 @@
}
+ public static FieldAssistDisposer addJavaPropertiesFieldAssistToText(Text text, IProject project, String className) {
+ // Decorate the text widget with the light-bulb image denoting content
+ // assist
+ int bits = SWT.DOWN | SWT.LEFT;
+ ControlDecoration controlDecoration = new ControlDecoration(text, bits);
+ // Configure text widget decoration
+ // No margin
+ controlDecoration.setMarginWidth(0);
+ // Custom hover tip text
+ if (isLinuxOS()) {
+ controlDecoration.setDescriptionText("Content Assist Available (Ctrl + space)");
+ } else {
+ controlDecoration.setDescriptionText("Content Assist Available (Alt + /)");
+ }
+ // Custom hover properties
+ controlDecoration.setShowHover(true);
+ controlDecoration.setShowOnlyOnFocus(true);
+ // Hover image to use
+ FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+ controlDecoration.setImage(contentProposalImage.getImage());
+
+ // Default text widget adapter for field assist
+ TextContentAdapter textContentAdapter = new TextContentAdapter();
+ // Content assist command
+ String command = "org.eclipse.ui.edit.text.contentAssist.proposals"; //$NON-NLS-1$
+
+ // Create the proposal provider
+ JavaPropertiesProposalProvider proposalProvider = new JavaPropertiesProposalProvider(project, className);
+ // Create the adapter
+ ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text, textContentAdapter,
+ proposalProvider, command, allEnglishCharas);
+ // Configure the adapter
+ // Add label provider
+ ILabelProvider labelProvider = new LabelProvider() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof XMLStructuredModelProposal) {
+ return ((XMLStructuredModelProposal) element).getLabel();
+ }
+ return super.getText(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object
+ * )
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof XMLStructuredModelProposal) {
+ if (((XMLStructuredModelProposal) element).getXmlStructuredObject() instanceof JavaBeanModel) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_ATTRIBUTE);
+ }
+ }
+ return super.getImage(element);
+ }
+
+ };
+ adapter.setLabelProvider(labelProvider);
+ // Replace text field contents with accepted proposals
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+ // Disable default filtering - custom filtering done
+ adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
+ // Add listeners required to reset state for custom filtering
+ SelectorConentProposalListener proposalListener = new SelectorConentProposalListener();
+ adapter.addContentProposalListener((IContentProposalListener) proposalListener);
+ adapter.addContentProposalListener((IContentProposalListener2) proposalListener);
+
+ return new FieldAssistDisposer(adapter, (IContentProposalListener) proposalListener,
+ (IContentProposalListener2) proposalListener);
+
+ }
+
+ public static FieldAssistDisposer addJavaSetterMethodFieldAssistToText(Text text, Class<?> clazz) {
+ // Decorate the text widget with the light-bulb image denoting content
+ // assist
+ int bits = SWT.DOWN | SWT.LEFT;
+ ControlDecoration controlDecoration = new ControlDecoration(text, bits);
+ // Configure text widget decoration
+ // No margin
+ controlDecoration.setMarginWidth(0);
+ // Custom hover tip text
+ if (isLinuxOS()) {
+ controlDecoration.setDescriptionText("Content Assist Available (Ctrl + space)");
+ } else {
+ controlDecoration.setDescriptionText("Content Assist Available (Alt + /)");
+ }
+ // Custom hover properties
+ controlDecoration.setShowHover(true);
+ controlDecoration.setShowOnlyOnFocus(true);
+ // Hover image to use
+ FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+ controlDecoration.setImage(contentProposalImage.getImage());
+
+ // Default text widget adapter for field assist
+ TextContentAdapter textContentAdapter = new TextContentAdapter();
+ // Content assist command
+ String command = "org.eclipse.ui.edit.text.contentAssist.proposals"; //$NON-NLS-1$
+
+ // Create the proposal provider
+ SetterMethodProposalProvider proposalProvider = new SetterMethodProposalProvider(clazz);
+ // Create the adapter
+ ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text, textContentAdapter,
+ proposalProvider, command, allEnglishCharas);
+ // Configure the adapter
+ // Add label provider
+ ILabelProvider labelProvider = new LabelProvider() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof SetterMethodContentProposal) {
+ return ((SetterMethodContentProposal) element).getLabel();
+ }
+ return super.getText(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object
+ * )
+ */
+ @Override
+ public Image getImage(Object element) {
+ return SmooksConfigurationActivator.getDefault().getImageRegistry().get(
+ GraphicsConstants.IMAGE_JAVA_ATTRIBUTE);
+ }
+
+ };
+ adapter.setLabelProvider(labelProvider);
+ // Replace text field contents with accepted proposals
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+ // Disable default filtering - custom filtering done
+ adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
+ // Add listeners required to reset state for custom filtering
+ SelectorConentProposalListener proposalListener = new SelectorConentProposalListener();
+ adapter.addContentProposalListener((IContentProposalListener) proposalListener);
+ adapter.addContentProposalListener((IContentProposalListener2) proposalListener);
+
+ return new FieldAssistDisposer(adapter, (IContentProposalListener) proposalListener,
+ (IContentProposalListener2) proposalListener);
+
+ }
+
public static FieldAssistDisposer addBeanIdRefAssistToCombo(Combo combo, EObject model) {
// Decorate the text widget with the light-bulb image denoting content
// assist
@@ -1432,6 +1674,100 @@
(IContentProposalListener2) proposalListener);
}
+ public static FieldAssistDisposer addBindingsContextAssistToText(Text text, SmooksResourceListType model) {
+ // Decorate the text widget with the light-bulb image denoting content
+ // assist
+ int bits = SWT.CENTER | SWT.LEFT;
+ ControlDecoration controlDecoration = new ControlDecoration(text, bits);
+ // Configure text widget decoration
+ // No margin
+ controlDecoration.setMarginWidth(0);
+ // Custom hover tip text
+ if (isLinuxOS()) {
+ controlDecoration.setDescriptionText("Content Assist Available (Ctrl + space)");
+ } else {
+ controlDecoration.setDescriptionText("Content Assist Available (Alt + /)");
+ }
+ // Custom hover properties
+ controlDecoration.setShowHover(true);
+ controlDecoration.setShowOnlyOnFocus(true);
+ // Hover image to use
+ FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
+ FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
+ controlDecoration.setImage(contentProposalImage.getImage());
+
+ // Default text widget adapter for field assist
+ MultiTextContentAdapter textContentAdapter = new MultiTextContentAdapter();
+ // Content assist command
+ String command = "org.eclipse.ui.edit.text.contentAssist.proposals"; //$NON-NLS-1$
+ // Set auto activation character to be a '.'
+
+ // Create the proposal provider
+ BindingsContextProposalProvider proposalProvider = new BindingsContextProposalProvider(model, text);
+ // Create the adapter
+ char[] chars = new char[allEnglishCharas.length + 1];
+ System.arraycopy(allEnglishCharas, 0, chars, 0, allEnglishCharas.length);
+ chars[chars.length - 1] = '.';
+ ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(text, textContentAdapter,
+ proposalProvider, command, chars);
+ // Configure the adapter
+ // Add label provider
+ ILabelProvider labelProvider = new LabelProvider() {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object
+ * )
+ */
+ @Override
+ public Image getImage(Object element) {
+ if (element instanceof BindingsContextContentProposal) {
+ int type = ((BindingsContextContentProposal) element).getType();
+ switch (type) {
+ case BindingsContextContentProposal.BINDINGS:
+ return SmooksCoreActivator.getDefault().getImageRegistry().get("BindingsType");
+ case BindingsContextContentProposal.EXPRESSIONS:
+ return SmooksCoreActivator.getDefault().getImageRegistry().get("ExpressionType");
+ case BindingsContextContentProposal.PROPERTIES:
+ return SmooksCoreActivator.getDefault().getImageRegistry().get("ValueType");
+ case BindingsContextContentProposal.WIRTINGS:
+ return SmooksCoreActivator.getDefault().getImageRegistry().get("WiringType");
+ }
+ }
+ return super.getImage(element);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+ */
+ @Override
+ public String getText(Object element) {
+ if (element instanceof IContentProposal) {
+ return ((IContentProposal) element).getLabel();
+ }
+ return super.getText(element);
+ }
+
+ };
+ adapter.setLabelProvider(labelProvider);
+ // Replace text field contents with accepted proposals
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_INSERT);
+ // Disable default filtering - custom filtering done
+ adapter.setFilterStyle(ContentProposalAdapter.FILTER_NONE);
+ // Add listeners required to reset state for custom filtering
+ SelectorConentProposalListener proposalListener = new SelectorConentProposalListener();
+ adapter.addContentProposalListener((IContentProposalListener) proposalListener);
+ adapter.addContentProposalListener((IContentProposalListener2) proposalListener);
+
+ return new FieldAssistDisposer(adapter, (IContentProposalListener) proposalListener,
+ (IContentProposalListener2) proposalListener);
+ }
+
public static TypeFieldAssistDisposer addTypeFieldAssistToText(Text text, IProject project, int searchScope) {
// Decorate the text widget with the light-bulb image denoting content
// assist
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/XMLStructuredModelProposal.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/XMLStructuredModelProposal.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/XMLStructuredModelProposal.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.smooks.configuration.editors.uitls;
+
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
+import org.jboss.tools.smooks.configuration.editors.javabean.JavaBeanModel;
+
+/**
+ * @author Dart (dpeng(a)redhat.com)
+ *
+ */
+public class XMLStructuredModelProposal implements IContentProposal {
+
+ private IXMLStructuredObject xmlStructuredObject;
+
+ private String content = null;
+
+ public XMLStructuredModelProposal(IXMLStructuredObject xmlStructuredObject){
+ this.xmlStructuredObject = xmlStructuredObject;
+ content = this.xmlStructuredObject.getNodeName();
+ if(xmlStructuredObject instanceof JavaBeanModel){
+ content = ((JavaBeanModel)this.xmlStructuredObject).getName();
+ }
+ }
+
+
+ /**
+ * @return the xmlStructuredObject
+ */
+ public IXMLStructuredObject getXmlStructuredObject() {
+ return xmlStructuredObject;
+ }
+
+
+ /**
+ * @param xmlStructuredObject the xmlStructuredObject to set
+ */
+ public void setXmlStructuredObject(IXMLStructuredObject xmlStructuredObject) {
+ this.xmlStructuredObject = xmlStructuredObject;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getContent()
+ */
+ public String getContent() {
+ return content;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getCursorPosition()
+ */
+ public int getCursorPosition() {
+ if(content != null){
+ return content.length();
+ }
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getDescription()
+ */
+ public String getDescription() {
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.fieldassist.IContentProposal#getLabel()
+ */
+ public String getLabel() {
+ return content;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/uitls/XMLStructuredModelProposal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/AbstractValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/AbstractValidator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/AbstractValidator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -23,52 +23,57 @@
/**
* @author Dart (dpeng(a)redhat.com)
- *
+ *
*/
public abstract class AbstractValidator implements ISmooksValidator {
-
-
- /* (non-Javadoc)
- * @see org.jboss.tools.smooks.configuration.validate.ISmooksValidator#validate(java.util.Collection, org.eclipse.emf.edit.domain.EditingDomain)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.jboss.tools.smooks.configuration.validate.ISmooksValidator#validate
+ * (java.util.Collection, org.eclipse.emf.edit.domain.EditingDomain)
*/
public List<Diagnostic> validate(Collection<?> selectedObjects, EditingDomain editingDomain) {
preStartValidation();
List<Diagnostic> list = new ArrayList<Diagnostic>();
- for (Iterator<?> iterator = selectedObjects.iterator(); iterator.hasNext();) {
- Object object = (Object) iterator.next();
- Diagnostic d = validateModel(object, editingDomain);
- if(d != null){
- list.add(d);
- }
- if (object instanceof EObject) {
- List<Diagnostic> dd = validate(((EObject) object).eContents(),editingDomain);
- if (dd != null) {
- list.addAll(dd);
+ try {
+ for (Iterator<?> iterator = selectedObjects.iterator(); iterator.hasNext();) {
+ Object object = (Object) iterator.next();
+ Diagnostic d = validateModel(object, editingDomain);
+ if (d != null) {
+ list.add(d);
}
+ if (object instanceof EObject) {
+ List<Diagnostic> dd = validate(((EObject) object).eContents(), editingDomain);
+ if (dd != null) {
+ list.addAll(dd);
+ }
+ }
}
+ } catch (Throwable t) {
+
}
return list;
}
-
- protected void preStartValidation(){
-
- }
- protected Diagnostic newDiagnostic(int severity , String message , Object model, EAttribute property){
- return new BasicDiagnostic(severity, "org.jboss.tools", 0, message, new Object[] {
- model, property });
+ protected void preStartValidation() {
+
}
-
- protected Diagnostic newWaringDiagnostic(String message , Object model, EAttribute property){
+
+ protected Diagnostic newDiagnostic(int severity, String message, Object model, EAttribute property) {
+ return new BasicDiagnostic(severity, "org.jboss.tools", 0, message, new Object[] { model, property });
+ }
+
+ protected Diagnostic newWaringDiagnostic(String message, Object model, EAttribute property) {
return newDiagnostic(Diagnostic.WARNING, message, model, property);
}
-
- protected Diagnostic newErrorDiagnostic(String message , Object model, EAttribute property){
+
+ protected Diagnostic newErrorDiagnostic(String message, Object model, EAttribute property) {
return newDiagnostic(Diagnostic.ERROR, message, model, property);
}
-
- protected Diagnostic validateModel(Object model , EditingDomain editingDomain){
+
+ protected Diagnostic validateModel(Object model, EditingDomain editingDomain) {
return null;
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/BeanIdRefValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/BeanIdRefValidator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/BeanIdRefValidator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -58,7 +58,7 @@
Object obj = resource.getContents().get(0);
if (obj instanceof DocumentRoot) {
SmooksResourceListType listType = ((DocumentRoot) obj).getSmooksResourceList();
- List<String> ids = SmooksUIUtils.getBeanIdList(listType);
+ List<String> ids = SmooksUIUtils.getBeanIdStringList(listType);
idList.addAll(ids);
}
if (idList.isEmpty()) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java 2009-05-27 06:25:34 UTC (rev 15545)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/validate/SmooksModelValidator.java 2009-05-27 06:37:36 UTC (rev 15546)
@@ -282,7 +282,6 @@
@Override
public ValidationResult validate(IResource resource, int kind, ValidationState state, IProgressMonitor monitor) {
- System.out.println("validate file : " + resource.getFullPath().toString() + ", change type is " + kind);
AdapterFactoryEditingDomain editingDomain = newEditingDomain();
if (editingDomain == null)
return null;
@@ -324,6 +323,5 @@
}
public void validate(IValidationContext helper, IReporter reporter) throws ValidationException {
- System.out.println("validate helper");
}
}
17 years, 1 month
JBoss Tools SVN: r15545 - trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-05-27 02:25:34 -0400 (Wed, 27 May 2009)
New Revision: 15545
Modified:
trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-4377
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties 2009-05-27 06:24:07 UTC (rev 15544)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml/resources/help/keys-seam.properties 2009-05-27 06:25:34 UTC (rev 15545)
@@ -1020,6 +1020,9 @@
FileSeamComponents21_AddImport.Title=Seam Import
SeamComponent_AddAnyProperty.WindowTitle=Add Property
+SeamComponent20_Properties.Title=Seam Component
+SeamComponent21_Properties.Title=Seam Component
+
SeamComponent_AddAnyProperty.Title=Property
SeamComponent20_AddProperty.WindowTitle=Add Simple Property
17 years, 1 month
JBoss Tools SVN: r15544 - in trunk/common/plugins: org.jboss.tools.common/.settings and 16 other directories.
by jbosstools-commits@lists.jboss.org
Author: sflanigan
Date: 2009-05-27 02:24:07 -0400 (Wed, 27 May 2009)
New Revision: 15544
Added:
trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Messages.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
trunk/common/plugins/org.jboss.tools.common/.settings/
trunk/common/plugins/org.jboss.tools.common/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/Messages.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/messages.properties
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReferenceList.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/GlobalELReferenceList.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELComplexExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInstanceImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMethodInvocationImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELOperatorImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELParametersImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELValueExpressionImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/CommaTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/DotTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/EndELTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprEndTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprStartTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/JavaNameTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamEndTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamStartTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StartELTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StringTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/WhiteSpaceTokenDescription.java
trunk/common/plugins/org.jboss.tools.common.el.ui/.settings/org.eclipse.jdt.core.prefs
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/Activator.java
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/GlobalElVariablesComposite.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/CommonPlugin.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/MethodNotImplementedException.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/StatusFactory.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/DefaultProblemReporter.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/Submit.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/TextProposal.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/DtdResolver.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/ErrorHandlerImpl.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SAXValidator.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SafeDocumentBuilderFactory.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolverImpl.java
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3557 Externalize English strings
Added: trunk/common/plugins/org.jboss.tools.common/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/CommonPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/CommonPlugin.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/CommonPlugin.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -24,7 +24,7 @@
public class CommonPlugin extends BasePlugin {
- public static final String PLUGIN_ID = "org.jboss.tools.common";
+ public static final String PLUGIN_ID = "org.jboss.tools.common"; //$NON-NLS-1$
protected static CommonPlugin instance;
private static String environment;
@@ -52,41 +52,41 @@
*/
public static String getEnvironment() {
if(environment == null) {
- String osName = System.getProperty("os.name");
- String javaVersion = System.getProperty("java.version");
- String studioName = "unknown";
- String studioVersion = "unknown";
- String eclipseVersion = "unknown";
- String eclipseBuildId = "unknown";
+ String osName = System.getProperty("os.name"); //$NON-NLS-1$
+ String javaVersion = System.getProperty("java.version"); //$NON-NLS-1$
+ String studioName = "unknown"; //$NON-NLS-1$
+ String studioVersion = "unknown"; //$NON-NLS-1$
+ String eclipseVersion = "unknown"; //$NON-NLS-1$
+ String eclipseBuildId = "unknown"; //$NON-NLS-1$
- Bundle studio = Platform.getBundle("org.jboss.tools.common");
+ Bundle studio = Platform.getBundle("org.jboss.tools.common"); //$NON-NLS-1$
if(studio!=null) {
Dictionary studioDic = studio.getHeaders();
- studioName = (String)studioDic.get("Bundle-Name");
- studioVersion = (String)studioDic.get("Bundle-Version");
+ studioName = (String)studioDic.get("Bundle-Name"); //$NON-NLS-1$
+ studioVersion = (String)studioDic.get("Bundle-Version"); //$NON-NLS-1$
}
- Bundle eclipse = Platform.getBundle("org.eclipse.platform");
+ Bundle eclipse = Platform.getBundle("org.eclipse.platform"); //$NON-NLS-1$
if(eclipse!=null) {
Dictionary eclipseDic = eclipse.getHeaders();
- eclipseVersion = (String)eclipseDic.get("Bundle-Version");
+ eclipseVersion = (String)eclipseDic.get("Bundle-Version"); //$NON-NLS-1$
FileInputStream fis = null;
try {
- String path = FileLocator.resolve(eclipse.getEntry("/")).getPath();
+ String path = FileLocator.resolve(eclipse.getEntry("/")).getPath(); //$NON-NLS-1$
if(path!=null) {
- File aboutMappings = new File(path, "about.mappings");
+ File aboutMappings = new File(path, "about.mappings"); //$NON-NLS-1$
if(aboutMappings.exists()) {
Properties properties = new Properties();
fis = new FileInputStream(aboutMappings);
properties.load(fis);
- String buildId = properties.getProperty("0");
+ String buildId = properties.getProperty("0"); //$NON-NLS-1$
if(buildId!=null && buildId.length()>0) {
eclipseBuildId = buildId;
}
}
}
} catch (IOException e) {
- getPluginLog().logError("Error in getting environment info: " + e.getMessage());
+ getPluginLog().logError("Error in getting environment info: " + e.getMessage()); //$NON-NLS-1$
} finally {
if(fis!=null) {
try {
@@ -97,10 +97,10 @@
}
}
}
- StringBuffer result = new StringBuffer(studioName).append(" ").append(studioVersion).
- append(", Eclipse ").append(eclipseVersion).append(" ").
- append(eclipseBuildId).append(", Java ").append(javaVersion).
- append(", ").append(osName);
+ StringBuffer result = new StringBuffer(studioName).append(" ").append(studioVersion). //$NON-NLS-1$
+ append(", Eclipse ").append(eclipseVersion).append(" "). //$NON-NLS-1$ //$NON-NLS-2$
+ append(eclipseBuildId).append(", Java ").append(javaVersion). //$NON-NLS-1$
+ append(", ").append(osName); //$NON-NLS-1$
environment = result.toString();
}
return environment;
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/Messages.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1,20 @@
+package org.jboss.tools.common;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.messages"; //$NON-NLS-1$
+ public static String BaseUIPlugin_ErrorDialogTitle;
+ public static String SAXValidator_IOExceptionMessage;
+ public static String SAXValidator_SAXExceptionMessage;
+ public static String SAXValidator_UnableToInstantiateMessage;
+ public static String XMLUtilities_IOExceptionMessage;
+ public static String XMLUtilities_SAXExceptionMessage;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/MethodNotImplementedException.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/MethodNotImplementedException.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/MethodNotImplementedException.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -17,7 +17,7 @@
public class MethodNotImplementedException extends RuntimeException {
public MethodNotImplementedException() {
- super("Method is not implemented yet");
+ super("Method is not implemented yet"); //$NON-NLS-1$
}
public MethodNotImplementedException(String message, Throwable cause) {
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/BaseUIPlugin.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -15,6 +15,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.jboss.tools.common.Messages;
/**
* Provides an easy way to log status of events.
@@ -65,6 +66,6 @@
logError(message, t);
Shell shell = Display.getDefault().getActiveShell();
IStatus s = StatusFactory.getInstance(IStatus.ERROR, this.getBundle().getSymbolicName(), message, t);
- ErrorDialog.openError(shell, "Hibernate Console", message, s);
+ ErrorDialog.openError(shell, Messages.BaseUIPlugin_ErrorDialogTitle, message, s);
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/StatusFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/StatusFactory.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/log/StatusFactory.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -16,8 +16,8 @@
public class StatusFactory {
public final static int UNDEFINED_ERROR = 0;
public final static String UNSPECIFIED_MESSAGE = null;
- public final static String EMPTY_MESSAGE = "";
- public final static String EMPTY_PLUGIN = "";
+ public final static String EMPTY_MESSAGE = ""; //$NON-NLS-1$
+ public final static String EMPTY_PLUGIN = ""; //$NON-NLS-1$
public static IStatus getInstance(int severity, String pluginId,
int code, String message, Throwable t) {
Added: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/messages.properties 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1,6 @@
+BaseUIPlugin_ErrorDialogTitle=Hibernate Console
+SAXValidator_IOExceptionMessage=Unidentified parser error
+SAXValidator_SAXExceptionMessage=Unidentified parser error
+SAXValidator_UnableToInstantiateMessage=error: Unable to instantiate parser ({0})
+XMLUtilities_IOExceptionMessage=Unexpected parser error
+XMLUtilities_SAXExceptionMessage=Unexpected parser error
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/DefaultProblemReporter.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/DefaultProblemReporter.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/DefaultProblemReporter.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -21,7 +21,7 @@
public void reportProblem(IStatus status) {
if(status != null) {
- Platform.getLog(Platform.getBundle("org.jboss.tools.common")).log(status);
+ Platform.getLog(Platform.getBundle("org.jboss.tools.common")).log(status); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemBuffer.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -35,7 +35,7 @@
*/
public void writeToBuffer(IStatus status) {
getEclipseLog();
- writer.logging(status, "org.jboss.tools.common");
+ writer.logging(status, "org.jboss.tools.common"); //$NON-NLS-1$
}
/**
@@ -50,7 +50,7 @@
int i = 0;
int c = 0;
while(i < s.length()) {
- i = s.indexOf("!ENTRY", i);
+ i = s.indexOf("!ENTRY", i); //$NON-NLS-1$
if(i >= 0) {
++c;
++i;
@@ -67,12 +67,12 @@
*/
public String getContent() {
File f = getLogFile();
- return (!f.isFile()) ? "" : FileUtil.readFile(f);
+ return (!f.isFile()) ? "" : FileUtil.readFile(f); //$NON-NLS-1$
}
public String getEclipseLogContent() {
File f = Platform.getLogFileLocation().toFile();
- return (f.isFile()) ? FileUtil.readFile(f) : "";
+ return (f.isFile()) ? FileUtil.readFile(f) : ""; //$NON-NLS-1$
}
public void clean() {
@@ -90,10 +90,10 @@
public void report(String text, String userEMail, String other, boolean cleanBuffer) {
StringBuffer sb = new StringBuffer();
if(userEMail != null && userEMail.trim().length() > 0) {
- sb.append("Customer e-mail=" + userEMail + "\n");
+ sb.append("Customer e-mail=" + userEMail + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
if(other != null && other.length() > 0) {
- sb.append("Other=" + other + "\n");
+ sb.append("Other=" + other + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
}
if(text != null) {
sb.append(text);
@@ -114,9 +114,9 @@
}
private File getLogFile() {
- Bundle b = Platform.getBundle("org.jboss.tools.common");
+ Bundle b = Platform.getBundle("org.jboss.tools.common"); //$NON-NLS-1$
String stateLocation = Platform.getStateLocation(b).toString().replace('\\', '/');
- String logLocation = stateLocation + "/.log";
+ String logLocation = stateLocation + "/.log"; //$NON-NLS-1$
return new File(logLocation);
}
}
\ No newline at end of file
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/ProblemReportingHelper.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -36,7 +36,7 @@
*/
public static void reportProblem(String plugin, String message, Throwable throwable) {
if(message==null) {
- throw new IllegalArgumentException("Message parameter cannot be null");
+ throw new IllegalArgumentException("Message parameter cannot be null"); //$NON-NLS-1$
}
IStatus status = new Status(IStatus.ERROR, plugin, 0, message, throwable);
reportProblem(status);
@@ -48,8 +48,8 @@
*/
public static void reportProblem(IStatus status) {
if(status == null) {
- reportProblem("org.jboss.tools.common",
- new IllegalArgumentException("Parameter 'status' cannt be null"));
+ reportProblem("org.jboss.tools.common", //$NON-NLS-1$
+ new IllegalArgumentException("Parameter 'status' cannot be null")); //$NON-NLS-1$
return;
}
IProblemReporter reporter = ProblemReporterFactory.getInstance().getProblemReporter();
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/Submit.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/Submit.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/reporting/Submit.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -27,11 +27,11 @@
*/
public class Submit {
- public static String REPORT_DESRIPTION_PARAMETER_NAME = CommonPlugin.getMessage("%reportParameterName");
+ public static String REPORT_DESRIPTION_PARAMETER_NAME = CommonPlugin.getMessage("%reportParameterName"); //$NON-NLS-1$
- private static String URL = CommonPlugin.getMessage("%reportingUrl");
- private static String JOB_NAME = CommonPlugin.getMessage("%reportingJobName");
- private static String ERROR_MESSAGE = CommonPlugin.getMessage("%errorReportingMessage");
+ private static String URL = CommonPlugin.getMessage("%reportingUrl"); //$NON-NLS-1$
+ private static String JOB_NAME = CommonPlugin.getMessage("%reportingJobName"); //$NON-NLS-1$
+ private static String ERROR_MESSAGE = CommonPlugin.getMessage("%errorReportingMessage"); //$NON-NLS-1$
private static Submit INSTANCE = new Submit();
@@ -61,7 +61,7 @@
String exceptionMessage = e.getMessage();
String message = ERROR_MESSAGE;
if(exceptionMessage!=null && exceptionMessage.trim().length()>0) {
- message = message + ".\r\n" + e.getClass().getName() + ": " + exceptionMessage;
+ message = message + ".\r\n" + e.getClass().getName() + ": " + exceptionMessage; //$NON-NLS-1$ //$NON-NLS-2$
}
Status status = new Status(IStatus.WARNING, CommonPlugin.PLUGIN_ID, IStatus.WARNING, message, e);
return status;
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/TextProposal.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/TextProposal.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/text/TextProposal.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -191,7 +191,7 @@
* @return
*/
public boolean isCloseTag() {
- return label != null && label.startsWith("/");
+ return label != null && label.startsWith("/"); //$NON-NLS-1$
}
/**
@@ -199,11 +199,11 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append("label: ");
+ buffer.append("label: "); //$NON-NLS-1$
buffer.append(label);
- buffer.append("\ncontextInfo: ");
+ buffer.append("\ncontextInfo: "); //$NON-NLS-1$
buffer.append(contextInfo);
- buffer.append("\nreplacementString: ");
+ buffer.append("\nreplacementString: "); //$NON-NLS-1$
buffer.append(replacementString);
return buffer.toString();
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -56,13 +56,13 @@
} catch (CoreException e) {
CommonPlugin.getPluginLog().logError(e);
}
- return encoding != null ? encoding : "8859_1";
+ return encoding != null ? encoding : "8859_1"; //$NON-NLS-1$
}
public static String readFile(File f) {
- if(!f.isFile()) return "";
+ if(!f.isFile()) return ""; //$NON-NLS-1$
ReadBytes bs = readBytes(f);
- if(bs == null) return "";
+ if(bs == null) return ""; //$NON-NLS-1$
String encoding = getEncoding(bs.bs);
if(encoding == null) return new String(bs.bs, 0, bs.length);
try {
@@ -73,9 +73,9 @@
}
public static String readFileWithEncodingCheck(File f, String defaultEncoding) {
- if(!f.isFile()) return "";
+ if(!f.isFile()) return ""; //$NON-NLS-1$
ReadBytes bs = readBytes(f);
- if(bs == null) return "";
+ if(bs == null) return ""; //$NON-NLS-1$
String encoding = getEncoding(bs.bs);
if(encoding == null) encoding = validateEncoding(defaultEncoding, null);
if(encoding == null) return new String(bs.bs, 0, bs.length);
@@ -170,7 +170,7 @@
// FIXME Size of string buffer should be set to size of file by default
// to avoid StringBuffer extension on each append
public static String readStream(InputStream is) {
- StringBuffer sb = new StringBuffer("");
+ StringBuffer sb = new StringBuffer(""); //$NON-NLS-1$
try {
byte[] b = new byte[4096];
while(true) {
@@ -193,8 +193,8 @@
if(value == null) return false;
String encoding = getEncoding(value);
if(encoding == null) encoding = validateEncoding(defaultEncoding, null);
- if(value.startsWith("<?xml")) {
- String s = validateEncoding(encoding, "UTF-8");
+ if(value.startsWith("<?xml")) { //$NON-NLS-1$
+ String s = validateEncoding(encoding, "UTF-8"); //$NON-NLS-1$
if(encoding == null) {
encoding = s;
} else if(s == null || !s.equals(encoding)) {
@@ -211,9 +211,9 @@
if(f.isFile() && !isSameFile(f)) f.delete();
if(!f.exists()) f.createNewFile();
} catch (IOException e) {
- CommonPlugin.getPluginLog().logError("Problem writing to file " + f, e);
+ CommonPlugin.getPluginLog().logError("Problem writing to file " + f, e); //$NON-NLS-1$
} catch (SecurityException e) {
- CommonPlugin.getPluginLog().logError("Problem writing to file " + f, e);
+ CommonPlugin.getPluginLog().logError("Problem writing to file " + f, e); //$NON-NLS-1$
}
PrintWriter pw = new PrintWriter(new FileWriter(f));
pw.print(value);
@@ -445,10 +445,10 @@
public static void add(File f, String name, JarOutputStream jos) throws IOException {
String en = name;
- if(f.isDirectory()) en += "/";
- JarEntry entry = (en.endsWith("/")) ? null : new JarEntry(en);
+ if(f.isDirectory()) en += "/"; //$NON-NLS-1$
+ JarEntry entry = (en.endsWith("/")) ? null : new JarEntry(en); //$NON-NLS-1$
if(f.isDirectory()) {
- if("/".equals(en)) en = "";
+ if("/".equals(en)) en = ""; //$NON-NLS-1$ //$NON-NLS-2$
File[] fs = f.listFiles();
if(fs != null) for (int i = 0; i < fs.length; i++)
add(fs[i], en + fs[i].getName(), jos);
@@ -519,7 +519,7 @@
if(url == null) return null;
String resultUrl = url.replace('\\', '/');
/// if(!url.startsWith("file:/")) return url;
- if(!resultUrl.startsWith("file:")) return resultUrl;
+ if(!resultUrl.startsWith("file:")) return resultUrl; //$NON-NLS-1$
int iLast = resultUrl.lastIndexOf(':'), iFirst = resultUrl.indexOf(':');
return (iLast == iFirst) ? resultUrl.substring(5) : resultUrl.substring(iLast - 1);
}
@@ -533,19 +533,19 @@
int i = 0;
while(i < r.length && i < p.length && r[i].equalsIgnoreCase(p[i])) ++i;
StringBuffer sb = new StringBuffer();
- for (int k = i; k < r.length; k++) sb.append("/..");
- for (int k = i; k < p.length; k++) sb.append("/").append(p[k]);
+ for (int k = i; k < r.length; k++) sb.append("/.."); //$NON-NLS-1$
+ for (int k = i; k < p.length; k++) sb.append("/").append(p[k]); //$NON-NLS-1$
return sb.toString();
}
private static String[] tokenizePath(String path) {
String tokenizedPath = path.replace('\\', '/');
- StringTokenizer st = new StringTokenizer(tokenizedPath, "/");
+ StringTokenizer st = new StringTokenizer(tokenizedPath, "/"); //$NON-NLS-1$
ArrayList l = new ArrayList();
while(st.hasMoreTokens()) {
String t = st.nextToken();
- if(t.length() == 0 || t.equals(".")) continue;
- if(t.equals("..")) {
+ if(t.length() == 0 || t.equals(".")) continue; //$NON-NLS-1$
+ if(t.equals("..")) { //$NON-NLS-1$
if(l.size() > 0) l.remove(l.size() - 1);
continue;
}
@@ -557,20 +557,20 @@
public static String encode(String text, String encoding) {
if(true) return text;
try {
- byte[] bs = text.getBytes(System.getProperty("file.encoding"));
+ byte[] bs = text.getBytes(System.getProperty("file.encoding")); //$NON-NLS-1$
ByteArrayInputStream is = new ByteArrayInputStream(bs);
InputStreamReader r = new InputStreamReader(is, encoding);
char[] cs = new char[bs.length];
int l = r.read(cs, 0, cs.length);
return new String(cs, 0, l);
} catch (IOException e) {
- if("UTF-8".equals(encoding)) return text;
- return encode(text, "UTF-8");
+ if("UTF-8".equals(encoding)) return text; //$NON-NLS-1$
+ return encode(text, "UTF-8"); //$NON-NLS-1$
}
}
public static String encodeDefault(String text) {
- return encode(text, System.getProperties().getProperty("file.encoding"));
+ return encode(text, System.getProperties().getProperty("file.encoding")); //$NON-NLS-1$
}
/*
@@ -624,10 +624,10 @@
public static String getEncoding(String s) {
if(s == null) return null;
- if(s.startsWith("<?xml")) {
- int i = s.indexOf("encoding=");
+ if(s.startsWith("<?xml")) { //$NON-NLS-1$
+ int i = s.indexOf("encoding="); //$NON-NLS-1$
if(i < 0) return null;
- i += "encoding=".length() + 1;
+ i += "encoding=".length() + 1; //$NON-NLS-1$
int j = s.indexOf('\"', i);
if(j < 0) return null;
return s.substring(i, j);
@@ -643,7 +643,7 @@
if(validEncodings.contains(encoding)) return encoding;
if(invalidEncodings.contains(encoding)) return defaultEncoding;
try {
- if(defaultEncoding != null && defaultEncoding.equals("UTF-16")) {
+ if(defaultEncoding != null && defaultEncoding.equals("UTF-16")) { //$NON-NLS-1$
new String(XML_16, 0, XML_16.length, encoding);
} else {
new String(XML_8, 0, XML_8.length, encoding);
@@ -663,15 +663,15 @@
if(bs.length < 20) return null;
if(startsWith(bs, XML_8)) {
int i = getIndex(bs, (byte)'?', 5);
- if(i < 0) return "UTF-8";
+ if(i < 0) return "UTF-8"; //$NON-NLS-1$
String encoding = getEncoding(new String(bs, 0, i));
- return validateEncoding(encoding, "UTF-8");
+ return validateEncoding(encoding, "UTF-8"); //$NON-NLS-1$
} else if(startsWith(bs, XML_16)) {
int i = getIndex(bs, (byte)'?', XML_16.length);
- if(i < 0) return "UTF-16";
+ if(i < 0) return "UTF-16"; //$NON-NLS-1$
try {
- String encoding = getEncoding(new String(bs, 0, i, "UTF-16"));
- return validateEncoding(encoding, "UTF-16");
+ String encoding = getEncoding(new String(bs, 0, i, "UTF-16")); //$NON-NLS-1$
+ return validateEncoding(encoding, "UTF-16"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e) {
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/ResourcesUtils.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -71,7 +71,7 @@
}
public static IProject importExistingProject(IProject project, String location, String name, IProgressMonitor monitor, boolean refreshWorkspace) throws CoreException {
- IPath path = new Path(location).append(".project");
+ IPath path = new Path(location).append(".project"); //$NON-NLS-1$
IProjectDescription description = ResourcesPlugin.getWorkspace().loadProjectDescription(path);
description.setName(name);
project.create(description, monitor);
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/DtdResolver.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/DtdResolver.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/DtdResolver.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -45,19 +45,19 @@
location = XMLCorePlugin.getDefault().getDefaultXMLCatalog().resolveURI(systemId);
}
if(location == null) {
- if(systemId != null && systemId.startsWith("file:") && systemId.endsWith(".xsd")) {
+ if(systemId != null && systemId.startsWith("file:") && systemId.endsWith(".xsd")) { //$NON-NLS-1$ //$NON-NLS-2$
int i = systemId.replace('\\', '/').lastIndexOf('/');
String systemId2 = systemId.substring(i + 1);
location = XMLCorePlugin.getDefault().getDefaultXMLCatalog().resolveURI(systemId2);
}
}
- if((location == null || location.startsWith("http:")) && systemId != null) {
- Bundle b = Platform.getBundle("org.eclipse.jst.standard.schemas");
+ if((location == null || location.startsWith("http:")) && systemId != null) { //$NON-NLS-1$
+ Bundle b = Platform.getBundle("org.eclipse.jst.standard.schemas"); //$NON-NLS-1$
if(b != null) {
- int q = systemId.lastIndexOf("/");
+ int q = systemId.lastIndexOf("/"); //$NON-NLS-1$
String s = systemId.substring(q + 1);
- URL u = b.getEntry("/dtdsAndSchemas/" + s);
+ URL u = b.getEntry("/dtdsAndSchemas/" + s); //$NON-NLS-1$
try {
if(u != null) {
u = FileLocator.resolve(u);
@@ -73,9 +73,9 @@
if(location == null) {
if(systemId != null && !unfound.contains(systemId)) {
unfound.add(systemId);
- CommonPlugin.getPluginLog().logError("Cannot find locally: "
- + "Public ID " + publicId
- + " System ID " + systemId);
+ CommonPlugin.getPluginLog().logError("Cannot find locally: " //$NON-NLS-1$
+ + "Public ID " + publicId //$NON-NLS-1$
+ + " System ID " + systemId); //$NON-NLS-1$
}
}
if(location!=null) {
@@ -84,27 +84,27 @@
File file = new File(url.getFile());
if(file.isFile()) {
return new FileInputStream(file);
- } else if("jar".equals(url.getProtocol())) {
+ } else if("jar".equals(url.getProtocol())) { //$NON-NLS-1$
return url.openStream();
}
} catch(FileNotFoundException e) {
- CommonPlugin.getPluginLog().logError("Error in DtdResolver: " + e.getMessage());
+ CommonPlugin.getPluginLog().logError("Error in DtdResolver: " + e.getMessage()); //$NON-NLS-1$
}
}
String resourceType = null;
if(systemId!=null) {
- if(systemId.toLowerCase().endsWith(".dtd")) {
- resourceType = "DTD";
- } else if(systemId.toLowerCase().endsWith(".xsd")) {
- resourceType = "XSD";
+ if(systemId.toLowerCase().endsWith(".dtd")) { //$NON-NLS-1$
+ resourceType = "DTD"; //$NON-NLS-1$
+ } else if(systemId.toLowerCase().endsWith(".xsd")) { //$NON-NLS-1$
+ resourceType = "XSD"; //$NON-NLS-1$
}
}
InputStream is = null;
if(resourceType!=null) { // this deactivates DTD and XSD
try {
URL url = new URL(systemId);
- if("http".equals(url.getProtocol())) {
+ if("http".equals(url.getProtocol())) { //$NON-NLS-1$
is = HttpUtil.getInputStreamFromUrlByGetMethod(systemId);
}
} catch (MalformedURLException e) {
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/ErrorHandlerImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/ErrorHandlerImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/ErrorHandlerImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -34,7 +34,7 @@
}
private void add(SAXParseException e) {
- errors.add("" + e.getMessage() + ":" + e.getLineNumber() + ":" + e.getColumnNumber());
+ errors.add("" + e.getMessage() + ":" + e.getLineNumber() + ":" + e.getColumnNumber()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SAXValidator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SAXValidator.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SAXValidator.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -14,6 +14,7 @@
import java.io.IOException;
import java.io.Reader;
import java.net.URL;
+import java.text.MessageFormat;
import java.util.HashSet;
import java.util.Set;
@@ -21,6 +22,7 @@
import org.apache.xerces.xni.XMLResourceIdentifier;
import org.eclipse.core.runtime.Platform;
import org.jboss.tools.common.CommonPlugin;
+import org.jboss.tools.common.Messages;
import org.jboss.tools.common.util.FileUtil;
import org.osgi.framework.Bundle;
import org.xml.sax.SAXException;
@@ -36,16 +38,16 @@
*/
public class SAXValidator {
- protected static final String FATAL_ERROR_PROCESSING_FEATURE_ID = "http://apache.org/xml/features/continue-after-fatal-error";
- protected static final String ENTITY_RESOLVER_PROPERTY_ID = "http://apache.org/xml/properties/internal/entity-resolver";
- protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces";
- protected static final String NAMESPACE_PREFIXES_FEATURE_ID = "http://xml.org/sax/features/namespace-prefixes";
- protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation";
- protected static final String VALIDATION_SCHEMA_FEATURE_ID = "http://apache.org/xml/features/validation/schema";
- protected static final String VALIDATION_SCHEMA_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
- protected static final String VALIDATION_DYNAMIC_FEATURE_ID = "http://apache.org/xml/features/validation/dynamic";
+ protected static final String FATAL_ERROR_PROCESSING_FEATURE_ID = "http://apache.org/xml/features/continue-after-fatal-error"; //$NON-NLS-1$
+ protected static final String ENTITY_RESOLVER_PROPERTY_ID = "http://apache.org/xml/properties/internal/entity-resolver"; //$NON-NLS-1$
+ protected static final String NAMESPACES_FEATURE_ID = "http://xml.org/sax/features/namespaces"; //$NON-NLS-1$
+ protected static final String NAMESPACE_PREFIXES_FEATURE_ID = "http://xml.org/sax/features/namespace-prefixes"; //$NON-NLS-1$
+ protected static final String VALIDATION_FEATURE_ID = "http://xml.org/sax/features/validation"; //$NON-NLS-1$
+ protected static final String VALIDATION_SCHEMA_FEATURE_ID = "http://apache.org/xml/features/validation/schema"; //$NON-NLS-1$
+ protected static final String VALIDATION_SCHEMA_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking"; //$NON-NLS-1$
+ protected static final String VALIDATION_DYNAMIC_FEATURE_ID = "http://apache.org/xml/features/validation/dynamic"; //$NON-NLS-1$
- protected static final String DEFAULT_SAX_PARSER_CLASS_NAME = "org.apache.xerces.parsers.SAXParser";
+ protected static final String DEFAULT_SAX_PARSER_CLASS_NAME = "org.apache.xerces.parsers.SAXParser"; //$NON-NLS-1$
/**
*
@@ -72,9 +74,9 @@
try {
parserInstance.setProperty(ENTITY_RESOLVER_PROPERTY_ID, new XMLEntityResolverImpl());
} catch (SAXNotRecognizedException e1) {
- CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1);
+ CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1); //$NON-NLS-1$
} catch (SAXNotSupportedException e1) {
- CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1);
+ CommonPlugin.getPluginLog().logError( e1.getMessage()+"", e1); //$NON-NLS-1$
}
parserInstance.setContentHandler(handler);
@@ -93,7 +95,7 @@
parser.setFeature(name, value);
} catch (SAXException e) {
// TODO - Move to NLS bundle
- CommonPlugin.getPluginLog().logError("warning: Parser does not support feature ("+name+")", e);
+ CommonPlugin.getPluginLog().logError("warning: Parser does not support feature ("+name+")", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -107,7 +109,7 @@
try {
parser.setProperty(name, value);
} catch (SAXException e) {
- CommonPlugin.getPluginLog().logError("warning: Parser does not support feature ("+name+")", e);
+ CommonPlugin.getPluginLog().logError("warning: Parser does not support feature ("+name+")", e); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -123,20 +125,18 @@
try {
XMLReader parser = createParser();
if(parser==null) {
- // TODO - Move to NLS bundle
- return new String[]{ "error: Unable to instantiate parser ("+DEFAULT_SAX_PARSER_CLASS_NAME+")"};
+ return new String[]{ MessageFormat.format(
+ Messages.SAXValidator_UnableToInstantiateMessage, DEFAULT_SAX_PARSER_CLASS_NAME)};
}
parser.setErrorHandler(h);
parser.parse(is);
} catch (SAXException e) {
if(h.errors.isEmpty()) {
- // TODO - Move to NLS bundle
- return new String[]{"Unidentified parser error:0:0",e.getMessage()};
+ return new String[]{Messages.SAXValidator_SAXExceptionMessage+":0:0",e.getMessage()}; //$NON-NLS-1$
}
} catch (IOException e) {
if(h.errors.isEmpty()) {
- // TODO - Move to NLS bundle
- return new String[]{"Unidentified parser error:0:0",e.getMessage()};
+ return new String[]{Messages.SAXValidator_IOExceptionMessage+":0:0",e.getMessage()}; //$NON-NLS-1$
}
} finally {
// Thread.currentThread().setContextClassLoader(cc);
@@ -162,34 +162,34 @@
Bundle b = Platform.getBundle(CommonPlugin.PLUGIN_ID);
String location = Platform.getStateLocation(b).toString().replace('\\', '/');
- if(!location.endsWith("/")) {
- location += "/";
+ if(!location.endsWith("/")) { //$NON-NLS-1$
+ location += "/"; //$NON-NLS-1$
}
String urlString = null;
URL url = null;
try {
- url = Platform.resolve(b.getEntry("/"));
+ url = Platform.resolve(b.getEntry("/")); //$NON-NLS-1$
urlString = url.toString();
- if(!urlString.endsWith("/")) {
- urlString += "/";
+ if(!urlString.endsWith("/")) { //$NON-NLS-1$
+ urlString += "/"; //$NON-NLS-1$
}
- urlString += "schemas";
+ urlString += "schemas"; //$NON-NLS-1$
} catch (IOException e) {
CommonPlugin.getPluginLog().logError(e);
}
- File f1 = new File(url.getFile() + "/schemas/catalog.xml");
- File f2 = new File(location + "schemas/catalog.xml");
+ File f1 = new File(url.getFile() + "/schemas/catalog.xml"); //$NON-NLS-1$
+ File f2 = new File(location + "schemas/catalog.xml"); //$NON-NLS-1$
if(f2.exists()) {
- return "file:///" + location + "schemas/catalog.xml";
+ return "file:///" + location + "schemas/catalog.xml"; //$NON-NLS-1$ //$NON-NLS-2$
}
FileUtil.copyDir(f1.getParentFile(), f2.getParentFile(), true);
String text = FileUtil.readFile(f2);
- while(text.indexOf("%install%") >= 0) {
- int i = text.indexOf("%install%");
+ while(text.indexOf("%install%") >= 0) { //$NON-NLS-1$
+ int i = text.indexOf("%install%"); //$NON-NLS-1$
text = text.substring(0, i) + urlString + text.substring(i + 9);
}
FileUtil.writeFile(f2, text);
- return "file:///" + location + "schemas/catalog.xml";
+ return "file:///" + location + "schemas/catalog.xml"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SafeDocumentBuilderFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SafeDocumentBuilderFactory.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/SafeDocumentBuilderFactory.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -24,8 +24,8 @@
public class SafeDocumentBuilderFactory extends Thread {
public static final EntityResolver EMPTY_RESOLVER = new EntityResolver() {
public InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId) throws SAXException, java.io.IOException {
- if((systemId != null) && systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD
- return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
+ if((systemId != null) && systemId.toLowerCase().endsWith(".dtd")) { // this deactivates DTD //$NON-NLS-1$
+ return new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
} else {
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolver.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -94,8 +94,8 @@
}
}
- if(deactivate && (systemId != null) && (source == null) && (systemId.toLowerCase().endsWith(".dtd"))) { // this deactivates DTD
- source = new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes()));
+ if(deactivate && (systemId != null) && (source == null) && (systemId.toLowerCase().endsWith(".dtd"))) { // this deactivates DTD //$NON-NLS-1$
+ source = new InputSource(new ByteArrayInputStream("<?xml version='1.0' encoding='UTF-8'?>".getBytes())); //$NON-NLS-1$
}
return source;
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolverImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolverImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLEntityResolverImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -49,7 +49,7 @@
result = new XMLInputSource(rid.getPublicId(), systemId, rid.getBaseSystemId(), is, null);
}
} catch (SAXException e) {
- CommonPlugin.getPluginLog().logError( "Exception publicId=" + publicId + " systemId=" + systemId + " exception=" + e.getClass().getName() + ":" + e.getMessage());
+ CommonPlugin.getPluginLog().logError( "Exception publicId=" + publicId + " systemId=" + systemId + " exception=" + e.getClass().getName() + ":" + e.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
}
return result;
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/xml/XMLUtilities.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -28,6 +28,7 @@
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.XMLSerializer;
import org.jboss.tools.common.CommonPlugin;
+import org.jboss.tools.common.Messages;
import org.w3c.dom.Comment;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
@@ -240,11 +241,11 @@
builder.parse(is);
} catch (IOException e) {
if(h.errors.isEmpty()) {
- return new String[]{"Unexpected parser error:0:0",e.toString()};
+ return new String[]{Messages.XMLUtilities_IOExceptionMessage+":0:0",e.toString()}; //$NON-NLS-1$
}
} catch (SAXException e) {
if(h.errors.isEmpty()) {
- return new String[]{"Unexpected parser error:0:0",e.toString()};
+ return new String[]{Messages.XMLUtilities_SAXExceptionMessage+":0:0",e.toString()}; //$NON-NLS-1$
}
}
return h.errors.toArray(new String[0]);
@@ -262,8 +263,8 @@
serialize(element, new BufferedWriter(fw));
fw.close();
}
- static final String ENCODING = "encoding=\"";
- static final String UTF8 = "UTF-8";
+ static final String ENCODING = "encoding=\""; //$NON-NLS-1$
+ static final String UTF8 = "UTF-8"; //$NON-NLS-1$
public static String getEncoding(String body) {
int i = body.indexOf(ENCODING);
@@ -280,7 +281,7 @@
}
public static OutputFormat createOutputFormat(String encoding) {
OutputFormat format = new OutputFormat(Method.XML, encoding == null || encoding.length() == 0?null:encoding, true);
- format.setLineSeparator(System.getProperty("line.separator", LineSeparator.Web));
+ format.setLineSeparator(System.getProperty("line.separator", LineSeparator.Web)); //$NON-NLS-1$
format.setIndent(1);
return format;
}
@@ -373,17 +374,17 @@
public static final void setCDATA(Element element, String data) {
element.appendChild(element.getOwnerDocument().createCDATASection(
- data!=null?data:""));
+ data!=null?data:"")); //$NON-NLS-1$
}
public static final void setText(Element element, String data) {
element.appendChild(element.getOwnerDocument().createTextNode(
- data!=null?data:""));
+ data!=null?data:"")); //$NON-NLS-1$
}
public static final void setComment(Element element, String data) {
Comment comm = element.getOwnerDocument().createComment(
- data!=null?data:"");
+ data!=null?data:""); //$NON-NLS-1$
element.getParentNode().insertBefore(comm, element);
}
Added: trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1 @@
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Activator.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -20,7 +20,7 @@
public class Activator extends BaseUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.common.el";
+ public static final String PLUGIN_ID = "org.jboss.tools.common.el"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReferenceList.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReferenceList.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ELReferenceList.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -19,7 +19,7 @@
public class ELReferenceList extends ResourceReferenceList {
/** The PROPERT y_ NAME. */
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.ELReference");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.ELReference"); //$NON-NLS-1$ //$NON-NLS-2$
/** The instance. */
static ELReferenceList instance = new ELReferenceList();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/GlobalELReferenceList.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/GlobalELReferenceList.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/GlobalELReferenceList.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -20,7 +20,7 @@
*/
public class GlobalELReferenceList extends ResourceReferenceList {
/** The PROPERT y_ NAME. */
- private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.GlobalELReference");
+ private static QualifiedName PROPERTY_NAME = new QualifiedName("", "org.jboss.tools.vpe.editor.css.GlobalELReference"); //$NON-NLS-1$ //$NON-NLS-2$
/** The instance. */
private static GlobalELReferenceList instance = new GlobalELReferenceList();
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Messages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Messages.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/Messages.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1,32 @@
+package org.jboss.tools.common.el.core;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.common.el.core.messages"; //$NON-NLS-1$
+ public static String CallRule_ExpectingCommaOrRParen;
+ public static String CallRule_ExpectingRBrace;
+ public static String CallRule_ExpectingRBracket;
+ public static String CallRule_ExpectingRParen;
+ public static String CallRule_UnexpectedLParen;
+ public static String ExpressionRule_CannotStartWithBinaryOp;
+ public static String ExpressionRule_CannotStartWithInstanceof;
+ public static String ExpressionRule_ExpectingExpression;
+ public static String ExpressionRule_ExpectingJavaName;
+ public static String JavaNameTokenDescription_Name;
+ public static String OperationRule_ExpectingRBrace;
+ public static String OperationRule_ExpectingRBracket;
+ public static String OperationRule_ExpectingRParen;
+ public static String OperationTokenDescription_Name;
+ public static String PrimitiveValueTokenDescription_ArgMustResolveToIntegerOrString;
+ public static String PrimitiveValueTokenDescription_Name;
+ public static String StringTokenDescription_Name;
+ public static String WhiteSpaceTokenDescription_Name;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
Added: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/messages.properties 2009-05-27 06:24:07 UTC (rev 15544)
@@ -0,0 +1,18 @@
+CallRule_ExpectingCommaOrRParen=Expecting ',' or ')'
+CallRule_ExpectingRBrace=Expecting '}'
+CallRule_ExpectingRBracket=Expecting ']'
+CallRule_ExpectingRParen=Expecting ')'
+CallRule_UnexpectedLParen=Unexpected symbol '('
+ExpressionRule_CannotStartWithBinaryOp=Expression cannot start with binary operator.
+ExpressionRule_CannotStartWithInstanceof=Expression cannot start with instanceof.
+ExpressionRule_ExpectingExpression=Expecting expression
+ExpressionRule_ExpectingJavaName=Expecting Java method or property name
+JavaNameTokenDescription_Name=NAME
+OperationRule_ExpectingRBrace=Expecting '}'
+OperationRule_ExpectingRBracket=Expecting ']'
+OperationRule_ExpectingRParen=Expecting ')'
+OperationTokenDescription_Name=Operator
+PrimitiveValueTokenDescription_ArgMustResolveToIntegerOrString=Argument must resolve to integer or string.
+PrimitiveValueTokenDescription_Name=Primitive
+StringTokenDescription_Name=String
+WhiteSpaceTokenDescription_Name=Whitespace
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/Tokenizer.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -60,7 +60,7 @@
for (int i = 0; i < ds.length; i++) {
int type = ds[i].getType();
if(tokenDescriptions.containsKey(type)) {
- throw new IllegalArgumentException("Token type " + type + " is not unique.");
+ throw new IllegalArgumentException("Token type " + type + " is not unique."); //$NON-NLS-1$ //$NON-NLS-2$
}
tokenDescriptions.put(type, ds[i]);
}
@@ -93,7 +93,7 @@
this.sourceString = sourceString;
errors.clear();
index = initialOffset;
- start = new LexicalToken(initialOffset, 0, "", -1000);
+ start = new LexicalToken(initialOffset, 0, "", -1000); //$NON-NLS-1$
last = start;
state = BasicStates.STATE_EXPECTING_EL;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/parser/TokenizerFactory.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -106,7 +106,7 @@
}
public static void main(String[] args) {
- String text = "ioioio#{a(1.2e1i) + b c + d}ioioio#{0}";
+ String text = "ioioio#{a(1.2e1i) + b c + d}ioioio#{0}"; //$NON-NLS-1$
//"#{a[b()['l'].j]}";
//"#{g11.g12.y13} #{#{ #{a14.b15(x.t.u(uu.ii[9], j)).b16(m17(v18(i19[2]).u20).)+ a21(c.).b.}";
//"#{not a.b(x,y) + s.h((6 != -8) & (7 + -iy88.g[9].h(7 div 8).i.j)+(8) ? 4 : 7,'p', a.b.c.d[null])}";
@@ -117,28 +117,28 @@
while(ti != null) {
int type = ti.getType();
- System.out.println(type + ":" + ti.getText() + ":");
+ System.out.println(type + ":" + ti.getText() + ":"); //$NON-NLS-1$ //$NON-NLS-2$
ti = ti.getNextToken();
}
List<SyntaxError> errors = t.getErrors();
for (SyntaxError e: errors) {
- System.out.println("state=" + e.getState() + " position=" + e.getPosition() + " problem=" + e.getProblem());
+ System.out.println("state=" + e.getState() + " position=" + e.getPosition() + " problem=" + e.getProblem()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
ELParser parser = ELParserUtil.getJbossFactory().createParser();
ELModel model = parser.parse(text, 0, 90);
System.out.println(model);
ELExpression expr = model.getInstances().get(0).getExpression();
- System.out.println("Expression=" + expr);
+ System.out.println("Expression=" + expr); //$NON-NLS-1$
List<ELInvocationExpression> is = expr.getInvocations();
- System.out.println("Invocations:");
+ System.out.println("Invocations:"); //$NON-NLS-1$
for (ELInvocationExpression i : is) {
System.out.println(i);
}
int off = 8;
ELExpression expr1 = ELUtil.findExpression(model, off);
- System.out.println("Expression at " + off + ": " + expr1);
+ System.out.println("Expression at " + off + ": " + expr1); //$NON-NLS-1$ //$NON-NLS-2$
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ELResolverFactoryManager.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -64,22 +64,22 @@
}
Set<ELResolver> resolverSet = new HashSet<ELResolver>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
- IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.el.core.elResolver"); //$NON-NLS-N$1
+ IExtensionPoint extensionPoint = registry.getExtensionPoint("org.jboss.tools.common.el.core.elResolver"); //$NON-NLS-1$
IExtension[] extensions = extensionPoint.getExtensions();
for (int i=0; i<extensions.length; i++) {
IExtension extension = extensions[i];
IConfigurationElement[] elements = extension.getConfigurationElements();
for(int j=0; j<elements.length; j++) {
- IConfigurationElement[] natures = elements[i].getChildren("project-nature"); //$NON-NLS-N$1
+ IConfigurationElement[] natures = elements[i].getChildren("project-nature"); //$NON-NLS-1$
for (int k = 0; k < natures.length; k++) {
- String natureId = natures[k].getAttribute("id"); //$NON-NLS-N$1
+ String natureId = natures[k].getAttribute("id"); //$NON-NLS-1$
try {
if(project.hasNature(natureId)) {
- Object resolver = natures[k].createExecutableExtension("resolver-class"); //$NON-NLS-N$1
+ Object resolver = natures[k].createExecutableExtension("resolver-class"); //$NON-NLS-1$
if(resolver instanceof ELResolver) {
resolverSet.add((ELResolver)resolver);
} else {
- Activator.getPluginLog().logError(resolver.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolver");
+ Activator.getPluginLog().logError(resolver.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolver"); //$NON-NLS-1$
}
}
} catch (InvalidRegistryObjectException e) {
@@ -88,17 +88,17 @@
Activator.getPluginLog().logError(e);
}
}
- IConfigurationElement[] factories = elements[i].getChildren("factory"); //$NON-NLS-N$1
+ IConfigurationElement[] factories = elements[i].getChildren("factory"); //$NON-NLS-1$
for (int k = 0; k < factories.length; k++) {
try {
- Object factory = factories[k].createExecutableExtension("class"); //$NON-NLS-N$1
+ Object factory = factories[k].createExecutableExtension("class"); //$NON-NLS-1$
if(factory instanceof ELResolverFactory) {
ELResolver resolver = ((ELResolverFactory)factory).createResolver(resource);
if(resolver!=null) {
resolverSet.add(resolver);
}
} else {
- Activator.getPluginLog().logError(factory.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolverFactory");
+ Activator.getPluginLog().logError(factory.getClass().getName() + " must be instance of org.jboss.tools.common.el.core.resolver.ELResolverFactory"); //$NON-NLS-1$
}
} catch (CoreException e) {
Activator.getPluginLog().logError(e);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/ElVarSearcher.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -35,8 +35,8 @@
*/
public class ElVarSearcher {
- private final static String VAR_ATTRIBUTE_NAME = "var";
- private final static String VALUE_ATTRIBUTE_NAME = "value";
+ private final static String VAR_ATTRIBUTE_NAME = "var"; //$NON-NLS-1$
+ private final static String VALUE_ATTRIBUTE_NAME = "value"; //$NON-NLS-1$
private IFile file;
private ELCompletionEngine engine;
@@ -219,7 +219,7 @@
declLength = varNameEnd - varNameStart;
}
var = var.trim();
- if(!"".equals(var)) {
+ if(!"".equals(var)) { //$NON-NLS-1$
String value = element.getAttribute(VALUE_ATTRIBUTE_NAME);
if(value!=null) {
value = value.trim();
@@ -247,9 +247,9 @@
ArrayList<Var> parentVars = new ArrayList<Var>();
for (Var var : vars) {
ELExpression token = var.getElToken();
- if(token!=null && !token.getText().endsWith(".")) {
+ if(token!=null && !token.getText().endsWith(".")) { //$NON-NLS-1$
String varName = var.getName();
- if(el.equals(varName) || el.startsWith(varName.trim()+".")) {
+ if(el.equals(varName) || el.startsWith(varName.trim()+".")) { //$NON-NLS-1$
if(var.getElToken()!=null && initializeNestedVars) {
Var parentVar = findVarForEl(var.getElToken().getText(), parentVars, true);
if(parentVar!=null) {
@@ -267,7 +267,7 @@
}
if(resolvedToken!=null) {
String oldText = var.getElToken().getText();
- String newValue = "#{" + resolvedToken.getText() + oldText.substring(parentVar.getName().length()) + "}";
+ String newValue = "#{" + resolvedToken.getText() + oldText.substring(parentVar.getName().length()) + "}"; //$NON-NLS-1$ //$NON-NLS-2$
var.value = newValue;
var.elToken = var.parseEl(newValue);
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/TypeInfoCollector.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -291,7 +291,7 @@
}
public boolean isJavaLangObject() {
- return "java.lang.Object".equals(getDeclaringTypeQualifiedName());
+ return "java.lang.Object".equals(getDeclaringTypeQualifiedName()); //$NON-NLS-1$
}
public MemberInfo getParentMember() {
@@ -590,11 +590,11 @@
return false;
}
- return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0);
+ return (((getName().startsWith("get") && !getName().equals("get")) || getName().startsWith("is")) && getNumberOfParameters() == 0); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
public boolean isSetter() {
- return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1);
+ return ((getName().startsWith("set") && !getName().equals("set")) && getNumberOfParameters() == 1); //$NON-NLS-1$ //$NON-NLS-2$
}
public List<String> getAsPresentedStrings() {
@@ -764,12 +764,12 @@
}
boolean isDataModelObject(IType type) throws JavaModelException {
- return isInstanceofType(type, "javax.faces.model.DataModel");
+ return isInstanceofType(type, "javax.faces.model.DataModel"); //$NON-NLS-1$
}
public static boolean isResourceBundle(IType type) {
try {
- return isInstanceofType(type, "java.util.ResourceBundle");
+ return isInstanceofType(type, "java.util.ResourceBundle"); //$NON-NLS-1$
} catch (JavaModelException e) {
return false;
}
@@ -782,7 +782,7 @@
}
IType type = mbr.getMemberType();
if(type!=null) {
- return isInstanceofType(type, "java.util.Map") || isInstanceofType(type, "java.util.Collection");
+ return isInstanceofType(type, "java.util.Map") || isInstanceofType(type, "java.util.Collection"); //$NON-NLS-1$ //$NON-NLS-2$
}
return false;
} catch (JavaModelException e) {
@@ -844,10 +844,10 @@
void addInfoForDataModelVariable() {
fMethods.add(new MethodInfo(fType,
fType.getFullyQualifiedName(),
- "getRowCount", Modifier.PUBLIC,
+ "getRowCount", Modifier.PUBLIC, //$NON-NLS-1$
new String[0],
new String[0],
- "int",
+ "int", //$NON-NLS-1$
fTypeInfo,
fTypeInfo,
false));
@@ -856,19 +856,19 @@
void addInfoForDataModelObject() {
fMethods.add(new MethodInfo(fType,
fType.getFullyQualifiedName(),
- "size", Modifier.PUBLIC,
+ "size", Modifier.PUBLIC, //$NON-NLS-1$
new String[0],
new String[0],
- "int",
+ "int", //$NON-NLS-1$
fTypeInfo,
fTypeInfo,
false));
fMethods.add(new MethodInfo(fType,
fType.getFullyQualifiedName(),
- "isEmpty", Modifier.PUBLIC,
+ "isEmpty", Modifier.PUBLIC, //$NON-NLS-1$
new String[0],
new String[0],
- "boolean",
+ "boolean", //$NON-NLS-1$
fTypeInfo,
fTypeInfo,
false));
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/resolver/Var.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -47,7 +47,7 @@
}
ELExpression parseEl(String el) {
- if(el.length()>3 && el.startsWith("#{") && el.endsWith("}")) {
+ if(el.length()>3 && el.startsWith("#{") && el.endsWith("}")) { //$NON-NLS-1$ //$NON-NLS-2$
ELParser parser = factory.createParser();
ELModel model = parser.parse(el);
if(model == null || model.getSyntaxErrors().size() > 0) return null;
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentExpressionImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -42,7 +42,7 @@
}
public String toString() {
- return super.toString() + ((argument != null) ? argument.toString() : "");
+ return super.toString() + ((argument != null) ? argument.toString() : ""); //$NON-NLS-1$
}
public ELObjectType getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELArgumentImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -52,7 +52,7 @@
if(child instanceof ELExpressionImpl) {
setArgument((ELExpressionImpl)child);
} else {
- throw new IllegalArgumentException("EL argument can have only EL expression as its child.");
+ throw new IllegalArgumentException("EL argument can have only EL expression as its child."); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELComplexExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELComplexExpressionImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELComplexExpressionImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -57,7 +57,7 @@
if(child instanceof ELExpressionImpl) {
setExpression((ELExpressionImpl)child);
} else {
- throw new IllegalArgumentException("EL instance can have only EL expression as child.");
+ throw new IllegalArgumentException("EL instance can have only EL expression as child."); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInstanceImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInstanceImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInstanceImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -62,7 +62,7 @@
if(child instanceof ELExpressionImpl) {
setExpression((ELExpressionImpl)child);
} else {
- throw new IllegalArgumentException("EL instance can have only EL expression as child.");
+ throw new IllegalArgumentException("EL instance can have only EL expression as child."); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELInvocationExpressionImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -46,7 +46,7 @@
}
public String toString() {
- return left != null ? left.toString() : "";
+ return left != null ? left.toString() : ""; //$NON-NLS-1$
}
public void collectInvocations(List<ELInvocationExpression> list) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMethodInvocationImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMethodInvocationImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMethodInvocationImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -46,7 +46,7 @@
}
public String toString() {
- return super.toString() + ((parameters != null) ? parameters.toString() : "");
+ return super.toString() + ((parameters != null) ? parameters.toString() : ""); //$NON-NLS-1$
}
public ELObjectType getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELModelImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -51,7 +51,7 @@
if(child instanceof ELInstanceImpl) {
addInstance((ELInstanceImpl)child);
} else {
- throw new IllegalArgumentException("EL root can have onle ELInstances as its children.");
+ throw new IllegalArgumentException("EL root can have only ELInstances as its children."); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELMultiExpressionImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -44,13 +44,13 @@
} else if(child instanceof ELOperatorImpl) {
addOperator((ELOperatorImpl)child);
} else {
- throw new IllegalArgumentException("EL instance can have only EL expression as child.");
+ throw new IllegalArgumentException("EL instance can have only EL expression as child."); //$NON-NLS-1$
}
}
public void addExpression(ELExpressionImpl expression) {
if(expressions.size() > operators.size()) {
- throw new IllegalArgumentException("Expecting operator");
+ throw new IllegalArgumentException("Expecting operator"); //$NON-NLS-1$
}
super.addChild(expression);
expressions.add(expression);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELOperatorImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELOperatorImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELOperatorImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -25,7 +25,7 @@
}
public String toString() {
- return getFirstToken() != null ? getFirstToken().getText() : "";
+ return getFirstToken() != null ? getFirstToken().getText() : ""; //$NON-NLS-1$
}
public ELObjectType getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELParametersImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELParametersImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELParametersImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -56,7 +56,7 @@
if(child instanceof ELExpressionImpl) {
addParameter((ELExpressionImpl)child);
} else {
- throw new IllegalArgumentException("EL parameters can have only EL expressions as its children.");
+ throw new IllegalArgumentException("EL parameters can have only EL expressions as its children."); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELPropertyInvocationImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -56,12 +56,12 @@
}
String p = ((ELPropertyInvocationImpl)left).getQualifiedName();
if(p == null) return null;
- return p + "." + name.getText();
+ return p + "." + name.getText(); //$NON-NLS-1$
}
public String toString() {
- return super.toString() + (dot != null ? dot.getText() : "")
- + (name != null ? name.getText() : "");
+ return super.toString() + (dot != null ? dot.getText() : "") //$NON-NLS-1$
+ + (name != null ? name.getText() : ""); //$NON-NLS-1$
}
public ELObjectType getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELValueExpressionImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELValueExpressionImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/model/ELValueExpressionImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -24,7 +24,7 @@
}
public String toString() {
- return getFirstToken() != null ? getFirstToken().getText() : "";
+ return getFirstToken() != null ? getFirstToken().getText() : ""; //$NON-NLS-1$
}
public ELObjectType getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/ELParserImpl.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -52,7 +52,7 @@
public ELModelImpl parse(LexicalToken start) {
if(current != null) {
- throw new RuntimeException("Cannot reuse parser while it is running.");
+ throw new RuntimeException("Cannot reuse parser while it is running."); //$NON-NLS-1$
}
try {
ELModelImpl model = new ELModelImpl();
@@ -91,7 +91,7 @@
//create fake invocation expression
expression = new ELPropertyInvocationImpl();
int p = current != null ? current.getStart() : instance.getEndPosition();
- LexicalToken t = new LexicalToken(p, 0, "", JavaNameTokenDescription.JAVA_NAME);
+ LexicalToken t = new LexicalToken(p, 0, "", JavaNameTokenDescription.JAVA_NAME); //$NON-NLS-1$
expression.setFirstToken(t);
expression.setLastToken(t);
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/CallRule.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.rule;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.IRule;
import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
@@ -98,18 +99,18 @@
public String getProblem(int state, Tokenizer tokenizer) {
if(ParamUtil.isMethodParamContext(tokenizer.getContext())) {
- return "Expecting ',' or ')'";
+ return Messages.CallRule_ExpectingCommaOrRParen;
} else if(ParamUtil.isComplexExpressionContext(tokenizer.getContext())) {
- return "Expecting ')'";
+ return Messages.CallRule_ExpectingRParen;
} else if(ParamUtil.isArgContext(tokenizer.getContext())) {
- return "Expecting ']'";
+ return Messages.CallRule_ExpectingRBracket;
}
if(state == STATE_EXPECTING_CALL_AFTER_METHOD) {
if(ParamStartTokenDescription.INSTANCE.isStart(tokenizer, tokenizer.getCurrentIndex())) {
- return "Unexpected symbol '('";
+ return Messages.CallRule_UnexpectedLParen;
}
}
- return "Expecting '}'";
+ return Messages.CallRule_ExpectingRBrace;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/ExpressionRule.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.rule;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.IRule;
import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
@@ -127,15 +128,15 @@
public String getProblem(int state, Tokenizer tokenizer) {
if(state == STATE_EXPECTING_NAME) {
- return "Expecting Java method or property name";
+ return Messages.ExpressionRule_ExpectingJavaName;
} else {
if(OperationTokenDescription.INSTANCE.isStart(tokenizer, tokenizer.getCurrentIndex())) {
- return "Expression cannot start with binary operator.";
+ return Messages.ExpressionRule_CannotStartWithBinaryOp;
}
if(JavaNameTokenDescription.INSTANCEOF_INSTANCE.isStart(tokenizer, tokenizer.getCurrentIndex())) {
- return "Expression cannot start with instanceof.";
+ return Messages.ExpressionRule_CannotStartWithInstanceof;
}
- return "Expecting expression";
+ return Messages.ExpressionRule_ExpectingExpression;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/rule/OperationRule.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.rule;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.IRule;
import org.jboss.tools.common.el.core.parser.Tokenizer;
import org.jboss.tools.common.el.internal.core.parser.token.ArgEndTokenDescription;
@@ -72,13 +73,13 @@
public String getProblem(int state, Tokenizer tokenizer) {
if(ParamUtil.isMethodParamContext(tokenizer.getContext())) {
- return "Expecting ')'";
+ return Messages.OperationRule_ExpectingRParen;
} else if(ParamUtil.isComplexExpressionContext(tokenizer.getContext())) {
- return "Expecting ')'";
+ return Messages.OperationRule_ExpectingRParen;
} else if(ParamUtil.isArgContext(tokenizer.getContext())) {
- return "Expecting ']'";
+ return Messages.OperationRule_ExpectingRBracket;
}
- return "Expecting '}'";
+ return Messages.OperationRule_ExpectingRBrace;
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgEndTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -29,7 +29,7 @@
*/
public class ArgEndTokenDescription extends ConstantTokenDescription {
public static final int ARG_END = 11;
- public static final String CLOSE = "]";
+ public static final String CLOSE = "]"; //$NON-NLS-1$
public static ArgEndTokenDescription INSTANCE = new ArgEndTokenDescription();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ArgStartTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -19,7 +19,7 @@
*/
public class ArgStartTokenDescription extends ConstantTokenDescription {
public static final int ARG_START = 10;
- public static final String OPEN = "[";
+ public static final String OPEN = "["; //$NON-NLS-1$
public static ArgStartTokenDescription INSTANCE = new ArgStartTokenDescription();
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/CommaTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/CommaTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/CommaTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,7 +23,7 @@
public static CommaTokenDescription INSTANCE = new CommaTokenDescription();
public CommaTokenDescription () {
- super(",", COMMA);
+ super(",", COMMA); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/DotTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/DotTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/DotTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -21,7 +21,7 @@
public static DotTokenDescription INSTANCE = new DotTokenDescription();
public DotTokenDescription () {
- super(".", DOT);
+ super(".", DOT); //$NON-NLS-1$
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/EndELTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/EndELTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/EndELTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -24,7 +24,7 @@
public static EndELTokenDescription INSTANCE = new EndELTokenDescription();
public EndELTokenDescription () {
- super("}", END_EL);
+ super("}", END_EL); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprEndTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprEndTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprEndTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,7 +23,7 @@
public static ExprEndTokenDescription INSTANCE = new ExprEndTokenDescription();
public ExprEndTokenDescription () {
- super(")", EXPR_END);
+ super(")", EXPR_END); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprStartTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprStartTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ExprStartTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,7 +23,7 @@
public static ExprStartTokenDescription INSTANCE = new ExprStartTokenDescription();
public ExprStartTokenDescription () {
- super("(", EXPR_START);
+ super("(", EXPR_START); //$NON-NLS-1$
}
public boolean read(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/JavaNameTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/JavaNameTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/JavaNameTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.token;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.ITokenDescription;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -26,7 +27,7 @@
public static ConstantTokenDescription INSTANCEOF_INSTANCE = InstanceofTokenDescription.INSTANCE;
public String getName() {
- return "NAME";
+ return Messages.JavaNameTokenDescription_Name;
}
public int getType() {
@@ -65,11 +66,11 @@
public static InstanceofTokenDescription INSTANCE = new InstanceofTokenDescription();
private static final String[] OPS_2 = {
- "instanceof"
+ "instanceof" //$NON-NLS-1$
};
public InstanceofTokenDescription() {
- super("!", INSTANCEOF);
+ super("!", INSTANCEOF); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/OperationTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.token;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.ITokenDescription;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -22,18 +23,18 @@
public static final int OPERATION = 12;
static String[] OPS = {
- "&&", "||", "==", "!=", "<=", ">=",
- "+", "-", "*", "/", "&", "%", "|", "?" , ":", "^", "<", ">",
+ "&&", "||", "==", "!=", "<=", ">=", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+ "+", "-", "*", "/", "&", "%", "|", "?" , ":", "^", "<", ">", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$
};
private static final String[] OPS_2 = {
- "div", "and", "or", "not", "mod",
- "eq", "ne", "lt", "gt", "ge", "le",
+ "div", "and", "or", "not", "mod", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ "eq", "ne", "lt", "gt", "ge", "le", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
};
public static OperationTokenDescription INSTANCE = new OperationTokenDescription();
public String getName() {
- return "Operator";
+ return Messages.OperationTokenDescription_Name;
}
public int getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamEndTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamEndTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamEndTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,7 +23,7 @@
public static ParamEndTokenDescription INSTANCE = new ParamEndTokenDescription();
public ParamEndTokenDescription () {
- super(")", PARAM_END);
+ super(")", PARAM_END); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamStartTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamStartTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamStartTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,7 +23,7 @@
public static ParamStartTokenDescription INSTANCE = new ParamStartTokenDescription();
public ParamStartTokenDescription () {
- super("(", PARAM_START);
+ super("(", PARAM_START); //$NON-NLS-1$
}
public boolean read(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/ParamUtil.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -19,7 +19,7 @@
*
*/
public class ParamUtil {
- static String PARAM_HISTORY = "(_level";
+ static String PARAM_HISTORY = "(_level"; //$NON-NLS-1$
static class ParamHistory extends ArrayList<String>{
private static final long serialVersionUID = 1L;
@@ -40,17 +40,17 @@
public static boolean isMethodParamContext(Properties context) {
ParamHistory i = (ParamHistory)(context.get(PARAM_HISTORY));
- return i != null && i.size() > 0 && "params".equals(i.get(i.size() - 1));
+ return i != null && i.size() > 0 && "params".equals(i.get(i.size() - 1)); //$NON-NLS-1$
}
public static boolean isArgContext(Properties context) {
ParamHistory i = (ParamHistory)(context.get(PARAM_HISTORY));
- return i != null && i.size() > 0 && "arg".equals(i.get(i.size() - 1));
+ return i != null && i.size() > 0 && "arg".equals(i.get(i.size() - 1)); //$NON-NLS-1$
}
public static boolean isComplexExpressionContext(Properties context) {
- ParamHistory i = (ParamHistory)(context.get("(_level"));
- return i != null && i.size() > 0 && "expr".equals(i.get(i.size() - 1));
+ ParamHistory i = (ParamHistory)(context.get("(_level")); //$NON-NLS-1$
+ return i != null && i.size() > 0 && "expr".equals(i.get(i.size() - 1)); //$NON-NLS-1$
}
public static void closeCurrentParamContext(Properties context) {
@@ -61,18 +61,18 @@
}
public static void openMethodParamContext(Properties context) {
- ParamHistory i = (ParamHistory)(context.get("(_level"));
- i.add("params");
+ ParamHistory i = (ParamHistory)(context.get("(_level")); //$NON-NLS-1$
+ i.add("params"); //$NON-NLS-1$
}
public static void openComplexExpressionContext(Properties context) {
- ParamHistory i = (ParamHistory)(context.get("(_level"));
- i.add("expr");
+ ParamHistory i = (ParamHistory)(context.get("(_level")); //$NON-NLS-1$
+ i.add("expr"); //$NON-NLS-1$
}
public static void openArgContext(Properties context) {
- ParamHistory i = (ParamHistory)(context.get("(_level"));
- i.add("arg");
+ ParamHistory i = (ParamHistory)(context.get("(_level")); //$NON-NLS-1$
+ i.add("arg"); //$NON-NLS-1$
}
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/PrimitiveValueTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.token;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.ITokenDescription;
import org.jboss.tools.common.el.core.parser.SyntaxError;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -26,10 +27,10 @@
public static PrimitiveValueTokenDescription INSTANCE = new PrimitiveValueTokenDescription();
private static final String[] OPS_2 = {
- "null", "true", "false",
+ "null", "true", "false", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
};
public String getName() {
- return "Primitive";
+ return Messages.PrimitiveValueTokenDescription_Name;
}
public int getType() {
@@ -79,12 +80,12 @@
return true;
}
- static String TYPE_CHAR = "lLfFdD";
+ static String TYPE_CHAR = "lLfFdD"; //$NON-NLS-1$
private boolean readNumber(Tokenizer tokenizer, int offset) {
int i = offset;
int dotCount = 1;
int dotOffset = -1;
- if(tokenizer.startsWith("0x")) {
+ if(tokenizer.startsWith("0x")) { //$NON-NLS-1$
i += 2;
dotCount = 0;
}
@@ -140,7 +141,7 @@
&& tokenizer.getLastToken().getType() == ArgStartTokenDescription.ARG_START
&& dotCount < 1) {
SyntaxError error = new SyntaxError(dotOffset, BasicStates.STATE_EXPECTING_ARG);
- error.setProblem("Argument must resolve to integer or string.");
+ error.setProblem(Messages.PrimitiveValueTokenDescription_ArgMustResolveToIntegerOrString);
tokenizer.addSyntaxError(error);
}
tokenizer.addToken(getType(), offset, i);
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StartELTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StartELTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StartELTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,8 +23,8 @@
public static StartELTokenDescription INSTANCE = new StartELTokenDescription();
public StartELTokenDescription () {
- super("#{", START_EL);
- addContent("${");
+ super("#{", START_EL); //$NON-NLS-1$
+ addContent("${"); //$NON-NLS-1$
}
public boolean read(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StringTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StringTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/StringTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.token;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.ITokenDescription;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -24,7 +25,7 @@
public static StringTokenDescription INSTANCE = new StringTokenDescription();
public String getName() {
- return "String";
+ return Messages.StringTokenDescription_Name;
}
public int getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/UnaryTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -23,15 +23,15 @@
public static UnaryTokenDescription INSTANCE = new UnaryTokenDescription();
private static final String[] OPS_2 = {
- "not", "empty"
+ "not", "empty" //$NON-NLS-1$//$NON-NLS-2$
};
public UnaryTokenDescription() {
- super("!", UNARY);
- addContent("--");
- addContent("++");
- addContent("+");
- addContent("-");
+ super("!", UNARY); //$NON-NLS-1$
+ addContent("--"); //$NON-NLS-1$
+ addContent("++"); //$NON-NLS-1$
+ addContent("+"); //$NON-NLS-1$
+ addContent("-"); //$NON-NLS-1$
}
public boolean isStart(Tokenizer tokenizer, int offset) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/WhiteSpaceTokenDescription.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/WhiteSpaceTokenDescription.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/internal/core/parser/token/WhiteSpaceTokenDescription.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.common.el.internal.core.parser.token;
+import org.jboss.tools.common.el.core.Messages;
import org.jboss.tools.common.el.core.parser.ITokenDescription;
import org.jboss.tools.common.el.core.parser.Tokenizer;
@@ -24,7 +25,7 @@
public static WhiteSpaceTokenDescription INSTANCE = new WhiteSpaceTokenDescription();
public String getName() {
- return "Whitespace";
+ return Messages.WhiteSpaceTokenDescription_Name;
}
public int getType() {
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/.settings/org.eclipse.jdt.core.prefs 2009-05-27 06:24:07 UTC (rev 15544)
@@ -4,4 +4,5 @@
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.source=1.5
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/Activator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/Activator.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/Activator.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -20,7 +20,7 @@
public class Activator extends AbstractUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.common.el.ui";
+ public static final String PLUGIN_ID = "org.jboss.tools.common.el.ui"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
Modified: trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/GlobalElVariablesComposite.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/GlobalElVariablesComposite.java 2009-05-27 06:00:55 UTC (rev 15543)
+++ trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/GlobalElVariablesComposite.java 2009-05-27 06:24:07 UTC (rev 15544)
@@ -33,7 +33,7 @@
*/
@Override
protected String createGroupLabel() {
- return "";
+ return ""; //$NON-NLS-1$
}
/**
@@ -49,7 +49,7 @@
*/
@Override
protected String getEntity() {
- return "VPEGlobalElReference";
+ return "VPEGlobalElReference"; //$NON-NLS-1$
}
/**
@@ -62,7 +62,7 @@
@Override
protected ResourceReference getDefaultResourceReference() {
- ResourceReference rf = new ResourceReference("", ResourceReference.GLOBAL_SCOPE);
+ ResourceReference rf = new ResourceReference("", ResourceReference.GLOBAL_SCOPE); //$NON-NLS-1$
rf.setGlobal(true);
return rf;
}
17 years, 1 month
JBoss Tools SVN: r15543 - in trunk: jmx/plugins/org.jboss.tools.jmx.ui/META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-05-27 02:00:55 -0400 (Wed, 27 May 2009)
New Revision: 15543
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
Log:
weird changes causing workspace to fail
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-05-27 01:04:00 UTC (rev 15542)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2009-05-27 06:00:55 UTC (rev 15543)
@@ -42,11 +42,11 @@
org.eclipse.search,
org.apache.ant,
org.jboss.ide.eclipse.as.core,
- org.eclipse.ui.navigator;bundle-version="3.3.100",
- org.eclipse.ui.views.log;bundle-version="1.0.0",
- org.jboss.tools.jmx.ui;bundle-version="0.2.2",
- org.jboss.tools.jmx.core;bundle-version="0.2.1",
- org.eclipse.jst.j2ee.core;bundle-version="1.1.0"
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.views.log,
+ org.jboss.tools.jmx.ui,
+ org.jboss.tools.jmx.core,
+ org.eclipse.jst.j2ee.core
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.ui,
org.jboss.ide.eclipse.as.ui.dialogs,
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2009-05-27 01:04:00 UTC (rev 15542)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2009-05-27 06:00:55 UTC (rev 15543)
@@ -1,7 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
-Bundle-SymbolicName: org.jboss.tools.jmx.ui;singleton:=trueBundle-Version: 1.0.1.qualifier
+Bundle-SymbolicName: org.jboss.tools.jmx.ui;singleton:=true
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.jboss.tools.jmx.ui.JMXUIActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.ui,
17 years, 1 month
JBoss Tools SVN: r15542 - trunk/jmx/releng/psfs.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:04:00 -0400 (Tue, 26 May 2009)
New Revision: 15542
Added:
trunk/jmx/releng/psfs/athena.psf
Removed:
trunk/jmx/releng/psfs/jmxAndAthena.psf
Log:
https://jira.jboss.org/jira/browse/JBDS-737 easier to maintain if file only contains athena stuff, not athena + JMX
Copied: trunk/jmx/releng/psfs/athena.psf (from rev 15541, trunk/jmx/releng/psfs/jmxAndAthena.psf)
===================================================================
--- trunk/jmx/releng/psfs/athena.psf (rev 0)
+++ trunk/jmx/releng/psfs/athena.psf 2009-05-27 01:04:00 UTC (rev 15542)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<psf version="2.0">
+<provider id="org.eclipse.team.cvs.core.cvsnature">
+<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng,org.eclipse.dash.common.releng"/>
+<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,org.eclipse.releng.basebuilder,org.eclipse.releng.basebuilder,R35_M6"/>
+</provider>
+</psf>
\ No newline at end of file
Property changes on: trunk/jmx/releng/psfs/athena.psf
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/jmx/releng/psfs/jmxAndAthena.psf
===================================================================
--- trunk/jmx/releng/psfs/jmxAndAthena.psf 2009-05-27 01:02:53 UTC (rev 15541)
+++ trunk/jmx/releng/psfs/jmxAndAthena.psf 2009-05-27 01:04:00 UTC (rev 15542)
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<psf version="2.0">
-<provider id="org.tigris.subversion.subclipse.core.svnnature">
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/features/org.jboss.t..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/features/org.jboss.t..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/plugins/org.jboss.to..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/plugins/org.jboss.to..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/tests/org.jboss.tool..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/tests/org.jboss.tool..."/>
-<project reference="0.9.3,svn://svn.jboss.org/repos/jbosstools/trunk/jmx/tests/org.jboss.tool..."/>
-</provider>
-<provider id="org.eclipse.team.cvs.core.cvsnature">
-<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/technology,org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng,org.eclipse.dash.common.releng"/>
-<project reference="1.0,:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse,org.eclipse.releng.basebuilder,org.eclipse.releng.basebuilder,R35_M6"/>
-</provider>
-</psf>
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15541 - in trunk/jmx/features/org.jboss.tools.jmx.feature: sourceTemplateFeature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:02:53 -0400 (Tue, 26 May 2009)
New Revision: 15541
Added:
trunk/jmx/features/org.jboss.tools.jmx.feature/rootfiles/
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/license.html
Log:
https://jira.jboss.org/jira/browse/JBDS-737
Added: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties (rev 0)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties 2009-05-27 01:02:53 UTC (rev 15541)
@@ -0,0 +1,21 @@
+# properties file for org.jboss.tools.jmx.source
+featureName=JMX Console Source
+featureProvider=JBoss, a division of Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=eclipse-jmx is a JMX console which is used to manage Java applications through JMX and its RMI Connector. eclipse-jmx can be run from the Eclipse IDE.
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\nMarch 17, 2005\n\nUsage Of Content\n\nTHE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\nOTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\nUSE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\nAGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\nNOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\nAGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\nAND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\nOR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\nTERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\nOF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\nBELOW, THEN YOU MAY NOT USE THE CONTENT.\n\nApplicable Licenses\n\nUnless otherwise indicated, all Content made available by the Eclipse Foundation\nis provided to you under the terms and conditio!
ns of the Eclipse Public\nLicense Version 1.0 ("EPL"). A copy of the EPL is provided with this\nContent and is also available at http\://www.eclipse.org/legal/epl-v10.html.\nFor purposes of the EPL, "Program" will mean the Content.\n\nContent includes, but is not limited to, source code, object code,\ndocumentation and other files maintained in the Eclipse.org CVS\nrepository ("Repository") in CVS modules ("Modules") and made available\nas downloadable archives ("Downloads").\n\n- Content may be structured and packaged into modules to facilitate delivering,\nextending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\nplug-in fragments ("Fragments"), and features ("Features").\n- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\nin a directory named "plugins".\n- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\nEach Feature may be packaged as a sub-directory in a directory!
named "features".\nWithin a Feature, files named "feature.xml" may co
ntain a list of the names and version\nnumbers of the Plug-ins and/or Fragments associated with that Feature.\n- Features may also include other Features ("Included Features"). Within a Feature, files\nnamed "feature.xml" may contain a list of the names and version numbers of Included Features.\n\nFeatures may also include other Features ("Included Features"). Files named\n"feature.xml" may contain a list of the names and version numbers of\nIncluded Features.\n\nThe terms and conditions governing Plug-ins and Fragments should be\ncontained in files named "about.html" ("Abouts"). The terms and\nconditions governing Features and Included Features should be contained\nin files named "license.html" ("Feature Licenses"). Abouts and Feature\nLicenses may be located in any directory of a Download or Module\nincluding, but not limited to the following locations\:\n\n- The top-level (root) directory\n- Plug-in and Fragment directories\n- Inside Plug-ins and Fragments packaged as JAR!
s\n- Sub-directories of the directory named "src" of certain Plug-ins\n- Feature directories\n\nNote\: if a Feature made available by the Eclipse Foundation is installed using the\nEclipse Update Manager, you must agree to a license ("Feature Update\nLicense") during the installation process. If the Feature contains\nIncluded Features, the Feature Update License should either provide you\nwith the terms and conditions governing the Included Features or inform\nyou where you can locate them. Feature Update Licenses may be found in\nthe "license" property of files named "feature.properties". Such Abouts,\nFeature Licenses and Feature Update Licenses contain the terms and\nconditions (or references to such terms and conditions) that govern your\nuse of the associated Content in that directory.\n\nTHE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\nTO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\nSOME OF THESE OTHER LICENSE AGREEMENTS MA!
Y INCLUDE (BUT ARE NOT LIMITED TO)\:\n\n- Common Public License Versio
n 1.0 (available at http\://www.eclipse.org/legal/cpl-v10.html)\n- Apache Software License 1.1 (available at http\://www.apache.org/licenses/LICENSE)\n- Apache Software License 2.0 (available at http\://www.apache.org/licenses/LICENSE-2.0)\n- IBM Public License 1.0 (available at http\://oss.software.ibm.com/developerworks/opensource/license10.html)\n- Metro Link Public License 1.00 (available at http\://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n- Mozilla Public License Version 1.1 (available at http\://www.mozilla.org/MPL/MPL-1.1.html)\n\nIT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\nTO USE OF THE CONTENT. If no About, Feature License or Feature Update License\nis provided, please contact the Eclipse Foundation to determine what terms and conditions\ngovern that particular Content.\n\nCryptography\n\nContent may contain encryption software. The country in which you are\ncurrently may have restrictions on the import, posse!
ssion, and use,\nand/or re-export to another country, of encryption software. BEFORE\nusing any encryption software, please check the country's laws,\nregulations and policies concerning the import, possession, or use,\nand re-export of encryption software, to see if this is permitted.\n\nJava and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
+# END NON-TRANSLATABLE
+########### end of license property ##########################################
+
\ No newline at end of file
Property changes on: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/feature.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/license.html
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/license.html (rev 0)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/license.html 2009-05-27 01:02:53 UTC (rev 15541)
@@ -0,0 +1,79 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
+<title>Eclipse.org Software User Agreement</title>
+</head>
+
+<body lang="EN-US" link=blue vlink=purple>
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>March 17, 2005</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ ("EPL"). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS
+ modules ("Modules") and made available as downloadable archives ("Downloads").</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and
+Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
+</body>
+</html>
Property changes on: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/license.html
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 1 month
JBoss Tools SVN: r15540 - trunk/jmx/features/org.jboss.tools.jmx.tests.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:02:29 -0400 (Tue, 26 May 2009)
New Revision: 15540
Modified:
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/build.properties
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-737 add test source plugins
Modified: trunk/jmx/features/org.jboss.tools.jmx.tests.feature/build.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.tests.feature/build.properties 2009-05-27 01:02:01 UTC (rev 15539)
+++ trunk/jmx/features/org.jboss.tools.jmx.tests.feature/build.properties 2009-05-27 01:02:29 UTC (rev 15540)
@@ -1,5 +1,7 @@
bin.includes = feature.xml,\
feature.properties,\
license.html
-generate.plugin(a)org.jboss.tools.tests.source.feature=org.jboss.tools.tests.feature
+generate.plugin(a)org.jboss.tools.jmx.core.test.source=org.jboss.tools.jmx.core.test
+generate.plugin(a)org.jboss.tools.jmx.ui.test.source=org.jboss.tools.jmx.ui.test
+generate.plugin(a)org.jboss.tools.jmx.ui.test.interactive.source=org.jboss.tools.jmx.ui.test.interactive
root=rootfiles
\ No newline at end of file
Modified: trunk/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml 2009-05-27 01:02:01 UTC (rev 15539)
+++ trunk/jmx/features/org.jboss.tools.jmx.tests.feature/feature.xml 2009-05-27 01:02:29 UTC (rev 15540)
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
- id="org.jboss.tools.jmx.tests"
+ id="org.jboss.tools.jmx.tests.feature"
label="%featureName"
- version="0.2.2.qualifier"
+ version="1.0.1.qualifier"
provider-name="%featureProvider"
image="eclipse_update_120.jpg">
@@ -52,15 +52,33 @@
version="0.0.0"/>
<plugin
+ id="org.jboss.tools.jmx.core.test.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
id="org.jboss.tools.jmx.ui.test"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
+ id="org.jboss.tools.jmx.ui.test.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
id="org.jboss.tools.jmx.ui.test.interactive"
download-size="0"
install-size="0"
version="0.0.0"/>
-
+
+ <plugin
+ id="org.jboss.tools.jmx.ui.test.interactive.source"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
</feature>
17 years, 1 month
JBoss Tools SVN: r15537 - in trunk/jmx/features: org.jboss.tools.jmx.feature/sourceTemplatePlugin and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:01:25 -0400 (Tue, 26 May 2009)
New Revision: 15537
Added:
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplatePlugin/
Removed:
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplatePlugin/CVS/
trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/CVS/
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/CVS/
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/rootfiles/CVS/
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplatePlugin/CVS/
Log:
https://jira.jboss.org/jira/browse/JBDS-737 don't need CVS folders
Copied: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplatePlugin (from rev 15259, trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplatePlugin)
17 years, 1 month
JBoss Tools SVN: r15536 - in trunk/jmx/features: org.jboss.tools.jmx.sdk.feature and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:00:45 -0400 (Tue, 26 May 2009)
New Revision: 15536
Modified:
trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml
trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-737 fix version, add qualifier
Modified: trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml 2009-05-27 01:00:15 UTC (rev 15535)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/feature.xml 2009-05-27 01:00:45 UTC (rev 15536)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.jmx.feature"
label="%featureName"
- version="0.2.2"
+ version="1.0.1.qualifier"
provider-name="%featureProvider"
plugin="org.jboss.tools.jmx.ui">
@@ -36,7 +36,7 @@
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.ui.forms" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.ui.navigator" version="3.3.100" match="greaterOrEqual"/>
- <import plugin="org.jboss.tools.jmx.core" version="0.2.1" match="greaterOrEqual"/>
+ <import plugin="org.jboss.tools.jmx.core" version="1.0.0" match="greaterOrEqual"/>
</requires>
<plugin
Modified: trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.xml
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.xml 2009-05-27 01:00:15 UTC (rev 15535)
+++ trunk/jmx/features/org.jboss.tools.jmx.sdk.feature/feature.xml 2009-05-27 01:00:45 UTC (rev 15536)
@@ -2,7 +2,7 @@
<feature
id="org.jboss.tools.jmx.sdk.feature"
label="%featureName"
- version="0.2.2.qualifier"
+ version="1.0.1.qualifier"
provider-name="%featureProvider">
<description>
17 years, 1 month
JBoss Tools SVN: r15535 - trunk/jmx/releng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 21:00:15 -0400 (Tue, 26 May 2009)
New Revision: 15535
Added:
trunk/jmx/releng/buildlog.compileOK-UItestOK-coretestTimeout.txt
Modified:
trunk/jmx/releng/build.properties
trunk/jmx/releng/testing.properties
Log:
https://jira.jboss.org/jira/browse/JBDS-737
Modified: trunk/jmx/releng/build.properties
===================================================================
--- trunk/jmx/releng/build.properties 2009-05-27 00:48:56 UTC (rev 15534)
+++ trunk/jmx/releng/build.properties 2009-05-27 01:00:15 UTC (rev 15535)
@@ -6,7 +6,7 @@
zipPrefix=JMX
incubation=
buildType=N
-version=0.2.2
+version=1.0.0
mainFeatureToBuildID=org.jboss.tools.jmx.sdk.feature
testFeatureToBuildID=org.jboss.tools.jmx.tests.feature
@@ -38,6 +38,7 @@
#http://www.eclipse.org/downloads/download.php?r=1&file=/webtools/downloads/drops/R3.1/S-3.1M7-20090505073946/wtp-jpt-S-3.1M7-20090505073946.zip,\
#http://www.eclipse.org/downloads/download.php?r=1&file=/modeling/emf/emf/downloads/drops/2.5.0/S200905041408/xsd-runtime-2.5.0M7.zip
+individualSourceBundles=true
domainNamespace=*
projNamespace=org.jboss.tools.jmx
projRelengName=org.jboss.tools.jmx.releng
Added: trunk/jmx/releng/buildlog.compileOK-UItestOK-coretestTimeout.txt
===================================================================
--- trunk/jmx/releng/buildlog.compileOK-UItestOK-coretestTimeout.txt (rev 0)
+++ trunk/jmx/releng/buildlog.compileOK-UItestOK-coretestTimeout.txt 2009-05-27 01:00:15 UTC (rev 15535)
@@ -0,0 +1,1819 @@
+Buildfile: /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/build.xml
+run:
+runEclipse:
+ [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse
+check.ant-contrib:
+get.pde.build.svn:
+get.ant4eclipse:
+ [echo] Run /usr/lib/jvm/java/bin/java
+ [echo] -enableassertions
+ [echo] -jar /home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar
+ [echo] -application org.eclipse.ant.core.antRunner
+ [echo] -f /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/buildAll.xml run
+ [echo] -Dprojectid=jbosstools.jmx -DbuildTimestamp=200905171536 -DbuildType=N -Dversion=0.2.2 -DwritableBuildRoot=/tmp/build -DdownloadsDir=/tmp/build/downloads -DthirdPartyJarsDir=/tmp/build/3rdPartyJars -DbuildDir=/tmp/build/N200905171536-JMX -DrelengBuilderDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng -DrelengCommonBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng -DrelengBaseBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder -DJAVA_HOME=/usr/lib/jvm/java -DdependencyURLs=http://www.eclipse.org/downloads/download.php?r=1&file=/eclipse/downloads/drops/S-3.5M7-200904302300/eclipse-SDK-3.5M7-linux-gtk.tar.gz -DlocalSourceCheckoutDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx
+ [build] Buildfile: /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/buildAll.xml
+ [build] init:
+ [build] check.ant-contrib:
+ [build] init:
+ [build] genBuildCfgInit:
+ [build] Trying to override old definition of task echo-timestamp
+ [build] projectid2names:
+ [build] genBuildCfg:
+ [build] Trying to override old definition of task echo-timestamp
+ [build] createBuildConfigFile:
+ [build] [echo] Created /tmp/build/N200905171536-JMX/build.cfg
+ [build] Trying to override old definition of task echo-timestamp
+ [build] collectURLs:
+ [build] getZip:
+ [build] [echo] Found 1 dependency URLs
+ [build] [echo] Load properties from /tmp/build/N200905171536-JMX/build.cfg
+ [build] create.label.properties:
+ [build] [echo] subprojectName = jmx
+ [build] [echo] Base OS: linux; Base Window System: gtk
+ [build] collectMaps:
+ [build] run:
+ [build] [echo] Get pde.build.svn
+ [build] get.pde.build.svn:
+ [build] [echo] Get ant4eclipse
+ [build] get.ant4eclipse:
+ [build] [echo] buildAll.xml#run :: build.step :: buildUpdate
+ [build] buildUpdate:
+ [build] buildMasterZip:
+ [build] -timestamp:
+ [build] [echo] 03:36:29
+ [build] init:
+ [build] main:
+ [build] main:
+ [build] preBuild:
+ [build] preSetup:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/N200905171536
+ [build] init:
+ [build] copyLocalSourceCheckout:
+ [build] init:
+ [build] convertRawCheckoutToFeaturesAndPluginsDirs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.feature
+ [build] [copy] Copying 14 files to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.feature
+ [build] [copy] Copied 3 empty directories to 1 empty directory under /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.feature
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature
+ [build] [copy] Copying 5 files to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature
+ [build] [copy] Copying 10 files to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature
+ [build] [copy] Copied 3 empty directories to 2 empty directories under /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core
+ [build] [copy] Copying 43 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui
+ [build] [copy] Copying 105 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ant.optional.junit
+ [build] [copy] Copying 4 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ant.optional.junit
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test
+ [build] [copy] Copying 14 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test
+ [build] [copy] Copying 33 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test
+ [build] [copy] Copying 8 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive
+ [build] [copy] Copying 26 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Sources-N200905171536.zip
+ [build] getMapFiles:
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse
+ [build] init:
+ [build] postSetup:
+ [build] [echo] Download, then unpack Eclipse ...
+ [build] init:
+ [build] getDependency:
+ [build] getBundle:
+ [build] downloadFile:
+ [build] unpackBundle:
+ [build] unzipFile:
+ [build] untarFile:
+ [build] [untar] Expanding: /tmp/build/downloads/eclipse-SDK-3.5M7-linux-gtk.tar.gz into /tmp/build/N200905171536-JMX
+ [build] unpackDocISV:
+ [build] processRepos:
+ [build] fetch:
+ [build] generate:
+ [build] preGenerate:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] generateScript:
+ [build] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied.
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.core_3.3.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.junit.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.junit.runtime_3.4.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.app:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.app_1.2.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.swt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.swt_3.5.0.v3545a
+ [build] [eclipse.buildScript] Unsatisfied import package org.eclipse.swt.accessibility2_0.0.0.
+ [build] [eclipse.buildScript] Unsatisfied import package org.mozilla.xpcom_0.0.0.
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.externaltools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.externaltools_3.2.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.appserver:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.appserver_3.1.400.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime.compatibility:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.runtime.compatibility_3.2.0.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui.sdk:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui.sdk_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.debug.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.debug.core_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.core_3.3.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.jarprocessor:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.jarprocessor_1.0.1.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.swt.gtk.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.swt.gtk.linux.x86_3.5.0.v3545a
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.ui_3.2.200.v20090213
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.net:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.net_1.2.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit.runtime_3.4.100.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.touchpoint.eclipse:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.touchpoint.eclipse_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ltk.ui.refactoring:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ltk.ui.refactoring_3.4.100.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.navigator.resources:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.navigator.resources_3.4.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.cvs:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.cvs_1.0.100.v20090123
+ [build] [eclipse.buildScript] Bundle com.ibm.icu:
+ [build] [eclipse.buildScript] Another singleton version selected: com.ibm.icu_4.0.1.v20090415
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views.properties.tabbed:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views.properties.tabbed_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform.doc.isv:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform.doc.isv_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui.test.interactive:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.base:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.base_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.ui_3.5.0.v20090430-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.simpleconfigurator.manipulator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.simpleconfigurator.manipulator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.api.tools.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.api.tools.ui_1.0.100.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.core_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ui.templates:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ui.templates_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.registry:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.registry_3.4.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.artifact.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.artifact.repository_1.0.100.v20090430-2300
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.core.manipulation:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.core.manipulation_1.3.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.repository.tools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.repository.tools_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.build:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.build_3.5.0.v20090430-1420
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui_3.5.0.I20090430-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.net:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.net_1.2.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.core_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.extensionlocation:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.extensionlocation_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.contenttype:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.contenttype_3.4.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.ui_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ds.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ds.ui_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.debug:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.debug_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.osgi:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.osgi_3.5.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.updatesite:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.updatesite_1.0.100.v20090430-1645
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.compiler.apt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.compiler.apt_1.0.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.security:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.security_1.0.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.ds:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.ds_1.1.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.resources:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.resources_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.frameworkadmin.equinox:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.frameworkadmin.equinox_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.simpleconfigurator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.simpleconfigurator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.core_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.launching:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.launching_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.identity:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.identity_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.http.registry:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.http.registry_1.0.200.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.ui_3.3.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.intro.universal:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.intro.universal_3.2.300.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.launcher.gtk.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090306-1900
+ [build] [eclipse.buildScript] Bundle org.eclipse.help:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.filetransfer:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.filetransfer_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views.log:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views.log_1.0.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.console:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.console_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.intro:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.intro_3.3.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.sdk:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.sdk_3.5.0.v200904302300
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ds.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ds.core_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.runtime_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.updatechecker:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.updatechecker_1.1.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.debug.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.debug.ui_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit4.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit4.runtime_1.1.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.test:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.test_3.2.0
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.api.tools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.api.tools_1.0.100.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.scheduler:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.scheduler_3.2.200.v20081127
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filesystem.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filesystem.linux.x86_1.2.0.v20080604-1400
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ua.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ua.ui_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jsch.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jsch.core_1.1.100.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.resources.compatibility:
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.editors:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.editors_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.ltk.core.refactoring:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ltk.core.refactoring_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.rcp:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.rcp_3.4.0.v20080507
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.ide.application:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.ide.application_1.0.100.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata.repository_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform_3.3.200.v200904302300
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform.doc.user_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.configurator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.configurator_3.3.0.v20090312
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.director.app:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.director.app_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.httpclient:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.provider.filetransfer.httpclient_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.webapp:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.webapp_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime.compatibility.registry:
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.engine:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.engine_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench.compatibility:
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.variables:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.variables_3.2.200.v20090428
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.directorywatcher:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.directorywatcher_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ui_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.navigator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.navigator_3.4.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ua.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ua.core_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.security.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.security.ui_1.0.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.doc.user_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.browser:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.browser_3.2.300.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.exemplarysetup:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.exemplarysetup_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.core.linux:
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.core_3.5.0.v_955
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.ide:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.ide_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.presentations.r21:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.presentations.r21_3.2.100.I20081007-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views_3.4.0.I20090421-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata.generator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata.generator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.frameworkadmin:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.frameworkadmin_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.debug.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.debug.ui_3.5.0.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.net.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.net.linux.x86_1.1.0.I20081021
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.pluggable.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.pluggable.core_1.0.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.ssl:
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui.test:
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.common:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.common_3.5.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.jobs:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.jobs_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jsch.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jsch.ui_1.1.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.repository_1.0.0.v20090430-1645
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench.texteditor:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.workbench.texteditor_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.expressions:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.expressions_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filebuffers:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filebuffers_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui.sdk.scheduler:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui.sdk.scheduler_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.workbench_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.ui_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.director:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.director_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.provider.filetransfer_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.cheatsheets:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.cheatsheets_3.3.200.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.ui_3.3.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.compare:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.compare_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.console:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.console_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.preferences:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.preferences_3.2.300.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.ant.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ant.core_3.2.100.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.reconciler.dropins:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.reconciler.dropins_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.runtime_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.garbagecollector:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.garbagecollector_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.compiler.tool:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.compiler.tool_1.0.100.v_955
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.publisher:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.publisher_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.core_3.2.300.v20090429-1625
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.httpclient.ssl:
+ [build] [eclipse.buildScript] Bundle org.eclipse.ant.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ant.ui_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.touchpoint.natives:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.touchpoint.natives_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.ssl:
+ [build] [eclipse.buildScript] Bundle org.eclipse.search:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.search_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.doc.isv:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.doc.isv_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.ssh2:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.ssh2_3.2.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.doc.user_3.3.0.v20090430-1445
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filesystem:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filesystem_1.2.0.v20090429-1800
+ [build] postGenerate:
+ [build] clean:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] cleanElement:
+ [build] [echo] /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature
+ [build] init:
+ [build] clean:
+ [build] init:
+ [build] all.features:
+ [build] init:
+ [build] clean:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] update.feature:
+ [build] all.children:
+ [build] init:
+ [build] clean:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] update.feature:
+ [build] all.children:
+ [build] all.plugins:
+ [build] update.feature:
+ [build] all.children:
+ [build] process:
+ [build] preProcess:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] processElement:
+ [build] processViaFeature:
+ [build] init:
+ [build] build.jars:
+ [build] init:
+ [build] all.features:
+ [build] init:
+ [build] build.jars:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] @dot:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core/@dot
+ [build] [javac] Compiling 33 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core/@dot
+ [build] [javac] ----------
+ [build] [javac] 1. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core/src/org/jboss/tools/jmx/core/util/FileUtil.java (at line 527)
+ [build] [javac] try {
+ [build] [javac] byte[] bs = text.getBytes(System.getProperty("file.encoding"));
+ [build] [javac] ByteArrayInputStream is = new ByteArrayInputStream(bs);
+ [build] [javac] InputStreamReader r = new InputStreamReader(is, encoding);
+ [build] [javac] char[] cs = new char[bs.length];
+ [build] [javac] int l = r.read(cs, 0, cs.length);
+ [build] [javac] return new String(cs, 0, l);
+ [build] [javac] } catch (IOException e) {
+ [build] [javac] if("UTF-8".equals(encoding)) return text;
+ [build] [javac] return encode(text, "UTF-8");
+ [build] [javac] }
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Dead code
+ [build] [javac] ----------
+ [build] [javac] 1 problem (1 warning)
+ [build] checkCompilationResults:
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core/@dot
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] @dot:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/@dot
+ [build] [javac] Compiling 60 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/@dot
+ [build] [javac] ----------
+ [build] [javac] 1. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (at line 11)
+ [build] [javac] import org.eclipse.ui.internal.Workbench;
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The type Workbench is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.workbench_3.5.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 2. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (at line 21)
+ [build] [javac] page = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage();
+ [build] [javac] ^^^^^^^^^
+ [build] [javac] Discouraged access: The type Workbench is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.workbench_3.5.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 3. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (at line 21)
+ [build] [javac] page = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage();
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The method getInstance() from the type Workbench is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.workbench_3.5.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 4. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/editors/EditorConnectionMapping.java (at line 21)
+ [build] [javac] page = Workbench.getInstance().getActiveWorkbenchWindow().getActivePage();
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The method getActiveWorkbenchWindow() from the type Workbench is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.workbench_3.5.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] ----------
+ [build] [javac] 5. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/JMXNavigator.java (at line 23)
+ [build] [javac] import org.eclipse.ui.internal.navigator.NavigatorContentService;
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The type NavigatorContentService is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.navigator_3.4.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] ----------
+ [build] [javac] 6. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/UpdateSelectionJob.java (at line 30)
+ [build] [javac] import org.eclipse.ui.internal.navigator.NavigatorContentService;
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The type NavigatorContentService is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.navigator_3.4.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 7. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/UpdateSelectionJob.java (at line 31)
+ [build] [javac] import org.eclipse.ui.internal.navigator.NavigatorPlugin;
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The type NavigatorPlugin is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.navigator_3.4.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 8. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/UpdateSelectionJob.java (at line 97)
+ [build] [javac] NavigatorPlugin.logError(0, msg, e);
+ [build] [javac] ^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The type NavigatorPlugin is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.navigator_3.4.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 9. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/src/org/jboss/tools/jmx/ui/internal/views/navigator/UpdateSelectionJob.java (at line 97)
+ [build] [javac] NavigatorPlugin.logError(0, msg, e);
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Discouraged access: The method logError(int, String, Throwable) from the type NavigatorPlugin is not accessible due to restriction on classpath entry /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.ui.navigator_3.4.0.I20090429-1800.jar
+ [build] [javac] ----------
+ [build] [javac] 9 problems (9 warnings)
+ [build] checkCompilationResults:
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui/@dot
+ [build] update.feature:
+ [build] all.children:
+ [build] init:
+ [build] build.jars:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] build.jars:
+ [build] build.jars:
+ [build] update.feature:
+ [build] all.children:
+ [build] all.plugins:
+ [build] update.feature:
+ [build] all.children:
+ [build] processFlat:
+ [build] postProcess:
+ [build] assemble:
+ [build] preAssemble:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] assembleElement:
+ [build] main:
+ [build] defaultAssemble:
+ [build] main:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp
+ [build] gather.bin.parts:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [copy] Copying 39 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [copy] Copying 117 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [copy] Copying 36 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.source_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.individual.sources:
+ [build] copy.src.zip:
+ [build] [copy] Copying 33 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] copy.src.includes:
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.source_1.0.1.v200905171536
+ [build] [copy] Copying 5 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.individual.sources:
+ [build] copy.src.zip:
+ [build] [copy] Copying 60 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] copy.src.includes:
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536
+ [build] children:
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536
+ [build] rootFiles:
+ [build] rootFilesgroup_group_group:
+ [build] rootFiles*_*_*:
+ [build] rootFileswin32_win32_x86:
+ [build] rootFileswin32_wpf_x86:
+ [build] rootFileswin32_win32_x86_64:
+ [build] rootFileswce_ppc_win32_arm:
+ [build] rootFileslinux_gtk_x86:
+ [build] rootFileslinux_gtk_ppc:
+ [build] rootFileslinux_gtk_x86_64:
+ [build] rootFileslinux_gtk_ia64:
+ [build] rootFileslinux_motif_x86:
+ [build] rootFilessolaris_gtk_sparc:
+ [build] rootFilessolaris_motif_sparc:
+ [build] rootFilesaix_motif_ppc:
+ [build] rootFileshpux_motif_PA_RISC:
+ [build] rootFileshpux_motif_ia64_32:
+ [build] rootFilesmacosx_carbon_ppc:
+ [build] rootFilesmacosx_cocoa_x86:
+ [build] rootFilesmacosx_cocoa_x86_64:
+ [build] rootFilesqnx_photon_x86:
+ [build] customAssembly:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536
+ [build] children:
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536
+ [build] rootFiles:
+ [build] rootFilesgroup_group_group:
+ [build] rootFiles*_*_*:
+ [build] rootFileswin32_win32_x86:
+ [build] rootFileswin32_wpf_x86:
+ [build] rootFileswin32_win32_x86_64:
+ [build] rootFileswce_ppc_win32_arm:
+ [build] rootFileslinux_gtk_x86:
+ [build] rootFileslinux_gtk_ppc:
+ [build] rootFileslinux_gtk_x86_64:
+ [build] rootFileslinux_gtk_ia64:
+ [build] rootFileslinux_motif_x86:
+ [build] rootFilessolaris_gtk_sparc:
+ [build] rootFilessolaris_motif_sparc:
+ [build] rootFilesaix_motif_ppc:
+ [build] rootFileshpux_motif_PA_RISC:
+ [build] rootFileshpux_motif_ia64_32:
+ [build] rootFilesmacosx_carbon_ppc:
+ [build] rootFilesmacosx_cocoa_x86:
+ [build] rootFilesmacosx_cocoa_x86_64:
+ [build] rootFilesqnx_photon_x86:
+ [build] customAssembly:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536
+ [build] children:
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536
+ [build] rootFiles:
+ [build] rootFilesgroup_group_group:
+ [build] rootFiles*_*_*:
+ [build] rootFileswin32_win32_x86:
+ [build] rootFileswin32_wpf_x86:
+ [build] rootFileswin32_win32_x86_64:
+ [build] rootFileswce_ppc_win32_arm:
+ [build] rootFileslinux_gtk_x86:
+ [build] rootFileslinux_gtk_ppc:
+ [build] rootFileslinux_gtk_x86_64:
+ [build] rootFileslinux_gtk_ia64:
+ [build] rootFileslinux_motif_x86:
+ [build] rootFilessolaris_gtk_sparc:
+ [build] rootFilessolaris_motif_sparc:
+ [build] rootFilesaix_motif_ppc:
+ [build] rootFileshpux_motif_PA_RISC:
+ [build] rootFileshpux_motif_ia64_32:
+ [build] rootFilesmacosx_carbon_ppc:
+ [build] rootFilesmacosx_cocoa_x86:
+ [build] rootFilesmacosx_cocoa_x86_64:
+ [build] rootFilesqnx_photon_x86:
+ [build] customAssembly:
+ [build] customAssembly:
+ [build] jar.processing:
+ [build] jarUp:
+ [build] jarIng:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.source_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.source_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.source_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.source_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng_NoManifest:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536.jar
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng_NoManifest:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536.jar
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536
+ [build] jarUp:
+ [build] jarIng_NoManifest:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536.jar
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536
+ [build] customAssembly:
+ [build] generate.p2.metadata:
+ [build] assemble.archive:
+ [build] customAssembly:
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Master-N200905171536.zip
+ [build] cleanup.assembly:
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp
+ [build] generate.p2.metadata:
+ [build] postAssemble:
+ [build] package:
+ [build] postBuild:
+ [build] postBuild:
+ [build] gatherLogs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/N200905171536/compilelogs
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] gatherLogs:
+ [build] init:
+ [build] zip.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder
+ [build] init:
+ [build] all.features:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder/plugins
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] update.feature:
+ [build] all.children:
+ [build] init:
+ [build] gather.logs:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] update.feature:
+ [build] all.children:
+ [build] all.plugins:
+ [build] update.feature:
+ [build] all.children:
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536.log.zip
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/feature.temp.folder
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.sdk.feature/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536.log.zip into /tmp/build/N200905171536-JMX/eclipse/N200905171536/compilelogs
+ [build] -timestamp:
+ [build] [echo] 03:37:16
+ [build] signMasterZip:
+ [build] unpackUpdateJarsAndRepack:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/unpacktmp/new/eclipse/features
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/unpacktmp/new/eclipse/plugins
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Master-N200905171536.zip into /tmp/build/N200905171536-JMX/eclipse/unpacktmp
+ [build] [unpackUpdateJars] [exec] unzip -qo /tmp/build/N200905171536-JMX/eclipse/unpacktmp/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536.jar -d /tmp/build/N200905171536-JMX/eclipse/unpacktmp/new/eclipse/features/org.jboss.tools.jmx.source.feature_1.0.1.v200905171536
+ [build] [unpackUpdateJars] [exec] unzip -qo /tmp/build/N200905171536-JMX/eclipse/unpacktmp/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536.jar -d /tmp/build/N200905171536-JMX/eclipse/unpacktmp/new/eclipse/features/org.jboss.tools.jmx.feature_1.0.1.v200905171536
+ [build] [unpackUpdateJars] [exec] unzip -qo /tmp/build/N200905171536-JMX/eclipse/unpacktmp/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536.jar -d /tmp/build/N200905171536-JMX/eclipse/unpacktmp/new/eclipse/features/org.jboss.tools.jmx.sdk.feature_1.0.1.v200905171536
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-AllFeaturesAndPlugins-N200905171536.zip
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/unpacktmp
+ [build] processMasterZip:
+ [build] -timestamp:
+ [build] [echo] 03:37:16
+ [build] packMasterZip:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/packtmp
+ [build] [move] Moving 1 file to /tmp/build/N200905171536-JMX/eclipse/packtmp
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/pack200tmp
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/pack200tmp
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/pack200tmp
+ [build] [echo] Pack with /opt/public/common/ibm-java2-ppc-50/jre/bin/pack200
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/packtmp
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/pack200tmp
+ [build] -timestamp:
+ [build] [echo] 03:37:32
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/p2tmp
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Master-N200905171536.zip into /tmp/build/N200905171536-JMX/eclipse/p2tmp
+ [build] buildSiteXml:
+ [build] [echo] Generating site.xml for use with p2 repo / update site categories...
+ [build] [echo] Run p2 metadata generator using launcherjar = /home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar
+ [build] [p2.meta] Generating metadata for /tmp/build/N200905171536-JMX/eclipse/p2tmp/eclipse.
+ [build] [p2.meta] Generation completed with success [0 seconds].
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Update-N200905171536.zip
+ [build] [echo] buildAll.xml#run :: build.step :: buildTests
+ [build] buildTests:
+ [build] init:
+ [build] main:
+ [build] main:
+ [build] preBuild:
+ [build] preSetup:
+ [build] copyLocalSourceCheckout:
+ [build] getMapFiles:
+ [build] postSetup:
+ [build] processRepos:
+ [build] fetch:
+ [build] generate:
+ [build] preGenerate:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] generateScript:
+ [build] [eclipse.buildScript] Some inter-plug-in dependencies have not been satisfied.
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.updatechecker:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.updatechecker_1.1.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.debug.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.debug.ui_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.test:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.test_3.2.0
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.core_3.3.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.junit.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.junit.runtime_3.4.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.app:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.app_1.2.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.externaltools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.externaltools_3.2.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.jsch.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jsch.core_1.1.100.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.appserver:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.appserver_3.1.400.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui.sdk:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui.sdk_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.rcp:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.rcp_3.4.0.v20080507
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.jarprocessor:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.jarprocessor_1.0.1.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata.repository_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.net:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.net_1.2.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit.runtime_3.4.100.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform_3.3.200.v200904302300
+ [build] [eclipse.buildScript] Bundle org.eclipse.ltk.ui.refactoring:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ltk.ui.refactoring_3.4.100.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.cvs:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.cvs_1.0.100.v20090123
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.httpclient:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.provider.filetransfer.httpclient_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.engine:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.engine_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.variables:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.variables_3.2.200.v20090428
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.directorywatcher:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.directorywatcher_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views.properties.tabbed:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views.properties.tabbed_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform.doc.isv:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform.doc.isv_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui.test.interactive:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.navigator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.navigator_3.4.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ua.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ua.core_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.base:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.base_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.ui_3.5.0.v20090430-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.browser:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.browser_3.2.300.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.ide:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.ide_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.presentations.r21:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.presentations.r21_3.2.100.I20081007-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.core_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ui.templates:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ui.templates_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.metadata.generator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.metadata.generator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.artifact.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.artifact.repository_1.0.100.v20090430-2300
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.core.manipulation:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.core.manipulation_1.3.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.debug.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.debug.ui_3.5.0.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.build:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.build_3.5.0.v20090430-1420
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui_3.5.0.I20090430-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.net:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.net_1.2.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.core_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.extensionlocation:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.extensionlocation_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.ssl:
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.ui_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ds.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ds.ui_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.debug:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.debug_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.updatesite:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.updatesite_1.0.100.v20090430-1645
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.expressions:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.expressions_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filebuffers:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filebuffers_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.ds:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.ds_1.1.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.resources:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.resources_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.frameworkadmin.equinox:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.frameworkadmin.equinox_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.simpleconfigurator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.simpleconfigurator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.console:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.console_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.preferences:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.preferences_3.2.300.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.http.registry:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.http.registry_1.0.200.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.ui_3.3.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.intro.universal:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.intro.universal_3.2.300.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.launcher.gtk.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090306-1900
+ [build] [eclipse.buildScript] Bundle org.eclipse.help:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.reconciler.dropins:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.reconciler.dropins_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.core_3.2.300.v20090429-1625
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.touchpoint.natives:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.touchpoint.natives_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.search:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.search_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.doc.isv:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.doc.isv_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.intro:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.intro_3.3.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.sdk:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.sdk_3.5.0.v200904302300
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.ssh2:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.ssh2_3.2.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ds.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ds.core_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.runtime_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit4.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit4.runtime_1.1.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.api.tools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.api.tools_1.0.100.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.scheduler:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.scheduler_3.2.200.v20081127
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.junit:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.junit_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filesystem.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filesystem.linux.x86_1.2.0.v20080604-1400
+ [build] [eclipse.buildScript] Bundle org.eclipse.swt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.swt_3.5.0.v3545a
+ [build] [eclipse.buildScript] Unsatisfied import package org.eclipse.swt.accessibility2_0.0.0.
+ [build] [eclipse.buildScript] Unsatisfied import package org.mozilla.xpcom_0.0.0.
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ua.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ua.ui_1.0.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.resources.compatibility:
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime.compatibility:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.runtime.compatibility_3.2.0.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.editors:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.editors_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.ltk.core.refactoring:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ltk.core.refactoring_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.debug.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.debug.core_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.cvs.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.cvs.core_3.3.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.swt.gtk.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.swt.gtk.linux.x86_3.5.0.v3545a
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.ide.application:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.ide.application_1.0.100.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.ui_3.2.200.v20090213
+ [build] [eclipse.buildScript] Bundle org.eclipse.platform.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.platform.doc.user_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.configurator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.update.configurator_3.3.0.v20090312
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.touchpoint.eclipse:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.touchpoint.eclipse_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.director.app:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.director.app_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.navigator.resources:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.navigator.resources_3.4.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.help.webapp:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.help.webapp_3.4.0.v20090429_1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.runtime.compatibility.registry:
+ [build] [eclipse.buildScript] Bundle com.ibm.icu:
+ [build] [eclipse.buildScript] Another singleton version selected: com.ibm.icu_4.0.1.v20090415
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench.compatibility:
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.ui_3.5.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui_1.0.100.v20090430-0100
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.security.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.security.ui_1.0.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.doc.user_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.exemplarysetup:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.exemplarysetup_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.update.core.linux:
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.simpleconfigurator.manipulator:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.simpleconfigurator.manipulator_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.core_3.5.0.v_955
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.api.tools.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.api.tools.ui_1.0.100.v20090430-1530
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views_3.4.0.I20090421-0800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.registry:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.registry_3.4.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.frameworkadmin:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.frameworkadmin_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.repository.tools:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.repository.tools_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.net.linux.x86:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.net.linux.x86_1.1.0.I20081021
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.pluggable.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.pluggable.core_1.0.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.contenttype:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.contenttype_3.4.0.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.jboss.tools.jmx.ui.test:
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.common:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.common_3.5.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.jobs:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.jobs_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.jsch.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jsch.ui_1.1.200.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.repository:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.repository_1.0.0.v20090430-1645
+ [build] [eclipse.buildScript] Bundle org.eclipse.osgi:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.osgi_3.5.0.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.compiler.apt:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.compiler.apt_1.0.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench.texteditor:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.workbench.texteditor_3.5.0.v20090429-1800b
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.security:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.security_1.0.100.v20090429-1630
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.ui.sdk.scheduler:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.ui.sdk.scheduler_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.workbench:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.workbench_3.5.0.I20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.ui_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.director:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.director_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.provider.filetransfer_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.team.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.team.core_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.cheatsheets:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.cheatsheets_3.3.200.v20090413
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.apt.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.apt.ui_3.3.200.v20090429-1720
+ [build] [eclipse.buildScript] Bundle org.eclipse.compare:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.compare_3.5.0.I20090430-0408
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.launching:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.launching_3.5.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.identity:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.identity_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.ant.core:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ant.core_3.2.100.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.runtime:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.runtime_3.4.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.filetransfer:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ecf.filetransfer_3.0.0.v20090429-2045
+ [build] [eclipse.buildScript] Bundle org.eclipse.ui.views.log:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ui.views.log_1.0.100.v20090429-1800
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.garbagecollector:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.garbagecollector_1.0.100.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.jdt.compiler.tool:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.jdt.compiler.tool_1.0.100.v_955
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.publisher:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.publisher_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.httpclient.ssl:
+ [build] [eclipse.buildScript] Bundle org.eclipse.ant.ui:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.ant.ui_3.4.0.v20090429
+ [build] [eclipse.buildScript] Bundle org.eclipse.equinox.p2.console:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.equinox.p2.console_1.0.0.v20090429-2126
+ [build] [eclipse.buildScript] Bundle org.eclipse.ecf.provider.filetransfer.ssl:
+ [build] [eclipse.buildScript] Bundle org.eclipse.pde.doc.user:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.pde.doc.user_3.3.0.v20090430-1445
+ [build] [eclipse.buildScript] Bundle org.eclipse.core.filesystem:
+ [build] [eclipse.buildScript] Another singleton version selected: org.eclipse.core.filesystem_1.2.0.v20090429-1800
+ [build] postGenerate:
+ [build] clean:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] cleanElement:
+ [build] [echo] /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature
+ [build] init:
+ [build] clean:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] properties:
+ [build] init:
+ [build] clean:
+ [build] update.feature:
+ [build] all.children:
+ [build] process:
+ [build] preProcess:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] processElement:
+ [build] processViaFeature:
+ [build] init:
+ [build] build.jars:
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] build.jars:
+ [build] build.jars:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] jmx-core-test.jar:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/temp.folder/jmx-core-test.jar.bin
+ [build] [javac] Compiling 7 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/temp.folder/jmx-core-test.jar.bin
+ [build] [javac] ----------
+ [build] [javac] 1. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util/FileUtil.java (at line 527)
+ [build] [javac] try {
+ [build] [javac] byte[] bs = text.getBytes(System.getProperty("file.encoding"));
+ [build] [javac] ByteArrayInputStream is = new ByteArrayInputStream(bs);
+ [build] [javac] InputStreamReader r = new InputStreamReader(is, encoding);
+ [build] [javac] char[] cs = new char[bs.length];
+ [build] [javac] int l = r.read(cs, 0, cs.length);
+ [build] [javac] return new String(cs, 0, l);
+ [build] [javac] } catch (IOException e) {
+ [build] [javac] if("UTF-8".equals(encoding)) return text;
+ [build] [javac] return encode(text, "UTF-8");
+ [build] [javac] }
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Dead code
+ [build] [javac] ----------
+ [build] [javac] 1 problem (1 warning)
+ [build] checkCompilationResults:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/jmx-core-test.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/temp.folder/jmx-core-test.jar.bin
+ [build] properties:
+ [build] init:
+ [build] @dot:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/@dot
+ [build] [javac] Compiling 7 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/@dot
+ [build] [javac] ----------
+ [build] [javac] 1. WARNING in /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.core.test/src/org/jboss/tools/jmx/core/tests/util/FileUtil.java (at line 527)
+ [build] [javac] try {
+ [build] [javac] byte[] bs = text.getBytes(System.getProperty("file.encoding"));
+ [build] [javac] ByteArrayInputStream is = new ByteArrayInputStream(bs);
+ [build] [javac] InputStreamReader r = new InputStreamReader(is, encoding);
+ [build] [javac] char[] cs = new char[bs.length];
+ [build] [javac] int l = r.read(cs, 0, cs.length);
+ [build] [javac] return new String(cs, 0, l);
+ [build] [javac] } catch (IOException e) {
+ [build] [javac] if("UTF-8".equals(encoding)) return text;
+ [build] [javac] return encode(text, "UTF-8");
+ [build] [javac] }
+ [build] [javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+ [build] [javac] Dead code
+ [build] [javac] ----------
+ [build] [javac] 1 problem (1 warning)
+ [build] checkCompilationResults:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] @dot:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive/@dot
+ [build] [javac] Compiling 19 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive/@dot
+ [build] checkCompilationResults:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] @dot:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test/@dot
+ [build] [javac] Compiling 2 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.jboss.tools.jmx.ui.test/@dot
+ [build] checkCompilationResults:
+ [build] properties:
+ [build] init:
+ [build] build.jars:
+ [build] properties:
+ [build] init:
+ [build] automated.jar:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test/temp.folder/automated.jar.bin
+ [build] [javac] Compiling 4 source files to /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test/temp.folder/automated.jar.bin
+ [build] checkCompilationResults:
+ [build] [jar] Building jar: /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test/automated.jar
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/plugins/org.eclipse.test/temp.folder/automated.jar.bin
+ [build] update.feature:
+ [build] all.children:
+ [build] processFlat:
+ [build] postProcess:
+ [build] assemble:
+ [build] preAssemble:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] assembleElement:
+ [build] main:
+ [build] defaultAssemble:
+ [build] main:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp
+ [build] gather.bin.parts:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.eclipse.ant.optional.junit_3.2.0
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.eclipse.ant.optional.junit_3.2.0
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.eclipse.test_3.2.0
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.eclipse.test_3.2.0
+ [build] [copy] Copying 8 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.eclipse.test_3.2.0
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [copy] Copying 23 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test.source_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.individual.sources:
+ [build] copy.src.zip:
+ [build] [copy] Copying 7 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test.source_1.0.1.v200905171536
+ [build] copy.jmx-core-testsrc.zip:
+ [build] [copy] Copying 7 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.core.test.source_1.0.1.v200905171536/jmx-core-testsrc
+ [build] properties:
+ [build] init:
+ [build] copy.src.includes:
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.source_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.individual.sources:
+ [build] copy.src.zip:
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] copy.src.includes:
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [copy] Copying 20 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] properties:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive.source_1.0.1.v200905171536
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.individual.sources:
+ [build] copy.src.zip:
+ [build] [copy] Copying 19 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/plugins/org.jboss.tools.jmx.ui.test.interactive.source_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] copy.src.includes:
+ [build] apitools.generation:
+ [build] customAssembly:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.tests.feature_1.0.1.v200905171536
+ [build] children:
+ [build] [copy] Copying 3 files to /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/features/org.jboss.tools.jmx.tests.feature_1.0.1.v200905171536
+ [build] rootFiles:
+ [build] rootFiles*_*_*:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/tmp/eclipse/ANY.ANY.ANY/eclipse
+ [build] customAssembly:
+ [build] init:
+ [build] gather.bin.parts:
+ [build] children:
+ [build] rootFiles:
+ [build] rootFiles*_*_*:
+ [build] customAssembly:
+ [build] customAssembly:
+ [build] jar.processing:
+ [build] customAssembly:
+ [build] generate.p2.metadata:
+ [build] assemble.archive:
+ [build] customAssembly:
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-junit-tests-N200905171536.zip
+ [build] cleanup.assembly:
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/tmp
+ [build] generate.p2.metadata:
+ [build] postAssemble:
+ [build] package:
+ [build] postBuild:
+ [build] postBuild:
+ [build] gatherLogs:
+ [build] allElements:
+ [build] allElementsDelegator:
+ [build] init:
+ [build] gatherLogs:
+ [build] init:
+ [build] zip.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder
+ [build] init:
+ [build] all.features:
+ [build] all.plugins:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] properties:
+ [build] init:
+ [build] gather.logs:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.eclipse.test_3.2.0
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder/plugins/org.eclipse.test_3.2.0
+ [build] update.feature:
+ [build] all.children:
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/org.jboss.tools.jmx.tests.feature_1.0.1.v200905171536.log.zip
+ [build] [delete] Deleting directory /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/feature.temp.folder
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/features/org.jboss.tools.jmx.tests.feature/org.jboss.tools.jmx.tests.feature_1.0.1.v200905171536.log.zip into /tmp/build/N200905171536-JMX/eclipse/N200905171536/compilelogs
+ [build] packageTestFramework:
+ [build] [echo] workingDirectory: /tmp/build/N200905171536-JMX/eclipse/test.assembly
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-junit-tests-N200905171536.zip into /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins
+ [build] [echo] tempPluginDirRoot: /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins
+ [build] [echo] Load /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/build.properties
+ [build] [echo] Load /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/testing.properties
+ [build] [echo] Load /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/builder/tests/testing.properties
+ [build] [echo] testPluginName: org.jboss.tools.jmx.core.test
+ [build] [echo] Generate /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536/test.xml to run org.jboss.tools.jmx.core.JMXCoreAllTests:
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [echo] testPluginName: org.jboss.tools.jmx.ui.test
+ [build] [echo] Generate /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536/test.xml to run org.jboss.tools.jmx.ui.JMXUIAllTests:
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/test.assembly/testing
+ [build] [echo] Load /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/testing.properties
+ [build] [echo] Load /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/builder/tests/testing.properties
+ [build] [move] Moving 8 files to /tmp/build/N200905171536-JMX/eclipse/test.assembly/eclipse/dropins/eclipse/plugins/org.eclipse.test
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/test.assembly/testing/JMX-junit-tests-N200905171536.zip
+ [build] [copy] Copying 2 files to /tmp/build/N200905171536-JMX/eclipse/test.assembly/testing
+ [build] [copy] Copying 10 files to /tmp/build/N200905171536-JMX/eclipse/test.assembly/testing
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/test.assembly/testing
+ [build] [zip] Building zip: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Automated-Tests-N200905171536.zip
+ [build] [delete] Deleting: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-junit-tests-N200905171536.zip
+ [build] [echo] buildAll.xml#run :: build.step :: generateDigests
+ [build] generateDigests:
+ [build] [echo] buildAll.xml#run :: build.step :: test
+ [build] test:
+ [build] test-nix-local:
+ [build] main:
+ [build] runtests-local:
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/testing/N200905171536
+ [build] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Automated-Tests-N200905171536.zip into /tmp/build/N200905171536-JMX/testing/N200905171536
+ [build] installVmForLocal:
+ [build] getVM:
+ [build] [exec] java version "1.6.0_0"
+ [build] [exec] IcedTea6 1.4 (fedora-15.b14.fc10-i386) Runtime Environment (build 1.6.0_0-b14)
+ [build] [exec] OpenJDK Server VM (build 14.0-b08, mixed mode)
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testing/N200905171536/testing
+ [build] init:
+ [build] customSetup:
+ [build] loadbuildConfig:
+ [build] [echo] Running runtests.sh ...
+ [build] [exec] [runtests] Using /tmp/build/N200905171536-JMX/build.cfg
+ [build] [exec] [runtests] /tmp/build/N200905171536-JMX/testing/N200905171536/testing/runtests.sh started on: 15:37:55[runtests] Run as nboldt
+ [build] [exec] [runtests] With PATH = .:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/X11R6/bin:/tmp/build/N200905171536-JMX/testing/N200905171536/testing/../linux
+ [build] [exec] [runtests] In dir /tmp/build/N200905171536-JMX/testing/N200905171536/testing
+ [build] [exec] [runtests] Set JAVA_HIGH_ZIPFDS=500 & LANG=C
+ [build] [exec] [runtests] Using X server: 'Xvnc -geometry 1024x768 -depth 24 -ac :27'
+ [build] [exec] access control disabled, clients can connect from any host
+ [build] [exec]
+ [build] [exec] Fatal server error:
+ [build] [exec] Server is already active for display 27
+ [build] [exec] If this server is no longer running, remove /tmp/.X27-lock
+ [build] [exec] and start again.
+ [build] [exec]
+ [build] [exec] [runtests] Get JAVA_HOME from build.cfg ... /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
+ [build] [exec]
+ [build] [exec] java version "1.6.0_0"
+ [build] [exec] IcedTea6 1.4 (fedora-15.b14.fc10-i386) Runtime Environment (build 1.6.0_0-b14)
+ [build] [exec] OpenJDK Server VM (build 14.0-b08, mixed mode)
+ [build] [exec]
+ [build] [exec] [runtests] Currently in /tmp/build/N200905171536-JMX/testing/N200905171536/testing:
+ [build] [exec] [runtests] Eclipse SDK is /tmp/build/downloads/eclipse-SDK-3.5M7-linux-gtk.tar.gz
+ [build] [exec] [runtests] [15:38:10] Launching Eclipse (installmode = clean with -enableassertions turned on) ...
+ [build] [exec]
+ [build] [exec] [15:38:10]
+ [build] [exec] /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/bin/java
+ [build] [exec] -Xms256M
+ [build] [exec] -Xmx256M
+ [build] [exec] -enableassertions
+ [build] [exec] -cp /tmp/build/N200905171536-JMX/testing/N200905171536/testing/eclipse/plugins/org.eclipse.equinox.launcher_1.0.200.v20090429-1630.jar org.eclipse.equinox.launcher.Main
+ [build] [exec] -ws gtk
+ [build] [exec] -os linux
+ [build] [exec] -arch x86
+ [build] [exec] -application org.eclipse.ant.core.antRunner
+ [build] [exec] -data /tmp/build/N200905171536-JMX/testing/N200905171536/testing/eclipse/workspace
+ [build] [exec] -f /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/builder/tests/test.xml all
+ [build] [exec] -Dosgi.bundlefile.limit=100
+ [build] [exec] -Dplatform=linux.gtk
+ [build] [exec] -Dws=gtk
+ [build] [exec] -Dos=linux
+ [build] [exec] -Darch=x86
+ [build] [exec] -Dclean=true
+ [build] [exec] -Dbuildcfg=/tmp/build/N200905171536-JMX/build.cfg
+ [build] [exec] -DdownloadsDir=/tmp/build/downloads
+ [build] [exec] -DtestingDir=/tmp/build/N200905171536-JMX/testing/N200905171536/testing
+ [build] [exec] -DrelengBaseBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.releng.basebuilder
+ [build] [exec] -DrelengCommonBuilderDir=/home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng
+ [build] [exec] -DrelengBuilderDir=/home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng
+ [build] [exec] -DJ2SE-1.6=.:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/management-agent.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/charsets.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rhino.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/about.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/resources.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jsse.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rt.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/gnome-java-bridge.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jce.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/im/indicim.jar:/u!
sr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/im/thaiim.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/tools.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/sa-jdi.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/dt.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/jconsole.jar
+ [build] [exec] -DbundleBootClasspath=.:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/management-agent.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/charsets.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rhino.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/about.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/resources.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jsse.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/rt.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/pulse-java.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/ext/gnome-java-bridge.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/jce.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/im/ind!
icim.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/lib/im/thaiim.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/tools.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/sa-jdi.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/dt.jar:/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/lib/jconsole.jar
+ [build] [exec] -DjavacSource=1.6
+ [build] [exec] -DjavacTarget=1.6
+ [build] [exec] -DbundleJavacSource=1.6
+ [build] [exec] -DbundleJavacTarget=1.6
+ [build] [exec] -logger org.apache.tools.ant.DefaultLogger
+ [build] [exec] Buildfile: /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/builder/tests/test.xml
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec] [echo] Load /tmp/build/N200905171536-JMX/build.cfg
+ [build] [exec] [echo] Load /tmp/build/N200905171536-JMX/testing/N200905171536/testing/test.properties
+ [build] [exec] [echo] Load /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/build.properties
+ [build] [exec] [echo] Load /home/nboldt/eclipse/workspace-jboss/jbosstools-trunk/jmx/releng/testing.properties
+ [build] [exec] [echo] Load /home/nboldt/eclipse/workspace-jboss/org.eclipse.dash.common.releng/builder/tests/testing.properties
+ [build] [exec]
+ [build] [exec] setup:
+ [build] [exec] [mkdir] Created dir: /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/eclipse/plugins
+ [build] [exec] [echo] Download then unpack dependencies into /tmp/build/N200905171536-JMX/testing/target ...
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec]
+ [build] [exec] getTestDependency:
+ [build] [exec]
+ [build] [exec] getBundle:
+ [build] [exec]
+ [build] [exec] downloadFile:
+ [build] [exec]
+ [build] [exec] unpackBundle:
+ [build] [exec]
+ [build] [exec] unzipFile:
+ [build] [exec]
+ [build] [exec] untarFile:
+ [build] [exec] [untar] Expanding: /tmp/build/downloads/eclipse-SDK-3.5M7-linux-gtk.tar.gz into /tmp/build/N200905171536-JMX/testing/target
+ [build] [exec] [copy] Copying 94 files to /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/eclipse/plugins
+ [build] [exec] [copy] Copied 37 empty directories to 1 empty directory under /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/eclipse/plugins
+ [build] [exec] [mkdir] Created dir: /tmp/build/N200905171536-JMX/testing/p2dirTmp/eclipse
+ [build] [exec] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Master-N200905171536.zip into /tmp/build/N200905171536-JMX/testing/p2dirTmp
+ [build] [exec] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Update-N200905171536.zip into /tmp/build/N200905171536-JMX/testing/p2dirTmp/eclipse
+ [build] [exec] [echo] Install org.jboss.tools.jmx.sdk.feature feature to /tmp/build/N200905171536-JMX/testing/target
+ [build] [exec]
+ [build] [exec] run.director:
+ [build] [exec] [echo]
+ [build] [exec] [echo] p2.director.installIU = org.jboss.tools.jmx.sdk.feature
+ [build] [exec] [echo] p2.director.input.repo = /tmp/build/N200905171536-JMX/testing/p2dirTmp/eclipse
+ [build] [exec] [echo] p2.director.destination = /tmp/build/N200905171536-JMX/testing/target/eclipse
+ [build] [exec] [p2.dir] Installing org.jboss.tools.jmx.sdk.feature.feature.group 1.0.1.v200905171536.
+ [build] [exec] [p2.dir] Operation completed in 6960 ms.
+ [build] [exec] [echo] Unpack tests JMX-Automated-Tests-N200905171536.zip to /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins
+ [build] [exec] [unzip] Expanding: /tmp/build/N200905171536-JMX/eclipse/N200905171536/JMX-Automated-Tests-N200905171536.zip into /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx
+ [build] [exec] [unzip] Expanding: /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx/testing/JMX-junit-tests-N200905171536.zip into /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx
+ [build] [exec]
+ [build] [exec] all:
+ [build] [exec] [echo] testPluginDirRoot: /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx/eclipse/plugins
+ [build] [exec] [echo] testPluginName: org.jboss.tools.jmx.core.test
+ [build] [exec] [echo] Run /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx/eclipse/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536/test.xml:
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec]
+ [build] [exec] suite:
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec] [mkdir] Created dir: /tmp/build/N200905171536-JMX/testing/target/eclipse/results
+ [build] [exec]
+ [build] [exec] ui-test:
+ [build] [exec]
+ [build] [exec] java-test:
+ [build] [exec] [echo] Running org.jboss.tools.jmx.core.JMXCoreAllTests. Result file: /tmp/build/N200905171536-JMX/testing/target/eclipse/results/org.jboss.tools.jmx.core.JMXCoreAllTests.xml.
+ [build] [exec] [java] Xlib: extension "RANDR" missing on display "localhost:27.0".
+ [build] [exec] [java] Timeout: killed the sub-process
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:787)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.Target.execute(Target.java:357)
+ [build] [exec] [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
+ [build] [exec] [java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.Target.execute(Target.java:357)
+ [build] [exec] [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
+ [build] [exec] [java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.Target.execute(Target.java:357)
+ [build] [exec] [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
+ [build] [exec] [java] at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.java:228)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:281)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:213)
+ [build] [exec] [java] at net.sf.antcontrib.logic.For.execute(For.java:166)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.doSequentialIteration(ForDelegate.java:228)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.doTheTasks(ForDelegate.java:253)
+ [build] [exec] [java] at net.sf.antcontrib.logic.ForDelegate.execute(ForDelegate.java:213)
+ [build] [exec] [java] at net.sf.antcontrib.logic.For.execute(For.java:166)
+ [build] [exec] [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
+ [build] [exec] [java] at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
+ [build] [exec] [java] at org.apache.tools.ant.Task.perform(Task.java:348)
+ [build] [exec] [java] at org.apache.tools.ant.Target.execute(Target.java:357)
+ [build] [exec] [java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
+ [build] [exec] [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
+ [build] [exec] [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
+ [build] [exec] [java] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
+ [build] [exec] [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ [build] [exec] [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
+ [build] [exec] [java] at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
+ [build] [exec] [java] at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
+ [build] [exec] [java] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
+ [build] [exec] [java] at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
+ [build] [exec] [java] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
+ [build] [exec] [java] at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
+ [build] [exec] [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+ [build] [exec] [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
+ [build] [exec] [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+ [build] [exec] [java] at java.lang.reflect.Method.invoke(Method.java:616)
+ [build] [exec] [java] at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
+ [build] [exec] [java] at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
+ [build] [exec] [java] at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
+ [build] [exec] [java] at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
+ [build] [exec] [java] Java Result: -1
+ [build] [exec]
+ [build] [exec] collect-results:
+ [build] [exec] [junitreport] the file /tmp/build/N200905171536-JMX/testing/target/eclipse/org.jboss.tools.jmx.core.JMXCoreAllTests.xml is empty.
+ [build] [exec] [junitreport] This can be caused by the test JVM exiting unexpectedly
+ [build] [exec] [style] Warning: the task name <style> is deprecated. Use <xslt> instead.
+ [build] [exec] [style] Transforming into /tmp/build/N200905171536-JMX/testing/target/eclipse/results
+ [build] [exec]
+ [build] [exec] cleanup:
+ [build] [exec] [mkdir] Created dir: /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/consolelogs
+ [build] [exec] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/consolelogs
+ [build] [exec]
+ [build] [exec] run:
+ [build] [exec]
+ [build] [exec] collect:
+ [build] [exec] [junitreport] the file /tmp/build/N200905171536-JMX/testing/target/eclipse/org.jboss.tools.jmx.core.JMXCoreAllTests.xml is empty.
+ [build] [exec] [junitreport] This can be caused by the test JVM exiting unexpectedly
+ [build] [exec] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/xml
+ [build] [exec] [echo] testPluginName: org.jboss.tools.jmx.ui.test
+ [build] [exec] [echo] Run /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx/eclipse/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536/test.xml:
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec]
+ [build] [exec] suite:
+ [build] [exec] [delete] Deleting directory /tmp/build/N200905171536-JMX/testing/target/eclipse/testWorkspace
+ [build] [exec]
+ [build] [exec] init:
+ [build] [exec]
+ [build] [exec] ui-test:
+ [build] [exec]
+ [build] [exec] java-test:
+ [build] [exec] [echo] Running org.jboss.tools.jmx.ui.JMXUIAllTests. Result file: /tmp/build/N200905171536-JMX/testing/target/eclipse/results/org.jboss.tools.jmx.ui.JMXUIAllTests.xml.
+ [build] [exec] [java] Xlib: extension "RANDR" missing on display "localhost:27.0".
+ [build] [exec]
+ [build] [exec] collect-results:
+ [build] [exec] [style] Warning: the task name <style> is deprecated. Use <xslt> instead.
+ [build] [exec] [style] Transforming into /tmp/build/N200905171536-JMX/testing/target/eclipse/results
+ [build] [exec]
+ [build] [exec] cleanup:
+ [build] [exec] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/consolelogs
+ [build] [exec]
+ [build] [exec] run:
+ [build] [exec]
+ [build] [exec] collect:
+ [build] [exec] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/xml
+ [build] [exec]
+ [build] [exec] genHtml:
+ [build] [exec] [xslt] Transforming into /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/html
+ [build] [exec] [xslt] Processing /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/xml/org.jboss.tools.jmx.core.test_linux.gtk.xml to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/html/org.jboss.tools.jmx.core.test_linux.gtk.html
+ [build] [exec] [xslt] Loading stylesheet /tmp/build/N200905171536-JMX/testing/target/eclipse/dropins/jmx/eclipse/plugins/org.eclipse.test/JUNIT.XSL
+ [build] [exec] [xslt] Processing /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/xml/org.jboss.tools.jmx.ui.test_linux.gtk.xml to /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/html/org.jboss.tools.jmx.ui.test_linux.gtk.html
+ [build] [exec] BUILD SUCCESSFUL
+ [build] [exec]
+ [build] [exec] BUILD SUCCESSFUL
+ [build] [exec] Total time: 121 minutes 1 second
+ [build] [exec] [runtests] [17:39:28] Eclipse test run completed.
+ [build] [exec] [runtests] Found test failure(s) in /tmp/build/N200905171536-JMX/testing/N200905171536/testing/results/xml/org.jboss.tools.jmx.core.test_linux.gtk.xml:
+ [build] [exec]
+ [build] [exec] [runtests] Creating 'noclean' file to prevent cleanup after build completes.
+ [build] [exec] [runtests] runtests.sh done: 17:39:28
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/N200905171536/testresults
+ [build] [mkdir] Created dir: /tmp/build/N200905171536-JMX/eclipse/N200905171536/testresults/consolelogs
+ [build] [copy] Copying 6 files to /tmp/build/N200905171536-JMX/eclipse/N200905171536/testresults
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/N200905171536/testresults/consolelogs
+ [build] [echo] buildAll.xml#run :: build.step :: publish
+ [build] publish:
+ [build] [echo] Copy static files to build root folder
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/eclipse/N200905171536
+ [build] [echo] Move generated zips to build root folder
+ [build] [move] Moving 24 files to /tmp/build/N200905171536-JMX
+ [build] [echo] Generate compilelogs/summary.txt
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testresults
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testresults/consolelogs
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testresults/html
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/testresults/xml
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins/org.jboss.tools.jmx.core.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins/org.jboss.tools.jmx.core_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins/org.jboss.tools.jmx.ui.test.interactive_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins/org.jboss.tools.jmx.ui.test_1.0.1.v200905171536
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX/compilelogs/plugins/org.jboss.tools.jmx.ui_1.0.1.v200905171536
+ [build] [echo] buildAll.xml#run :: build.step :: cleanup
+ [build] cleanup:
+ [build] [echo] The follow temporary files/folders should be deleted from your build:
+ [build] [echo] /tmp/build/N200905171536-JMX/*-AllFeaturesAndPlugins-*.zip*
+ [build] [echo] /tmp/build/N200905171536-JMX/*-Master-*.zip*
+ [build] [echo] /tmp/build/N200905171536-JMX/eclipse
+ [build] [echo] /tmp/build/N200905171536-JMX/testing
+ [build] [copy] Copying 1 file to /tmp/build/N200905171536-JMX
+ [build] BUILD SUCCESSFUL
+ [build] BUILD SUCCESSFUL
+ [build] Total time: 123 minutes 9 seconds
+BUILD SUCCESSFUL
+Total time: 123 minutes 23 seconds
Property changes on: trunk/jmx/releng/buildlog.compileOK-UItestOK-coretestTimeout.txt
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jmx/releng/testing.properties
===================================================================
--- trunk/jmx/releng/testing.properties 2009-05-27 00:48:56 UTC (rev 15534)
+++ trunk/jmx/releng/testing.properties 2009-05-27 01:00:15 UTC (rev 15535)
@@ -2,5 +2,10 @@
#csv list of test plugins to run
testPluginsToRun=\
-org.jboss.tools.core.test,\
-org.jboss.tools.ui.test
\ No newline at end of file
+org.jboss.tools.jmx.core.test,\
+org.jboss.tools.jmx.ui.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.jmx.core.test.suite=org.jboss.tools.jmx.core.JMXCoreAllTests
+org.jboss.tools.jmx.ui.test.suite=org.jboss.tools.jmx.ui.JMXUIAllTests
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15534 - in trunk/jmx/features: org.jboss.tools.jmx.feature/sourceTemplateFeature and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 20:48:56 -0400 (Tue, 26 May 2009)
New Revision: 15534
Added:
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/
trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/build.properties
Removed:
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplateFeature/feature.properties
Log:
[JBDS-737]
Added: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/build.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/build.properties (rev 0)
+++ trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/build.properties 2009-05-27 00:48:56 UTC (rev 15534)
@@ -0,0 +1,15 @@
+###############################################################################
+# Copyright (c) 2009 Red Hat and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Red Hat - initial API and implementation
+###############################################################################
+
+bin.includes = feature.*,\
+ license.html
+
+
Property changes on: trunk/jmx/features/org.jboss.tools.jmx.feature/sourceTemplateFeature/build.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplateFeature/feature.properties
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplateFeature/feature.properties 2009-05-27 00:48:28 UTC (rev 15533)
+++ trunk/jmx/features/org.jboss.tools.jmx.tests.feature/sourceTemplateFeature/feature.properties 2009-05-27 00:48:56 UTC (rev 15534)
@@ -1,21 +0,0 @@
-# properties file for org.jboss.tools.jmx.source
-featureName=JMX Console Tests Source
-featureProvider=JBoss, a division of Red Hat
-
-# "updateSiteName" property - label for the update site
-updateSiteName=JBossTools Update Site
-
-# "description" property - description of the feature
-description=eclipse-jmx is a JMX console which is used to manage Java applications through JMX and its RMI Connector. eclipse-jmx can be run from the Eclipse IDE.
-
-# "licenseURL" property - URL of the "Feature License"
-# do not translate value - just change to point to a locale-specific HTML page
-licenseURL=license.html
-
-# START NON-TRANSLATABLE
-# "license" property - text of the "Feature Update License"
-# should be plain text version of license agreement pointed to be "licenseURL"
-license=ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\nMarch 17, 2005\n\nUsage Of Content\n\nTHE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\nOTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\nUSE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\nAGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\nNOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\nAGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\nAND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\nOR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\nTERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\nOF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\nBELOW, THEN YOU MAY NOT USE THE CONTENT.\n\nApplicable Licenses\n\nUnless otherwise indicated, all Content made available by the Eclipse Foundation\nis provided to you under the terms and conditio!
ns of the Eclipse Public\nLicense Version 1.0 ("EPL"). A copy of the EPL is provided with this\nContent and is also available at http\://www.eclipse.org/legal/epl-v10.html.\nFor purposes of the EPL, "Program" will mean the Content.\n\nContent includes, but is not limited to, source code, object code,\ndocumentation and other files maintained in the Eclipse.org CVS\nrepository ("Repository") in CVS modules ("Modules") and made available\nas downloadable archives ("Downloads").\n\n- Content may be structured and packaged into modules to facilitate delivering,\nextending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\nplug-in fragments ("Fragments"), and features ("Features").\n- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\nin a directory named "plugins".\n- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\nEach Feature may be packaged as a sub-directory in a directory!
named "features".\nWithin a Feature, files named "feature.xml" may co
ntain a list of the names and version\nnumbers of the Plug-ins and/or Fragments associated with that Feature.\n- Features may also include other Features ("Included Features"). Within a Feature, files\nnamed "feature.xml" may contain a list of the names and version numbers of Included Features.\n\nFeatures may also include other Features ("Included Features"). Files named\n"feature.xml" may contain a list of the names and version numbers of\nIncluded Features.\n\nThe terms and conditions governing Plug-ins and Fragments should be\ncontained in files named "about.html" ("Abouts"). The terms and\nconditions governing Features and Included Features should be contained\nin files named "license.html" ("Feature Licenses"). Abouts and Feature\nLicenses may be located in any directory of a Download or Module\nincluding, but not limited to the following locations\:\n\n- The top-level (root) directory\n- Plug-in and Fragment directories\n- Inside Plug-ins and Fragments packaged as JAR!
s\n- Sub-directories of the directory named "src" of certain Plug-ins\n- Feature directories\n\nNote\: if a Feature made available by the Eclipse Foundation is installed using the\nEclipse Update Manager, you must agree to a license ("Feature Update\nLicense") during the installation process. If the Feature contains\nIncluded Features, the Feature Update License should either provide you\nwith the terms and conditions governing the Included Features or inform\nyou where you can locate them. Feature Update Licenses may be found in\nthe "license" property of files named "feature.properties". Such Abouts,\nFeature Licenses and Feature Update Licenses contain the terms and\nconditions (or references to such terms and conditions) that govern your\nuse of the associated Content in that directory.\n\nTHE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\nTO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\nSOME OF THESE OTHER LICENSE AGREEMENTS MA!
Y INCLUDE (BUT ARE NOT LIMITED TO)\:\n\n- Common Public License Versio
n 1.0 (available at http\://www.eclipse.org/legal/cpl-v10.html)\n- Apache Software License 1.1 (available at http\://www.apache.org/licenses/LICENSE)\n- Apache Software License 2.0 (available at http\://www.apache.org/licenses/LICENSE-2.0)\n- IBM Public License 1.0 (available at http\://oss.software.ibm.com/developerworks/opensource/license10.html)\n- Metro Link Public License 1.00 (available at http\://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n- Mozilla Public License Version 1.1 (available at http\://www.mozilla.org/MPL/MPL-1.1.html)\n\nIT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\nTO USE OF THE CONTENT. If no About, Feature License or Feature Update License\nis provided, please contact the Eclipse Foundation to determine what terms and conditions\ngovern that particular Content.\n\nCryptography\n\nContent may contain encryption software. The country in which you are\ncurrently may have restrictions on the import, posse!
ssion, and use,\nand/or re-export to another country, of encryption software. BEFORE\nusing any encryption software, please check the country's laws,\nregulations and policies concerning the import, possession, or use,\nand re-export of encryption software, to see if this is permitted.\n\nJava and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
-# END NON-TRANSLATABLE
-########### end of license property ##########################################
-
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15533 - trunk/jmx/features/org.jboss.tools.jmx.tests.feature.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 20:48:28 -0400 (Tue, 26 May 2009)
New Revision: 15533
Modified:
trunk/jmx/features/org.jboss.tools.jmx.tests.feature/.project
Log:
[JBDS-737] Rename
Modified: trunk/jmx/features/org.jboss.tools.jmx.tests.feature/.project
===================================================================
--- trunk/jmx/features/org.jboss.tools.jmx.tests.feature/.project 2009-05-27 00:48:06 UTC (rev 15532)
+++ trunk/jmx/features/org.jboss.tools.jmx.tests.feature/.project 2009-05-27 00:48:28 UTC (rev 15533)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.jmx.tests-feature</name>
+ <name>org.jboss.tools.jmx.tests.feature</name>
<comment></comment>
<projects>
</projects>
17 years, 1 month
JBoss Tools SVN: r15532 - in trunk/jmx: plugins/org.jboss.tools.jmx.ui/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2009-05-26 20:48:06 -0400 (Tue, 26 May 2009)
New Revision: 15532
Modified:
trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF
trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF
Log:
[JBDS-737] Updated manifests to include .qualifier and correct versions/ranges
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2009-05-27 00:31:16 UTC (rev 15531)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.core/META-INF/MANIFEST.MF 2009-05-27 00:48:06 UTC (rev 15532)
@@ -1,7 +1,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core;singleton:=true
-Bundle-Version: 0.2.1
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.jboss.tools.jmx.core.JMXActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.core.runtime
Modified: trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2009-05-27 00:31:16 UTC (rev 15531)
+++ trunk/jmx/plugins/org.jboss.tools.jmx.ui/META-INF/MANIFEST.MF 2009-05-27 00:48:06 UTC (rev 15532)
@@ -1,8 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
-Bundle-SymbolicName: org.jboss.tools.jmx.ui;singleton:=true
-Bundle-Version: 0.2.2
+Bundle-SymbolicName: org.jboss.tools.jmx.ui;singleton:=trueBundle-Version: 1.0.1.qualifier
Bundle-Activator: org.jboss.tools.jmx.ui.JMXUIActivator
Bundle-Vendor: %BundleProvider
Require-Bundle: org.eclipse.ui,
@@ -10,7 +9,7 @@
org.eclipse.ui.views,
org.eclipse.ui.forms;bundle-version="[3.2.0,4.0.0)",
org.eclipse.ui.navigator;bundle-version="3.3.100",
- org.jboss.tools.jmx.core;bundle-version="0.2.1"
+ org.jboss.tools.jmx.core;bundle-version="[1.0.0,2.0.0)"
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Export-Package: org.jboss.tools.jmx.ui.extensions,
Modified: trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-05-27 00:31:16 UTC (rev 15531)
+++ trunk/jmx/tests/org.jboss.tools.jmx.core.test/META-INF/MANIFEST.MF 2009-05-27 00:48:06 UTC (rev 15532)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %BundleName
Bundle-SymbolicName: org.jboss.tools.jmx.core.test
-Bundle-Version: 0.2.2
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.jboss.tools.jmx.core.tests.JMXTestPlugin
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF 2009-05-27 00:31:16 UTC (rev 15531)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test/META-INF/MANIFEST.MF 2009-05-27 00:48:06 UTC (rev 15532)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.f0
Bundle-SymbolicName: org.jboss.tools.jmx.ui.test
-Bundle-Version: 0.2.1
+Bundle-Version: 1.0.1.qualifier
Fragment-Host: org.jboss.tools.jmx.ui
Require-Bundle: org.junit
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF
===================================================================
--- trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF 2009-05-27 00:31:16 UTC (rev 15531)
+++ trunk/jmx/tests/org.jboss.tools.jmx.ui.test.interactive/META-INF/MANIFEST.MF 2009-05-27 00:48:06 UTC (rev 15532)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.jmx.ui.test.interactive;singleton:=true
-Bundle-Version: 0.2.2
+Bundle-Version: 1.0.1.qualifier
Bundle-Activator: org.jboss.tools.jmx.ui.test.interactive.Activator
Bundle-Vendor: %Bundle-Vendor.0
Require-Bundle: org.eclipse.ui,
17 years, 1 month
JBoss Tools SVN: r15531 - trunk/jst/plugins/org.jboss.tools.jst.jsp.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-26 20:31:16 -0400 (Tue, 26 May 2009)
New Revision: 15531
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
The skeleton to prompt for the tag names is added
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-05-27 00:26:21 UTC (rev 15530)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2009-05-27 00:31:16 UTC (rev 15531)
@@ -438,6 +438,46 @@
</contenttype>
</contentAssistProcessor>
+ <!--
+ <contentAssistProcessor
+ class="org.jboss.tools.jst.jsp.contentassist.JspContentAssistProcessor"
+ id="org.jboss.tools.jst.jsp.contentassist.JspContentAssistProcessor">
+ <contenttype id="org.eclipse.jst.jsp.core.jspsource">
+ <partitiontype id="org.eclipse.wst.xml.XML_DEFAULT" />
+ <partitiontype id="org.eclipse.wst.html.HTML_DEFAULT" />
+ <partitiontype id="org.eclipse.jst.jsp.DEFAULT_JSP" />
+ <partitiontype id="org.eclipse.jst.jsp.JSP_DIRECTIVE" />
+ <partitiontype id="org.eclipse.jst.jsp.SCRIPT.DELIMITER" />
+ <partitiontype id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
+ <partitiontype id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
+ </contenttype>
+ </contentAssistProcessor>
+
+ <contentAssistProcessor
+ class="org.jboss.tools.jst.jsp.contentassist.XmlContentAssistProcessor"
+ id="org.jboss.tools.jst.jsp.contentassist.XmlContentAssistProcessor">
+ <contenttype id="org.eclipse.wst.xml.core.xmlsource">
+ <partitiontype id="org.eclipse.wst.xml.XML_DEFAULT" />
+ <partitiontype id="org.eclipse.wst.xml.XML_CDATA" />
+ <partitiontype id="org.eclipse.wst.xml.XML_PI" />
+ <partitiontype id="org.eclipse.wst.xml.XML_DECL" />
+ <partitiontype id="org.eclipse.wst.xml.XML_COMMENT" />
+ <partitiontype id="org.eclipse.wst.xml.dtd.internal_subset" />
+ <partitiontype id="org.eclipse.wst.sse.ST_DEFAULT" />
+ <partitiontype id="org.eclipse.wst.sse.UNKNOWN_PARTITION_TYPE" />
+ </contenttype>
+ </contentAssistProcessor>
+
+ <contentAssistProcessor
+ class="org.jboss.tools.jst.jsp.contentassist.FaceletPageContectAssistProcessor"
+ id="org.jboss.tools.jst.jsp.contentassist.FaceletPageContectAssistProcessor">
+ <contenttype id="org.eclipse.wst.html.core.htmlsource">
+ <partitiontype id="org.eclipse.wst.html.HTML_DEFAULT" />
+ <partitiontype id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
+ <partitiontype id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
+ </contenttype>
+ </contentAssistProcessor>
+ -->
</extension>
<extension
point="org.eclipse.ui.popupMenus">
17 years, 1 month
JBoss Tools SVN: r15530 - trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-26 20:26:21 -0400 (Tue, 26 May 2009)
New Revision: 15530
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
The skeleton to prompt for a tag names is added
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-05-26 23:53:50 UTC (rev 15529)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/AbstractXMLContentAssistProcessor.java 2009-05-27 00:26:21 UTC (rev 15530)
@@ -10,23 +10,31 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
import org.eclipse.core.filebuffers.FileBuffers;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.text.contentassist.IContextInformationValidator;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocumentRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
import org.eclipse.wst.xml.core.internal.contentmodel.CMElementDeclaration;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
+import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
import org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor;
@@ -34,7 +42,16 @@
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELResolver;
import org.jboss.tools.common.el.core.resolver.ELResolverFactoryManager;
+import org.jboss.tools.jst.web.kb.KbQuery;
+import org.jboss.tools.jst.web.kb.PageProcessor;
+import org.jboss.tools.jst.web.kb.KbQuery.Type;
+import org.jboss.tools.jst.web.kb.taglib.INameSpace;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
abstract public class AbstractXMLContentAssistProcessor extends AbstractContentAssistProcessor {
private static final char[] PROPOSAL_AUTO_ACTIVATION_CHARS = new char[] {
@@ -54,11 +71,18 @@
int offset) {
this.fDocument = (viewer == null ? null : viewer.getDocument());
this.fDocumentPosition = offset;
- this.fContext = createContext();
-
+ try {
+ this.fContext = createContext();
+ } catch (Exception e) {
+ e.printStackTrace();
+ return new ICompletionProposal[0];
+ }
System.out.println("AbstractXMLContentAssistProcessor: computeCompletionProposals() invoked");
try {
return super.computeCompletionProposals(viewer, offset);
+ } catch (Exception e) {
+ e.printStackTrace();
+ return new ICompletionProposal[0];
} finally {
System.out.println("AbstractXMLContentAssistProcessor: computeCompletionProposals() exited");
}
@@ -117,11 +141,19 @@
/* the methods to be overriden in derived classes */
+
+
+ /*
+ * Calculates and adds the attribute name proposals to the Content Assist Request object
+ */
protected void addAttributeNameProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addAttributeNameProposals() invoked");
}
+ /*
+ * Calculates and adds the attribute value proposals to the Content Assist Request object
+ */
protected void addAttributeValueProposals(ContentAssistRequest contentAssistRequest) {
IDOMNode node = (IDOMNode) contentAssistRequest.getNode();
@@ -173,50 +205,88 @@
}
}
+ /*
+ * Calculates and adds the comment proposals to the Content Assist Request object
+ */
protected void addCommentProposal(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addCommentProposal() invoked");
}
+ /*
+ * Calculates and adds the doc type proposals to the Content Assist Request object
+ */
protected void addDocTypeProposal(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addDocTypeProposal() invoked");
}
+ /*
+ * Calculates and adds the empty document proposals to the Content Assist Request object
+ */
protected void addEmptyDocumentProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addEmptyDocumentProposals() invoked");
}
+ /*
+ * Calculates and adds the tag name proposals to the Content Assist Request object
+ */
protected void addEndTagNameProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addEndTagNameProposals() invoked");
}
+ /*
+ * Calculates and adds the end tag proposals to the Content Assist Request object
+ */
protected void addEndTagProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addEndTagProposals() invoked");
}
+ /*
+ * Calculates and adds the enttity proposals to the Content Assist Request object
+ */
protected void addEntityProposals(ContentAssistRequest contentAssistRequest, int documentPosition, ITextRegion completionRegion, IDOMNode treeNode) {
System.out.println("AbstractXMLContentAssistProcessor: addEntityProposals() invoked");
}
+ /*
+ * Calculates and adds the PCDATA proposals to the Content Assist Request object
+ */
protected void addPCDATAProposal(String nodeName, ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addPCDATAProposal() invoked");
}
+ /*
+ * Calculates and adds the start document proposals to the Content Assist Request object
+ */
protected void addStartDocumentProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addStartDocumentProposals() invoked");
}
+ /*
+ * Calculates and adds the tag close proposals to the Content Assist Request object
+ */
protected void addTagCloseProposals(ContentAssistRequest contentAssistRequest) {
System.out.println("AbstractXMLContentAssistProcessor: addTagCloseProposals() invoked");
}
+ /*
+ * Calculates and adds the tag insertion proposals to the Content Assist Request object
+ */
protected void addTagInsertionProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
System.out.println("AbstractXMLContentAssistProcessor: addTagInsertionProposals() invoked");
}
- protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int childPosition) {
- System.out.println("AbstractXMLContentAssistProcessor: addTagNameProposals() invoked");
- }
-
+ /**
+ * Calculates and adds the tag name proposals to the Content Assist Request object
+ *
+ * @param contentAssistRequest
+ * @param childPosition
+ */
+ abstract protected void addTagNameProposals(ContentAssistRequest contentAssistRequest, int childPosition);
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.wst.xml.ui.internal.contentassist.AbstractContentAssistProcessor#computeCompletionProposals(int, java.lang.String, org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion, org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode, org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode)
+ */
protected ContentAssistRequest computeCompletionProposals(int documentPosition, String matchString, ITextRegion completionRegion, IDOMNode treeNode, IDOMNode xmlnode) {
ContentAssistRequest contentAssistRequest = super.computeCompletionProposals(documentPosition, matchString, completionRegion, treeNode, xmlnode);
@@ -234,22 +304,70 @@
return contentAssistRequest;
}
+ /**
+ * Creates and fulfills the <code>org.jboss.tools.common.el.core.resolver.ELContext</code>
+ * instance
+ *
+ * @return
+ */
abstract protected ELContext createContext();
+ /**
+ * Creates and fulfills the <code>org.jboss.tools.jst.web.kb.KbQuery</code>
+ * instance
+ * Important: the Context is to be set before any call to createKbQuery
+ *
+ * @return
+ */
+
+ void a() {}
+ ///
+
+
+ /**
+ * Returns the <code>org.jboss.tools.jst.web.kb.KbQuery</code> instance
+ *
+ * @param type One of the <code>org.jboss.tools.jst.web.kb.KbQuery.Type</code> values
+ * @param query The value for query
+ * @param stringQuery the full text of the query value
+ *
+ * @return The <code>org.jboss.tools.jst.web.kb.KbQuery</code> instance
+ */
+ abstract protected KbQuery createKbQuery(Type type, String query, String stringQuery);
+
+ /**
+ * Returns the <code>org.jboss.tools.common.el.core.resolver.ELContext</code> instance
+ *
+ * @return
+ */
protected ELContext getContext() {
return this.fContext;
}
+ /**
+ * Returns the document position where the CA is invoked
+ * @return
+ */
protected int getOffset() {
return this.fDocumentPosition;
}
+ /**
+ * Returns the document
+ *
+ * @return
+ */
protected IDocument getDocument() {
return this.fDocument;
}
+ /**
+ * Returns IFile resource of the document
+ *
+ * @return
+ */
protected IFile getResource() {
- IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(fTextViewer.getDocument());
+ IStructuredModel sModel = StructuredModelManager.getModelManager().getExistingModelForRead(getDocument());
try {
if (sModel != null) {
String baseLocation = sModel.getBaseLocation();
@@ -266,8 +384,257 @@
return null;
}
- ELResolver[] getELResolvers(IResource resource) {
+ /**
+ * Returns array of the <code>org.jboss.tools.common.el.core.resolver.ELResolver</code>
+ * instances.
+ *
+ * @param resource
+ * @return
+ */
+ protected ELResolver[] getELResolvers(IResource resource) {
ELResolverFactoryManager elrfm = ELResolverFactoryManager.getInstance();
return elrfm.getResolvers(resource);
}
+
+ private static final String[] EMPTY_TAGS = new String[0];
+ /**
+ * Returns array of the parent tags
+ *
+ * @return
+ */
+ protected String[] getParentTags() {
+ List<String> parentTags = new ArrayList<String>();
+
+ IStructuredModel sModel = StructuredModelManager
+ .getModelManager()
+ .getExistingModelForRead(getDocument());
+ try {
+ if (sModel == null)
+ return EMPTY_TAGS;
+
+ Document xmlDocument = (sModel instanceof IDOMModel)
+ ? ((IDOMModel) sModel).getDocument()
+ : null;
+
+ if (xmlDocument == null)
+ return EMPTY_TAGS;
+
+ Node n = findNodeForOffset(xmlDocument, getOffset());
+ if (n == null)
+ return EMPTY_TAGS;
+
+ // Find the first parent tag
+ if (!(n instanceof Element)) {
+ if (n instanceof Attr) {
+ n = ((Attr) n).getOwnerElement();
+ } else {
+ n = n.getParentNode();
+ }
+ } else {
+ n = n.getParentNode();
+ }
+
+ // Store all the parents
+ while (n != null) {
+ String tagName = n.getNodeName();
+ parentTags.add(0, tagName);
+ n = n.getParentNode();
+ }
+
+ return (String[])parentTags.toArray(new String[parentTags.size()]);
+ } finally {
+ if (sModel != null) {
+ sModel.releaseFromRead();
+ }
+ }
+ }
+
+ /**
+ * For internal use only!
+ * Returns the parent Element for the Attribute or TEXT nodes
+ *
+ * @param xmlDocument
+ * @return
+ */
+ protected Node _getParentElement(Document xmlDocument) {
+ Node n = findNodeForOffset(xmlDocument, getOffset());
+ if (n == null)
+ return null;
+
+ if (n instanceof Element)
+ return n;
+
+ if (n instanceof Attr) {
+ return ((Attr) n).getOwnerElement();
+ } else {
+ return n.getParentNode();
+ }
+ }
+
+ /**
+ * Returns name of the parent attribute/tag name
+ *
+ * @return
+ */
+ protected String getParent(boolean returnAttributeName) {
+ IStructuredModel sModel = StructuredModelManager
+ .getModelManager()
+ .getExistingModelForRead(getDocument());
+ try {
+ if (sModel == null)
+ return null;
+
+ Document xmlDocument = (sModel instanceof IDOMModel)
+ ? ((IDOMModel) sModel).getDocument()
+ : null;
+
+ if (xmlDocument == null)
+ return null;
+
+ Node n = findNodeForOffset(xmlDocument, getOffset());
+ if (n == null)
+ return null;
+
+ // Find the first parent tag
+ if (!(n instanceof Element)) {
+ if (n instanceof Attr) {
+ if (returnAttributeName) {
+ String parentAttrName = n.getNodeName();
+ return parentAttrName;
+ }
+ n = ((Attr) n).getOwnerElement();
+ } else {
+ n = n.getParentNode();
+ }
+ } else {
+ n = n.getParentNode();
+ }
+ if (n == null)
+ return null;
+
+ String parentTagName = n.getNodeName();
+ return parentTagName;
+ } finally {
+ if (sModel != null) {
+ sModel.releaseFromRead();
+ }
+ }
+ }
+
+ /**
+ * Returns URI for the current/parent tag
+ * @return
+ */
+ protected String getTagPrefix() {
+ IStructuredModel sModel = StructuredModelManager
+ .getModelManager()
+ .getExistingModelForRead(getDocument());
+ try {
+ if (sModel == null)
+ return null;
+
+ Document xmlDocument = (sModel instanceof IDOMModel)
+ ? ((IDOMModel) sModel).getDocument()
+ : null;
+
+ if (xmlDocument == null)
+ return null;
+
+ Node n = findNodeForOffset(xmlDocument, getOffset());
+ if (n == null)
+ return null;
+
+
+ if (!(n instanceof Element) && !(n instanceof Attr))
+ return null;
+
+ if (n instanceof Attr) {
+ n = ((Attr) n).getOwnerElement();
+ }
+
+ if (n == null)
+ return null;
+
+ String nodePrefix = ((Element)n).getPrefix();
+ return nodePrefix;
+ } finally {
+ if (sModel != null) {
+ sModel.releaseFromRead();
+ }
+ }
+ }
+
+ /**
+ * Returns URI for the current/parent tag
+ * @return
+ */
+ protected String getTagUri() {
+ String nodePrefix = getTagPrefix();
+ return getUri(nodePrefix);
+ }
+
+ /**
+ * Returns URI string for the prefix specified
+ *
+ * @param prefix
+ * @return
+ */
+ abstract protected String getUri(String prefix);
+
+ /* Utility functions */
+ Node findNodeForOffset(IDOMNode node, int offset) {
+ if(node == null) return null;
+ if (!node.contains(offset)) return null;
+
+ if (node.hasChildNodes()) {
+ // Try to find the node in children
+ NodeList children = node.getChildNodes();
+ for (int i = 0; children != null && i < children.getLength(); i++) {
+ IDOMNode child = (IDOMNode)children.item(i);
+ if (child.contains(offset)) {
+ return findNodeForOffset(child, offset);
+ }
+ }
+ }
+ // Not found in children or nave no children
+ if (node.hasAttributes()) {
+ // Try to find in the node attributes
+ NamedNodeMap attributes = node.getAttributes();
+
+ for (int i = 0; attributes != null && i < attributes.getLength(); i++) {
+ IDOMNode attr = (IDOMNode)attributes.item(i);
+ if (attr.contains(offset)) {
+ return attr;
+ }
+ }
+ }
+ // Return the node itself
+ return node;
+ }
+
+ Node findNodeForOffset(Node node, int offset) {
+ return (node instanceof IDOMNode) ? findNodeForOffset((IDOMNode)node, offset) : null;
+ }
+
+ /**
+ * this is the position the cursor should be in after the proposal is
+ * applied
+ *
+ * @param proposedText
+ * @return the position the cursor should be in after the proposal is
+ * applied
+ */
+ protected int getCursorPositionForProposedText(String proposedText) {
+ int cursorAdjustment;
+ cursorAdjustment = proposedText.indexOf("\"\"") + 1; //$NON-NLS-1$
+ // otherwise, after the first tag
+ if (cursorAdjustment == 0) {
+ cursorAdjustment = proposedText.indexOf('>') + 1;
+ }
+ if (cursorAdjustment == 0) {
+ cursorAdjustment = proposedText.length();
+ }
+
+ return cursorAdjustment;
+ }
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-26 23:53:50 UTC (rev 15529)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/FaceletPageContectAssistProcessor.java 2009-05-27 00:26:21 UTC (rev 15530)
@@ -19,6 +19,7 @@
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
+import org.jboss.tools.jst.web.kb.IFaceletPageContext;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.internal.FaceletPageContextImpl;
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
@@ -132,39 +133,8 @@
}
- /* Utility functions */
- private Node findNodeForOffset(IDOMNode node, int offset) {
- if(node == null) return null;
- if (!node.contains(offset)) return null;
-
- if (node.hasChildNodes()) {
- // Try to find the node in children
- NodeList children = node.getChildNodes();
- for (int i = 0; children != null && i < children.getLength(); i++) {
- IDOMNode child = (IDOMNode)children.item(i);
- if (child.contains(offset)) {
- return findNodeForOffset(child, offset);
- }
- }
- }
- // Not found in children or nave no children
- if (node.hasAttributes()) {
- // Try to find in the node attributes
- NamedNodeMap attributes = node.getAttributes();
-
- for (int i = 0; attributes != null && i < attributes.getLength(); i++) {
- IDOMNode attr = (IDOMNode)attributes.item(i);
- if (attr.contains(offset)) {
- return attr;
- }
- }
- }
- // Return the node itself
- return node;
+ @Override
+ protected IFaceletPageContext getContext() {
+ return (IFaceletPageContext)super.getContext();
}
-
- private Node findNodeForOffset(Node node, int offset) {
- return (node instanceof IDOMNode) ? findNodeForOffset((IDOMNode)node, offset) : null;
- }
-
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-05-26 23:53:50 UTC (rev 15529)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/JspContentAssistProcessor.java 2009-05-27 00:26:21 UTC (rev 15530)
@@ -10,23 +10,35 @@
******************************************************************************/
package org.jboss.tools.jst.jsp.contentassist;
+import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jst.jsp.core.internal.contentmodel.TaglibController;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TLDCMDocumentManager;
import org.eclipse.jst.jsp.core.internal.contentmodel.tld.TaglibTracker;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.eclipse.wst.sse.ui.internal.contentassist.CustomCompletionProposal;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMModel;
+import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
+import org.eclipse.wst.xml.ui.internal.contentassist.XMLRelevanceConstants;
import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.common.text.TextProposal;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
+import org.jboss.tools.jst.web.kb.KbQuery;
+import org.jboss.tools.jst.web.kb.PageProcessor;
+import org.jboss.tools.jst.web.kb.KbQuery.Type;
import org.jboss.tools.jst.web.kb.internal.JspContextImpl;
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
+import org.jboss.tools.jst.web.kb.taglib.TagLibriryManager;
import org.w3c.dom.Document;
public class JspContentAssistProcessor extends XmlContentAssistProcessor {
@@ -101,13 +113,82 @@
}
}
+ private static final ITagLibrary[] EMPTY_LIBRARIES = new ITagLibrary[0];
+ /**
+ */
+
protected ITagLibrary[] getTagLibraries(IPageContext context) {
- // TODO
- return null;
+ Map<String, INameSpace> nameSpaces = context.getNameSpaces(getOffset());
+ if (nameSpaces == null || nameSpaces.isEmpty())
+ return EMPTY_LIBRARIES;
+
+ List<ITagLibrary> tagLibraries = new ArrayList<ITagLibrary>();
+ for (INameSpace nameSpace : nameSpaces.values()) {
+ ITagLibrary[] libs = TagLibriryManager.getLibraries(context.getResource().getProject(), nameSpace.getURI());
+ if (libs != null && libs.length > 0) {
+ for (ITagLibrary lib : libs) {
+ tagLibraries.add(lib);
+ }
+ }
+ }
+ return (tagLibraries.isEmpty() ? EMPTY_LIBRARIES :
+ (ITagLibrary[])tagLibraries.toArray(new ITagLibrary[tagLibraries.size()]));
}
protected IResourceBundle[] getResourceBundles() {
// TODO
return null;
}
+
+ @Override
+ protected IPageContext getContext() {
+ return (IPageContext)super.getContext();
+ }
+
+ @Override
+ protected void addTagNameProposals(
+ ContentAssistRequest contentAssistRequest, int childPosition) {
+ // TODO Auto-generated method stub
+ System.out.println("JspContentAssistProcessor: addTagNameProposals() invoked");
+ String matchString = contentAssistRequest.getMatchString();
+ String query = matchString;
+ if (query == null)
+ query = "";
+ if (query.indexOf(KbQuery.PREFIX_SEPARATOR) > -1) {
+ query = matchString.substring(query.indexOf(KbQuery.PREFIX_SEPARATOR) + 1);
+ }
+ String stringQuery = "<" + matchString;
+
+ KbQuery kbQuery = createKbQuery(Type.TAG_NAME, query, stringQuery);
+ TextProposal[] proposals = PageProcessor.getInstance().getProposals(kbQuery, getContext());
+
+ for (int i = 0; proposals != null && i < proposals.length; i++) {
+ TextProposal textProposal = proposals[i];
+ System.out.println("Tag Name proposal [" + (i + 1) + "/" + proposals.length + "]: " + textProposal.getReplacementString());
+
+ String replacementString = textProposal.getReplacementString() + ">";
+
+ int replacementOffset = contentAssistRequest.getReplacementBeginPosition();
+ int replacementLength = contentAssistRequest.getReplacementLength();
+ int cursorPosition = getCursorPositionForProposedText(replacementString);
+ Image image = textProposal.getImage();
+ String displayString = textProposal.getLabel();
+ IContextInformation contextInformation = null;
+ String additionalProposalInfo = textProposal.getContextInfo();
+ int relevance = textProposal.getRelevance() + 10000;
+
+
+// cursorAdjustment = proposedText.length() +
+ // 1;
+ // proposedText += "></" +
+ // getRequiredName(parent, elementDecl) + ">";
+ // //$NON-NLS-2$//$NON-NLS-1$
+
+
+ CustomCompletionProposal proposal = new CustomCompletionProposal(replacementString, replacementOffset, replacementLength, cursorPosition, image, displayString, contextInformation, additionalProposalInfo, relevance);
+ contentAssistRequest.addProposal(proposal);
+ }
+ return;
+ }
+
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-05-26 23:53:50 UTC (rev 15529)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/contentassist/XmlContentAssistProcessor.java 2009-05-27 00:26:21 UTC (rev 15530)
@@ -11,9 +11,13 @@
package org.jboss.tools.jst.jsp.contentassist;
import org.eclipse.core.resources.IFile;
+import org.eclipse.wst.xml.ui.internal.contentassist.ContentAssistRequest;
import org.jboss.tools.common.el.core.resolver.ELContext;
import org.jboss.tools.common.el.core.resolver.ELContextImpl;
import org.jboss.tools.common.el.core.resolver.ELResolver;
+import org.jboss.tools.jst.web.kb.IFaceletPageContext;
+import org.jboss.tools.jst.web.kb.KbQuery;
+import org.jboss.tools.jst.web.kb.KbQuery.Type;
public class XmlContentAssistProcessor extends AbstractXMLContentAssistProcessor {
@@ -37,4 +41,41 @@
protected void setVars(ELContext context) {
// TODO
}
+
+ @Override
+ protected KbQuery createKbQuery(Type type, String query, String stringQuery) {
+ KbQuery kbQuery = new KbQuery();
+
+ String prefix = getTagPrefix();
+ String uri = getTagUri();
+ String[] parentTags = getParentTags();
+ String parent = getParent(type == Type.ATTRIBUTE_VALUE);
+ String queryValue = query;
+ String queryStringValue = stringQuery;
+
+ kbQuery.setPrefix(prefix);
+ kbQuery.setUri(uri);
+ kbQuery.setParentTags(parentTags);
+ kbQuery.setParent(parent);
+ kbQuery.setMask(true);
+ kbQuery.setType(type);
+ kbQuery.setOffset(getOffset());
+ kbQuery.setValue(queryValue);
+ kbQuery.setStringQuery(queryStringValue);
+
+ return kbQuery;
+ }
+
+ @Override
+ protected String getUri(String prefix) {
+ return null;
+ }
+
+
+ @Override
+ protected void addTagNameProposals(
+ ContentAssistRequest contentAssistRequest, int childPosition) {
+ // TODO Auto-generated method stub
+
+ }
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15529 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 19:53:50 -0400 (Tue, 26 May 2009)
New Revision: 15529
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
Fixed compilation errors.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 23:48:52 UTC (rev 15528)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 23:53:50 UTC (rev 15529)
@@ -487,9 +487,9 @@
// Unknown factory name
System.out.println("Test - Unknown factory name");
- IFile �omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
+ IFile component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
try{
- component12File.setContents(�omponent12File2.getContents(), true, false, null);
+ component12File.setContents(component12File2.getContents(), true, false, null);
}catch(Exception ex){
JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
"'Component12File2.2'", ex);
@@ -508,9 +508,9 @@
assertEquals("Problem marker has wrong line number", 24, lineNumbers[0]);
- �omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory");
+ component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory");
try{
- component12File.setContents(�omponent12File2.getContents(), true, false, null);
+ component12File.setContents(component12File2.getContents(), true, false, null);
}catch(Exception ex){
JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
"'DuplicateFactory'", ex);
17 years, 1 month
JBoss Tools SVN: r15528 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 19:48:52 -0400 (Tue, 26 May 2009)
New Revision: 15528
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-26 23:31:10 UTC (rev 15527)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-26 23:48:52 UTC (rev 15528)
@@ -194,7 +194,7 @@
proposal.setContextInfo(components[i].getDescription());
StringBuffer label = new StringBuffer();
if(prefix!=null) {
- label.append(query.getPrefix() + KbQuery.PREFIX_SEPARATOR);
+ label.append(prefix + KbQuery.PREFIX_SEPARATOR);
}
label.append(components[i].getName());
proposal.setLabel(label.toString());
17 years, 1 month
JBoss Tools SVN: r15527 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: internal and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 19:31:10 -0400 (Tue, 26 May 2009)
New Revision: 15527
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java 2009-05-26 22:26:25 UTC (rev 15526)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/IPageContext.java 2009-05-26 23:31:10 UTC (rev 15527)
@@ -51,6 +51,7 @@
/**
* Returns map of name spaces which are set in particular offset.
+ * Key is URI of name space.
* @return
*/
Map<String, INameSpace> getNameSpaces(int offset);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-05-26 22:26:25 UTC (rev 15526)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-05-26 23:31:10 UTC (rev 15527)
@@ -99,6 +99,6 @@
Map<String, INameSpace> nameSpaceMap = new HashMap<String, INameSpace>();
nameSpaces.put(region, nameSpaceMap);
}
- nameSpaces.get(region).put(nameSpace.getPrefix(), nameSpace);
+ nameSpaces.get(region).put(nameSpace.getURI(), nameSpace);
}
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-26 22:26:25 UTC (rev 15526)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractComponent.java 2009-05-26 23:31:10 UTC (rev 15527)
@@ -27,7 +27,6 @@
import org.jboss.tools.jst.web.kb.internal.KbXMLStoreConstants;
import org.jboss.tools.jst.web.kb.taglib.IAttribute;
import org.jboss.tools.jst.web.kb.taglib.IComponent;
-import org.jboss.tools.jst.web.kb.taglib.INameSpace;
import org.w3c.dom.Element;
/**
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-26 22:26:25 UTC (rev 15526)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/taglib/AbstractTagLib.java 2009-05-26 23:31:10 UTC (rev 15527)
@@ -178,6 +178,14 @@
* @see org.jboss.tools.jst.web.kb.ProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.PageContext)
*/
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
+ String prefix = null;
+ Map<String, INameSpace> nameSpaces = context.getNameSpaces(query.getOffset());
+ if(nameSpaces!=null) {
+ INameSpace nameSpace = nameSpaces.get(getURI());
+ if(nameSpace!=null) {
+ prefix = nameSpace.getPrefix();
+ }
+ }
List<TextProposal> proposals = new ArrayList<TextProposal>();
IComponent[] components = getComponents(query, context);
if(query.getType() == KbQuery.Type.TAG_NAME) {
@@ -185,7 +193,7 @@
TextProposal proposal = new TextProposal();
proposal.setContextInfo(components[i].getDescription());
StringBuffer label = new StringBuffer();
- if(query.getPrefix()!=null) {
+ if(prefix!=null) {
label.append(query.getPrefix() + KbQuery.PREFIX_SEPARATOR);
}
label.append(components[i].getName());
17 years, 1 month
JBoss Tools SVN: r15526 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-05-26 18:26:25 -0400 (Tue, 26 May 2009)
New Revision: 15526
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
Log:
JBIDE-2808: Improve/refactor org.jboss.tools.common.kb plugin.
getProposals() method is fixed: NullPointerException.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 22:23:27 UTC (rev 15525)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 22:26:25 UTC (rev 15526)
@@ -42,7 +42,7 @@
public TextProposal[] getProposals(KbQuery query, IPageContext context) {
ArrayList<TextProposal> proposals = new ArrayList<TextProposal>();
ITagLibrary[] libs = context.getLibraries();
- for (int i = 0; i < libs.length; i++) {
+ for (int i = 0; libs != null && i < libs.length; i++) {
TextProposal[] libProposals = libs[i].getProposals(query, context);
for (int j = 0; j < libProposals.length; j++) {
proposals.add(libProposals[i]);
@@ -53,7 +53,7 @@
//TODO convert value to EL string.
String elString = value;
ELResolver[] resolvers = context.getElResolvers();
- for (int i = 0; i < resolvers.length; i++) {
+ for (int i = 0; resolvers != null && i < resolvers.length; i++) {
proposals.addAll(resolvers[i].getCompletions(elString, !query.isMask(), query.getOffset(), context));
}
}
17 years, 1 month
JBoss Tools SVN: r15525 - in trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb: taglib and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 18:23:27 -0400 (Tue, 26 May 2009)
New Revision: 15525
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/TagLibriryManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 22:20:57 UTC (rev 15524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 22:23:27 UTC (rev 15525)
@@ -25,6 +25,9 @@
private static final PageProcessor INSTANCE = new PageProcessor();
+ /**
+ * @return instance of PageProcessor
+ */
public static PageProcessor getInstance() {
return INSTANCE;
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/TagLibriryManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/TagLibriryManager.java 2009-05-26 22:20:57 UTC (rev 15524)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/taglib/TagLibriryManager.java 2009-05-26 22:23:27 UTC (rev 15525)
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IProject;
import org.jboss.tools.jst.web.kb.IKbProject;
import org.jboss.tools.jst.web.kb.KbProjectFactory;
+import org.jboss.tools.jst.web.kb.WebKbPlugin;
/**
* @author Alexey Kazakov
@@ -27,6 +28,10 @@
*/
public static ITagLibrary[] getLibraries(IProject project, String uri) {
IKbProject kbProject = KbProjectFactory.getKbProject(project, true);
+ if(kbProject==null) {
+ WebKbPlugin.getDefault().logWarning("Project " + project.getName() + " doesn't have KB nature.");
+ return new ITagLibrary[0];
+ }
return kbProject.getTagLibraries(uri);
}
}
\ No newline at end of file
17 years, 1 month
JBoss Tools SVN: r15524 - in trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4: src/org/jboss/tools/flow/jpdl4/editor and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2009-05-26 18:20:57 -0400 (Tue, 26 May 2009)
New Revision: 15524
Added:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ListenerListTreeEditPart.java
Modified:
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/EventListenerListTreeEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java
Log:
- Event listeners on nodes and transitions (GPD-332)
- Deserialization of decision handler (GPD-342)
- Adding second swimlane and timer (GPD-343)
- On elements are no longer removed from nodes (GPD-340)
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/plugin.xml 2009-05-26 22:20:57 UTC (rev 15524)
@@ -489,6 +489,12 @@
value="org.jboss.tools.flow.jpdl4.editpart.ProcessTreeRootEditPart">
</instanceof>
<instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.TaskTreeRootEditPart">
+ </instanceof>
+ <instanceof
+ value="org.jboss.tools.flow.jpdl4.editpart.SequenceFlowTreeRootEditPart">
+ </instanceof>
+ <instanceof
value="org.jboss.tools.flow.jpdl4.editpart.EventListenerListTreeEditPart">
</instanceof>
</or>
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlDeserializer.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -221,7 +221,7 @@
}
}
- class ConnectionAttributeHandler extends DefaultAttributeDeserializer {
+ class SequenceFlowAttributeHandler extends DefaultAttributeDeserializer {
public void deserializeAttributes(Wrapper wrapper, Element element) {
super.deserializeAttributes(wrapper, element);
if (!(wrapper instanceof ConnectionWrapper)) return;
@@ -232,6 +232,24 @@
}
}
+ class SequenceFlowChildNodeHandler implements ChildNodeDeserializer {
+ public Wrapper deserializeChildNode(Wrapper parent, Node node) {
+ Wrapper result = null;
+ if (!(parent instanceof ConnectionWrapper)) return result;
+ ConnectionWrapper connectionWrapper = (ConnectionWrapper)parent;
+ if (node instanceof Element) {
+ result = createWrapper((Element)node);
+ if (result == null) return null;
+ if (result instanceof Wrapper) {
+ if (result.getElement() instanceof EventListener) {
+ connectionWrapper.addChild("listener", result);
+ }
+ }
+ }
+ return result;
+ }
+ }
+
class ProcessChildNodeHandler implements ChildNodeDeserializer {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
Wrapper result = null;
@@ -281,8 +299,12 @@
}
if (node instanceof Element) {
result = createWrapper((Element)node);
- if (result != null && result instanceof ConnectionWrapper) {
- flows.add((ConnectionWrapper)result);
+ if (result != null) {
+ if (result instanceof ConnectionWrapper) {
+ flows.add((ConnectionWrapper)result);
+ } else if (result.getElement() instanceof EventListenerContainer) {
+ parent.addChild("eventListener", result);
+ }
}
}
return result;
@@ -291,11 +313,13 @@
class ExclusiveGateWayChildNodeHandler extends NodeChildNodeHandler {
public Wrapper deserializeChildNode(Wrapper parent, Node node) {
- Wrapper result = super.deserializeChildNode(parent, node);
+ Wrapper result = null;
ExclusiveGateway exclusiveGateway = (ExclusiveGateway)parent.getElement();
if (node instanceof Element && "handler".equals(node.getNodeName())) {
String className = ((Element)node).getAttribute("class");
exclusiveGateway.setHandler("".equals(className) ? null : className);
+ } else {
+ result = super.deserializeChildNode(parent, node);
}
return result;
}
@@ -383,7 +407,7 @@
} else if (wrapper instanceof NodeWrapper) {
return getNodeAttributeHandler(wrapper);
} else if (wrapper instanceof ConnectionWrapper) {
- return new ConnectionAttributeHandler();
+ return new SequenceFlowAttributeHandler();
} else if (wrapper instanceof DefaultWrapper) {
return getDefaultAttributeHandler(wrapper);
}
@@ -424,6 +448,8 @@
return getNodeChildNodeDeserializer(wrapper);
} else if (wrapper instanceof DefaultWrapper) {
return getDefaultChildNodeHandler(wrapper);
+ } else if (wrapper instanceof ConnectionWrapper) {
+ return new SequenceFlowChildNodeHandler();
}
return null;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editor/JpdlSerializer.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -265,6 +265,15 @@
buffer.append(labelBuffer);
buffer.append("\"");
}
+ public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
+ List<Element> eventListeners = wrapper.getChildren("listener");
+ if (eventListeners != null) {
+ for (Element eventListener : eventListeners) {
+ if (!(eventListener instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)eventListener, level+1);
+ }
+ }
+ }
}
class ProcessNodeWrapperSerializer extends AbstractWrapperSerializer {
@@ -305,6 +314,13 @@
}
public void appendBody(StringBuffer buffer, Wrapper wrapper, int level) {
NodeWrapper nodeWrapper = (NodeWrapper)wrapper;
+ List<Element> eventListenerContainers = nodeWrapper.getChildren("eventListener");
+ if (eventListenerContainers != null) {
+ for (Element eventListenerContainer : eventListenerContainers) {
+ if (!(eventListenerContainer instanceof Wrapper)) continue;
+ appendToBuffer(buffer, (Wrapper)eventListenerContainer, level+1);
+ }
+ }
List<ConnectionWrapper> children = nodeWrapper.getOutgoingConnections();
for (ConnectionWrapper connectionWrapper : children) {
appendToBuffer(buffer, connectionWrapper, level+1);
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/EventListenerListTreeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/EventListenerListTreeEditPart.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/EventListenerListTreeEditPart.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -59,7 +59,15 @@
((JpdlTreeEditPart)parent).modelChanged(modelEvent);
}
refreshChildren();
- } else if (event.getChangeType() == Wrapper.CHANGE_PROPERTY) {
+ } else if (event.getChangeType() == Wrapper.ADD_ELEMENT) {
+ refreshChildren();
+ Object object = event.getNewValue();
+ EditPart editPart = (EditPart)getViewer().getEditPartRegistry().get(object);
+ if (editPart != null) {
+ getViewer().select(editPart);
+ }
+ }
+ else if (event.getChangeType() == Wrapper.CHANGE_PROPERTY) {
refreshVisuals();
}
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/JpdlTreeEditPartFactory.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -28,6 +28,7 @@
}
if (model instanceof SwimlaneListTreeEditPart) return (EditPart)model;
if (model instanceof TimerListTreeEditPart) return (EditPart)model;
+ if (model instanceof ListenerListTreeEditPart) return (EditPart)model;
return new NoDetailsTreeRootEditPart();
}
Added: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ListenerListTreeEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ListenerListTreeEditPart.java (rev 0)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ListenerListTreeEditPart.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -0,0 +1,33 @@
+package org.jboss.tools.flow.jpdl4.editpart;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.jpdl4.util.SharedImages;
+
+public class ListenerListTreeEditPart extends JpdlTreeEditPart {
+
+ public ListenerListTreeEditPart(List<Element> timers) {
+ super(timers);
+ }
+
+ protected Image getImage() {
+ String iconPath = "icons/16/events_multiple.gif";
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(
+ Platform.getBundle("org.jboss.tools.flow.jpdl4").getEntry(iconPath));
+ return SharedImages.INSTANCE.getImage(descriptor);
+ }
+
+ protected String getText() {
+ return "Event Listeners";
+ }
+
+ @SuppressWarnings("unchecked")
+ protected List<Object> getModelChildren() {
+ return (List<Object>)getModel();
+ }
+
+}
Property changes on: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ListenerListTreeEditPart.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/ProcessTreeRootEditPart.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -5,14 +5,13 @@
import org.eclipse.gef.EditPart;
import org.jboss.tools.flow.common.model.Element;
-import org.jboss.tools.flow.common.wrapper.FlowWrapper;
import org.jboss.tools.flow.common.wrapper.ModelEvent;
import org.jboss.tools.flow.common.wrapper.Wrapper;
public class ProcessTreeRootEditPart extends JpdlTreeEditPart {
- public ProcessTreeRootEditPart(FlowWrapper flowWrapper) {
- super(flowWrapper);
+ public ProcessTreeRootEditPart(Wrapper wrapper) {
+ super(wrapper);
}
protected void createEditPolicies() {
@@ -20,23 +19,23 @@
protected List<Object> getModelChildren() {
List<Object> result = new ArrayList<Object>();
- FlowWrapper flowWrapper = (FlowWrapper)getModel();
- if (flowWrapper == null) return null;
- addSwimlanes(result, flowWrapper);
- addEventListeners(result, flowWrapper);
- addTimers(result, flowWrapper);
+ Wrapper wrapper = (Wrapper)getModel();
+ if (wrapper == null) return null;
+ addSwimlanes(result, wrapper);
+ addEventListeners(result, wrapper);
+ addTimers(result, wrapper);
return result;
}
- private void addSwimlanes(List<Object> list, FlowWrapper flowWrapper) {
- List<Element> swimlanes = flowWrapper.getChildren("swimlane");
+ private void addSwimlanes(List<Object> list, Wrapper wrapper) {
+ List<Element> swimlanes = wrapper.getChildren("swimlane");
if (swimlanes != null && !swimlanes.isEmpty()) {
list.add(new SwimlaneListTreeEditPart(swimlanes));
}
}
- private void addEventListeners(List<Object> list, FlowWrapper flowWrapper) {
- List<Element> eventListeners = flowWrapper.getChildren("eventListener");
+ private void addEventListeners(List<Object> list, Wrapper wrapper) {
+ List<Element> eventListeners = wrapper.getChildren("eventListener");
if (eventListeners == null) return;
for (Element element : eventListeners) {
if (element instanceof Wrapper) {
@@ -45,8 +44,8 @@
}
}
- private void addTimers(List<Object> list, FlowWrapper flowWrapper) {
- List<Element> timers = flowWrapper.getChildren("timer");
+ private void addTimers(List<Object> list, Wrapper wrapper) {
+ List<Element> timers = wrapper.getChildren("timer");
if (timers != null && !timers.isEmpty()) {
list.add(new TimerListTreeEditPart(timers));
}
@@ -67,11 +66,11 @@
public void activate() {
super.activate();
- ((FlowWrapper)getModel()).addListener(this);
+ ((Wrapper)getModel()).addListener(this);
}
public void deactivate() {
- ((FlowWrapper)getModel()).removeListener(this);
+ ((Wrapper)getModel()).removeListener(this);
super.deactivate();
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/SequenceFlowTreeRootEditPart.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -3,18 +3,53 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.flow.common.wrapper.ConnectionWrapper;
+import org.eclipse.gef.EditPart;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
public class SequenceFlowTreeRootEditPart extends JpdlTreeEditPart {
- public SequenceFlowTreeRootEditPart(ConnectionWrapper connectionWrapper) {
- super(connectionWrapper);
+ public SequenceFlowTreeRootEditPart(Wrapper wrapper) {
+ super(wrapper);
}
protected List<Object> getModelChildren() {
List<Object> result = new ArrayList<Object>();
- result.add(new EventListenerListTreeEditPart(null));
+ Wrapper wrapper = (Wrapper)getModel();
+ if (wrapper == null) return null;
+ addEventListeners(result, wrapper);
return result;
}
+ private void addEventListeners(List<Object> list, Wrapper wrapper) {
+ List<Element> eventListeners = wrapper.getChildren("listener");
+ if (eventListeners != null && !eventListeners.isEmpty()) {
+ list.add(new ListenerListTreeEditPart(eventListeners));
+ }
+ }
+
+ public void modelChanged(ModelEvent event) {
+ if (event.getChangeType() == Wrapper.ADD_ELEMENT) {
+ refreshChildren();
+ Object object = event.getNewValue();
+ EditPart editPart = (EditPart)getViewer().getEditPartRegistry().get(object);
+ if (editPart != null) {
+ getViewer().select(editPart);
+ }
+ } else if (event.getChangeType() == Wrapper.REMOVE_ELEMENT) {
+ refreshChildren();
+ }
+ }
+
+ public void activate() {
+ super.activate();
+ ((Wrapper)getModel()).addListener(this);
+ }
+
+ public void deactivate() {
+ ((Wrapper)getModel()).removeListener(this);
+ super.deactivate();
+ }
+
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/editpart/TaskTreeRootEditPart.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -3,18 +3,56 @@
import java.util.ArrayList;
import java.util.List;
-import org.jboss.tools.flow.common.wrapper.NodeWrapper;
+import org.eclipse.gef.EditPart;
+import org.jboss.tools.flow.common.model.Element;
+import org.jboss.tools.flow.common.wrapper.ModelEvent;
+import org.jboss.tools.flow.common.wrapper.Wrapper;
public class TaskTreeRootEditPart extends JpdlTreeEditPart {
- public TaskTreeRootEditPart(NodeWrapper nodeWrapper) {
- super(nodeWrapper);
+ public TaskTreeRootEditPart(Wrapper wrapper) {
+ super(wrapper);
}
protected List<Object> getModelChildren() {
List<Object> result = new ArrayList<Object>();
- result.add(new EventListenerListTreeEditPart(null));
+ Wrapper wrapper = (Wrapper)getModel();
+ if (wrapper == null) return null;
+ addEventListeners(result, wrapper);
return result;
}
+ private void addEventListeners(List<Object> list, Wrapper wrapper) {
+ List<Element> eventListeners = wrapper.getChildren("eventListener");
+ if (eventListeners == null) return;
+ for (Element element : eventListeners) {
+ if (element instanceof Wrapper) {
+ list.add((Wrapper)element);
+ }
+ }
+ }
+
+ public void modelChanged(ModelEvent event) {
+ if (event.getChangeType() == Wrapper.ADD_ELEMENT) {
+ refreshChildren();
+ Object object = event.getNewValue();
+ EditPart editPart = (EditPart)getViewer().getEditPartRegistry().get(object);
+ if (editPart != null) {
+ getViewer().select(editPart);
+ }
+ } else if (event.getChangeType() == Wrapper.REMOVE_ELEMENT) {
+ refreshChildren();
+ }
+ }
+
+ public void activate() {
+ super.activate();
+ ((Wrapper)getModel()).addListener(this);
+ }
+
+ public void deactivate() {
+ ((Wrapper)getModel()).removeListener(this);
+ super.deactivate();
+ }
+
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddEventListenerHandler.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -15,7 +15,9 @@
import org.jboss.tools.flow.common.command.AddChildCommand;
import org.jboss.tools.flow.common.registry.ElementRegistry;
import org.jboss.tools.flow.common.wrapper.Wrapper;
+import org.jboss.tools.flow.jpdl4.editpart.SequenceFlowTreeRootEditPart;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
public class AddEventListenerHandler extends AbstractHandler implements IHandler {
@@ -38,14 +40,20 @@
Wrapper parent = (Wrapper)model;
Wrapper child;
AddChildCommand addChildCommand = new AddChildCommand();
- if (editPart.getParent() != null && editPart.getParent() instanceof RootEditPart) {
+ if (editPart.getParent() != null
+ && editPart.getParent() instanceof RootEditPart
+ && !(editPart instanceof SequenceFlowTreeRootEditPart)) {
child = ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.eventListenerContainer");
Wrapper wrapper = ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.eventListener");
addChildCommand.setType("eventListener");
child.addChild(EventListenerContainer.LISTENERS, wrapper);
} else {
child = ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.eventListener");
- addChildCommand.setType(EventListenerContainer.LISTENERS);
+ if (parent.getElement() instanceof SequenceFlow) {
+ addChildCommand.setType("listener");
+ } else {
+ addChildCommand.setType(EventListenerContainer.LISTENERS);
+ }
}
addChildCommand.setChild(child);
addChildCommand.setParent(parent);
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddSwimlaneHandler.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -16,8 +16,8 @@
import org.jboss.tools.flow.common.wrapper.Wrapper;
public class AddSwimlaneHandler extends AbstractHandler implements IHandler {
-
- public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ private Wrapper getParent(ExecutionEvent event) throws ExecutionException {
IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage();
if (page == null) return null;
ISelection selection = page.getSelection();
@@ -26,9 +26,18 @@
Object first = structuredSelection.getFirstElement();
if (!(first instanceof EditPart)) return null;
EditPart editPart = (EditPart)first;
- Object model = editPart.getModel();
- if (model == null || !(model instanceof Wrapper)) return null;
- Wrapper parent = (Wrapper)model;
+ while (editPart != null) {
+ Object model = editPart.getModel();
+ if (model != null && model instanceof Wrapper) {
+ return (Wrapper)model;
+ }
+ editPart = editPart.getParent();
+ }
+ return null;
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Wrapper parent = getParent(event);
IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
if (editorPart == null) return null;
Object object = editorPart.getAdapter(CommandStack.class);
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/AddTimerHandler.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -13,12 +13,11 @@
import org.eclipse.ui.handlers.HandlerUtil;
import org.jboss.tools.flow.common.command.AddChildCommand;
import org.jboss.tools.flow.common.registry.ElementRegistry;
-import org.jboss.tools.flow.common.wrapper.FlowWrapper;
import org.jboss.tools.flow.common.wrapper.Wrapper;
public class AddTimerHandler extends AbstractHandler implements IHandler {
- public Object execute(ExecutionEvent event) throws ExecutionException {
+ private Wrapper getParent(ExecutionEvent event) throws ExecutionException {
IWorkbenchPage page = HandlerUtil.getActiveWorkbenchWindowChecked(event).getActivePage();
if (page == null) return null;
ISelection selection = page.getSelection();
@@ -27,9 +26,18 @@
Object first = structuredSelection.getFirstElement();
if (!(first instanceof EditPart)) return null;
EditPart editPart = (EditPart)first;
- Object model = editPart.getModel();
- if (model == null || !(model instanceof FlowWrapper)) return null;
- FlowWrapper flowWrapper = (FlowWrapper)model;
+ while (editPart != null) {
+ Object model = editPart.getModel();
+ if (model != null && model instanceof Wrapper) {
+ return (Wrapper)model;
+ }
+ editPart = editPart.getParent();
+ }
+ return null;
+ }
+
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ Wrapper parent = getParent(event);
IEditorPart editorPart = HandlerUtil.getActiveEditor(event);
if (editorPart == null) return null;
Object object = editorPart.getAdapter(CommandStack.class);
@@ -39,7 +47,7 @@
Wrapper child = ElementRegistry.createWrapper("org.jboss.tools.flow.jpdl4.timer");
addChildCommand.setChild(child);
addChildCommand.setType("timer");
- addChildCommand.setParent(flowWrapper);
+ addChildCommand.setParent(parent);
commandStack.execute(addChildCommand);
return null;
}
Modified: trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java
===================================================================
--- trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java 2009-05-26 20:53:13 UTC (rev 15523)
+++ trunk/jbpm/plugins/org.jboss.tools.flow.jpdl4/src/org/jboss/tools/flow/jpdl4/handler/DeleteElementHandler.java 2009-05-26 22:20:57 UTC (rev 15524)
@@ -16,8 +16,10 @@
import org.jboss.tools.flow.common.model.Element;
import org.jboss.tools.flow.common.wrapper.Wrapper;
import org.jboss.tools.flow.jpdl4.Logger;
+import org.jboss.tools.flow.jpdl4.editpart.EventListenerListTreeEditPart;
import org.jboss.tools.flow.jpdl4.model.EventListener;
import org.jboss.tools.flow.jpdl4.model.EventListenerContainer;
+import org.jboss.tools.flow.jpdl4.model.SequenceFlow;
import org.jboss.tools.flow.jpdl4.model.Swimlane;
import org.jboss.tools.flow.jpdl4.model.Timer;
@@ -52,7 +54,11 @@
} else if (child.getElement() instanceof Timer) {
deleteChildCommand.setType("timer");
} else if (child.getElement() instanceof EventListener) {
- deleteChildCommand.setType(EventListenerContainer.LISTENERS);
+ if (parent.getElement() instanceof SequenceFlow) {
+ deleteChildCommand.setType("listener");
+ } else {
+ deleteChildCommand.setType(EventListenerContainer.LISTENERS);
+ }
} else if (child.getElement() instanceof EventListenerContainer) {
deleteChildCommand.setType("eventListener");
}
@@ -66,10 +72,10 @@
}
private EditPart getParentEditPart(Element element, EditPart editPart) {
- if (element instanceof Swimlane || element instanceof Timer) {
+ if (editPart.getParent() instanceof EventListenerListTreeEditPart) {
+ return editPart.getParent();
+ } else {
return getRootEditPart(editPart);
- } else {
- return editPart.getParent();
}
}
17 years, 1 month
JBoss Tools SVN: r15523 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 16:53:13 -0400 (Tue, 26 May 2009)
New Revision: 15523
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2808
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 20:48:54 UTC (rev 15522)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/PageProcessor.java 2009-05-26 20:53:13 UTC (rev 15523)
@@ -23,6 +23,15 @@
*/
public class PageProcessor implements IProposalProcessor {
+ private static final PageProcessor INSTANCE = new PageProcessor();
+
+ public static PageProcessor getInstance() {
+ return INSTANCE;
+ }
+
+ private PageProcessor() {
+ }
+
/*
* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.ProposalProcessor#getProposals(org.jboss.tools.jst.web.kb.KbQuery, org.jboss.tools.jst.web.kb.PageContext)
17 years, 1 month
JBoss Tools SVN: r15522 - in trunk/seam/tests/org.jboss.tools.seam.core.test: src/org/jboss/tools/seam/core/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 16:48:54 -0400 (Tue, 26 May 2009)
New Revision: 15522
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4378 Fixed
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-26 20:44:06 UTC (rev 15521)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-26 20:48:54 UTC (rev 15522)
@@ -16,7 +16,7 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.wst.validation.validationbuilder</name>
+ <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
<arguments>
</arguments>
</buildCommand>
@@ -25,18 +25,13 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>org.hibernate.eclipse.console.hibernateBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
+ <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
- <nature>org.hibernate.eclipse.console.hibernateNature</nature>
</natures>
</projectDescription>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 20:44:06 UTC (rev 15521)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 20:48:54 UTC (rev 15522)
@@ -477,11 +477,11 @@
}
public void testFactoriesValidator() {
- IFile �omponent12File = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.java");
+ IFile component12File = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.java");
refreshProject(project);
- int number = getMarkersNumber(�omponent12File);
+ int number = getMarkersNumber(component12File);
assertTrue("Problem marker was found in Component12.java", number == 0);
// Unknown factory name
@@ -489,7 +489,7 @@
IFile �omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
try{
- �omponent12File.setContents(�omponent12File2.getContents(), true, false, null);
+ component12File.setContents(�omponent12File2.getContents(), true, false, null);
}catch(Exception ex){
JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
"'Component12File2.2'", ex);
@@ -497,20 +497,20 @@
refreshProject(project);
- number = getMarkersNumber(�omponent12File);
+ number = getMarkersNumber(component12File);
assertFalse("Problem marker 'Unknown factory name' was not found", number == 0);
- String[] messages = getMarkersMessage(�omponent12File);
+ String[] messages = getMarkersMessage(component12File);
assertEquals("Problem marker 'Unknown factory name' was not found", "Factory method \"messageList2\" with a void return type must have an associated @Out/Databinder", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(�omponent12File);
+ int[] lineNumbers = getMarkersNumbersOfLine(component12File);
assertEquals("Problem marker has wrong line number", 24, lineNumbers[0]);
�omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory");
try{
- �omponent12File.setContents(�omponent12File2.getContents(), true, false, null);
+ component12File.setContents(�omponent12File2.getContents(), true, false, null);
}catch(Exception ex){
JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
"'DuplicateFactory'", ex);
@@ -518,7 +518,7 @@
refreshProject(project);
- number = getMarkersNumber(�omponent12File);
+ number = getMarkersNumber(component12File);
assertEquals("Duplicate factory name markers were not found", 2, number);
}
17 years, 1 month
JBoss Tools SVN: r15521 - in trunk/seam: tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-05-26 16:44:06 -0400 (Tue, 26 May 2009)
New Revision: 15521
Added:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4378 Fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2009-05-26 18:07:05 UTC (rev 15520)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamCoreValidator.java 2009-05-26 20:44:06 UTC (rev 15521)
@@ -36,7 +36,6 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.seam.core.BijectedAttributeType;
import org.jboss.tools.seam.core.IBijectedAttribute;
-import org.jboss.tools.seam.core.IRole;
import org.jboss.tools.seam.core.ISeamAnnotatedFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
@@ -284,22 +283,13 @@
private void validateAnnotatedFactory(ISeamAnnotatedFactory factory, Set<String> markedDuplicateFactoryNames) {
IMember sourceMember = factory.getSourceMember();
if(sourceMember instanceof IMethod) {
- IMethod method = (IMethod)sourceMember;
- try {
- String returnType = method.getReturnType();
- if("V".equals(returnType)) { //$NON-NLS-1$
- // return type is void
- String factoryName = factory.getName();
- if(factoryName==null) {
- // Unknown factory name
- SeamCorePlugin.getDefault().logError(NLS.bind(SeamCoreMessages.SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME,factory.getResource()));
- return;
- }
- validateFactoryName(factory, factoryName, markedDuplicateFactoryNames, true);
- }
- } catch (JavaModelException e) {
- SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE, e);
+ String factoryName = factory.getName();
+ if(factoryName==null) {
+ // Unknown factory name
+ SeamCorePlugin.getDefault().logError(NLS.bind(SeamCoreMessages.SEAM_CORE_VALIDATOR_FACTORY_METHOD_MUST_HAVE_NAME,factory.getResource()));
+ return;
}
+ validateFactoryName(factory, factoryName, markedDuplicateFactoryNames, true);
} else {
// factory must be java method!
// JDT should mark it.
@@ -341,7 +331,23 @@
if(firstDuplicateVariableWasMarked) {
markedDuplicateFactoryNames.add(factoryName);
}
- if(unknownVariable && validateUnknownName) {
+ boolean voidReturnType = false;
+ if(factory instanceof ISeamAnnotatedFactory) {
+ IMember sourceMember = ((ISeamAnnotatedFactory)factory).getSourceMember();
+ if(sourceMember instanceof IMethod) {
+ IMethod method = (IMethod)sourceMember;
+ try {
+ String returnType = method.getReturnType();
+ if("V".equals(returnType)) { //$NON-NLS-1$
+ // return type is void
+ voidReturnType = true;
+ }
+ } catch (JavaModelException e) {
+ SeamCorePlugin.getDefault().logError(SeamCoreMessages.SEAM_CORE_VALIDATOR_ERROR_VALIDATING_SEAM_CORE, e);
+ }
+ }
+ }
+ if(unknownVariable && validateUnknownName && voidReturnType) {
// mark unknown factory name
// save link to factory resource
validationContext.addLinkedCoreResource(factoryName, factory.getSourcePath());
Added: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory (rev 0)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory 2009-05-26 20:44:06 UTC (rev 15521)
@@ -0,0 +1,25 @@
+package org.domain.SeamWebWarTestProject.session;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.seam.annotations.Name;
+import org.jboss.seam.annotations.Factory;
+import org.jboss.seam.annotations.In;
+import org.jboss.seam.annotations.Logger;
+import org.jboss.seam.annotations.datamodel.DataModel;
+import org.jboss.seam.log.Log;
+import org.jboss.seam.core.FacesMessages;
+
+@Name("component12")
+public class Component12 {
+ @Factory("testFactory1")
+ public String getComp() {
+ return "";
+ }
+
+ @Factory("testFactory1")
+ public String getComp2() {
+ return "";
+ }
+}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-26 18:07:05 UTC (rev 15520)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/Test1-ejb/.project 2009-05-26 20:44:06 UTC (rev 15521)
@@ -16,7 +16,7 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.jboss.ide.eclipse.archives.core.archivesBuilder</name>
+ <name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
@@ -25,13 +25,18 @@
<arguments>
</arguments>
</buildCommand>
+ <buildCommand>
+ <name>org.hibernate.eclipse.console.hibernateBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
- <nature>org.jboss.ide.eclipse.archives.core.archivesNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.jboss.tools.seam.core.seamnature</nature>
+ <nature>org.hibernate.eclipse.console.hibernateNature</nature>
</natures>
</projectDescription>
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2009-05-26 18:07:05 UTC (rev 15520)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamCoreAllTests.java 2009-05-26 20:44:06 UTC (rev 15521)
@@ -13,10 +13,6 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.tools.seam.core.test.project.facet.Seam12XFacetTestSuite121EAP;
-import org.jboss.tools.seam.core.test.project.facet.Seam20XFacetTestSuite201GA;
-import org.jboss.tools.seam.core.test.project.facet.Seam2FacetInstallDelegateTest;
-import org.jboss.tools.seam.core.test.project.facet.SeamFacetInstallDelegateTest;
import org.jboss.tools.seam.core.test.project.facet.SeamRuntimeListConverterTest;
import org.jboss.tools.seam.core.test.project.facet.SeamRuntimeManagerTest;
import org.jboss.tools.seam.core.test.refactoring.SeamRefactoringAllTests;
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 18:07:05 UTC (rev 15520)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2009-05-26 20:44:06 UTC (rev 15521)
@@ -477,19 +477,19 @@
}
public void testFactoriesValidator() {
- IFile Component12File = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.java");
+ IFile �omponent12File = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.java");
refreshProject(project);
- int number = getMarkersNumber(Component12File);
+ int number = getMarkersNumber(�omponent12File);
assertTrue("Problem marker was found in Component12.java", number == 0);
// Unknown factory name
System.out.println("Test - Unknown factory name");
- IFile Component12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
+ IFile �omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/Component12.2");
try{
- Component12File.setContents(Component12File2.getContents(), true, false, null);
+ �omponent12File.setContents(�omponent12File2.getContents(), true, false, null);
}catch(Exception ex){
JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
"'Component12File2.2'", ex);
@@ -497,18 +497,31 @@
refreshProject(project);
- number = getMarkersNumber(Component12File);
+ number = getMarkersNumber(�omponent12File);
assertFalse("Problem marker 'Unknown factory name' was not found", number == 0);
- String[] messages = getMarkersMessage(Component12File);
+ String[] messages = getMarkersMessage(�omponent12File);
assertEquals("Problem marker 'Unknown factory name' was not found", "Factory method \"messageList2\" with a void return type must have an associated @Out/Databinder", messages[0]);
- int[] lineNumbers = getMarkersNumbersOfLine(Component12File);
+ int[] lineNumbers = getMarkersNumbersOfLine(�omponent12File);
assertEquals("Problem marker has wrong line number", 24, lineNumbers[0]);
+
+ �omponent12File2 = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/DuplicateFactory");
+ try{
+ �omponent12File.setContents(�omponent12File2.getContents(), true, false, null);
+ }catch(Exception ex){
+ JUnitUtils.fail("Error in changing 'Component12File2.java' content to " +
+ "'DuplicateFactory'", ex);
+ }
+
+ refreshProject(project);
+
+ number = getMarkersNumber(�omponent12File);
+ assertEquals("Duplicate factory name markers were not found", 2, number);
}
-
+
public void testBijectionsValidator() {
IFile selectionTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionTest.java");
IFile selectionIndexTestFile = project.getFile("src/action/org/domain/SeamWebWarTestProject/session/SelectionIndexTest.java");
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-26 18:07:05 UTC (rev 15520)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/refactoring/SeamComponentRefactoringTest.java 2009-05-26 20:44:06 UTC (rev 15521)
@@ -3,13 +3,13 @@
import java.util.ArrayList;
import java.util.List;
+import junit.framework.TestCase;
+
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
-import org.eclipse.ltk.core.refactoring.TextFileChange;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamProject;
@@ -18,8 +18,6 @@
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
-import junit.framework.TestCase;
-
public class SeamComponentRefactoringTest extends TestCase {
static String warProjectName = "Test1";
static String earProjectName = "Test1-ear";
@@ -56,6 +54,7 @@
private ISeamProject loadSeamProject(IProject project) throws CoreException {
JobUtils.waitForIdle();
+
System.out.println("Project - "+project);
ISeamProject seamProject = SeamCorePlugin.getSeamProject(project, true);
assertNotNull("Seam project for " + project.getName() + " is null", seamProject);
@@ -113,7 +112,6 @@
}
private void renameComponent(ISeamProject seamProject, String componentName, String newName, List<TestChangeStructure> changeList) throws CoreException{
-
// Test before renaming
ISeamComponent component = seamProject.getComponent(componentName);
assertNotNull(component);
@@ -125,9 +123,8 @@
assertNotSame(changeStructure.getText(), content.substring(changeStructure.getOffset(), changeStructure.getOffset()+changeStructure.getLength()));
}
- if(component.getJavaDeclaration() == null)
- fail("Component 'test' does not have java declaration");
-
+ assertNotNull("Component " + component.getName() + " does not have java declaration.", component.getJavaDeclaration());
+
// Rename Seam Component
RenameComponentProcessor processor = new RenameComponentProcessor(component);
processor.setNewComponentName(newName);
17 years, 1 month
JBoss Tools SVN: r15520 - in trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog: common and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-05-26 14:07:05 -0400 (Tue, 26 May 2009)
New Revision: 15520
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4370
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-26 18:03:53 UTC (rev 15519)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/CSSClassDialog.java 2009-05-26 18:07:05 UTC (rev 15520)
@@ -258,7 +258,9 @@
}
public void releaseResources() {
-
+
+ preview.releaseModel();
+
if (cssModel != null) {
cssModel.release();
cssModel = null;
@@ -301,6 +303,7 @@
}
public void reinit() {
+ preview.releaseModel();
cssModel.setFile(file);
cssModel.reinit();
preview.reinit(cssModel);
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-05-26 18:03:53 UTC (rev 15519)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/CSSModel.java 2009-05-26 18:07:05 UTC (rev 15520)
@@ -220,7 +220,7 @@
public void release() {
IModelManager modelManager = StructuredModelManager.getModelManager();
- if ((model != null) && !modelManager.isShared(model.getId()) /* copy */) {
+ if ((model != null) /* && !modelManager.isShared(model.getId()) */) {
model.releaseFromEdit();
}
model = null;
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java 2009-05-26 18:03:53 UTC (rev 15519)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/tabs/TabPreviewControl.java 2009-05-26 18:07:05 UTC (rev 15520)
@@ -81,9 +81,15 @@
}
public void reinit(ICSSDialogModel cssModel) {
+ this.cssModel = cssModel;
viewer.setDocument(cssModel.getDocument());
}
+ public void releaseModel() {
+ viewer.setDocument(null);
+ cssModel = null;
+ }
+
/**
*
* @param selector
17 years, 1 month
JBoss Tools SVN: r15519 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2009-05-26 14:03:53 -0400 (Tue, 26 May 2009)
New Revision: 15519
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4262
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-26 17:07:23 UTC (rev 15518)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/refactoring/SeamComponentRenameHandler.java 2009-05-26 18:03:53 UTC (rev 15519)
@@ -51,6 +51,8 @@
public Object execute(ExecutionEvent event) throws ExecutionException {
IEditorPart editor = HandlerUtil.getActiveEditor(event);
Shell activeShell = HandlerUtil.getActiveShell(event);
+
+ saveAndBuild();
IEditorInput input = editor.getEditorInput();
if (input instanceof IFileEditorInput) {
@@ -79,15 +81,8 @@
}
public static void invokeRenameWizard(ISeamComponent component, Shell activeShell) {
- if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
- return;
+ saveAndBuild();
- try {
- Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
- } catch (InterruptedException e) {
- // do nothing
- }
-
RenameComponentProcessor processor = new RenameComponentProcessor(component);
RenameComponentRefactoring refactoring = new RenameComponentRefactoring(processor);
RenameComponentWizard wizard = new RenameComponentWizard(refactoring, component);
@@ -99,4 +94,15 @@
// operation was canceled
}
}
+
+ private static void saveAndBuild(){
+ if(!SeamGuiPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage().saveAllEditors(true))
+ return;
+
+ try {
+ Job.getJobManager().join(ResourcesPlugin.FAMILY_AUTO_BUILD, null);
+ } catch (InterruptedException e) {
+ // do nothing
+ }
+ }
}
17 years, 1 month
JBoss Tools SVN: r15518 - in trunk: jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-05-26 13:07:23 -0400 (Tue, 26 May 2009)
New Revision: 15518
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3969,check if element in parent have select item or not has been added for mac os platform
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3969/jbide3969.xhtml 2009-05-26 17:07:23 UTC (rev 15518)
@@ -0,0 +1,12 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+<ui:composition template="">
+<h:selectOneMenu value="#{test.test}">
+<div>a<div>t</div></div>
+</h:selectOneMenu>
+</ui:composition>
+</html>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-26 16:37:03 UTC (rev 15517)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-05-26 17:07:23 UTC (rev 15518)
@@ -55,6 +55,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3632Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3650Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3734Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE3969Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4037Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4373Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE675Test;
@@ -140,6 +141,7 @@
suite.addTestSuite(JBIDE3197Test.class);
suite.addTestSuite(JBIDE4373Test.class);
suite.addTestSuite(JBIDE675Test.class);
+ suite.addTestSuite(JBIDE3969Test.class);
// $JUnit-END$
// added by Max Areshkau
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE3969Test.java 2009-05-26 17:07:23 UTC (rev 15518)
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2008 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.part.FileEditorInput;
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.jst.jsp.jspeditor.JSPMultiPageEditor;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+
+/**
+ * @author mareshkau
+ *
+ */
+public class JBIDE3969Test extends VpeTest{
+
+ public JBIDE3969Test(String name) {
+ super(name);
+ }
+
+ public void testCorrectCustomElements() throws Throwable {
+ // set exception
+ setException(null);
+
+ // get test page path
+ IFile file = (IFile) TestUtil.getComponentPath("JBIDE/3969/jbide3969.xhtml",
+ JsfAllTests.IMPORT_PROJECT_NAME);
+
+ IEditorInput input = new FileEditorInput(file);
+
+ // open and get editor
+ JSPMultiPageEditor part = openEditor(input);
+
+ checkSourceSelection(part);
+
+ // check exception
+ if (getException() != null) {
+ throw getException();
+ }
+ }
+}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-26 16:37:03 UTC (rev 15517)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/XulRunnerEditor.java 2009-05-26 17:07:23 UTC (rev 15518)
@@ -396,7 +396,7 @@
}else {
getIFlasher().setColor(flasherHiddentElementColor);
}
- getIFlasher().drawElementOutline(element);
+ drawElementOutline(element);
}else {
getIFlasher().setColor(flasherHiddentElementColor);
@@ -404,7 +404,7 @@
if(domElement!=null) {
- getIFlasher().drawElementOutline(domElement);
+ drawElementOutline(domElement);
}
}
@@ -561,17 +561,17 @@
getIFlasher().setColor(flasherHiddentElementColor);
}
- getIFlasher().drawElementOutline(getLastSelectedElement());
+ drawElementOutline(getLastSelectedElement());
}else {
getIFlasher().setColor(flasherHiddentElementColor);
nsIDOMElement domElement = findVisbleParentElement(getLastSelectedElement());
if(domElement!=null) {
- getIFlasher().drawElementOutline(domElement);
+ drawElementOutline(domElement);
}
}
- } else if(getIFlasher()!=null&&Platform.getOSArch().equals(Platform.OS_MACOSX)){
+ } else if(getIFlasher()!=null&&Platform.OS_MACOSX.equals(Platform.getOS())){
//Max Areshkau (bug on Mac OS X, when we switch to preview from other view, selection rectangle doesn't disappear
//TODO Max Areshkau (may be exist passability not draw selection on resize event when we switches to other view)
try {
@@ -653,6 +653,34 @@
return null;
}
+ /**
+ * Decorator
+ * @author mareshkau
+ * @param domElement arround which border will be shown
+ *
+ */
+ private void drawElementOutline(nsIDOMElement domElement) {
+ //fix for JBIDE-3969
+ if(Platform.OS_MACOSX.equals(Platform.getOS())&&hasSelectInParenNodes(domElement.getParentNode())) {
+ return;
+ }
+ getIFlasher().drawElementOutline(domElement);
+ }
+ /**
+ * Checks if node has select in parent node, if has it's cause crash
+ * on OSX and xulrunner 1.8.1.3
+ * @param domElement
+ * @return
+ */
+ private boolean hasSelectInParenNodes(nsIDOMNode domNode){
+ if(domNode==null) {
+ return false;
+ }else if("select".equalsIgnoreCase(domNode.getNodeName())){
+ return true;
+ } else {
+ return hasSelectInParenNodes(domNode.getParentNode());
+ }
+ }
}
17 years, 1 month