JBoss Tools SVN: r9640 - trunk/documentation/jboss-tools-docs.
by jbosstools-commits@lists.jboss.org
Author: smukhina
Date: 2008-08-11 10:54:23 -0400 (Mon, 11 Aug 2008)
New Revision: 9640
Modified:
trunk/documentation/jboss-tools-docs/all-guides.xml
trunk/documentation/jboss-tools-docs/pom.xml
Log:
https://jira.jboss.org/jira/browse/JBDS-91-ws docs are added to docs bundle of nightly builds;
Modified: trunk/documentation/jboss-tools-docs/all-guides.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/all-guides.xml 2008-08-11 14:28:55 UTC (rev 9639)
+++ trunk/documentation/jboss-tools-docs/all-guides.xml 2008-08-11 14:54:23 UTC (rev 9640)
@@ -231,6 +231,20 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</fileSet>
+
+ <fileSet>
+ <directory>../../ws/docs/reference/target/docbook/publish/en-US</directory>
+ <outputDirectory>/ws_ref_guide</outputDirectory>
+ <filtered>false</filtered>
+ <lineEnding>keep</lineEnding>
+ <includes>
+ <include>**/*.*</include>
+ </includes>
+ <useStrictFiltering>false</useStrictFiltering>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <fileMode>0644</fileMode>
+ <directoryMode>0755</directoryMode>
+ </fileSet>
</fileSets>
</assembly>
\ No newline at end of file
Modified: trunk/documentation/jboss-tools-docs/pom.xml
===================================================================
--- trunk/documentation/jboss-tools-docs/pom.xml 2008-08-11 14:28:55 UTC (rev 9639)
+++ trunk/documentation/jboss-tools-docs/pom.xml 2008-08-11 14:54:23 UTC (rev 9640)
@@ -23,6 +23,8 @@
<module>../../struts/docs/struts_tools_ref_guide</module>
<module>../../struts/docs/struts_tools_tutorial</module>
<module>../../esb/docs/esb_ref_guide</module>
+ <module>../../ws/docs/reference</module>
+
<module>index</module>
</modules>
17 years, 4 months
JBoss Tools SVN: r9639 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template.
by jbosstools-commits@lists.jboss.org
Author: sdzmitrovich
Date: 2008-08-11 10:28:55 -0400 (Mon, 11 Aug 2008)
New Revision: 9639
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2526
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-08-11 13:49:06 UTC (rev 9638)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-08-11 14:28:55 UTC (rev 9639)
@@ -361,7 +361,7 @@
int anchorOffcetReferenceToSourceNode = anchorOffsetrInSourceDocument
- NodesManagingUtil.getStartOffsetNode(targetSourceNode);
- int length = targetSourceNode.getNodeValue().length();
+ int length = visualNode.getNodeValue().length();
if (focusOffcetReferenceToSourceNode > length
|| anchorOffcetReferenceToSourceNode > length)
return;
17 years, 4 months
JBoss Tools SVN: r9638 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-11 09:49:06 -0400 (Mon, 11 Aug 2008)
New Revision: 9638
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
Log:
Add "Restore Default" and "Apply" buttons functionality for the JBIDE-2594
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-11 13:49:01 UTC (rev 9637)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-11 13:49:06 UTC (rev 9638)
@@ -23,7 +23,9 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;
import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.vpe.editor.css.GlobalELReferenceList;
import org.jboss.tools.vpe.editor.css.GlobalElVariablesComposite;
+import org.jboss.tools.vpe.editor.css.ResourceReference;
import org.jboss.tools.vpe.editor.css.VpeResourcesDialog;
/**
@@ -33,9 +35,24 @@
*/
public class ELVariablesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ private static final ResourceReference[] EMPTY_RESOURCE = new ResourceReference[0];
/** The el. */
private GlobalElVariablesComposite el = new GlobalElVariablesComposite();
+ @Override
+ protected void performApply() {
+ super.performApply();
+ this.performOk();
+ }
+
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ el.clearAll();
+ el.update();
+ }
+
/**
* Creates the contents.
*
@@ -71,6 +88,7 @@
@Override
public boolean performOk() {
boolean rst = super.performOk();
+
el.commit();
return rst;
}
@@ -84,9 +102,9 @@
final VpeResourcesDialog dialog = new VpeResourcesDialog();
final Properties p = new Properties();
- p.setProperty("help", "VpeResourcesDialog");
- p.put("path", Platform.getLocation());
- p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ p.setProperty("help", "VpeResourcesDialog"); //$NON-NLS-1$ //$NON-NLS-2$
+ p.put("path", Platform.getLocation()); //$NON-NLS-1$
+ p.put("model", PreferenceModelUtilities.getPreferenceModel()); //$NON-NLS-1$
dialog.setObject(p);
el.setObject(p);
}
17 years, 4 months
JBoss Tools SVN: r9637 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-11 09:49:01 -0400 (Mon, 11 Aug 2008)
New Revision: 9637
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesComposite.java
Log:
Add "Restore Default" and "Apply" buttons functionality for the JBIDE-2594
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesComposite.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesComposite.java 2008-08-11 13:37:42 UTC (rev 9636)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/css/ResourceReferencesComposite.java 2008-08-11 13:49:01 UTC (rev 9637)
@@ -16,23 +16,21 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.meta.XAttribute;
-import org.jboss.tools.common.meta.XModelEntity;
-import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintFileFilter;
-import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
-import org.jboss.tools.common.model.ui.action.CommandBar;
-import org.jboss.tools.common.model.ui.action.CommandBarListener;
-import org.jboss.tools.common.model.ui.objecteditor.XTable;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
+import org.jboss.tools.common.meta.XAttribute;
+import org.jboss.tools.common.meta.XModelEntity;
+import org.jboss.tools.common.meta.constraint.impl.XAttributeConstraintFileFilter;
+import org.jboss.tools.common.meta.impl.XModelMetaDataImpl;
+import org.jboss.tools.common.model.ui.action.CommandBar;
+import org.jboss.tools.common.model.ui.action.CommandBarListener;
+import org.jboss.tools.common.model.ui.objecteditor.XTable;
public abstract class ResourceReferencesComposite {
static String ADD = "Add";
@@ -117,6 +115,15 @@
return (ResourceReference[])dataList.toArray(new ResourceReference[0]);
}
+ /**
+ * Clear all entries from table.
+ */
+ public void clearAll(){
+ if(this.dataList!=null){
+ this.dataList.clear();
+ }
+ }
+
public void commit() {
if(file != null) {
getReferenceList().setAllResources(file, getReferenceArray());
17 years, 4 months
JBoss Tools SVN: r9636 - 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-08-11 09:37:42 -0400 (Mon, 11 Aug 2008)
New Revision: 9636
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.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/NodesManagingUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2526
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-08-11 10:06:22 UTC (rev 9635)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaEditor.java 2008-08-11 13:37:42 UTC (rev 9636)
@@ -727,6 +727,10 @@
//here we getting inline table editor and disable it's too
nsIHTMLInlineTableEditor inlineTableEditor = (nsIHTMLInlineTableEditor) editor.queryInterface(nsIHTMLInlineTableEditor.NS_IHTMLINLINETABLEEDITOR_IID);
inlineTableEditor.setInlineTableEditingEnabled(false);
+
+ // Added by Sergey Dzmitrovich Fix for JBIDE-2526
+ // It need for correct work of selection in source
+ iEditingSession.tearDownEditorOnWindow(getXulRunnerEditor().getWebBrowser().getContentDOMWindow());
}
return editor;
}
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-08-11 10:06:22 UTC (rev 9635)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/template/SelectionManager.java 2008-08-11 13:37:42 UTC (rev 9636)
@@ -16,9 +16,7 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
-import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.xml.core.internal.document.NodeImpl;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.NodeData;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
@@ -118,7 +116,7 @@
}
} else {
- //here we processed text node
+ // here we processed text node
targetVisualNode = nodeMapping.getVisualNode();
targetSourceNode = nodeMapping.getSourceNode();
isNodeEditable = true;
@@ -130,7 +128,8 @@
if (isNodeEditable) {
- Point sourceSelectionRange = SelectionUtil.getSourceSelectionRange(selection,targetSourceNode);
+ Point sourceSelectionRange = SelectionUtil.getSourceSelectionRange(
+ selection, targetSourceNode);
focusOffset = sourceSelectionRange.x;
length = sourceSelectionRange.y;
@@ -241,152 +240,194 @@
targetVisualNode);
}
+
/**
- * Syncronization visual selection and source selection,
- * actually moves source selection to visual selection
+ * Syncronization visual selection and source selection, actually moves
+ * source selection to visual selection
*/
final public void refreshVisualSelection() {
- //TODO Max Areshkau Adjust for restoring cursor position
+ // TODO Max Areshkau Adjust for restoring cursor position
IStructuredModel model = null;
-
+
try {
- //checks for null, for case when we close editor and background update job is running
- if(getSourceEditor().getTextViewer()==null) {
-
- return;
- }
- //gets source model for read, model should be released see JBIDE-2219
- model = StructuredModelManager.getModelManager()
- .getExistingModelForRead(getSourceEditor().getTextViewer().getDocument());
-
- Point range = SelectionUtil.getSourceSelectionRange(getSourceEditor());
-
- ISelection selection = getSourceEditor().getTextViewer().getSelection();
+ // checks for null, for case when we close editor and background
+ // update job is running
+ if (getSourceEditor().getTextViewer() == null) {
- if (range == null)
- return;
-
- int focusOffcetInSourceDocument = range.x;
+ return;
+ }
+ // gets source model for read, model should be released see
+ // JBIDE-2219
+ model = StructuredModelManager.getModelManager()
+ .getExistingModelForRead(
+ getSourceEditor().getTextViewer().getDocument());
- int anchorOffcetInSourceDocument = focusOffcetInSourceDocument + range.y;
+ Point range = SelectionUtil
+ .getSourceSelectionRange(getSourceEditor());
- // get element mapping
- VpeNodeMapping nodeMapping = SelectionUtil
- .getNodeMappingBySourceSelection(model,
- getDomMapping(), focusOffcetInSourceDocument, anchorOffcetInSourceDocument);
+ ISelection selection = getSourceEditor().getTextViewer()
+ .getSelection();
- if (nodeMapping == null)
- return;
+ if (range == null)
+ return;
- // visual node which will be selected
- nsIDOMNode targetVisualNode;
-
-// int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
-
- // if mapping is elementMapping
- if (nodeMapping instanceof VpeElementMapping) {
+ int focusOffcetInSourceDocument = range.x;
- VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
+ int anchorOffcetInSourceDocument = focusOffcetInSourceDocument
+ + range.y;
- VpeTemplate template = elementMapping.getTemplate();
+ // get element mapping
+ VpeNodeMapping nodeMapping = SelectionUtil
+ .getNodeMappingBySourceSelection(model, getDomMapping(),
+ focusOffcetInSourceDocument,
+ anchorOffcetInSourceDocument);
- targetVisualNode = template.getVisualNodeByBySourcePosition(
- elementMapping, focusOffcetInSourceDocument, anchorOffcetInSourceDocument, getDomMapping());
+ if (nodeMapping == null)
+ return;
+
+ // visual node which will be selected
+ nsIDOMNode targetVisualNode;
+
+ // int visualNodeOffcet =
+ // TextUtil.visualPosition(((Node)targetSourceNode
+ // ).getNodeValue(),offcetReferenceToSourceNode);
+
+ // if mapping is elementMapping
- NodeData nodeData = template.getNodeData(targetVisualNode, elementMapping.getElementData(), getDomMapping());
- //we can restore cursor position only if we have nodeData and range.y==0
- if(nodeData!=null && range.y==0) {
- //restore cursor position in source document
- restoreVisualCursorPosition(template, nodeData, focusOffcetInSourceDocument);
+ SelectionUtil.clearSelection(selectionController);
+
+ if (nodeMapping instanceof VpeElementMapping) {
+
+ VpeElementMapping elementMapping = (VpeElementMapping) nodeMapping;
+
+ VpeTemplate template = elementMapping.getTemplate();
+
+ targetVisualNode = template.getVisualNodeByBySourcePosition(
+ elementMapping, focusOffcetInSourceDocument,
+ anchorOffcetInSourceDocument, getDomMapping());
+
+ NodeData nodeData = template.getNodeData(targetVisualNode,
+ elementMapping.getElementData(), getDomMapping());
+ // we can restore cursor position only if we have nodeData and
+ // range.y==0
+ if (nodeData != null) {
+ // restore cursor position in source document
+ restoreVisualCursorPosition(template, nodeData,
+ focusOffcetInSourceDocument,
+ anchorOffcetInSourceDocument);
+ }
+ } else {
+
+ targetVisualNode = nodeMapping.getVisualNode();
+ // restore cursor position for source node
+// restoreVisualCursorPositionForTextNode(targetVisualNode,
+// focusOffcetInSourceDocument, model);
}
- } else {
-
- targetVisualNode = nodeMapping.getVisualNode();
- //restore cursor position for source node
- restoreVisualCursorPositionForTextNode(targetVisualNode, focusOffcetInSourceDocument, model);
- }
- //here we restore only highlight
- getPageContext().getVisualBuilder().setSelectionRectangle(
- targetVisualNode);
+ // here we restore only highlight
+ getPageContext().getVisualBuilder().setSelectionRectangle(
+ targetVisualNode);
} finally {
- if(model!=null) {
+ if (model != null) {
model.releaseFromRead();
}
}
}
+
/**
* Restores visual cursor position in visual part of editor
*
- * @param template - current template in scope of which we are editing data
- * !IMPORTANT for current implementation in should be a text node
- * @param nodeData -contains mapping before sourceNode(it's can be an attribute) and visual node, attribute
+ * @param template
+ * - current template in scope of which we are editing data
+ * !IMPORTANT for current implementation in should be a text node
+ * @param nodeData
+ * -contains mapping before sourceNode(it's can be an attribute)
+ * and visual node, attribute
*/
- private void restoreVisualCursorPosition(VpeTemplate template, NodeData nodeData,int focusOffcetInSourceDocument) {
-
+ private void restoreVisualCursorPosition(VpeTemplate template,
+ NodeData nodeData, int focusOffcetInSourceDocument,
+ int anchorOffsetrInSourceDocument) {
+
nsIDOMNode visualNode = nodeData.getVisualNode();
-
- if(visualNode!=null
- &&visualNode.getNodeType()==nsIDOMNode.TEXT_NODE
- &&nodeData.getSourceNode()!=null){
-
- if(nodeData.getSourceNode().getNodeType()==Node.ATTRIBUTE_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);
-
- if(visualNodeOffcet<visualNode.getNodeValue().length()) {
-
- selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(visualNode, visualNodeOffcet);
- }
- }
+ if (visualNode != null
+ && visualNode.getNodeType() == nsIDOMNode.TEXT_NODE
+ && nodeData.getSourceNode() != null) {
+
+ Node targetSourceNode = nodeData.getSourceNode();
+
+ int focusOffcetReferenceToSourceNode = focusOffcetInSourceDocument
+ - NodesManagingUtil.getStartOffsetNode(targetSourceNode);
+
+ int anchorOffcetReferenceToSourceNode = anchorOffsetrInSourceDocument
+ - NodesManagingUtil.getStartOffsetNode(targetSourceNode);
+
+ int length = targetSourceNode.getNodeValue().length();
+ if (focusOffcetReferenceToSourceNode > length
+ || anchorOffcetReferenceToSourceNode > length)
+ return;
+
+ int visualNodeFocusOffcet = TextUtil.visualPosition(
+ ((Node) targetSourceNode).getNodeValue(),
+ focusOffcetReferenceToSourceNode);
+
+ int visualNodeAnchorOffcet = TextUtil.visualPosition(
+ ((Node) targetSourceNode).getNodeValue(),
+ anchorOffcetReferenceToSourceNode);
+
+ selectionController.getSelection(
+ nsISelectionController.SELECTION_NORMAL).collapse(
+ visualNode, visualNodeFocusOffcet);
+
+ if (visualNodeAnchorOffcet != visualNodeFocusOffcet) {
+ selectionController.getSelection(
+ nsISelectionController.SELECTION_NORMAL).extend(
+ visualNode, visualNodeAnchorOffcet);
}
-
+
+ }
+
}
+
/**
+ *
+ * @deprecated
* Restore cursor position in visual document for by source position
+ *
* @param visualNode
* @param focusOffcetInSourceDocument
*/
- private void restoreVisualCursorPositionForTextNode(nsIDOMNode visualNode, int focusOffcetInSourceDocument,IStructuredModel model) {
-
- if(visualNode==null) return;
-
+ private void restoreVisualCursorPositionForTextNode(nsIDOMNode visualNode,
+ int focusOffcetInSourceDocument, IStructuredModel model) {
+
+ if (visualNode == null)
+ return;
+
nsIDOMNode targetVisualNode = visualNode.getFirstChild();
-
- if(targetVisualNode==null||targetVisualNode.getNodeType()!=nsIDOMNode.TEXT_NODE) {
+
+ if (targetVisualNode == null
+ || targetVisualNode.getNodeType() != nsIDOMNode.TEXT_NODE) {
return;
}
-
- IndexedRegion targetSourceNode = (IndexedRegion) SelectionUtil.getSourceNodeByPosition(model, focusOffcetInSourceDocument);
+
+ IndexedRegion targetSourceNode = (IndexedRegion) SelectionUtil
+ .getSourceNodeByPosition(model, focusOffcetInSourceDocument);
// should be a text node
- if(((Node)targetSourceNode).getNodeType()!=Node.TEXT_NODE) {
+ if (((Node) targetSourceNode).getNodeType() != Node.TEXT_NODE) {
return;
}
- int offcetReferenceToSourceNode = focusOffcetInSourceDocument-targetSourceNode.getStartOffset();
+ int offcetReferenceToSourceNode = focusOffcetInSourceDocument
+ - targetSourceNode.getStartOffset();
- int visualNodeOffcet = TextUtil.visualPosition(((Node)targetSourceNode).getNodeValue(),offcetReferenceToSourceNode);
+ int visualNodeOffcet = TextUtil.visualPosition(
+ ((Node) targetSourceNode).getNodeValue(),
+ offcetReferenceToSourceNode);
- selectionController.getSelection(nsISelectionController.SELECTION_NORMAL).collapse(targetVisualNode, visualNodeOffcet);
+ selectionController.getSelection(
+ nsISelectionController.SELECTION_NORMAL).collapse(
+ targetVisualNode, visualNodeOffcet);
}
-
+
protected VpePageContext getPageContext() {
return pageContext;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2008-08-11 10:06:22 UTC (rev 9635)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/NodesManagingUtil.java 2008-08-11 13:37:42 UTC (rev 9636)
@@ -99,7 +99,23 @@
}
/**
+ * if position belong to node return true
*
+ * @param node
+ * @param position
+ * @return
+ */
+ public static boolean isNodeContainsPosition(Node node, int position) {
+
+ if ((NodesManagingUtil.getStartOffsetNode(node) <= position)
+ && (NodesManagingUtil.getEndOffsetNode(node) > position))
+ return true;
+
+ return false;
+ }
+
+ /**
+ *
* @param pageContext
* @param sourceElement
* @return
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-08-11 10:06:22 UTC (rev 9635)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2008-08-11 13:37:42 UTC (rev 9636)
@@ -11,9 +11,6 @@
package org.jboss.tools.vpe.editor.util;
-import java.util.ArrayList;
-import java.util.List;
-
import org.eclipse.core.resources.IFile;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.ITextViewer;
@@ -21,33 +18,25 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
-import org.eclipse.wst.xml.core.internal.provisional.document.IDOMNode;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
+import org.jboss.tools.vpe.editor.selection.VpeSelectionController;
import org.mozilla.interfaces.nsIDOMNode;
import org.mozilla.interfaces.nsIDOMRange;
import org.mozilla.interfaces.nsISelection;
+import org.mozilla.interfaces.nsISelectionController;
import org.w3c.dom.Node;
/**
* Util class for selection manupalating
+ *
* @author S.Dzmitrovich
*
*/
public class SelectionUtil {
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static List<String> NO_INPUT_TYPES;
- static {
- NO_INPUT_TYPES = new ArrayList<String>();
-
- NO_INPUT_TYPES.add(HTML.VALUE_TEXT_TYPE);
- NO_INPUT_TYPES.add(HTML.VALUE_PASSWORD_TYPE);
- NO_INPUT_TYPES.add(EMPTY_STRING);
- }
-
/**
* get selected visual node from nsISelection
*
@@ -125,7 +114,8 @@
Node focusNode = getSourceNodeByPosition(model, focus);
// if focus node also contain anchor point (selected only 1 element)
- if ((focusNode != null) && isNodeContainsPosition(focusNode, anchor)) {
+ if ((focusNode != null)
+ && NodesManagingUtil.isNodeContainsPosition(focusNode, anchor)) {
return NodesManagingUtil.getNodeMapping(domMapping, focusNode);
@@ -134,22 +124,6 @@
}
- /**
- * if position belong to node return true
- *
- * @param node
- * @param position
- * @return
- */
- private static boolean isNodeContainsPosition(Node node, int position) {
-
- if ((((IDOMNode) node).getStartOffset() <= position)
- && (((IDOMNode) node).getEndOffset() >= position))
- return true;
-
- return false;
- }
-
public static Node getSourceNodeByPosition(IStructuredModel model,
int position) {
@@ -158,11 +132,13 @@
return node;
}
+
/**
- * Returns selection range for visual part of editor
- * Focus offset and anchor offset can be not equals to source focus offset and anchor offset
+ * Returns selection range for visual part of editor Focus offset and anchor
+ * offset can be not equals to source focus offset and anchor offset
*
- * @param selection -selection in visual part of editor
+ * @param selection
+ * -selection in visual part of editor
*
* @return selection range for visual part of editor
*/
@@ -179,17 +155,36 @@
}
return range;
}
+
/**
- * Return source editor part selection range, range returns relatively to start of text in source,
- * not for start of document
+ * Return source editor part selection range, range returns relatively to
+ * start of text in source, not for start of document
*
* @param selection
* @return source editor selection range
*/
- public static Point getSourceSelectionRange(nsISelection selection, Node sourceNode) {
+ public static Point getSourceSelectionRange(nsISelection selection,
+ Node sourceNode) {
+
+ if (selection.getAnchorNode() != null) {
+
+ System.out.print("\n anchor name:"
+ + selection.getAnchorNode().getNodeName() + "\t value:"
+ + selection.getAnchorNode().getNodeValue());
+ System.out.print("\n anchor offset " + selection.getAnchorOffset());
+
+ }
+ if (selection.getFocusNode() != null) {
+
+ System.out.print("\n focus name:"
+ + selection.getFocusNode().getNodeName() + "\t value:"
+ + selection.getFocusNode().getNodeValue());
+ System.out.print("\n focus offset " + selection.getFocusOffset());
+
+ }
nsIDOMNode focusedNode = getSelectedNode(selection);
- //gets visual selection range
+ // gets visual selection range
Point sourceRange = new Point(0, 0);
//converts to source selection
if (sourceNode != null) {
@@ -199,54 +194,57 @@
}
return sourceRange;
}
-
+
public static VpeNodeMapping getNodeMappingBySourceSelection(
StructuredTextEditor sourceEditor, VpeDomMapping domMapping) {
Point range = sourceEditor.getTextViewer().getSelectedRange();
IDocument document = sourceEditor.getTextViewer().getDocument();
-
- IStructuredModel model =null;
-
+
+ IStructuredModel model = null;
+
try {
- model = StructuredModelManager.getModelManager()
- .getExistingModelForRead(document);
+ model = StructuredModelManager.getModelManager()
+ .getExistingModelForRead(document);
- int anchor = range.x;
- int focus = range.x + range.y;
+ int anchor = range.x;
+ int focus = range.x + range.y;
- /*
- * implementation of IDOMModel's method getIndexedRegion(...) has one
- * feature : if cursor is situated at the border of elements then this
- * method return next element. For example ... <h:inputText
- * ../><h:outputText/>... - if cursor will be situated at the right
- * border of "h:inputText" element then getIndexedRegion() return
- * "h:outputText" element. So for focus position we choose smaller value
- */
+ /*
+ * implementation of IDOMModel's method getIndexedRegion(...) has
+ * one feature : if cursor is situated at the border of elements
+ * then this method return next element. For example ...
+ * <h:inputText ../><h:outputText/>... - if cursor will be situated
+ * at the right border of "h:inputText" element then
+ * getIndexedRegion() return "h:outputText" element. So for focus
+ * position we choose smaller value
+ */
- if (anchor < focus) {
- focus = anchor;
- anchor = focus;
- }
+ if (anchor < focus) {
+ focus = anchor;
+ anchor = focus;
+ }
- // get source node by offset
- Node focusNode = getSourceNodeByPosition(model, focus);
+ // get source node by offset
+ Node focusNode = getSourceNodeByPosition(model, focus);
- // if focus node also contain anchor point (selected only 1 element)
- if ((focusNode != null) && isNodeContainsPosition(focusNode, anchor)) {
+ // if focus node also contain anchor point (selected only 1 element)
+ if ((focusNode != null)
+ && NodesManagingUtil.isNodeContainsPosition(focusNode,
+ anchor)) {
- return NodesManagingUtil.getNodeMapping(domMapping, focusNode);
+ return NodesManagingUtil.getNodeMapping(domMapping, focusNode);
- }
+ }
} finally {
-
- if(model!=null) {
-
+
+ if (model != null) {
+
model.releaseFromRead();
}
}
-
+
return null;
}
@@ -257,12 +255,15 @@
.getLastSelectedNode();
}
+
/**
* Returns sourceSelectionRange
+ *
* @param sourceEditor
* @return sourceSelectionRange
*/
- static public Point getSourceSelectionRange(StructuredTextEditor sourceEditor) {
+ static public Point getSourceSelectionRange(
+ StructuredTextEditor sourceEditor) {
ITextViewer textViewer = sourceEditor.getTextViewer();
if (textViewer != null)
@@ -270,5 +271,14 @@
return null;
}
+
+ /**
+ *
+ * @param selectionController
+ */
+ static public void clearSelection(VpeSelectionController selectionController) {
+ selectionController.getSelection(
+ nsISelectionController.SELECTION_NORMAL).removeAllRanges();
+ }
}
17 years, 4 months
JBoss Tools SVN: r9635 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test: jbide and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-11 06:06:22 -0400 (Mon, 11 Aug 2008)
New Revision: 9635
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java
Log:
Test case for the JBIDE-2594
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 2008-08-08 18:59:21 UTC (rev 9634)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2008-08-11 10:06:22 UTC (rev 9635)
@@ -33,6 +33,7 @@
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2505Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2582Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2584Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.JBIDE2594Test;
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.JsfJbide1467Test;
@@ -86,6 +87,7 @@
suite.addTestSuite(ElPreferencesTestCase.class);
suite.addTestSuite(JBIDE2010Test.class);
suite.addTestSuite(JBIDE2582Test.class);
+ suite.addTestSuite(JBIDE2594Test.class);
// $JUnit-END$
// added by Max Areshkau
// add here projects which should be imported for junit tests
Added: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java 2008-08-11 10:06:22 UTC (rev 9635)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.test.jbide;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.jsf.vpe.jsf.test.CommonJBIDE2010Test;
+import org.jboss.tools.vpe.editor.css.GlobalELReferenceList;
+import org.jboss.tools.vpe.editor.css.ResourceReference;
+import org.jboss.tools.vpe.editor.util.ElService;
+
+/**
+ * Test case for testing global El expression substitution
+ * @author Evgenij Stherbin
+ *
+ */
+public class JBIDE2594Test extends CommonJBIDE2010Test {
+
+ /**
+ *
+ */
+ protected static final String KEY_6 = "#{global.value1}"; //$NON-NLS-1$
+ protected Map<String, String> globalElMap = new HashMap<String, String>();
+
+ /**
+ * @param name
+ */
+ public JBIDE2594Test(String name) {
+ super(name);
+ }
+
+
+
+
+ public void testReplaceGlobalElVariable(){
+ String replaceString= KEY_6+"images/test.gif"; //$NON-NLS-1$
+ String replacedString = ElService.getInstance().replaceEl(file, replaceString);
+
+ assertEquals("Should be equals " + globalElMap.get(KEY_6) + "images/test.gif", replacedString, globalElMap.get(KEY_6) //$NON-NLS-1$ //$NON-NLS-2$
+ + "images/test.gif"); //$NON-NLS-1$
+ }
+
+ /**
+ * Test replace attribute value.
+ *
+ * @throws CoreException the core exception
+ */
+ public void testOverrideLocalVariable() throws CoreException {
+ String string1 = KEY_1+"/images/smalle.gif"; //$NON-NLS-1$
+ String replacedValue = ElService.getInstance().replaceEl(file, string1);
+
+ assertEquals("Should be equals " + globalElMap.get(KEY_1) + "/images/smalle.gif", replacedValue, globalElMap.get(KEY_1) //$NON-NLS-1$ //$NON-NLS-2$
+ + "/images/smalle.gif"); //$NON-NLS-1$
+
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ IPath path = Platform.getLocation();
+
+ assertNotNull("Path can't be null",path); //$NON-NLS-1$
+
+ globalElMap.put(KEY_1, "/override/global/value/"); //$NON-NLS-1$
+ globalElMap.put(KEY_6, "/global/value1/"); //$NON-NLS-1$
+
+ ResourceReference[] entries = new ResourceReference[globalElMap.size()];
+ int i = 0;
+ for (Entry<String, String> string : globalElMap.entrySet()) {
+
+ entries[i] = new ResourceReference(string.getKey(), ResourceReference.GLOBAL_SCOPE);
+ entries[i].setProperties(string.getValue());
+ i++;
+ }
+ setGlobalValues(entries, path);
+
+
+ }
+
+
+ protected void setGlobalValues(ResourceReference[] entries,IPath path) {
+ GlobalELReferenceList.getInstance().setAllResources(path, entries);
+ }
+
+
+
+ @Override
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+}
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/JBIDE2594Test.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 4 months
JBoss Tools SVN: r9634 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-08-08 14:59:21 -0400 (Fri, 08 Aug 2008)
New Revision: 9634
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
Log:
JBID-2609 The VpeController.visualRefresh() method is called even if the Visual part is minimized
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-08-08 17:49:14 UTC (rev 9633)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2008-08-08 18:59:21 UTC (rev 9634)
@@ -1678,6 +1678,10 @@
}
public void visualRefresh() {
+ if (!visualEditorVisible) {
+ synced = false;
+ return;
+ }
if (uiJob != null && uiJob.getState() != Job.NONE) {
return;
}
@@ -1701,6 +1705,7 @@
IProgressMonitor.UNKNOWN);
visualRefreshImpl();
monitor.done();
+ synced=true;
} catch (VpeDisposeException exc) {
// just ignore this exception
} catch (NullPointerException ex) {
17 years, 4 months
JBoss Tools SVN: r9633 - in trunk/documentation/whatsnew: images and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2008-08-08 13:49:14 -0400 (Fri, 08 Aug 2008)
New Revision: 9633
Added:
trunk/documentation/whatsnew/images/seamearprojectvalidator.png
trunk/documentation/whatsnew/images/seamsettingsvalidation.png
trunk/documentation/whatsnew/images/vpespliteditor.png
trunk/documentation/whatsnew/jbds/jbds-news-1.1.0.CR1.html
trunk/documentation/whatsnew/seam/seam-news-1.1.0.CR1.html
trunk/documentation/whatsnew/vpe/vpe-news-2.1.0.CR1.html
Modified:
trunk/documentation/whatsnew/index.html
Log:
commit lost merges from 2.1.x branch.
Added: trunk/documentation/whatsnew/images/seamearprojectvalidator.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/seamearprojectvalidator.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/seamsettingsvalidation.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/seamsettingsvalidation.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/whatsnew/images/vpespliteditor.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/whatsnew/images/vpespliteditor.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/whatsnew/index.html
===================================================================
--- trunk/documentation/whatsnew/index.html 2008-08-08 16:20:37 UTC (rev 9632)
+++ trunk/documentation/whatsnew/index.html 2008-08-08 17:49:14 UTC (rev 9633)
@@ -21,6 +21,21 @@
</tr>
<tr>
<td valign="top" align="left">
+ <p align="right"><b>2.1.0.GA</b>
+ <td valign="top"><p>Bugfixes, no new major features</p></td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>2.1.0.CR1</b>
+ <td valign="top">
+ <p><a href="vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor</a></p>
+ <p><a href="seam/seam-news-1.1.0.CR1.html">Seam Tools</a></p>
+ </td>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
<p align="right"><b>2.1.0.beta1</b>
<td valign="top">
<p><a href="esb/esb-news-1.0.0.beta1.html">JBoss ESB Tools</a></p>
@@ -73,6 +88,20 @@
</tr>
<tr>
<td valign="top" align="left">
+ <p align="right"><b>1.1.0.GA</b></td>
+ <td valign="top">
+ <p>Bugfixes, no new major features</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>1.1.0.CR1</b></td>
+ <td valign="top">
+ <p><a href="jbds/jbds-news-1.1.0.CR1.html">JBoss Developer Studio</a></p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
<p align="right"><b>1.1.0.beta1</b></td>
<td valign="top">
<p><a href="jbds/jbds-news-1.1.0.beta1.html">JBoss Developer Studio</a></p>
Added: trunk/documentation/whatsnew/jbds/jbds-news-1.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/jbds/jbds-news-1.1.0.CR1.html (rev 0)
+++ trunk/documentation/whatsnew/jbds/jbds-news-1.1.0.CR1.html 2008-08-08 17:49:14 UTC (rev 9633)
@@ -0,0 +1,43 @@
+<html>
+
+<head>
+<link rel="stylesheet" href="../whatsnew.css">
+<title>JBoss Developer Studio 1.1.0.CR1 News</title>
+</head>
+
+<body>
+
+<h1>JBoss Developer Studio 1.1.0.CR1 - New and Noteworthy</h1>
+
+<html>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr>
+ <h3>Platforms</h3>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>EAP 4.3</b></td>
+ <td valign="top">
+ <p>We now bundle EAP 4.3 as opposed to EAP 4.2 in previous versions</p>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="left">
+ <p align="right"><b>WTP 2.0.2+Patches+Fix</b></td>
+ <td valign="top">
+ <p>Eclipse is updated to WTP 2.0.2 with WTP's patches and our fix/workaround for ensuring JEE jar's without descriptors can get deployed.</p>
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/seam/seam-news-1.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/seam/seam-news-1.1.0.CR1.html (rev 0)
+++ trunk/documentation/whatsnew/seam/seam-news-1.1.0.CR1.html 2008-08-08 17:49:14 UTC (rev 9633)
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>Seam tools 1.1.0.CR1 What's New</title>
+</head>
+<body>
+<h1>Seam tools 1.1.0.CR1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../vpe/vpe-news-2.1.0.CR1.html">Visual Page Editor News ></a></p>
+
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Validator</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Seam Ear Project Validator</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>Because WTP 2.0.2 has issues with how previous Seam applications were declared in application.xml we added a Seam Ear Project Validator to make sure users are informed about possible issues and how to update the file.</p>
+
+ <p><img src="../images/seamearprojectvalidator.png"/></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+ <td valign="top" align="right">
+ <a name="itemnam2e" id="itemname2"></a><b>Seam Project settings validator</b>
+ </td>
+ <td width="70%" valign="top">
+ <p>The Seam validator now validates project settings.</p>
+
+ <p><img src="../images/seamsettingsvalidation.png"/></p>
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+</table>
+
+</body>
+
+</html>
+
+
Added: trunk/documentation/whatsnew/vpe/vpe-news-2.1.0.CR1.html
===================================================================
--- trunk/documentation/whatsnew/vpe/vpe-news-2.1.0.CR1.html (rev 0)
+++ trunk/documentation/whatsnew/vpe/vpe-news-2.1.0.CR1.html 2008-08-08 17:49:14 UTC (rev 9633)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Language" content="en-us" />
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+<link rel="stylesheet" href="../whatsnew.css"/>
+<title>Visual Page Editor 2.1.0.CR1 What's New</title>
+</head>
+<body>
+<h1>Visual Page Editor 2.1.0.CR1 What's New</h1>
+
+<p align="right"><a href="../index.html">< Main Index</a> <a href="../seam/seam-news-1.1.0.CR1.html">Seam Tools News ></a></p>
+
+<table border="0" cellpadding="10" cellspacing="0" width="80%">
+ <tr>
+ <td colspan="2">
+ <hr/>
+ <h3>Editor</h3>
+ <hr/>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top" align="right"><p><a name="performance" id="performance"></a><b>Splitpane editor</b></p></td>
+ <td valign="top"><p>The Visual Page Editor now has a splitpane with toggle buttons for quickly moving between source, visual or source/visual modes instead of multiple tabs.</p>
+
+ <p><img src="../images/vpespliteditor.png"/></p>
+
+ <p>You can use shift-F6 and alt-shift-F6 as shortcuts to toggle between the various states of the splitpane.</p>
+ <p>Tip: When editing large documents hiding the visual part will speed up editing</p>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2"><hr />
+ </td>
+ </tr>
+
+</table>
+
+</body>
+
+</html>
+
+
17 years, 4 months
JBoss Tools SVN: r9632 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-08 12:20:37 -0400 (Fri, 08 Aug 2008)
New Revision: 9632
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java
Log:
JBIDE-2594 issue implementation add global el variables scope.
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-08-08 15:56:27 UTC (rev 9631)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/ElService.java 2008-08-08 16:20:37 UTC (rev 9632)
@@ -14,9 +14,12 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
import org.jboss.tools.vpe.editor.bundle.BundleMap;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.css.ELReferenceList;
+import org.jboss.tools.vpe.editor.css.GlobalELReferenceList;
import org.jboss.tools.vpe.editor.css.ResourceReference;
import org.w3c.dom.Attr;
import org.w3c.dom.NamedNodeMap;
@@ -42,7 +45,7 @@
*/
public boolean isAvailable(IFile resourceFile) {
boolean rst = false;
- final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
+ final ResourceReference[] references = getAllResources(resourceFile);
if ((references != null) && (references.length > 0)) {
rst = true;
@@ -86,15 +89,17 @@
}
Assert.isNotNull(resourceFile);
String rst = resourceString;
+ final ResourceReference[] references = getAllResources(resourceFile);
+
- final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
-
if ((references != null) && (references.length > 0)) {
rst = replace(resourceString, references);
}
return rst;
}
+
+
/**
* Replace.
*
@@ -249,7 +254,8 @@
private boolean findForNode(Node sourceNode, IFile resourceFile) {
boolean rst = false;
final NamedNodeMap nodeMap = sourceNode.getAttributes();
- final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
+ final ResourceReference[] references = getAllResources(resourceFile);
+ //ELReferenceList.getInstance().getAllResources(resourceFile);
String textValue = null;
if (sourceNode.getNodeType() == Node.TEXT_NODE/*
@@ -310,7 +316,8 @@
*/
public String reverseReplace(IFile resourceFile, String replacedString) {
String str = replacedString;
- final ResourceReference[] references = ELReferenceList.getInstance().getAllResources(resourceFile);
+ final ResourceReference[] references = getAllResources(resourceFile);
+ //ELReferenceList.getInstance().getAllResources(resourceFile);
if ((str != null) && (references != null) && (references.length > 0)) {
for (ResourceReference rf : references) {
@@ -323,7 +330,36 @@
return str;
}
+
+
+ protected ResourceReference[] getAllResources(IFile resourceFile) {
+ ResourceReference[] rst = null;
+ final IPath workspacePath = Platform.getLocation();
+ final ResourceReference[] gResources = GlobalELReferenceList.getInstance().getAllResources(workspacePath);
+ final ResourceReference[] elResources = ELReferenceList.getInstance().getAllResources(resourceFile);
+
+ int size = (gResources == null ? 0 : gResources.length);
+ size += (elResources == null ? 0 : elResources.length);
+ rst = new ResourceReference[size];
+ int counter = 0;
+ if ((gResources != null) && (gResources.length > 0)) {
+ for (ResourceReference r : gResources) {
+ rst[counter] = r;
+ counter++;
+ }
+ }
+ if ((elResources != null) && (elResources.length > 0)) {
+ for (ResourceReference r : elResources) {
+ rst[counter] = r;
+ counter++;
+ }
+ }
+
+ return rst;
+
+ }
+
public String replaceElAndResources(VpePageContext pageContext, Node attributeNode) {
final IFile file = pageContext.getVisualBuilder().getCurrentIncludeInfo().getFile();
17 years, 4 months
JBoss Tools SVN: r9631 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: estherbin
Date: 2008-08-08 11:56:27 -0400 (Fri, 08 Aug 2008)
New Revision: 9631
Added:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
JBIDE-2594 issue implementation add global el variables scope.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-08-08 15:49:53 UTC (rev 9630)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/META-INF/MANIFEST.MF 2008-08-08 15:56:27 UTC (rev 9631)
@@ -27,7 +27,8 @@
org.jboss.tools.jst.web.ui.wizards.tomcatvm,
org.jboss.tools.jst.jsp.jspeditor.jsppreview,
org.jboss.tools.common.model.ui.texteditors.preferences,
- org.jboss.tools.jst.web.ui.editors.webapp.form
+ org.jboss.tools.jst.web.ui.editors.webapp.form,
+ org.jboss.tools.vpe
Require-Bundle: org.jboss.tools.common,
org.eclipse.ui.ide,
org.eclipse.ui.views,
@@ -84,4 +85,5 @@
org.eclipse.core.runtime,
org.eclipse.debug.ui
Bundle-Version: 2.0.0
+Import-Package: org.jboss.tools.vpe.editor.css
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-08-08 15:49:53 UTC (rev 9630)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2008-08-08 15:56:27 UTC (rev 9631)
@@ -41,6 +41,8 @@
<extension point="org.eclipse.ui.preferencePages">
<page category="org.jboss.tools.common.model.ui" class="org.jboss.tools.jst.web.ui.internal.preferences.LibrarySetsPreferencePage" id="org.jboss.tools.common.xstudio.libsets" name="Library Sets">
</page>
+ <page category="org.jboss.tools.common.model.ui" class="org.jboss.tools.jst.web.ui.internal.preferences.ELVariablesPreferencePage" id="org.jboss.tools.common.xstudio.elvariables" name="El Variables">
+ </page>
</extension>
<extension point="org.eclipse.ui.editors">
<editor
Added: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java (rev 0)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java 2008-08-08 15:56:27 UTC (rev 9631)
@@ -0,0 +1,106 @@
+/*******************************************************************************
+ * 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.jst.web.ui.internal.preferences;
+
+import java.util.Properties;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+import org.jboss.tools.common.model.options.PreferenceModelUtilities;
+import org.jboss.tools.vpe.editor.css.GlobalElVariablesComposite;
+import org.jboss.tools.vpe.editor.css.VpeResourcesDialog;
+
+/**
+ * Page for the El preferences.
+ *
+ * @author Evgenij Stherbin
+ */
+public class ELVariablesPreferencePage extends PreferencePage implements IWorkbenchPreferencePage {
+
+ /** The el. */
+ private GlobalElVariablesComposite el = new GlobalElVariablesComposite();
+
+ /**
+ * Creates the contents.
+ *
+ * @param parent the parent
+ *
+ * @return the control
+ *
+ * @see org.eclipse.jface.preference.PreferencePage#createContents(org.eclipse.swt.widgets.Composite)
+ */
+ @Override
+ protected Control createContents(Composite parent) {
+
+ GridData data;
+ Composite c = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, false);
+ layout.marginWidth = 0;
+ layout.marginHeight = 0;
+ c.setLayout(layout);
+
+ setUpVariableComposite(el);
+ data = new GridData(GridData.FILL_BOTH);
+ final Control elControl = el.createControl(c);
+ elControl.setLayoutData(data);
+
+ return c;
+ }
+
+ /**
+ * Perform ok.
+ *
+ * @return true, if perform ok
+ */
+ @Override
+ public boolean performOk() {
+ boolean rst = super.performOk();
+ el.commit();
+ return rst;
+ }
+
+ /**
+ * Sets the up variable composite.
+ *
+ * @param el the el
+ */
+ private void setUpVariableComposite(GlobalElVariablesComposite el){
+ final VpeResourcesDialog dialog = new VpeResourcesDialog();
+ final Properties p = new Properties();
+
+ p.setProperty("help", "VpeResourcesDialog");
+ p.put("path", Platform.getLocation());
+ p.put("model", PreferenceModelUtilities.getPreferenceModel());
+ dialog.setObject(p);
+ el.setObject(p);
+ }
+
+ /**
+ * Init.
+ *
+ * @param workbench the workbench
+ *
+ * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
+ */
+ public void init(IWorkbench workbench) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
Property changes on: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELVariablesPreferencePage.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
17 years, 4 months