JBoss Tools SVN: r33234 - branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/editors_features.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 23:03:27 -0400 (Tue, 26 Jul 2011)
New Revision: 33234
Modified:
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/editors_features/editors_features_30.png
Log:
updated for TOOLSDOC-182
Modified: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/editors_features/editors_features_30.png
===================================================================
(Binary files differ)
14 years, 5 months
JBoss Tools SVN: r33233 - trunk/jsf/docs/userguide/en-US/images/editors_features.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 23:03:16 -0400 (Tue, 26 Jul 2011)
New Revision: 33233
Modified:
trunk/jsf/docs/userguide/en-US/images/editors_features/editors_features_30.png
Log:
updated for TOOLSDOC-182
Modified: trunk/jsf/docs/userguide/en-US/images/editors_features/editors_features_30.png
===================================================================
(Binary files differ)
14 years, 5 months
JBoss Tools SVN: r33232 - branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 22:47:23 -0400 (Tue, 26 Jul 2011)
New Revision: 33232
Modified:
branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/editors_features_27a.png
Log:
updated screenshot for TOOLSDOC-182
-- This line, and those below, will be ignored--
M userguide/en-US/images/visual_page/editors_features_27a.png
Modified: branches/jbosstools-3.2.x/jsf/docs/userguide/en-US/images/visual_page/editors_features_27a.png
===================================================================
(Binary files differ)
14 years, 5 months
JBoss Tools SVN: r33231 - trunk/jsf/docs/userguide/en-US/images/visual_page.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 22:46:50 -0400 (Tue, 26 Jul 2011)
New Revision: 33231
Modified:
trunk/jsf/docs/userguide/en-US/images/visual_page/editors_features_27a.png
Log:
updated screenshot for TOOLSDOC-182
Modified: trunk/jsf/docs/userguide/en-US/images/visual_page/editors_features_27a.png
===================================================================
(Binary files differ)
14 years, 5 months
JBoss Tools SVN: r33230 - branches/jbosstools-3.2.x/drools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 20:31:50 -0400 (Tue, 26 Jul 2011)
New Revision: 33230
Modified:
branches/jbosstools-3.2.x/drools/docs/reference/en-US/Book_Info.xml
branches/jbosstools-3.2.x/drools/docs/reference/en-US/editors.xml
Log:
updated to fix TOOLSDOC-225
Modified: branches/jbosstools-3.2.x/drools/docs/reference/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/drools/docs/reference/en-US/Book_Info.xml 2011-07-27 00:31:40 UTC (rev 33229)
+++ branches/jbosstools-3.2.x/drools/docs/reference/en-US/Book_Info.xml 2011-07-27 00:31:50 UTC (rev 33230)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
- <pubsnumber>2</pubsnumber>
+ <pubsnumber>3</pubsnumber>
<abstract>
<para>The Drools Tools Reference Guide explains how to use the Drools Tools for creating, executing and debugging Drools processes and rules.</para>
</abstract>
Modified: branches/jbosstools-3.2.x/drools/docs/reference/en-US/editors.xml
===================================================================
--- branches/jbosstools-3.2.x/drools/docs/reference/en-US/editors.xml 2011-07-27 00:31:40 UTC (rev 33229)
+++ branches/jbosstools-3.2.x/drools/docs/reference/en-US/editors.xml 2011-07-27 00:31:50 UTC (rev 33230)
@@ -98,7 +98,7 @@
<itemizedlist>
<listitem>
<para>
- <emphasis>Edit</emphasis>: by clicking the button users can edit selected in the table of language message mappings lines. For more information look at the <xref linkend="edit_wizard"/> section.
+ <emphasis>Edit</emphasis>: by clicking the button users can edit the selected line in the language message mappings table. For more information look at the <xref linkend="edit_wizard"/> section.
</para>
</listitem>
<listitem>
14 years, 5 months
JBoss Tools SVN: r33229 - trunk/drools/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-07-26 20:31:40 -0400 (Tue, 26 Jul 2011)
New Revision: 33229
Modified:
trunk/drools/docs/reference/en-US/Book_Info.xml
trunk/drools/docs/reference/en-US/editors.xml
Log:
updated to fix TOOLSDOC-225
Modified: trunk/drools/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/drools/docs/reference/en-US/Book_Info.xml 2011-07-27 00:23:39 UTC (rev 33228)
+++ trunk/drools/docs/reference/en-US/Book_Info.xml 2011-07-27 00:31:40 UTC (rev 33229)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
- <pubsnumber>2</pubsnumber>
+ <pubsnumber>3</pubsnumber>
<abstract>
<para>The Drools Tools Reference Guide explains how to use the Drools Tools for creating, executing and debugging Drools processes and rules.</para>
</abstract>
Modified: trunk/drools/docs/reference/en-US/editors.xml
===================================================================
--- trunk/drools/docs/reference/en-US/editors.xml 2011-07-27 00:23:39 UTC (rev 33228)
+++ trunk/drools/docs/reference/en-US/editors.xml 2011-07-27 00:31:40 UTC (rev 33229)
@@ -98,7 +98,7 @@
<itemizedlist>
<listitem>
<para>
- <emphasis>Edit</emphasis>: by clicking the button users can edit selected in the table of language message mappings lines. For more information look at the <xref linkend="edit_wizard"/> section.
+ <emphasis>Edit</emphasis>: by clicking the button users can edit the selected line in the language message mappings table. For more information look at the <xref linkend="edit_wizard"/> section.
</para>
</listitem>
<listitem>
14 years, 5 months
JBoss Tools SVN: r33228 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-26 20:23:39 -0400 (Tue, 26 Jul 2011)
New Revision: 33228
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-07-27 00:23:16 UTC (rev 33227)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-07-27 00:23:39 UTC (rev 33228)
@@ -23,6 +23,7 @@
import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
import org.eclipse.swt.graphics.Image;
import org.jboss.tools.common.el.core.ca.AbstractELCompletionEngine;
import org.jboss.tools.common.el.core.model.ELArgumentInvocation;
@@ -47,13 +48,21 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.jboss.tools.common.model.util.PositionHolder;
import org.jboss.tools.common.text.TextProposal;
+import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
+import org.jboss.tools.common.text.ext.util.Utils;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.model.helpers.converter.OpenKeyHelper;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
public class JSFMessageELCompletionEngine extends AbstractELCompletionEngine<IVariable> {
private static final Image JSF_EL_MESSAGES_PROPOSAL_IMAGE = JSFModelPlugin.getDefault().getImage(JSFModelPlugin.CA_JSF_MESSAGES_IMAGE_PATH);
@@ -91,6 +100,7 @@
* @see org.jboss.tools.common.el.core.resolver.ELResolver2#getProposals(org.jboss.tools.common.el.core.resolver.ELContext, java.lang.String)
*/
public List<TextProposal> getProposals(ELContext context, String el, int offset) {
+ currentOffset = offset;
return getCompletions(el, false, 0, context);
}
@@ -115,11 +125,14 @@
return proposals;
}
+ int currentOffset = 0;
+
/*
* (non-Javadoc)
* @see org.jboss.tools.common.el.core.resolver.ELResolver2#resolve(org.jboss.tools.common.el.core.resolver.ELContext, org.jboss.tools.common.el.core.model.ELExpression)
*/
public ELResolution resolve(ELContext context, ELExpression operand, int offset) {
+ currentOffset = offset;
ELResolutionImpl resolution = resolveELOperand(operand, context, true);
if(resolution != null)
resolution.setContext(context);
@@ -492,6 +505,7 @@
return;
for (XModelObject p : properties) {
+ segment.addObject(p);
IFile propFile = (IFile)p.getAdapter(IFile.class);
if(propFile == null)
continue;
@@ -510,6 +524,8 @@
return;
for(Variable variable : variables){
if(expr.getFirstToken().getText().equals(variable.name)){
+ int offset = currentOffset;
+ String locale = getPageLocale(variable.f, offset);
IModelNature n = EclipseResourceUtil.getModelNature(variable.f.getProject());
if(n == null)
@@ -519,32 +535,73 @@
return;
OpenKeyHelper keyHelper = new OpenKeyHelper();
- XModelObject[] properties = keyHelper.findBundles(model, variable.basename, null);
-// XModelObject properties = model.getByPath("/" + variable.basename.replace('.', '/') + ".properties");
+ XModelObject[] properties = keyHelper.findBundles(model, variable.basename, locale);
if(properties == null)
return;
for (XModelObject p : properties) {
+ String name = segment.getToken().getText();
+ XModelObject property = p.getChildByPath(trimQuotes(name));
+ if(property == null) continue;
+ segment.addObject(property);
+
+ PositionHolder h = PositionHolder.getPosition(p, null);
+ h.update();
+ segment.setMessagePropertySourceReference(h.getStart(), name.length());
+
IFile propFile = (IFile)p.getAdapter(IFile.class);
if(propFile == null)
continue;
segment.setMessageBundleResource(propFile);
- XModelObject property = p.getChildByPath(trimQuotes(segment.getToken().getText()));
- if(property != null){
- try {
- String content = FileUtil.readStream(propFile);
- if(findPropertyLocation(property, content, segment)){
- segment.setBaseName(variable.basename);
- }
- } catch (CoreException e) {
- log(e);
- }
- }
}
}
}
}
+ private static final String VIEW_TAGNAME = "view"; //$NON-NLS-1$
+ private static final String LOCALE_ATTRNAME = "locale"; //$NON-NLS-1$
+ private static final String PREFIX_SEPARATOR = ":"; //$NON-NLS-1$
+
+ private String getPageLocale(IFile file, int offset) {
+ ELContext c = PageContextFactory.createPageContext(file);
+ if(!(c instanceof IPageContext)) return "";
+ IPageContext context = (IPageContext)c;
+ IDocument document = context.getDocument();
+ if(document == null) return "";
+
+ StructuredModelWrapper smw = new StructuredModelWrapper();
+ try {
+ smw.init(document);
+ Document xmlDocument = smw.getDocument();
+ if (xmlDocument == null) return null;
+
+ Node n = Utils.findNodeForOffset(xmlDocument, offset);
+ if (!(n instanceof Attr) ) return null;
+
+ Element el = ((Attr)n).getOwnerElement();
+
+ Element jsfCoreViewTag = null;
+ String nodeToFind = PREFIX_SEPARATOR + VIEW_TAGNAME;
+
+ while (el != null) {
+ if (el.getNodeName() != null && el.getNodeName().endsWith(nodeToFind)) {
+ jsfCoreViewTag = el;
+ break;
+ }
+ Node parent = el.getParentNode();
+ el = (parent instanceof Element ? (Element)parent : null);
+ }
+
+ if (jsfCoreViewTag == null || !jsfCoreViewTag.hasAttribute(LOCALE_ATTRNAME)) return null;
+
+ String locale = Utils.trimQuotes((jsfCoreViewTag.getAttributeNode(LOCALE_ATTRNAME)).getValue());
+ if (locale == null || locale.length() == 0) return null;
+ return locale;
+ } finally {
+ smw.dispose();
+ }
+ }
+
private String trimQuotes(String value) {
if(value == null)
return null;
14 years, 5 months
JBoss Tools SVN: r33227 - trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-07-26 20:23:16 -0400 (Tue, 26 Jul 2011)
New Revision: 33227
Modified:
trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlink.java
Log:
JBIDE-9087
https://issues.jboss.org/browse/JBIDE-9087
Modified: trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlink.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlink.java 2011-07-27 00:08:49 UTC (rev 33226)
+++ trunk/jst/plugins/org.jboss.tools.jst.text.ext/src/org/jboss/tools/jst/text/ext/hyperlink/ELHyperlink.java 2011-07-27 00:23:16 UTC (rev 33227)
@@ -11,8 +11,6 @@
package org.jboss.tools.jst.text.ext.hyperlink;
import java.text.MessageFormat;
-import java.util.List;
-import java.util.Properties;
import org.eclipse.core.resources.IFile;
import org.eclipse.jdt.core.JavaModelException;
@@ -23,25 +21,11 @@
import org.jboss.tools.common.el.core.resolver.IOpenableReference;
import org.jboss.tools.common.el.core.resolver.JavaMemberELSegment;
import org.jboss.tools.common.el.core.resolver.MessagePropertyELSegment;
-import org.jboss.tools.common.model.XModel;
-import org.jboss.tools.common.model.project.IPromptingProvider;
-import org.jboss.tools.common.model.project.PromptingProviderFactory;
import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
import org.jboss.tools.common.text.ext.hyperlink.xpl.Messages;
-import org.jboss.tools.common.text.ext.util.StructuredModelWrapper;
-import org.jboss.tools.common.text.ext.util.Utils;
import org.jboss.tools.jst.text.ext.JSTExtensionsPlugin;
-import org.jboss.tools.jst.web.project.list.WebPromptingProvider;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
public class ELHyperlink extends AbstractHyperlink{
- private static final String VIEW_TAGNAME = "view"; //$NON-NLS-1$
- private static final String LOCALE_ATTRNAME = "locale"; //$NON-NLS-1$
- private static final String PREFIX_SEPARATOR = ":"; //$NON-NLS-1$
-
private ELReference reference;
private ELSegment segment;
@@ -76,91 +60,8 @@
return;
}
- if(segment instanceof JavaMemberELSegment){
- //should not be here, Java case implements getOpenable().
- }else if(segment instanceof MessagePropertyELSegment){
- IFile file = ((MessagePropertyELSegment)segment).getMessageBundleResource();
- if(file == null)
- file = (IFile)segment.getResource();
-
- XModel xModel = getXModel(file);
- if (xModel == null) {
- openFileFailed();
- return;
- }
- String bundleBasename = ((MessagePropertyELSegment)segment).getBaseName();
- String property = ((MessagePropertyELSegment)segment).isBundle() ? null : trimQuotes(((MessagePropertyELSegment)segment).getToken().getText());
- String locale = getPageLocale(region);
-
- Properties p = new Properties();
-
- if (bundleBasename != null) {
- p.put(WebPromptingProvider.BUNDLE, bundleBasename);
- }
-
- if (property != null) {
- p.put(WebPromptingProvider.KEY, property);
- }
-
- if (locale != null) {
- p.setProperty(WebPromptingProvider.LOCALE, locale);
- }
-
- IPromptingProvider provider = PromptingProviderFactory.WEB;
-
- p.put(IPromptingProvider.FILE, file);
-
- List<?> list = provider.getList(xModel, getRequestMethod(p), p.getProperty("prefix"), p); //$NON-NLS-1$
- if (list != null && list.size() >= 1) {
- openFileInEditor((String)list.get(0));
- return;
- }
- String error = p.getProperty(IPromptingProvider.ERROR);
- if ( error != null && error.length() > 0) {
- openFileFailed();
- }
- return;
- }
-
- openFileFailed();
}
- private String getPageLocale(IRegion region) {
- if(getDocument() == null || region == null) return null;
-
- StructuredModelWrapper smw = new StructuredModelWrapper();
- try {
- smw.init(getDocument());
- Document xmlDocument = smw.getDocument();
- if (xmlDocument == null) return null;
-
- Node n = Utils.findNodeForOffset(xmlDocument, region.getOffset());
- if (!(n instanceof Attr) ) return null;
-
- Element el = ((Attr)n).getOwnerElement();
-
- Element jsfCoreViewTag = null;
- String nodeToFind = PREFIX_SEPARATOR + VIEW_TAGNAME;
-
- while (el != null) {
- if (el.getNodeName() != null && el.getNodeName().endsWith(nodeToFind)) {
- jsfCoreViewTag = el;
- break;
- }
- Node parent = el.getParentNode();
- el = (parent instanceof Element ? (Element)parent : null);
- }
-
- if (jsfCoreViewTag == null || !jsfCoreViewTag.hasAttribute(LOCALE_ATTRNAME)) return null;
-
- String locale = Utils.trimQuotes((jsfCoreViewTag.getAttributeNode(LOCALE_ATTRNAME)).getValue());
- if (locale == null || locale.length() == 0) return null;
- return locale;
- } finally {
- smw.dispose();
- }
- }
-
private String trimQuotes(String value) {
if(value == null)
return null;
@@ -175,10 +76,10 @@
return value;
}
- private String getRequestMethod(Properties prop) {
- return prop != null && prop.getProperty(WebPromptingProvider.KEY) == null ?
- WebPromptingProvider.JSF_OPEN_BUNDLE : WebPromptingProvider.JSF_OPEN_KEY;
- }
+// private String getRequestMethod(Properties prop) {
+// return prop != null && prop.getProperty(WebPromptingProvider.KEY) == null ?
+// WebPromptingProvider.JSF_OPEN_BUNDLE : WebPromptingProvider.JSF_OPEN_KEY;
+// }
@Override
public String getHyperlinkText() {
@@ -189,6 +90,7 @@
if(segment instanceof JavaMemberELSegment){
return "Should not get here."; //$NON-NLS-1$
}else if(segment instanceof MessagePropertyELSegment){
+ //TODO move to getLabel() in openable in MessagePropertyELSegmentImpl
String baseName = ((MessagePropertyELSegment)segment).getBaseName();
String propertyName = ((MessagePropertyELSegment)segment).isBundle() ? null : trimQuotes(((MessagePropertyELSegment)segment).getToken().getText());
if (propertyName == null)
14 years, 5 months
JBoss Tools SVN: r33226 - trunk/common/plugins/org.jboss.tools.common.el.core.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-07-26 20:08:49 -0400 (Tue, 26 Jul 2011)
New Revision: 33226
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/.classpath
Log:
Fixed compilation error
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/.classpath
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/.classpath 2011-07-27 00:07:13 UTC (rev 33225)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/.classpath 2011-07-27 00:08:49 UTC (rev 33226)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
14 years, 5 months
JBoss Tools SVN: r33225 - trunk/common/plugins/org.jboss.tools.common.el.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-07-26 20:07:13 -0400 (Tue, 26 Jul 2011)
New Revision: 33225
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF
Log:
Fixed compilation error
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF 2011-07-26 23:55:03 UTC (rev 33224)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/META-INF/MANIFEST.MF 2011-07-27 00:07:13 UTC (rev 33225)
@@ -22,5 +22,5 @@
org.jboss.tools.common.resref.core;visibility:=reexport,
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.jdt.ui;bundle-version="3.7.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: .
14 years, 5 months