JBoss Tools SVN: r19022 - in trunk: jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-12-03 08:41:45 -0500 (Thu, 03 Dec 2009)
New Revision: 19022
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/converter/OpenKeyHelper.java
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/browser/XulRunnerBrowser.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/ILocaleProvider.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/MainLocaleProvider.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5218, locale attribute was added to f:view
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/converter/OpenKeyHelper.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/converter/OpenKeyHelper.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/helpers/converter/OpenKeyHelper.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -71,15 +71,32 @@
}
public static String getDeafultLocale(XModel model) {
+ String facesConfigLocale = getDeafultLocaleFromFacesConfig(model);
+ if (facesConfigLocale.length() == 0) {
+ Locale locale = Locale.getDefault();
+ facesConfigLocale = locale == null || locale.toString().length() == 0 ? null : locale.toString();
+ }
+ return facesConfigLocale;
+ }
+
+ /**
+ * Gets the default locale from faces config file.
+ *
+ * @param model XModel
+ * @return locale string or empty string if no locale was found
+ */
+ public static String getDeafultLocaleFromFacesConfig(XModel model) {
+ String facesConfigLocale = ""; //$NON-NLS-1$
JSFProjectsRoot root = JSFProjectsTree.getProjectsRoot(model);
WebProjectNode conf = root == null ? null : (WebProjectNode)root.getChildByPath(JSFProjectTreeConstants.CONFIGURATION);
XModelObject[] fs = conf == null ? new XModelObject[0] : conf.getTreeChildren();
for (int i = 0; i < fs.length; i++) {
XModelObject o = fs[i].getChildByPath("application/Locale Config"); //$NON-NLS-1$
String res = (o == null) ? "" : o.getAttributeValue("default-locale"); //$NON-NLS-1$ //$NON-NLS-2$
- if(res != null && res.length() > 0) return res;
+ if(res != null && res.length() > 0) {
+ facesConfigLocale = res;
+ }
}
- Locale locale = Locale.getDefault();
- return locale == null || locale.toString().length() == 0 ? null : locale.toString();
+ return facesConfigLocale;
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/i18n/JsfLocaleProvider.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -28,6 +28,11 @@
*/
public class JsfLocaleProvider implements ILocaleProvider {
+ /*
+ * Stores the string representation of the current locale.
+ */
+ private String localeString = ""; //$NON-NLS-1$
+
/**
* Returns the locale for given {@code editor}, or {@code null} if it
* can not determine it.
@@ -39,9 +44,15 @@
.getFile().getProject();
XModel model = EclipseResourceUtil.getModelNature(project)
.getModel();
- return new Locale(OpenKeyHelper.getDeafultLocale(model));
+ localeString = OpenKeyHelper.getDeafultLocaleFromFacesConfig(model);
+ return new Locale(localeString);
} else {
return null;
}
}
+
+ public String getLocaleString() {
+ return localeString;
+ }
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfView.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -12,11 +12,15 @@
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
+import org.jboss.tools.jsf.vpe.jsf.template.util.ComponentUtil;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.i18n.MainLocaleProvider;
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.Constants;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -26,12 +30,16 @@
import org.w3c.dom.NodeList;
/**
+ * Creates template for JSF f:view tag.
+ * <p>Parses the locale attribute.
+ * <p>Adds nested children.
+ *
* @author dmaliarevich
- *
*/
public class JsfView extends VpeAbstractTemplate {
private static String TABLE_WIDTH_STYLE = "width: 100%;"; //$NON-NLS-1$
+ private static String ATTR_LOCALE = "locale"; //$NON-NLS-1$
/**
* Instantiates a new jsf view.
@@ -55,7 +63,50 @@
td.appendChild(div);
tr.appendChild(td);
table.appendChild(tr);
+
+ /*
+ * Variables that are used in locale processing.
+ * By default Locale object will be created for the empty string.
+ */
+ String localeString = Constants.EMPTY;
+ Locale locale = null;
+ /*
+ * 1. Get locale value.
+ *
+ * 1.1 Parse EL expression from locale atrribute:
+ * VPE cannot resolve runtime values for EL expressions,
+ * only Substituted and Global EL expression will be resolved.
+ * These expressions are parsed before template creating
+ * in VpeVisualDomBuilder, f:view template has already got parsed el.
+ *
+ * 1.2 If there is a default locale specified - use it in any case,
+ * otherwise get the locale from the attribute.
+ */
+ String defaultLocaleString = MainLocaleProvider.getInstance().getLocaleString();
+ if (ComponentUtil.isNotBlank(defaultLocaleString)) {
+ localeString = defaultLocaleString;
+ } else {
+ String localeAttribute = sourceElement.getAttribute(ATTR_LOCALE);
+ if (ComponentUtil.isNotBlank(localeAttribute)) {
+ localeString = localeAttribute;
+ }
+ }
+
+ /*
+ * 2. Create Locale object from locale string.
+ */
+ locale = createLocale(localeString);
+
+ /*
+ * 3. Get bundles for this Locale and Refresh the page.
+ * If there is no locale attribute in f:view - use default locale,
+ * that is got from MainLocaleProvider.
+ * When Default Locate is found - use it in any case.
+ */
+ pageContext.getBundle().setLocale(locale);
+ pageContext.getBundle().refreshRegisteredBundles();
+
VpeCreationData creationData = new VpeCreationData(table);
VpeChildrenInfo divInfo = new VpeChildrenInfo(div);
creationData.addChildrenInfo(divInfo);
@@ -68,6 +119,27 @@
}
/**
+ * Creates the locale.
+ * <p>If the locale string could be parsed into language and country -
+ * creates Locale for this arguments.
+ * <p> By default - locale for empty string is created.
+ *
+ * @param localeString the locale string
+ * @return Locale object
+ */
+ Locale createLocale(String localeString) {
+ Locale newLocale = null;
+ if (localeString.length() == 2) {
+ newLocale = new Locale(localeString);
+ } else if ((localeString.length() == 5) && (localeString.indexOf("_") == 2)) { //$NON-NLS-1$
+ newLocale = new Locale(localeString.substring(0, 2), localeString.substring(3));
+ } else {
+ newLocale = new Locale(Constants.EMPTY);
+ }
+ return newLocale;
+ }
+
+ /**
* Gets the children.
*
* @param sourceElement the source element
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-12-03 13:39:04 UTC (rev 19021)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -67,6 +67,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4509Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4510Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE4534Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE5218Test;
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;
@@ -180,6 +181,8 @@
suite.addTestSuite(VPERefreshTest.class);
suite.addTestSuite(OpenOnInsideJspRoot_JBIDE4852.class);
suite.addTestSuite(NullPointerWithStyleProperty_JBIDE5193.class);
+ suite.addTestSuite(JBIDE5218Test.class);
+
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/bundle/BundleMap.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -62,8 +62,11 @@
private StructuredTextEditor editor;
private String[] javaSources;
-
- private BundleEntry[] bundles = new BundleEntry[0];
+ /*
+ * Stores the current VPE locale.
+ */
+ private Locale locale;
+ private BundleEntry[] bundles = new BundleEntry[0];
private Map<String,UsedKey> usedKeys = new HashMap<String,UsedKey>();
boolean isShowBundleUsageAsEL = JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
@@ -78,25 +81,53 @@
if (input instanceof IFileEditorInput) {
javaSources = getJavaProjectSrcLocations(((IFileEditorInput)input).getFile().getProject());
}
+ /*
+ * Initialize the locale with default value.
+ */
+ locale = MainLocaleProvider.getInstance().getLocale(editor);
refreshRegisteredBundles();
PreferenceModelUtilities.getPreferenceModel().addModelTreeListener(modelListener);
}
public void refreshRegisteredBundles() {
- if (!hasJsfProjectNatureType() || !(editor.getEditorInput() instanceof IFileEditorInput)) return;
- IProject project = ((IFileEditorInput)editor.getEditorInput()).getFile().getProject();
+ if (!hasJsfProjectNatureType()
+ || !(editor.getEditorInput() instanceof IFileEditorInput)) {
+ return;
+ }
+ IProject project = ((IFileEditorInput) editor.getEditorInput())
+ .getFile().getProject();
XModel model = EclipseResourceUtil.getModelNature(project).getModel();
- List<Object> l = WebPromptingProvider.getInstance().getList(model, WebPromptingProvider.JSF_REGISTERED_BUNDLES, null, null);
- if(l == null || l.size() < 2 || !(l.get(1) instanceof Map)) return;
- Map<?,?> map = (Map<?,?>)l.get(1);
- Iterator<?> it = map.keySet().iterator();
- while(it.hasNext()) {
- String uri = it.next().toString();
- String prefix = map.get(uri).toString();
- int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
- removeBundle(hash);
- addBundle(hash, prefix, uri, true);
+ List<Object> l = WebPromptingProvider.getInstance().getList(model,
+ WebPromptingProvider.JSF_REGISTERED_BUNDLES, null, null);
+ if (l == null || l.size() < 2 || !(l.get(1) instanceof Map)) {
+ return;
}
+ Map<?, ?> map = (Map<?, ?>) l.get(1);
+ /*
+ * Fix for https://jira.jboss.org/jira/browse/JBIDE-5218
+ * When updating f:view's locale attribute right after template creation -
+ * map of registered bundles is empty and couldn't be updated.
+ * To change bundle's locale they should be accessed through
+ * <code>bundles</code> variable.
+ */
+ if (map.keySet().size() > 0) {
+ Iterator<?> it = map.keySet().iterator();
+ while (it.hasNext()) {
+ String uri = it.next().toString();
+ String prefix = map.get(uri).toString();
+ int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
+ removeBundle(hash);
+ addBundle(hash, prefix, uri, true);
+ }
+ } else if (bundles.length > 0) {
+ for (int i = 0; i < bundles.length; i++) {
+ String uri = bundles[i].uri;
+ String prefix = bundles[i].prefix;
+ int hash = (prefix + ":" + uri).hashCode(); //$NON-NLS-1$
+ removeBundle(hash);
+ addBundle(hash, prefix, uri, true);
+ }
+ }
}
public void clearAll() {
@@ -207,7 +238,8 @@
return null;
}
- private ResourceBundle getBundleByUrl(String uri) {
+
+ private ResourceBundle getBundleByUrl(String uri, Locale locale) {
try {
if (javaSources!=null) {
File file;
@@ -223,8 +255,6 @@
}
ClassLoader classLoader = new URLClassLoader(urls, ClassLoader.getSystemClassLoader());
-
- Locale locale = MainLocaleProvider.getInstance().getLocale(editor);
ResourceBundle bundle = ResourceBundle.getBundle(uri, locale, classLoader);
return bundle;
@@ -272,7 +302,7 @@
}
private void addBundle(int hashCode, String prefix, String uri,boolean refresh) {
- ResourceBundle bundle = getBundleByUrl(uri);
+ ResourceBundle bundle = getBundleByUrl(uri, locale);
BundleEntry entry = new BundleEntry(bundle, uri, prefix, hashCode);
if (bundle != null) {
BundleEntry[] newBundles = new BundleEntry[bundles.length + 1];
@@ -480,11 +510,20 @@
refresh();
}
}
+
public void updateShowBundleUsageAsEL() {
updateShowBundleUsageAsEL(JspEditorPlugin.getDefault().getPreferenceStore().getBoolean(
IVpePreferencesPage.SHOW_RESOURCE_BUNDLES_USAGE_AS_EL));
}
+ public Locale getLocale() {
+ return locale;
+ }
+
+ public void setLocale(Locale locale) {
+ this.locale = locale;
+ }
+
static class Expression {
public String prefix;
public String propertyName;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/ILocaleProvider.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/ILocaleProvider.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/ILocaleProvider.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -13,6 +13,7 @@
import java.util.Locale;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.common.model.XModel;
/**
* This interface is intended for creation extensions of {@code localeProvider}
@@ -26,4 +27,12 @@
* may return {@code null} if they can not determine the locale.
*/
Locale getLocale(StructuredTextEditor editor);
+
+ /**
+ * Shows the string representation of the locale
+ * returned by #getLocale(StructuredTextEditor) method.
+ *
+ * @return the string representation of the locale
+ */
+ String getLocaleString();
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/MainLocaleProvider.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/MainLocaleProvider.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/i18n/MainLocaleProvider.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -51,6 +51,8 @@
.getExtensionPoint(VpePlugin.EXTESION_POINT_LOCALE_PROVIDER);
private static MainLocaleProvider instance;
+ private String localeString = ""; //$NON-NLS-1$
+
private MainLocaleProvider() {
// private constructor
initNatureExtensionsMap();
@@ -83,6 +85,7 @@
for (ILocaleProvider provider : getProviders(natureId)) {
Locale locale = provider.getLocale(editor);
if (locale != null) {
+ localeString = provider.getLocaleString();
return locale;
}
}
@@ -180,4 +183,9 @@
}
return provider;
}
+
+ public String getLocaleString() {
+ return localeString;
+ }
+
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2009-12-03 13:39:04 UTC (rev 19021)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2009-12-03 13:41:45 UTC (rev 19022)
@@ -13,6 +13,7 @@
import java.io.File;
import java.io.IOException;
+import java.lang.reflect.Method;
import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Platform;
15 years, 1 month
JBoss Tools SVN: r19021 - in branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks: graphical/editors/commands and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-03 08:39:04 -0500 (Thu, 03 Dec 2009)
New Revision: 19021
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5365
Auto-expanded bean models should have concrete class implementations where a bean property is an Interface/Abstract
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java 2009-12-03 13:28:20 UTC (rev 19020)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/configuration/editors/javabean/JavaBeanModel.java 2009-12-03 13:39:04 UTC (rev 19021)
@@ -21,8 +21,12 @@
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Map;
import java.util.Properties;
+import java.util.Set;
import org.jboss.tools.smooks.configuration.editors.IXMLStructuredObject;
import org.jboss.tools.smooks.configuration.editors.uitls.JavaPropertyUtils;
@@ -225,7 +229,7 @@
JavaBeanModel(Class beanClass, String beanName, PropertyDescriptor propertyDescriptor, Class parentClass,
boolean lazyLoadProperties) {
this.lazyLoadProperties = lazyLoadProperties;
- this.beanClass = beanClass;
+ this.beanClass = toConcreteImpl(beanClass);
this.name = beanName;
if (beanClass == null)
return;
@@ -287,6 +291,23 @@
this(beanClass, null, null, null, lazyLoadProperties);
}
+ private Class<? extends Object> toConcreteImpl(Class declaredType) {
+
+ // Intentionally not doing an isAssignableFrom test... want to know is it the
+ // the exact class...
+ if(declaredType == List.class) {
+ return ArrayList.class;
+ } else if(declaredType == Set.class) {
+ return LinkedHashSet.class;
+ } else if(declaredType == Collection.class) {
+ return ArrayList.class;
+ } else if(declaredType == Map.class) {
+ return LinkedHashMap.class;
+ }
+
+ return declaredType;
+ }
+
public boolean isPrimitive() {
Class<?> beanType = getBeanClass();
if (beanType == null)
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java 2009-12-03 13:28:20 UTC (rev 19020)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java 2009-12-03 13:39:04 UTC (rev 19021)
@@ -115,24 +115,22 @@
((BeanType) parent).setClass(parentBeanModel.getBeanClassString());
if (properties != null && properties.length > 0) {
for (int i = 0; i < properties.length; i++) {
- Object pro = properties[i];
- if (pro instanceof JavaBeanModel && belongsToMe(parentBeanModel, (JavaBeanModel) pro)) {
- if (((JavaBeanModel) pro).isPrimitive()) {
+ Object beanPropertyObj = properties[i];
+ if (beanPropertyObj instanceof JavaBeanModel && belongsToMe(parentBeanModel, (JavaBeanModel) beanPropertyObj)) {
+ JavaBeanModel beanProperty = (JavaBeanModel) beanPropertyObj;
+ if (beanProperty.isPrimitive()) {
ValueType value = Javabean12Factory.eINSTANCE.createValueType();
- value.setProperty(((JavaBeanModel) pro).getName());
+ value.setProperty(beanProperty.getName());
((BeanType) parent).getValue().add(value);
} else {
WiringType value = Javabean12Factory.eINSTANCE.createWiringType();
- if (((JavaBeanModel) parentBeanModel).isArray()
- || ((JavaBeanModel) parentBeanModel).isList()) {
-
- } else {
- value.setProperty(((JavaBeanModel) pro).getName());
+ if (!parentBeanModel.isArray() && !parentBeanModel.isList()) {
+ value.setProperty(beanProperty.getName());
}
- String refID = generateBeanID((JavaBeanModel) pro, resourceListType, ids);
+ String refID = generateBeanID(beanProperty, resourceListType, ids);
value.setBeanIdRef(refID);
((BeanType) parent).getWiring().add(value);
- creationObject.addAll(createJavaBeanModel(type, (JavaBeanModel) pro, properties,
+ creationObject.addAll(createJavaBeanModel(type, beanProperty, properties,
resourceListType, ids));
}
}
15 years, 1 month
JBoss Tools SVN: r19020 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2009-12-03 08:28:20 -0500 (Thu, 03 Dec 2009)
New Revision: 19020
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/FileFilter.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5305
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/FileFilter.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/FileFilter.java 2009-12-03 13:20:42 UTC (rev 19019)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/FileFilter.java 2009-12-03 13:28:20 UTC (rev 19020)
@@ -87,6 +87,7 @@
else if (allowDirectories && element instanceof IFolder) {
return true;
} else if (element instanceof IContainer) { // IProject, IFolder
+ if (!((IContainer)element).isAccessible()) return false;
if (!recursive ) {
return true;
}
15 years, 1 month
JBoss Tools SVN: r19019 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2009-12-03 08:20:42 -0500 (Thu, 03 Dec 2009)
New Revision: 19019
Modified:
trunk/seam/docs/reference/en/modules/seam_refactoring.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-957 - the "Seam Refactoring Tools" chapter update: adding the references to the demos;
Modified: trunk/seam/docs/reference/en/modules/seam_refactoring.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/seam_refactoring.xml 2009-12-03 12:45:13 UTC (rev 19018)
+++ trunk/seam/docs/reference/en/modules/seam_refactoring.xml 2009-12-03 13:20:42 UTC (rev 19019)
@@ -40,12 +40,13 @@
<section id="RefactornigWizard">
<title>Using the Refactorinig Wizard</title>
- <para>This wizard is opened always when the user clicks <property>Rename Seam Component</property>/<property>Rename Seam Context Variable</property>/<property>Rename</property> command in any
- of the mentioned views.
+ <para>This wizard is opened always when the user clicks the <emphasis><property>Rename Seam Component</property>,</emphasis>
+ <emphasis><property>Rename Seam Context Variable</property></emphasis>
+ or <emphasis><property>Rename</property></emphasis> command in any of the views/editors mentioned later in this chapter.
</para>
<figure>
- <title>Refactoring Seam wizard</title>
+ <title>Refactoring Wizard</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_refactoring/seam_refactor2.png"/>
@@ -58,7 +59,7 @@
</para>
<figure>
- <title>Navigating between the differences</title>
+ <title>Navigating Between the Differences</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_refactoring/seam_refactor3.png"/>
@@ -99,8 +100,8 @@
<para>To apply the changes click <emphasis><property>Finish</property>.</emphasis></para>
- <para>Renaming the selected seam component also corrects all references to the
- component (also in other files in the project). Renaming a type doesn't allow to rename
+ <para>Renaming the selected seam component corrects all references to the
+ component (also in other files in the project). Renaming a type doesn't allow to rename
similarly named variables and methods.
</para>
</section>
@@ -118,26 +119,28 @@
<section id="JavaEditor">
<title>Renaming Seam Components in the Java Editor</title>
- <para>If you want to rename certain seam component using Java Editor,first of all it's necessary to open it.
- If you don't know ,where the seam component is declared,use <link linkend="open_seam_component">Open Seam Components icon</link>.
-
+ <para>If you want to rename certain seam component using Java editor, first of all it's necessary to open it.
+ If you don't know, where the seam component is declared, use <link linkend="open_seam_component">Open Seam Components</link> icon.</para>
+ <para>To rename a Seam component in the Java editor it's necessary to select the component, left click the file and then select
+ <emphasis><property>Seam Refactor > Rename Seam Component</property>.</emphasis>
</para>
- <para>To open the rename Seam Component command in Java Editor it's necessary to left click the file <emphasis><property>>Seam Refactor>Rename Seam Component</property></emphasis>.
- </para>
<figure>
- <title>Opening Refactoring wizard in Java Editor</title>
+ <title>Opening Refactoring Wizard in Java Editor</title>
<mediaobject>
<imageobject>
<imagedata fileref="images/seam_refactoring/seam_refactor1.png"/>
</imageobject>
</mediaobject>
</figure>
+
+ <para>For details, see also the movie,
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_java/rena...">"Renaming a Seam component in the Java Editor"</ulink>.</para>
</section>
<section id="SeamComponents">
<title>Renaming Seam Components in the Seam Components View</title>
- <para>To open <property>Refactoring</property> wizard in the <property>Seam Components</property> view
- you should left click the component you wants to open and choose <property>Rename Seam Component</property> option.</para>
+ <para>To open the <property>Refactoring</property> wizard in the <property>Seam Components</property> view
+ you should left click the component you want to open and choose <property>Rename Seam Component</property> option.</para>
<figure>
<title>Opening Refactoring Wizard in Seam Components View</title>
@@ -147,11 +150,14 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>For details, see also the movie,
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_view...">"Renaming a Seam component in the Seam Components view"</ulink>.</para>
</section>
<section id="components_xml_editor">
<title>Renaming Seam Components in the Seam Components Editor</title>
- <para>When you open <literal>components.xml</literal> file using <property>JBossTools XML Editor</property>, open the
+ <para>When you open <literal>components.xml</literal> file using <property>JBoss Tools XML Editor</property>, open the
<property>Refactoring</property> wizard in the Tree tab by left-clicking the component in
<property>components</property> area and choosing <property>Rename</property> option.</para>
@@ -164,6 +170,8 @@
</mediaobject>
</figure>
+ <para>For details, see also the movie,
+ <ulink url="http://docs.jboss.org/tools/movies/demos/rename_seam_components_comp_xml/...">"Renaming a Seam component in the components.xml file"</ulink>.</para>
</section>
</section>
@@ -201,6 +209,22 @@
</imageobject>
</mediaobject>
</figure>
+
+ <para>For details, see also a set of movies about renaming Seam context variables in EL in different locations:</para>
+ <itemizedlist>
+ <listitem>
+ <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_java/re...">In the Java editor</ulink></para>
+ </listitem>
+ <listitem>
+ <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_propert...">In the JBoss Tools Properties Editor</ulink></para>
+ </listitem>
+ <listitem>
+ <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_xml/ren...">In the XML editor</ulink></para>
+ </listitem>
+ <listitem>
+ <para><ulink url="http://docs.jboss.org/tools/movies/demos/rename_context_variables_vpe/ren...">In the Visual Page Editor</ulink></para>
+ </listitem>
+ </itemizedlist>
</section>
</chapter>
15 years, 1 month
JBoss Tools SVN: r19018 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-12-03 07:45:13 -0500 (Thu, 03 Dec 2009)
New Revision: 19018
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
Log:
JBIDE-5370: ArrayStoreException in org.eclipse.wst.validation
Issue is fixed
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-12-03 10:13:52 UTC (rev 19017)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2009-12-03 12:45:13 UTC (rev 19018)
@@ -84,7 +84,7 @@
System.arraycopy(thisVars, 0, result, 0, thisVars.length);
}
if (!includedVars.isEmpty()) {
- System.arraycopy(includedVars.toArray(new ITagLibrary[includedVars.size()]), 0,
+ System.arraycopy(includedVars.toArray(new Var[includedVars.size()]), 0,
result, thisVars == null ? 0 : thisVars.length, includedVars.size());
}
return result;
15 years, 1 month
JBoss Tools SVN: r19017 - branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-03 05:13:52 -0500 (Thu, 03 Dec 2009)
New Revision: 19017
Modified:
branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5311
Changes for the Java Bean Creation Wizard
Updated labels I forgot to update.
Modified: branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties
===================================================================
--- branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties 2009-12-03 10:05:32 UTC (rev 19016)
+++ branches/jbosstools-3.1.0.RC1/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties 2009-12-03 10:13:52 UTC (rev 19017)
@@ -1,7 +1,7 @@
JavaBeanCreationWizardPage_27="
JavaBeanCreationWizardPage_ArrayButtonText=Array
-JavaBeanCreationWizardPage_BeanClassEmptyErrorMessage=Bean Class is empty
-JavaBeanCreationWizardPage_BeanClassLabel=Bean Class :
+JavaBeanCreationWizardPage_BeanClassEmptyErrorMessage=Java Class must be configured
+JavaBeanCreationWizardPage_BeanClassLabel=Java Class :
JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1=Bean ID '
JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2=' is duplicate
JavaBeanCreationWizardPage_BeanIDEmptyErrorMessage=Bean ID is empty
15 years, 1 month
JBoss Tools SVN: r19016 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-03 05:05:32 -0500 (Thu, 03 Dec 2009)
New Revision: 19016
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties
Log:
https://jira.jboss.org/jira/browse/JBIDE-5311
Changes for the Java Bean Creation Wizard
Merged from CR1 Branch
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java 2009-12-03 08:23:39 UTC (rev 19015)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/editors/commands/CreateJavaBeanModelCommand.java 2009-12-03 10:05:32 UTC (rev 19016)
@@ -78,36 +78,6 @@
resourceListType, new ArrayList<String>());
String figureID = null;
int index = 0;
- // for (Iterator<?> iterator = models.iterator();
- // iterator.hasNext();) {
- // Object object = (Object) iterator.next();
- // if (object instanceof EObject) {
- // figureID =
- // SmooksGraphUtil.generateFigureIDViaModel((EObject)
- // object);
- // if (figureID != null && editorPart instanceof
- // SmooksGraphicalEditorPart) {
- // SmooksGraphicsExtType ext = ((SmooksGraphicalEditorPart)
- // editorPart)
- // .getSmooksGraphicsExtType();
- // GraphType graph = ext.getGraph();
- // if (graph != null) {
- // FigureType figureType =
- // SmooksGraphUtil.findFigureType(graph, figureID);
- // if (figureType == null) {
- // figureType = GraphFactory.eINSTANCE.createFigureType();
- // graph.getFigure().add(figureType);
- // figureType.setId(figureID);
- // }
- // String x = String.valueOf(this.x + index);
- // String y = String.valueOf(this.y + index);
- // figureType.setX(x);
- // figureType.setY(y);
- // index += 20;
- // }
- // }
- // }
- // }
List<Object> creationModels = new ArrayList<Object>();
@@ -143,7 +113,7 @@
if (parent instanceof BeanType) {
((BeanType) parent).setBeanId(beanID);
((BeanType) parent).setClass(parentBeanModel.getBeanClassString());
- if (properties != null) {
+ if (properties != null && properties.length > 0) {
for (int i = 0; i < properties.length; i++) {
Object pro = properties[i];
if (pro instanceof JavaBeanModel && belongsToMe(parentBeanModel, (JavaBeanModel) pro)) {
@@ -167,6 +137,9 @@
}
}
}
+ } else if(parentBeanModel.isList()) {
+ WiringType value = Javabean12Factory.eINSTANCE.createWiringType();
+ ((BeanType) parent).getWiring().add(value);
}
}
// if (parent instanceof BindingsType) {
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-03 08:23:39 UTC (rev 19015)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/JavaBeanCreationWizardPage.java 2009-12-03 10:05:32 UTC (rev 19016)
@@ -125,7 +125,7 @@
createBeanClassControls(mainComposite);
- createBeanTypeControls(mainComposite);
+ //createBeanTypeControls(mainComposite);
Label seperator = new Label(mainComposite, SWT.HORIZONTAL
| SWT.SEPARATOR);
@@ -261,7 +261,7 @@
private void createBeanTypeControls(Composite mainComposite) {
- GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ GridData gd;
Label beanTypeLabel = new Label(mainComposite, SWT.NONE);
beanTypeLabel
@@ -408,32 +408,17 @@
ProjectClassLoader loader = new ProjectClassLoader(project);
javaBeanModel = null;
isCollection = isCollectionClass(beanClass);
- if (isCollection) {
- if (collectionClass != null) {
- Class<?> clazz = loader.loadClass(beanClass);
- Class<?> cclazz = loader.loadClass(collectionClass);
- javaBeanModel = JavaBeanModelFactory
- .getJavaBeanModelWithLazyLoad(clazz);
- javaBeanModel.setComponentClass(cclazz);
- } else {
- viewer.setInput(""); //$NON-NLS-1$
- }
- } else {
- Class<?> clazz = loader.loadClass(beanClass);
- if (isArray) {
- Object arrayInstance = Array.newInstance(clazz, 0);
- clazz = arrayInstance.getClass();
- }
- javaBeanModel = JavaBeanModelFactory
- .getJavaBeanModelWithLazyLoad(clazz);
- }
+ Class<?> clazz = loader.loadClass(beanClass);
+
+ javaBeanModel = JavaBeanModelFactory.getJavaBeanModelWithLazyLoad(clazz);
if (javaBeanModel != null) {
if (beanID != null) {
javaBeanModel.setName(beanID);
}
- viewer.setInput(javaBeanModel.getChildren());
- viewer.setCheckedElements(javaBeanModel.getChildren()
- .toArray());
+ if(!isCollection) {
+ viewer.setInput(javaBeanModel.getChildren());
+ }
+ viewer.setCheckedElements(javaBeanModel.getChildren().toArray());
} else {
viewer.setInput(""); //$NON-NLS-1$
}
@@ -465,23 +450,11 @@
public void modifyText(ModifyEvent e) {
Text t = (Text) e.getSource();
- arrayButton.setEnabled(true);
beanClass = t.getText();
if (beanClass != null) {
beanClass = beanClass.trim();
}
isCollection = isCollectionClass(beanClass);
- if (isCollection) {
- isArray = false;
- arrayButton.setSelection(false);
- arrayButton.setEnabled(false);
- collectionClassBrowseButton.setEnabled(true);
- colllectionClassText.setEnabled(true);
- } else {
- collectionClassBrowseButton.setEnabled(false);
- colllectionClassText.setEnabled(false);
- colllectionClassText.setText(""); //$NON-NLS-1$
- }
refreshJavaBeanModel();
updateWizardPageStatus();
}
@@ -571,14 +544,14 @@
ProjectClassLoader loader = new ProjectClassLoader(project);
Class<?> clazz = loader.loadClass(beanClass);
if (Modifier.isAbstract(clazz.getModifiers())) {
- error = "The class can't be abstract";
+ error = "Class is Abstract. Cannot be instantiated.";
} else {
try {
- Constructor<?> constructor = clazz.getConstructor(null);
+ clazz.getConstructor(null);
} catch (SecurityException e) {
- error = "The class can't be instanced";
+ error = "Unable to determine if the class can be instantiated.";
} catch (NoSuchMethodException e) {
- error = "The class can't be instanced";
+ error = "Class does not have a Public Default Constructor.";
}
}
} catch (JavaModelException e) {
@@ -589,34 +562,6 @@
}
}
- if (isCollection) {
- if (collectionClass == null || "".equals(collectionClass.trim())) { //$NON-NLS-1$
- error = Messages.JavaBeanCreationWizardPage_CollectionComponentClassEmptyErrorMessage;
- } else {
- try {
- ProjectClassLoader loader = new ProjectClassLoader(project);
- Class<?> clazz = loader.loadClass(collectionClass);
- if (Modifier.isAbstract(clazz.getModifiers())) {
- error = "The collection component class can't be abstract";
- } else {
- try {
- Constructor<?> constructor = clazz
- .getConstructor(null);
- } catch (SecurityException e) {
- error = "The collection component class can't be instanced";
- } catch (NoSuchMethodException e) {
- error = "The collection component class can't be instanced";
- }
- }
- } catch (JavaModelException e) {
- e.printStackTrace();
- } catch (ClassNotFoundException e) {
- error = Messages.JavaBeanCreationWizardPage_CatFindClassErrorMessage1
- + beanClass;
- }
- }
- }
-
this.setErrorMessage(error);
this.setPageComplete(error == null);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties 2009-12-03 08:23:39 UTC (rev 19015)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/graphical/wizards/messages.properties 2009-12-03 10:05:32 UTC (rev 19016)
@@ -1,7 +1,7 @@
JavaBeanCreationWizardPage_27="
JavaBeanCreationWizardPage_ArrayButtonText=Array
-JavaBeanCreationWizardPage_BeanClassEmptyErrorMessage=Bean Class is empty
-JavaBeanCreationWizardPage_BeanClassLabel=Bean Class :
+JavaBeanCreationWizardPage_BeanClassEmptyErrorMessage=Java Class must be configured
+JavaBeanCreationWizardPage_BeanClassLabel=Java Class :
JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage1=Bean ID '
JavaBeanCreationWizardPage_BeanIDDuplicateErrorMessage2=' is duplicate
JavaBeanCreationWizardPage_BeanIDEmptyErrorMessage=Bean ID is empty
@@ -12,5 +12,5 @@
JavaBeanCreationWizardPage_CollectionButtonLabel=Collection
JavaBeanCreationWizardPage_CollectionClassLabel=Collection Class :
JavaBeanCreationWizardPage_CollectionComponentClassEmptyErrorMessage=Colletion component class is empty
-JavaBeanCreationWizardPage_WizardDes=Create a Java Bean model
-JavaBeanCreationWizardPage_WizardTitle=Java Bean Creation
+JavaBeanCreationWizardPage_WizardDes=Add a Java Bean instance to the Smooks Bean Context
+JavaBeanCreationWizardPage_WizardTitle=Add Java Bean Instance
15 years, 1 month
JBoss Tools SVN: r19013 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-02 20:57:18 -0500 (Wed, 02 Dec 2009)
New Revision: 19013
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
Log:
JBIDE-5329 - replaced gif
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
===================================================================
(Binary files differ)
15 years, 1 month
JBoss Tools SVN: r19012 - trunk/vpe/features/org.jboss.tools.xulrunner.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-12-02 19:39:58 -0500 (Wed, 02 Dec 2009)
New Revision: 19012
Modified:
trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
Log:
clean arch attribute for cocoa plug-in in xulrunner feature
Modified: trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml
===================================================================
--- trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-12-02 22:51:13 UTC (rev 19011)
+++ trunk/vpe/features/org.jboss.tools.xulrunner.feature/feature.xml 2009-12-03 00:39:58 UTC (rev 19012)
@@ -83,7 +83,6 @@
id="org.mozilla.xulrunner.cocoa.macosx.x86"
os="macosx"
ws="cocoa"
- arch="x86"
download-size="0"
install-size="0"
version="0.0.0"/>
15 years, 1 month
JBoss Tools SVN: r19011 - trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch.
by jbosstools-commits@lists.jboss.org
Author: tfennelly
Date: 2009-12-02 17:51:13 -0500 (Wed, 02 Dec 2009)
New Revision: 19011
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5312
Smooks Run Configuration - needs unique name to avoid collisions
Updated to use ILaunchManager.generateUniqueLaunchConfigurationNameFrom
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java 2009-12-02 22:27:59 UTC (rev 19010)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/launch/SmooksRunTab.java 2009-12-02 22:51:13 UTC (rev 19011)
@@ -58,6 +58,7 @@
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
@@ -184,8 +185,9 @@
if(editorInput instanceof FileEditorInput) {
FileEditorInput fileEI = (FileEditorInput) editorInput;
IFile file = fileEI.getFile();
+ String configName = getLaunchManager().generateUniqueLaunchConfigurationNameFrom(editor.getTitle());
- launchConfigWC.rename("[" + file.getProject().getName() + "]" + editor.getTitle());
+ launchConfigWC.rename(configName);
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, file.getProject().getName()); //$NON-NLS-1$
launchConfigWC.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, file.getProjectRelativePath().toString()); //$NON-NLS-1$
}
15 years, 1 month