JBoss Tools SVN: r17602 - trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/factory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-15 19:34:00 -0400 (Tue, 15 Sep 2009)
New Revision: 17602
Modified:
trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/factory/AdapterFactory.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4890 NPE was fixed
Modified: trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/factory/AdapterFactory.java
===================================================================
--- trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/factory/AdapterFactory.java 2009-09-15 20:34:26 UTC (rev 17601)
+++ trunk/bpel/plugins/org.eclipse.bpel.validator/src/org/eclipse/bpel/validator/factory/AdapterFactory.java 2009-09-15 23:34:00 UTC (rev 17602)
@@ -132,11 +132,15 @@
IResource adapt_Element2IResource ( Element elm ) {
Element top = elm.getOwnerDocument().getDocumentElement();
-
- // Find the EObject reference to the emf model in the hierarchy of the
- EObject eObj = (EObject) top.getUserData("emf.model");
-
- return adapt_EObject2IResource(eObj);
+ IResource result = null;
+ if (top != null) {
+ // Find the EObject reference to the emf model in the hierarchy of
+ // the
+ EObject eObj = (EObject) top.getUserData("emf.model");
+
+ result = adapt_EObject2IResource(eObj);
+ }
+ return result;
}
/**
15 years, 4 months
JBoss Tools SVN: r17601 - trunk/maven/features/org.jboss.tools.maven.feature.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-15 16:34:26 -0400 (Tue, 15 Sep 2009)
New Revision: 17601
Modified:
trunk/maven/features/org.jboss.tools.maven.feature/.project
Log:
correct project name for maven.sdk.feature
Modified: trunk/maven/features/org.jboss.tools.maven.feature/.project
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.feature/.project 2009-09-15 20:05:02 UTC (rev 17600)
+++ trunk/maven/features/org.jboss.tools.maven.feature/.project 2009-09-15 20:34:26 UTC (rev 17601)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.jboss.tools.maven.feature</name>
+ <name>org.jboss.tools.maven.sdk.feature</name>
<comment></comment>
<projects>
</projects>
15 years, 4 months
JBoss Tools SVN: r17600 - trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/META-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-15 16:05:02 -0400 (Tue, 15 Sep 2009)
New Revision: 17600
Modified:
trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/META-INF/MANIFEST.MF
Log:
restore bpel.as.integration java classes to fix plugin activation errors
Modified: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/META-INF/MANIFEST.MF
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/META-INF/MANIFEST.MF 2009-09-15 20:00:39 UTC (rev 17599)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/META-INF/MANIFEST.MF 2009-09-15 20:05:02 UTC (rev 17600)
@@ -14,3 +14,4 @@
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Vendor: %providerName
+Export-Package: org.jboss.tools.bpel.as.integration
15 years, 4 months
JBoss Tools SVN: r17599 - trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-09-15 16:00:39 -0400 (Tue, 15 Sep 2009)
New Revision: 17599
Added:
trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
Log:
restore bpel.as.integration java classes to fix plugin activation errors
Added: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java 2009-09-15 20:00:39 UTC (rev 17599)
@@ -0,0 +1,50 @@
+package org.jboss.tools.bpel.as.integration;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.bpel.as.integration";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Property changes on: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/Activator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
===================================================================
--- trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java (rev 0)
+++ trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java 2009-09-15 20:00:39 UTC (rev 17599)
@@ -0,0 +1,37 @@
+package org.jboss.tools.bpel.as.integration;
+
+import org.eclipse.bpel.runtimes.IBPELModuleFacetConstants;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.publishers.JstPublisher;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
+
+public class JBossServerBPELPublisher extends JstPublisher implements
+ IJBossServerPublisher {
+
+ public JBossServerBPELPublisher() {
+ }
+
+ public boolean accepts(String method, IServer server, IModule[] module) {
+ return "local".equals(method) && accepts(server, module);
+ }
+
+ public boolean accepts(IServer server, IModule[] module) {
+ IProject project = module[0].getProject();
+ if(project == null) return false;
+
+ try {
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ IProjectFacet pf = ProjectFacetsManager.getProjectFacet(IBPELModuleFacetConstants.BPEL20_PROJECT_FACET);
+ return fp.hasProjectFacet(pf);
+ } catch (Exception e) {
+ return false;
+ }
+
+ }
+}
Property changes on: trunk/bpel/plugins/org.jboss.tools.bpel.as.integration/src/org/jboss/tools/bpel/as/integration/JBossServerBPELPublisher.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 4 months
JBoss Tools SVN: r17598 - in trunk/jst/plugins: org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2009-09-15 11:57:03 -0400 (Tue, 15 Sep 2009)
New Revision: 17598
Modified:
trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java
trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java
Log:
JBIDE-4850
Modified: trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java 2009-09-15 15:44:21 UTC (rev 17597)
+++ trunk/jst/plugins/org.jboss.tools.jst.css/src/org/jboss/tools/jst/css/common/CSSStyleRuleContainer.java 2009-09-15 15:57:03 UTC (rev 17598)
@@ -44,7 +44,8 @@
if ((me.getValue() == null)
|| (me.getValue().length() == 0)) {
declaration.removeProperty(me.getKey());
- } else {
+ } else if (!me.getValue().equals(
+ declaration.getPropertyValue(me.getKey()))) {
declaration.setProperty(me.getKey(), me.getValue(),
Constants.EMPTY);
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java 2009-09-15 15:44:21 UTC (rev 17597)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/src/org/jboss/tools/jst/jsp/outline/cssdialog/common/StyleAttributes.java 2009-09-15 15:57:03 UTC (rev 17598)
@@ -21,96 +21,101 @@
*/
public class StyleAttributes {
- private Map<String, String> attributeMap = null;
- /**
- * Default constructor.
- */
- public StyleAttributes() {
- this.attributeMap = new WritableMap();
- }
+ private Map<String, String> attributeMap = null;
- /**
- * Gets attribute map.
- *
- * @return map of attributes
- */
- public Map<String, String> getAttributeMap() {
- return attributeMap;
- }
+ /**
+ * Default constructor.
+ */
+ public StyleAttributes() {
+ this.attributeMap = new WritableMap();
+ }
+ /**
+ * Gets attribute map.
+ *
+ * @return map of attributes
+ */
+ public Map<String, String> getAttributeMap() {
+ return attributeMap;
+ }
+ /**
+ * Add attribute with the given name and value.
+ *
+ * @param name
+ * the name of attribute
+ * @param value
+ * the value of attribute
+ */
+ public void addAttribute(String name, String value) {
+ attributeMap.put(name, value);
+ }
- /**
- * Add attribute with the given name and value.
- *
- * @param name the name of attribute
- * @param value the value of attribute
- */
- public void addAttribute(String name, String value) {
- attributeMap.put(name, value);
- }
+ /**
+ * Remove attribute with the given name.
+ *
+ * @param name
+ * the name of attribute to be removed
+ */
+ public void removeAttribute(String name) {
+ attributeMap.remove(name);
+ }
- /**
- * Remove attribute with the given name.
- *
- * @param name the name of attribute to be removed
- */
- public void removeAttribute(String name) {
- attributeMap.remove(name);
- }
+ /**
+ * @see java.util.HashMap#entrySet()
+ */
+ public Set<Entry<String, String>> entrySet() {
+ return attributeMap.entrySet();
+ }
- /**
- * @see java.util.HashMap#entrySet()
- */
- public Set<Entry<String, String>> entrySet() {
- return attributeMap.entrySet();
- }
+ /**
+ * Get attribute value with the given name.
+ *
+ * @param name
+ * the name of attribute to be returned
+ * @return attribute value
+ */
+ public String getAttribute(String name) {
+ String value = attributeMap.get(name);
+ return value != null ? value : Constants.EMPTY;
+ }
- /**
- * Get attribute value with the given name.
- *
- * @param name the name of attribute to be returned
- * @return attribute value
- */
- public String getAttribute(String name) {
- String value = attributeMap.get(name);
- return value != null ? value : Constants.EMPTY;
- }
+ /**
+ * @see java.util.HashMap#keySet()
+ */
+ public Set<String> keySet() {
+ return attributeMap.keySet();
+ }
- /**
- * @see java.util.HashMap#keySet()
- */
- public Set<String> keySet() {
- return attributeMap.keySet();
- }
+ /**
+ * Clear cache of attributes.
+ */
+ public void clear() {
+ attributeMap.clear();
+ }
- /**
- * Clear cache of attributes.
- */
- public void clear() {
- attributeMap.clear();
- }
-
- /**
+ /**
*
*/
- public void setStyleProperties(Map<String, String> properties){
- attributeMap.clear();
- attributeMap.putAll(properties);
- }
-
+ public void setStyleProperties(Map<String, String> properties) {
+ attributeMap.clear();
+ attributeMap.putAll(properties);
+ }
+
/**
* String representation of style attributes.
- *
+ *
* @return style string representation
*/
public String getStyle() {
- // update newStyle value
- StringBuffer buf = new StringBuffer();
- Set<Entry<String, String>> set = entrySet();
- for (Map.Entry<String, String> me : set) {
- buf.append(me.getKey() + Constants.COLON + me.getValue() + Constants.SEMICOLON);
- }
- return buf.toString();
+ // update newStyle value
+ StringBuffer buf = new StringBuffer();
+ Set<Entry<String, String>> set = entrySet();
+ for (Map.Entry<String, String> me : set) {
+ if ((me.getValue() != null) && (me.getValue().length() != 0))
+ buf.append(me.getKey() + Constants.COLON + me.getValue()
+ + Constants.SEMICOLON);
+ }
+ return buf.toString();
}
}
15 years, 4 months
JBoss Tools SVN: r17597 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-15 11:44:21 -0400 (Tue, 15 Sep 2009)
New Revision: 17597
Removed:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4885
Dead code removed
Deleted: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2009-09-15 15:43:25 UTC (rev 17596)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/BrowserHelper.java 2009-09-15 15:44:21 UTC (rev 17597)
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.model.util;
-
-import java.io.*;
-import java.text.MessageFormat;
-import java.util.*;
-import org.jboss.tools.common.model.*;
-import org.jboss.tools.common.model.engines.impl.XProcess;
-import org.jboss.tools.common.model.options.PreferenceModelUtilities;
-import org.jboss.tools.common.model.plugin.ModelMessages;
-import org.jboss.tools.common.model.plugin.ModelPlugin;
-import org.jboss.tools.common.meta.action.*;
-import org.jboss.tools.common.meta.action.impl.*;
-import org.jboss.tools.common.meta.action.impl.handlers.*;
-
-public class BrowserHelper {
- static String ATTRIBUTE = "Browser Path"; //$NON-NLS-1$
-
-
- public BrowserHelper() {}
-
- public static void startExplorer(XModel model, String url) throws XModelException {
- XModelObject editor = PreferenceModelUtilities.getPreferenceModel().getByPath("%Options%/Struts Studio/Running"); //$NON-NLS-1$
- if(editor == null) throw new XModelException(ModelMessages.BrowserHelper_InternetBrowserNotSet);
- if(validatePath(PreferenceModelUtilities.getPreferenceModel().getService(), editor)) new OWEProcess(editor, url).start();
- }
-
- static boolean validatePath(ServiceDialog d, XModelObject o) {
- String[] paths = getEnvironmentPaths();
- String en = o.getModelEntity().getName();
- XEntityData[] dt = new XEntityData[]{XEntityDataImpl.create(new String[][]{{en, XModelObjectConstants.YES}, {ATTRIBUTE, XModelObjectConstants.YES}})};
- String path = o.getAttributeValue(ATTRIBUTE).replace('\\','/');
- XAttributeData ad = HUtil.find(dt, 0, ATTRIBUTE);
- ad.setValue(path);
- while(true) {
- String b = ad.getValue();
- if(b != null && b.length() > 0)
- try {
- if(fileExists(b, paths)) {
- if(!b.equals(path)) {
- o.getModel().changeObjectAttribute(o, ATTRIBUTE, b);
- o.getModel().saveOptions();
- }
- return true;
- }
- } catch (XModelException e) {
- ModelPlugin.getPluginLog().logError("BrowserHelper:" + e.getMessage()); //$NON-NLS-1$
- }
- int i = d.showDialog(ModelMessages.BrowserHelper_DialogTitleRun, MessageFormat.format(ModelMessages.BrowserHelper_EnterValidPath, o.getPresentationString()),
- new String[]{ModelMessages.OK, ModelMessages.Cancel}, dt[0], ServiceDialog.QUESTION);
- if(i != 0) return false;
- }
- }
-
- static String[] getEnvironmentPaths() {
- String jlp = OSHelper.getProperty("PATH", ""); //$NON-NLS-1$ //$NON-NLS-2$
- StringTokenizer st = new StringTokenizer(jlp, File.pathSeparator);
- String[] ps = new String[st.countTokens()];
- for (int i = 0; i < ps.length; i++) ps[i] = st.nextToken();
- return ps;
- }
-
- static boolean fileExists(String filename, String[] paths) {
- filename = filename.replace('\\', '/');
- if(paths == null || filename.indexOf('/') >= 0) return new File(filename).isFile();
- for (int i = 0; i < paths.length; i++) {
- String f = paths[i] + XModelObjectConstants.SEPARATOR + filename;
- if(new File(f).isFile()) return true;
- }
- return false;
- }
-
-}
-
-class OWEProcess extends XProcess {
- private XModelObject o;
- private String url;
-
- public OWEProcess(XModelObject o, String url) {
- this.o = o;
- this.url = url;
- }
-
- protected String getRoot() {
- return "."; //$NON-NLS-1$
- }
-
- protected void write(String s) {
- o.getModel().getOut().print(s);
- }
-
- protected void buildCommandLine(ArrayList<String> l) {
- String program = o.getAttributeValue(BrowserHelper.ATTRIBUTE);
- l.add(program);
- l.add(url);
- }
-
-}
15 years, 4 months
JBoss Tools SVN: r17596 - trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/page.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-15 11:43:25 -0400 (Tue, 15 Sep 2009)
New Revision: 17596
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/page/RunHandler.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4885
Dead code removed
Modified: trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/page/RunHandler.java
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/page/RunHandler.java 2009-09-15 15:38:29 UTC (rev 17595)
+++ trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/handlers/page/RunHandler.java 2009-09-15 15:43:25 UTC (rev 17596)
@@ -79,9 +79,4 @@
}
}
- public static void startExplorer(XModel model, String url) throws Exception {
- BrowserHelper.startExplorer(model, url);
- }
-
-
}
15 years, 4 months
JBoss Tools SVN: r17595 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-09-15 11:38:29 -0400 (Tue, 15 Sep 2009)
New Revision: 17595
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4885
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2009-09-15 15:34:12 UTC (rev 17594)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/project/ProjectHome.java 2009-09-15 15:38:29 UTC (rev 17595)
@@ -48,15 +48,15 @@
File f = new File(location + XModelObjectConstants.SEPARATOR + IModelNature.PROJECT_TEMP);
File ep = new File(location + XModelObjectConstants.SEPARATOR + IModelNature.PROJECT_FILE);
if(ep.isFile()) {
- // to remove .struts file
+ // to remove temp file
if(f.isFile()) f.delete();
- return getLocationFrom_strutsstudio_File(location, ep);
+ return getLocationFrom_project_File(location, ep);
}
- if(f.isFile()) return getLocationFrom_struts_File(location, f);
+ if(f.isFile()) return getLocationFrom_temp_File(location, f);
return ""; //$NON-NLS-1$
}
- private String getLocationFrom_strutsstudio_File(String location, File ss) {
+ private String getLocationFrom_project_File(String location, File ss) {
Element element = XMLUtil.getElement(ss);
String path = ""; //$NON-NLS-1$
if(element.hasAttribute("workspace-home")) { //$NON-NLS-1$
@@ -68,7 +68,7 @@
return q;
}
- private String getLocationFrom_struts_File(String location, File s) {
+ private String getLocationFrom_temp_File(String location, File s) {
String path = XModelObjectLoaderUtil.getCDATA(XMLUtil.getElement(s));
String q = (path.equals(".")) ? location : (path.startsWith("./")) ? location + path.substring(1) : path; //$NON-NLS-1$ //$NON-NLS-2$
s.delete();
15 years, 4 months
JBoss Tools SVN: r17594 - trunk/hibernatetools/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: chukhutsina
Date: 2009-09-15 11:34:12 -0400 (Tue, 15 Sep 2009)
New Revision: 17594
Modified:
trunk/hibernatetools/docs/reference/en/modules/ant.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-862 -Added the info about NamingStrategy supporting in JPA projects to 5.3.1. Standard Hibernate Configuration section. </p>
</body></html>
Modified: trunk/hibernatetools/docs/reference/en/modules/ant.xml
===================================================================
--- trunk/hibernatetools/docs/reference/en/modules/ant.xml 2009-09-15 15:20:28 UTC (rev 17593)
+++ trunk/hibernatetools/docs/reference/en/modules/ant.xml 2009-09-15 15:34:12 UTC (rev 17594)
@@ -367,7 +367,7 @@
<entry>
<para>Name of a class that implements org.hibernate.cfg.NamingStrategy. Used for
setting up the naming strategy in Hibernate which controls the automatic naming of
- tables and columns.</para>
+ tables and columns.In JPA projects naming strategy is supported for default Name/Columns mapping</para>
</entry>
<entry>
15 years, 4 months
JBoss Tools SVN: r17593 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2009-09-15 11:20:28 -0400 (Tue, 15 Sep 2009)
New Revision: 17593
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java
Log:
JBIDE-512 context variable code completion dropdown should show their "source"
JBIDE-2541 Show java-doc for EL content assist item
The values of type, sourceType and JavaDoc are gathered to be displayed in CA
Var's declared using var attribute (<h:dataTable value="#{...}" var="mapItem">) are also processed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java 2009-09-15 15:12:06 UTC (rev 17592)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/el/AbstractELCompletionEngine.java 2009-09-15 15:20:28 UTC (rev 17593)
@@ -255,20 +255,37 @@
}
// JBIDE-512, JBIDE-2541 related changes ===>>>
- // TODO: Add type, sourceType and JavaDoc found if possible
- // Reason of incomplete: there are no resolved members here,
- // The var value is to be resolved by the ELResolver to let us know
- // what is the var's type
if(!returnEqualedVariablesOnly && vars!=null) {
for (Var v : vars) {
String prefix = operand.toString();
if(v.getName().startsWith(prefix)) {
+ MemberInfo memberInfo = resolveEL(file, v.getElToken(), true, vars, varSearcher);
+ String sourceTypeName = memberInfo == null ? null : memberInfo.getDeclaringTypeQualifiedName();
+ if (sourceTypeName != null && sourceTypeName.indexOf('.') != -1)
+ sourceTypeName = Signature.getSimpleName(sourceTypeName);
+ String typeName = memberInfo == null ? null : memberInfo.getType().getName();
+ if (typeName != null && typeName.indexOf('.') != -1)
+ typeName = Signature.getSimpleName(typeName);
+
+ IJavaElement element = memberInfo == null ? null : memberInfo.getJavaElement();
+ String attachedJavaDoc = null;
+
+ try {
+ attachedJavaDoc = element == null ? null : element.getAttachedJavadoc(null);
+ } catch (JavaModelException e) {
+ // Ignore
+ }
+
String varNameProposal = v.getName().substring(prefix.length());
TextProposal proposal = new TextProposal();
+ proposal.setLabel(v.getName());
proposal.setReplacementString(varNameProposal);
proposal.setLabel(v.getName());
proposal.setImage(getELProposalImage());
+ proposal.setType(typeName);
+ proposal.setSourceType(sourceTypeName);
+ proposal.setContextInfo(attachedJavaDoc);
status.getProposals().add(proposal);
}
}
@@ -294,6 +311,21 @@
return status.getMemberOfResolvedOperand();
}
+ /**
+ * Returns MemberInfo for last segment of EL. Null if El is not resolved.
+ * @param seamProject
+ * @param file
+ * @param operand EL without #{}
+ * @return MemberInfo for last segment of EL. Null if El is not resolved.
+ * @throws BadLocationException
+ * @throws StringIndexOutOfBoundsException
+ */
+ public TypeInfoCollector.MemberInfo resolveEL(IFile file, ELExpression operand, boolean returnEqualedVariablesOnly, List<Var> vars, ElVarSearcher varSearcher) throws BadLocationException, StringIndexOutOfBoundsException {
+ if(!(operand instanceof ELInvocationExpression)) return null;
+ ELOperandResolveStatus status = resolveELOperand(file, operand, returnEqualedVariablesOnly, vars, varSearcher);
+ return status.getMemberOfResolvedOperand();
+ }
+
public ELOperandResolveStatus resolveELOperand(IFile file, ELExpression operand,
boolean returnEqualedVariablesOnly, boolean varIsUsed) throws BadLocationException, StringIndexOutOfBoundsException {
if(!(operand instanceof ELInvocationExpression) || file == null) {
@@ -371,6 +403,7 @@
}
TextProposal proposal = new TextProposal();
+ proposal.setLabel(varName);
proposal.setReplacementString(varName.substring(operand.getLength()));
setImage(proposal, var);
proposal.setType(typeName);
15 years, 4 months