JBoss Tools SVN: r9458 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-31 14:10:48 -0400 (Thu, 31 Jul 2008)
New Revision: 9458
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
Log:
JBIDE-2533
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2008-07-31 17:04:50 UTC (rev 9457)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2008-07-31 18:10:48 UTC (rev 9458)
@@ -125,7 +125,7 @@
IDeployableServer server = (IDeployableServer)contentProvider.server.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
String location = null;
if( server != null )
- location = server.getDeployDirectory();
+ location = server.getConfigDirectory();
else
location = contentProvider.server.getRuntime().getLocation().toOSString();
16 years, 5 months
JBoss Tools SVN: r9457 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-07-31 13:04:50 -0400 (Thu, 31 Jul 2008)
New Revision: 9457
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
Log:
JBIDE-2410
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2008-07-31 15:51:10 UTC (rev 9456)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServer.java 2008-07-31 17:04:50 UTC (rev 9457)
@@ -62,21 +62,23 @@
// here we update the launch configuration with any details that might have changed.
try {
Server s = (Server)getServer();
- ILaunchConfiguration lc = s.getLaunchConfiguration(true, new NullProgressMonitor());
- String startArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
- String originalArgs = startArgs;
- if( !getServer().getHost().equals(getHost(true)))
- startArgs = ArgsUtil.setArg(startArgs, "-b", "--host", getServer().getHost());
-
- IJBossServerRuntime runtime = (IJBossServerRuntime)
- getServer().getRuntime().loadAdapter(IJBossServerRuntime.class, null);
- String config = runtime.getJBossConfiguration();
- startArgs = ArgsUtil.setArg(startArgs, "-c", "--configuration", config);
-
- if( !startArgs.equals(originalArgs)) {
- ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
- wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, startArgs);
- wc.doSave();
+ ILaunchConfiguration lc = s.getLaunchConfiguration(false, new NullProgressMonitor());
+ if( lc != null ) {
+ String startArgs = lc.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, (String)null);
+ String originalArgs = startArgs;
+ if( !getServer().getHost().equals(getHost(true)))
+ startArgs = ArgsUtil.setArg(startArgs, "-b", "--host", getServer().getHost());
+
+ IJBossServerRuntime runtime = (IJBossServerRuntime)
+ getServer().getRuntime().loadAdapter(IJBossServerRuntime.class, null);
+ String config = runtime.getJBossConfiguration();
+ startArgs = ArgsUtil.setArg(startArgs, "-c", "--configuration", config);
+
+ if( startArgs != null && !startArgs.equals(originalArgs)) {
+ ILaunchConfigurationWorkingCopy wc = lc.getWorkingCopy();
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, startArgs);
+ wc.doSave();
+ }
}
} catch( CoreException ce ) {
IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Could not save server's start arguments", ce);
16 years, 5 months
JBoss Tools SVN: r9456 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 11:51:10 -0400 (Thu, 31 Jul 2008)
New Revision: 9456
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 15:17:08 UTC (rev 9455)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 15:51:10 UTC (rev 9456)
@@ -329,7 +329,7 @@
&&visualNode.getNodeType()==nsIDOMNode.TEXT_NODE
&&nodeData.getSourceNode()!=null){
- if(nodeData.getSourceNode().getNodeType()==Node.ELEMENT_NODE) {
+ if(nodeData.getSourceNode().getNodeType()==Node.ATTRIBUTE_NODE) {
NodeImpl targetSourceNode = (NodeImpl)nodeData.getSourceNode();
String sourceNodeValue = nodeData.getSourceNode().getNodeValue();
ITextRegion valueRegion = targetSourceNode.getValueRegion();
16 years, 5 months
JBoss Tools SVN: r9455 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 11:17:08 -0400 (Thu, 31 Jul 2008)
New Revision: 9455
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 15:09:02 UTC (rev 9454)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 15:17:08 UTC (rev 9455)
@@ -452,45 +452,42 @@
nsIDOMNode visualNewNode =creationData.getNode();
-// nsIDOMElement visualNewElement = null;
- //TODO Max Areshkau process it's correctly
-// if(creationData.getNode()!=null) {
-//
-// visualNewElement = (nsIDOMElement) creationData
-// .getNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
-// }
-//
-// if ((visualNewElement != null) && template.hasImaginaryBorder()) {
-//
-// visualNewElement.setAttribute(HTML.ATTR_STYLE, visualNewElement
-// .getAttribute(HTML.ATTR_STYLE)
-// + VpeStyleUtil.SEMICOLON_STRING + DOTTED_BORDER);
-//
-// }
-//
-// if (visualNewElement != null)
-// correctVisualAttribute(visualNewElement);
-
+ nsIDOMElement border = null;
+ if(visualNewNode!=null && visualNewNode.getNodeType()==nsIDOMNode.ELEMENT_NODE) {
+
+ nsIDOMElement visualNewElement = (nsIDOMElement) creationData
+ .getNode().queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+
+ if ((visualNewElement != null) && template.hasImaginaryBorder()) {
- nsIDOMElement border = null;
+ visualNewElement.setAttribute(HTML.ATTR_STYLE, visualNewElement
+ .getAttribute(HTML.ATTR_STYLE)
+ + VpeStyleUtil.SEMICOLON_STRING + DOTTED_BORDER);
+
+ }
+ if (visualNewElement != null) {
+ correctVisualAttribute(visualNewElement);
+ }
+ if (YES_STRING.equals(VpePreference.SHOW_BORDER_FOR_ALL_TAGS
+ .getValue())
+ && visualNewElement != null) {
+ boolean block = true;
+ if (template.getTagDescription(null, null, null,
+ visualNewElement, null).getDisplayType() == VpeTagDescription.DISPLAY_TYPE_INLINE) {
+ block = false;
+ }
+ border = createBorder(sourceNode, visualNewElement, block);
+ }
+ if (!isCurrentMainDocument() && visualNewElement != null) {
+ setReadOnlyElement(visualNewElement);
+ }
+ }
+
if(sourceNode instanceof Element && visualNewNode!= null &&visualNewNode.getNodeType()==nsIDOMNode.ELEMENT_NODE) {
setTooltip((Element) sourceNode, (nsIDOMElement)visualNewNode.queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID));
}
-// if (YES_STRING.equals(VpePreference.SHOW_BORDER_FOR_ALL_TAGS
-// .getValue())
-// && visualNewElement != null) {
-// boolean block = true;
-// if (template.getTagDescription(null, null, null,
-// visualNewElement, null).getDisplayType() == VpeTagDescription.DISPLAY_TYPE_INLINE) {
-// block = false;
-// }
-// border = createBorder(sourceNode, visualNewElement, block);
-// }
-// if (!isCurrentMainDocument() && visualNewElement != null) {
-// setReadOnlyElement(visualNewElement);
-// }
if (registerFlag) {
VpeElementMapping elementMapping = new VpeElementMapping(
sourceNode, visualNewNode, border,
16 years, 5 months
JBoss Tools SVN: r9454 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-31 11:09:02 -0400 (Thu, 31 Jul 2008)
New Revision: 9454
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_clear.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_start.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/fileUpload.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
Log:
Fix https://jira.jboss.org/jira/browse/JBIDE-2453
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/fileUpload.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/fileUpload.css 2008-07-31 14:42:16 UTC (rev 9453)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/fileUpload.css 2008-07-31 15:09:02 UTC (rev 9454)
@@ -37,4 +37,18 @@
.rich-fileupload-ico-add {
background-image: url(ico_add.gif);
+}
+
+.rich-fileupload-ico-start {
+ background-image: url(ico_start.gif);
+}
+
+a.rich-fileupload-button-selection {
+ color: #000000;
+ display: block;
+ text-decoration: none;
+}
+
+.rich-fileupload-ico-clear {
+ background-image:url(ico_clear.gif);
}
\ No newline at end of file
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_clear.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_clear.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_start.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/fileUpload/ico_start.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-07-31 14:42:16 UTC (rev 9453)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesFileUploadTemplate.java 2008-07-31 15:09:02 UTC (rev 9454)
@@ -12,8 +12,10 @@
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VpeStyleUtil;
+import org.jboss.tools.vpe.xulrunner.browser.util.DOMTreeDumper;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
+import org.mozilla.interfaces.nsIDOMNode;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -51,6 +53,14 @@
/** The list width. */
private String listWidth;
+
+ private String uploadControlLabel;
+
+ private String uploadControlClass;
+
+ private String clearAllControlLabel;
+
+ private String clearAllControlClass;
/**
* The Constructor.
@@ -97,24 +107,76 @@
final nsIDOMElement labelDiv = visualDocument.createElement(HTML.TAG_DIV);
labelDiv.setAttribute(HTML.ATTR_CLASS, defaultStyleClasses.get("addButtonClassDiv2"));
+ labelDiv.appendChild(visualDocument.createTextNode(this.addControlLabel));
+ fileuploadButtonDiv.appendChild(labelDiv);
+
+
rootDiv.appendChild(table);
rootDiv.appendChild(createPanelDiv(pageContext, source, visualDocument));
table.appendChild(tr);
tr.appendChild(td);
td.appendChild(buttonBorderDiv);
buttonBorderDiv.appendChild(fileuploadButtonDiv);
- fileuploadButtonDiv.appendChild(labelDiv);
- labelDiv.appendChild(visualDocument.createTextNode(this.addControlLabel));
+ td.appendChild(createControl(pageContext, sourceNode, visualDocument, defaultStyleClasses.get("uploadButtonClass2"),
+ uploadControlLabel, false));
+ td.appendChild(createControl(pageContext, sourceNode, visualDocument, defaultStyleClasses.get("clearAllButtonClass2"),
+ clearAllControlLabel, true));
+
-// DOMTreeDumper dumper = new DOMTreeDumper();
-// dumper.dumpToStream(System.err, rootDiv);
+ DOMTreeDumper dumper = new DOMTreeDumper();
+ dumper.dumpToStream(System.err, rootDiv);
data = new VpeCreationData(rootDiv);
return data;
}
/**
+ * @param pageContext
+ * @param sourceNode
+ * @param visualDocument
+ * @return
+ */
+ private nsIDOMNode createControl(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument,String secondCssClass,String text,boolean isClearButton) {
+ //<div class="rich-fileupload-button-border" style="float: left;">
+ final nsIDOMElement firstDiv = visualDocument.createElement(HTML.TAG_DIV);
+
+ firstDiv.setAttribute(HTML.ATTR_CLASS, "rich-fileupload-button-border");
+
+ firstDiv.setAttribute(HTML.ATTR_STYLE,"float: "+(isClearButton ? "right;" : "left;"));
+
+ final nsIDOMElement secondDiv = visualDocument.createElement(HTML.TAG_DIV);
+
+ if (isClearButton) {
+ secondDiv.setAttribute(HTML.ATTR_CLASS, "rich-fileupload-button rich-fileupload-font");
+ final nsIDOMElement thirdDiv = visualDocument.createElement(HTML.TAG_DIV);
+ final nsIDOMElement aElement = visualDocument.createElement(HTML.TAG_A);
+
+ aElement.setAttribute(HTML.ATTR_CLASS, "rich-fileupload-button-selection");
+ thirdDiv.setAttribute(HTML.ATTR_CLASS,defaultStyleClasses.get("clearAllButtonClass2"));
+ firstDiv.appendChild(secondDiv);
+ secondDiv.appendChild(aElement);
+ aElement.appendChild(thirdDiv);
+ thirdDiv.appendChild(visualDocument.createTextNode(text));
+ }else{
+ secondDiv.setAttribute(HTML.ATTR_CLASS, secondCssClass);
+
+ final nsIDOMElement bDiv = visualDocument.createElement(HTML.TAG_B);
+
+ bDiv.appendChild(visualDocument.createTextNode(text));
+
+ firstDiv.appendChild(secondDiv);
+ secondDiv.appendChild(bDiv);
+ }
+
+
+
+
+
+ return firstDiv;
+ }
+
+ /**
* Creates the panel div.
*
* @param visualDocument the visual document
@@ -137,8 +199,12 @@
*/
private void initDefaultStyleClasses() {
defaultStyleClasses.put("addButtonClass", "rich-fileupload-button rich-fileupload-font");
+ defaultStyleClasses.put("uploadButtonClass","rich-fileupload-button rich-fileupload-font");
defaultStyleClasses.put("addButtonClassDiv2",
" rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-add");
+ defaultStyleClasses.put("clearAllButtonClass2", "rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-clear");
+ defaultStyleClasses.put("uploadButtonClass2",
+ "rich-fileupload-button-content rich-fileupload-font rich-fileupload-ico rich-fileupload-ico-start ");
defaultStyleClasses.put("uploadListClass", "rich-fileupload-list-overflow");
}
@@ -196,6 +262,28 @@
if (ComponentUtil.isNotBlank(uploadListClass)) {
defaultStyleClasses.put("uploadListClass", defaultStyleClasses.get("uploadListClass") + " " + uploadListClass);
}
+
+ this.uploadControlClass = ComponentUtil.getAttribute(sourceElement, "uploadControlClass");
+
+ if(ComponentUtil.isNotBlank(uploadControlClass)){
+ defaultStyleClasses.put("uploadButtonClass2", defaultStyleClasses.get("uploadButtonClass2")+" "+uploadListClass);
+ }
+
+
+ this.uploadControlLabel = ComponentUtil.getAttribute(sourceElement, "uploadControlLabel");
+
+ if (ComponentUtil.isBlank(this.uploadControlLabel)) {
+ this.uploadControlLabel = "Upload";
+ }
+
+ this.clearAllControlLabel = ComponentUtil.getAttribute(sourceElement, "clearAllControlLabel");
+
+ if(ComponentUtil.isBlank(this.clearAllControlLabel)){
+ this.clearAllControlLabel = "Clear All";
+ }
+
+ clearAllControlClass = ComponentUtil.getAttribute(sourceElement, "");
+
}
}
16 years, 5 months
JBoss Tools SVN: r9453 - in trunk/vpe/plugins: org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-07-31 10:42:16 -0400 (Thu, 31 Jul 2008)
New Revision: 9453
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
JBIDE-2584
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 13:30:13 UTC (rev 9452)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2008-07-31 14:42:16 UTC (rev 9453)
@@ -422,7 +422,7 @@
// switch (sourceNode.getNodeType()) {
// case Node.ELEMENT_NODE:
- // Map<?, ?> xmlnsMap = createXmlns((Element) sourceNode);
+// Map<?, ?> xmlnsMap = createXmlns((Element) sourceNode);
Set<Node> ifDependencySet = new HashSet<Node>();
pageContext.setCurrentVisualNode(visualOldContainer);
VpeTemplate template = templateManager.getTemplate(pageContext,
@@ -553,7 +553,7 @@
}
}
- protected nsIDOMElement createComment(Node sourceNode) {
+ private nsIDOMElement createComment(Node sourceNode) {
nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
div.setAttribute(VpeStyleUtil.ATTRIBUTE_STYLE, COMMENT_STYLE);
String value = COMMENT_PREFIX + sourceNode.getNodeValue()
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 13:30:13 UTC (rev 9452)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 14:42:16 UTC (rev 9453)
@@ -325,21 +325,37 @@
nsIDOMNode visualNode = nodeData.getVisualNode();
- if(visualNode!=null&&visualNode.getNodeType()==nsIDOMNode.TEXT_NODE&&nodeData.getSourceNode()!=null) {
- NodeImpl targetSourceNode = (NodeImpl)nodeData.getSourceNode();
- String sourceNodeValue = nodeData.getSourceNode().getNodeValue();
- ITextRegion valueRegion = targetSourceNode.getValueRegion();
- if(valueRegion==null) {
- return;
+ if(visualNode!=null
+ &&visualNode.getNodeType()==nsIDOMNode.TEXT_NODE
+ &&nodeData.getSourceNode()!=null){
+
+ if(nodeData.getSourceNode().getNodeType()==Node.ELEMENT_NODE) {
+ NodeImpl targetSourceNode = (NodeImpl)nodeData.getSourceNode();
+ String sourceNodeValue = nodeData.getSourceNode().getNodeValue();
+ ITextRegion valueRegion = targetSourceNode.getValueRegion();
+ if(valueRegion==null) {
+ return;
+ }
+ ITextRegion nameRegion = targetSourceNode.getNameRegion();
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument-valueRegion.getStart()-targetSourceNode.getStartOffset()+nameRegion.getStart()-1;
+
+ if(offcetReferenceToSourceNode<visualNode.getNodeValue().length()){
+
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, offcetReferenceToSourceNode);
+ }
+ }else if (nodeData.getSourceNode().getNodeType()==Node.TEXT_NODE){
+
+ IndexedRegion targetSourceNode = (IndexedRegion) nodeData.getSourceNode();
+
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
+
+ int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+
+ selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, visualNodeOffcet);
+
+ }
}
- ITextRegion nameRegion = targetSourceNode.getNameRegion();
- int offcetReferenceToSourceNode = focusOffcetInSourceDocument-valueRegion.getStart()-targetSourceNode.getStartOffset()+nameRegion.getStart()-1;
-
- if(offcetReferenceToSourceNode<visualNode.getNodeValue().length()){
- selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, offcetReferenceToSourceNode);
- }
- }
}
/**
* Restore cursor position in visual document for by source position
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-07-31 13:30:13 UTC (rev 9452)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.html/src/org/jboss/tools/vpe/html/template/HtmlTextTemplate.java 2008-07-31 14:42:16 UTC (rev 9453)
@@ -12,6 +12,10 @@
package org.jboss.tools.vpe.html.template;
import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.mapping.NodeData;
+import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
+import org.jboss.tools.vpe.editor.mapping.VpeElementData;
+import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
import org.jboss.tools.vpe.editor.util.HTML;
@@ -48,4 +52,22 @@
return new VpeCreationData(element);
}
+ /* (non-Javadoc)
+ * @see org.jboss.tools.vpe.editor.template.VpeAbstractTemplate#getNodeData(org.mozilla.interfaces.nsIDOMNode, org.jboss.tools.vpe.editor.mapping.VpeElementData, org.jboss.tools.vpe.editor.mapping.VpeDomMapping)
+ */
+ @Override
+ public NodeData getNodeData(nsIDOMNode node, VpeElementData elementData,
+ VpeDomMapping domMapping) {
+
+ NodeData result;
+ VpeNodeMapping nodeMapping = domMapping.getNearNodeMapping(node);
+ if(node.getNodeType()==nsIDOMNode.ELEMENT_NODE) {
+ result = new NodeData(nodeMapping.getSourceNode(),node.getFirstChild(),true);
+ } else {
+ result = new NodeData(nodeMapping.getSourceNode(),node,true);
+ }
+ return result;
+ }
+
+
}
16 years, 5 months
JBoss Tools SVN: r9452 - queries and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2008-07-31 09:30:13 -0400 (Thu, 31 Jul 2008)
New Revision: 9452
Removed:
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL queries.wnk
Log:
The old file is deleted
Deleted: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL queries.wnk
===================================================================
(Binary files differ)
16 years, 5 months
JBoss Tools SVN: r9451 - queries and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: msorokin
Date: 2008-07-31 09:28:29 -0400 (Thu, 31 Jul 2008)
New Revision: 9451
Modified:
trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
Log:
The org styles were added to the html file
Modified: trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm
===================================================================
--- trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm 2008-07-31 12:00:18 UTC (rev 9450)
+++ trunk/documentation/movies/HQL_JPA-QL queries/HQL_JPA-QL_queries.htm 2008-07-31 13:28:29 UTC (rev 9451)
@@ -1,6 +1,14 @@
<!-- saved from url=(0014)about:internet -->
<HTML>
+<head>
+<link rel="stylesheet" href="../resources/tools.css" type="text/css"/>
+<link xmlns="" rel="shortcut icon" type="image/vnd.microsoft.icon" href="../resources/images/favicon.ico"/>
+</head>
<BODY>
+<div class="book">
+<p id="title"><a href="http://www.jboss.org" class="site_href">
+<strong>JBoss.org</strong></a><a href="http://docs.jboss.org/" class="doc_href">
+<strong >Community Demos</strong></a></p>
<center><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="752" HEIGHT="628" CODEBASE="http://active.macromedia.com/flash5/cabs/swflash.cab#version=7,0,0,0">
<PARAM NAME=movie VALUE="HQL_JPA-QL_queries.swf">
<PARAM NAME=play VALUE=true>
16 years, 5 months
JBoss Tools SVN: r9450 - in trunk: vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-07-31 08:00:18 -0400 (Thu, 31 Jul 2008)
New Revision: 9450
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FaceletUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
add comments
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/AbstractOutputJsfTemplate.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.template;
import org.eclipse.wst.xml.core.internal.provisional.document.IDOMAttr;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextAreaTemplate.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.template;
import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.jsf.vpe.jsf.template;
import org.jboss.tools.jsf.vpe.jsf.template.util.JSF;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/KeyEventManager.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.vpe.editor.template;
import org.eclipse.swt.custom.ST;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.vpe.editor.template;
import org.eclipse.jface.viewers.ISelection;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/DocTypeUtil.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.vpe.editor.util;
import java.io.File;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FaceletUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FaceletUtil.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/FaceletUtil.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.vpe.editor.util;
import java.util.HashSet;
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-31 11:12:51 UTC (rev 9449)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-07-31 12:00:18 UTC (rev 9450)
@@ -1,3 +1,14 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.tools.vpe.editor.util;
import java.util.ArrayList;
16 years, 5 months
JBoss Tools SVN: r9449 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-07-31 07:12:51 -0400 (Thu, 31 Jul 2008)
New Revision: 9449
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
Fix bugs.
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-31 10:56:33 UTC (rev 9448)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-07-31 11:12:51 UTC (rev 9449)
@@ -177,7 +177,7 @@
textValue = sourceNode.getFirstChild().getNodeValue();
}
if ((textValue != null) && isContainsEl(textValue)) {
- final String newValue = bundleMap.getBundleValue(sourceNode.getNodeValue(), 0);
+ final String newValue = bundleMap.getBundleValue(textValue, 0);
if (!textValue.equals(newValue)) {
rst = true;
16 years, 5 months