JBoss Tools SVN: r36055 - branches/jbosstools-3.3.0.M4/build/aggregate/soa-site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-27 16:10:54 -0400 (Thu, 27 Oct 2011)
New Revision: 36055
Modified:
branches/jbosstools-3.3.0.M4/build/aggregate/soa-site/build.xml
Log:
backport fixes in trunk to 33x branch
Modified: branches/jbosstools-3.3.0.M4/build/aggregate/soa-site/build.xml
===================================================================
--- branches/jbosstools-3.3.0.M4/build/aggregate/soa-site/build.xml 2011-10-27 18:44:29 UTC (rev 36054)
+++ branches/jbosstools-3.3.0.M4/build/aggregate/soa-site/build.xml 2011-10-27 20:10:54 UTC (rev 36055)
@@ -31,6 +31,8 @@
<property name="aggregateSite.properties" value="aggregateSite.jbosstools.properties" />
<property file="${aggregateSite.properties}" />
+ <property name="web.content.files" value="index.html, **/*.css, README*, *directory.xml"/>
+
<target name="init">
<ant antfile="${build.xml}" target="init" />
<taskdef resource="net/sf/antcontrib/antlib.xml">
@@ -400,7 +402,7 @@
</target>
<target name="pack.zip">
- <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.* index.html, web/*.css, README*" />
+ <zip destfile="${output.dir}/target/site_assembly.zip" update="true" basedir="${update.site.source.dir}" includes="content.*, ${web.content.files}" />
</target>
<target name="check.target">
@@ -476,7 +478,7 @@
</copy>
<copy todir="${update.site.source.dir}">
- <fileset dir="${output.dir}" includes="index.html, **/*.css, README*" />
+ <fileset dir="${output.dir}" includes="${web.content.files}" />
</copy>
</target>
@@ -494,7 +496,7 @@
<!-- look for http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.*/logs/z...;
if found, load file and use ${ALL_ZIPS} to get list of relative path zips to fetch -->
- <target name="collect.zips" description="collect zips from the sites we aggregated">
+ <target name="collect.zips" description="collect zips from the sites we aggregated" unless="collect.zips.skip">
<property name="aggregate.zips.dir" value="${output.dir}/zips" />
<delete dir="${aggregate.zips.dir}" quiet="true" />
<mkdir dir="${aggregate.zips.dir}" />
13 years, 1 month
JBoss Tools SVN: r36054 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 14:44:29 -0400 (Thu, 27 Oct 2011)
New Revision: 36054
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/DiscoveryViewer.java
Log:
JBIDE-10065 NullPointerException occurs on selection Software/Update Tab in JBoss Central Editor
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/DiscoveryViewer.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/DiscoveryViewer.java 2011-10-27 18:38:47 UTC (rev 36053)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/xpl/DiscoveryViewer.java 2011-10-27 18:44:29 UTC (rev 36054)
@@ -1002,6 +1002,9 @@
// have
// connectors that are filtered based on version of Mylyn
Bundle bundle = Platform.getBundle("org.eclipse.mylyn.tasks.core"); //$NON-NLS-1$
+ if (bundle == null) {
+ bundle = Platform.getBundle("org.eclipse.mylyn.commons.core"); //$NON-NLS-1$
+ }
String versionString = (String) bundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$
if (versionString != null) {
Version version = new Version(versionString);
13 years, 1 month
JBoss Tools SVN: r36053 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 14:38:47 -0400 (Thu, 27 Oct 2011)
New Revision: 36053
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
Log:
JBIDE-10025 Apostrophe character is shown wrong in JBoss Central pop up windows for blog post
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-10-27 18:33:37 UTC (rev 36052)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-10-27 18:38:47 UTC (rev 36053)
@@ -49,6 +49,7 @@
super(formText);
this.toolText = "<html>" +
"<head>" +
+ "<meta charset=\"UTF-8\" />" +
"<title>JBoss</title>" +
"<style>" +
"html, body { font-size: 12px;font-family: Arial, Helvetica, sans-serif; }" +
13 years, 1 month
JBoss Tools SVN: r36052 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 14:33:37 -0400 (Thu, 27 Oct 2011)
New Revision: 36052
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
Log:
JBIDE-10042 Tooltip for feeds in central shows up even though central does not have focus
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-10-27 17:18:43 UTC (rev 36051)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/FeedsToolTip.java 2011-10-27 18:33:37 UTC (rev 36052)
@@ -18,6 +18,7 @@
import org.eclipse.swt.browser.WindowEvent;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.graphics.Font;
@@ -32,6 +33,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.widgets.FormText;
/**
@@ -42,60 +44,7 @@
public class FeedsToolTip extends ToolTip {
private String toolText;
- private static Shell CURRENT_TOOLTIP;
- private Label hintLabel;
- private FormText formText;
- private int x;
- private int y;
- private boolean focused = false;
-// private Listener deactivateListener = new Listener() {
-//
-// @Override
-// public void handleEvent(Event event) {
-// if (focused) {
-// if (CURRENT_TOOLTIP != null) {
-// CURRENT_TOOLTIP.dispose();
-// CURRENT_TOOLTIP = null;
-// }
-// activate();
-// hide();
-// focused = false;
-// }
-// }
-// };
-
- private MouseMoveListener mouseMoveListener = new MouseMoveListener() {
- public void mouseMove(MouseEvent e) {
- x = e.x;
- y = e.y;
- }
- };
- private Listener keyListener = new Listener() {
-
- @Override
- public void handleEvent(Event e) {
- if (e == null)
- return;
- if (e.keyCode == SWT.ESC) {
- if (CURRENT_TOOLTIP != null) {
- CURRENT_TOOLTIP.dispose();
- CURRENT_TOOLTIP = null;
- }
- activate();
- focused = false;
- }
- if (e.keyCode == SWT.F2) {
- if (CURRENT_TOOLTIP == null) {
- deactivate();
- hide();
- }
- focused = true;
- createFocusedTooltip(FeedsToolTip.this.formText);
- }
- }
- };
-
public FeedsToolTip(FormText formText, String toolText) {
super(formText);
this.toolText = "<html>" +
@@ -110,67 +59,24 @@
toolText +
"</body>" +
"</html>";
- this.formText = formText;
- setShift(new Point(0, 15));
+ setShift(new Point(0, 0));
setPopupDelay(400);
- setHideOnMouseDown(true);
+ setHideOnMouseDown(false);
}
- public void createFocusedTooltip(final Control control) {
- final Shell stickyTooltip = new Shell(control.getShell(), SWT.ON_TOP | SWT.TOOL
- | SWT.NO_FOCUS);
- stickyTooltip.setLayout(new GridLayout());
- //stickyTooltip.setBackground(stickyTooltip.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND));
-
- control.getDisplay().asyncExec(new Runnable() {
- public void run() {
- Event event = new Event();
- event.x = x;
- event.y = y;
- event.widget = control;
-
- createToolTipContentArea(event, stickyTooltip);
- stickyTooltip.pack();
-
- stickyTooltip.setLocation(stickyTooltip.getDisplay().getCursorLocation());
- hintLabel.setText("Press 'ESC' to Hide.");
- stickyTooltip.setVisible(true);
- }
- });
- CURRENT_TOOLTIP = stickyTooltip;
- }
-
@Override
- protected Composite createToolTipContentArea(Event event, Composite parent) {
- if (!focused) {
- formText.setFocus();
- }
-// if (formText.getShell() != null) {
-// formText.getShell().addListener(SWT.Deactivate, deactivateListener);
-// }
- formText.addMouseMoveListener(mouseMoveListener);
- formText.addListener(SWT.KeyDown, keyListener);
-
- parent.addDisposeListener(new DisposeListener() {
-
- @Override
- public void widgetDisposed(DisposeEvent e) {
- if (formText != null && !formText.isDisposed()) {
- formText.removeMouseMoveListener(mouseMoveListener);
- formText.removeListener(SWT.KeyDown, keyListener);
-// if (formText.getShell() != null && !formText.getShell().isDisposed()) {
-// formText.getShell().removeListener(SWT.Deactivate, deactivateListener);
-// }
- }
- }
- });
-
+ protected Composite createToolTipContentArea(Event event, Composite parent) {
parent.setLayout(new GridLayout());
GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);
parent.setLayoutData(gd);
- Browser browser = new Browser(parent, SWT.NONE);
+ Browser browser;
+ try {
+ browser = new Browser(parent, SWT.NONE);
+ } catch (Exception e1) {
+ browser = new Browser(parent, SWT.WEBKIT);
+ }
browser.setJavascriptEnabled(false);
browser.addOpenWindowListener(new OpenWindowListener() {
public void open(WindowEvent event) {
@@ -183,29 +89,6 @@
browser.setLayoutData(gd);
browser.setText(toolText);
- hintLabel = new Label(parent, SWT.NONE);
- gd = new GridData(SWT.FILL, SWT.FILL, true, true);
- hintLabel.setLayoutData(gd);
- hintLabel.setAlignment(SWT.RIGHT);
- hintLabel.setBackground(parent.getDisplay().getSystemColor(
- SWT.COLOR_INFO_BACKGROUND));
- hintLabel.setText("Press 'F2' for Focus.");
- hintLabel.setForeground(parent.getDisplay().getSystemColor(
- SWT.COLOR_DARK_GRAY));
-
- final Font font;
- Display display = parent.getDisplay();
- FontData[] fd = parent.getFont().getFontData();
- int size2 = fd.length;
- for (int i = 0; i < size2; i++)
- fd[i].setHeight(7);
- font = new Font(display, fd);
- parent.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- font.dispose();
- }
- });
- hintLabel.setFont(font);
return parent;
}
13 years, 1 month
JBoss Tools SVN: r36051 - in trunk/jsf: plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-10-27 13:18:43 -0400 (Thu, 27 Oct 2011)
New Revision: 36051
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.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp.xml
Log:
https://issues.jboss.org/browse/JBIDE-9417 - <c:out> template was updated, junit was updated.
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 2011-10-27 17:14:56 UTC (rev 36050)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jsf/src/org/jboss/tools/jsf/vpe/jsf/template/JsfInputTextTemplate.java 2011-10-27 17:18:43 UTC (rev 36051)
@@ -29,11 +29,8 @@
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
-
Element sourceElement = (Element) sourceNode;
-
nsIDOMElement input = visualDocument.createElement(HTML.TAG_INPUT);
-
/*
* https://jira.jboss.org/jira/browse/JBIDE-3225
* Component should render its children.
@@ -41,29 +38,19 @@
VpeCreationData creationData = VisualDomUtil
.createTemplateWithTextContainer(sourceElement,
input, HTML.TAG_SPAN, visualDocument);
-
copyGeneralJsfAttributes(sourceElement, input);
ComponentUtil.copyDisabled(sourceElement, input);
-
copyAttribute(input, sourceElement, JSF.ATTR_VALUE, HTML.ATTR_VALUE);
copyAttribute(input, sourceElement, JSF.ATTR_SIZE, HTML.ATTR_SIZE);
copyAttribute(input, sourceElement, JSF.ATTR_DIR, HTML.ATTR_DIR);
-
VpeElementData elementData = new VpeElementData();
if (sourceElement.hasAttribute(JSF.ATTR_VALUE)) {
-
Attr attr = sourceElement.getAttributeNode(JSF.ATTR_VALUE);
- elementData
- .addNodeData(new AttributeData(attr, input, true));
-
+ elementData.addNodeData(new AttributeData(attr, input, true));
} else {
-
- elementData.addNodeData(new AttributeData(JSF.ATTR_VALUE,
- input, true));
-
+ elementData.addNodeData(new AttributeData(JSF.ATTR_VALUE, input, true));
}
creationData.setElementData(elementData);
-
return creationData;
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java 2011-10-27 17:14:56 UTC (rev 36050)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.jstl/src/org/jboss/tools/jsf/vpe/jstl/template/JstlOutTemplate.java 2011-10-27 17:18:43 UTC (rev 36051)
@@ -13,13 +13,13 @@
import org.jboss.tools.jsf.vpe.jsf.template.AbstractOutputJsfTemplate;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.jboss.tools.vpe.editor.util.VisualDomUtil;
import org.mozilla.interfaces.nsIDOMDocument;
import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-
/**
* Class for creating Out content
*
@@ -27,27 +27,17 @@
*/
public class JstlOutTemplate extends AbstractOutputJsfTemplate {
- /**
- * Create html instead c:out component.
- *
- * @param pageContext
- * Contains the information on edited page.
- * @param sourceNode
- * The current node of the source tree.
- * @param visualDocument
- * The document of the visual tree.
- * @return The information on the created node of the visual tree.
- */
+ @Override
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
- // convert to Element
Element sourceElement = (Element) sourceNode;
- // create span element
- nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument);
-
+ nsIDOMElement span = VisualDomUtil.createBorderlessContainer(visualDocument, HTML.TAG_DIV);
+ span.setAttribute(HTML.ATTR_STYLE, "display: inline"); //$NON-NLS-1$
VpeCreationData creationData = new VpeCreationData(span);
-
+ /*
+ * https://issues.jboss.org/browse/JBIDE-9417
+ */
+ setEscapeAttributeName("escapeXml"); //$NON-NLS-1$
processOutputAttribute(pageContext, visualDocument, sourceElement, span, creationData);
-
return creationData;
}
}
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp 2011-10-27 17:14:56 UTC (rev 36050)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp 2011-10-27 17:18:43 UTC (rev 36051)
@@ -12,5 +12,16 @@
<c:out value="cout_value" id="id1">
some out
</c:out>
+
+ <c:out value="escaped symbols defult behavior ==[ <,>,&,' ]==" id="id2"/>
+ <c:out value='escaped quotes defult behavior ==[ " ]==' id="id3" />
+ <c:out value="escaped symbols attr set to false ==[ <,>,&,' ]==" escapeXml="false" id="id4" />
+ <c:out value='escaped quotes attr set to false ==[ " ]==' escapeXml="false" id="id5" />
+
+ <c:out value="escaped symbols defult behavior ==[ <xml><book> some&xml'inside </book></xml> ]==" id="id6" />
+ <c:out value='escaped quotes defult behavior ==[ <xml><book> "some xml inside" </book></xml> ]==' id="id7" />
+ <c:out value="escaped symbols attr set to false ==[ <xml><book> some&xml'inside </book></xml> ]==" escapeXml="false" id="id8" />
+ <c:out value='escaped quotes attr set to false ==[ <xml><book> "some xml inside" </book></xml> ]==' escapeXml="false" id="id9" />
+
</body>
</html>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp.xml 2011-10-27 17:14:56 UTC (rev 36050)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.jstl.test/resources/jstlTests/WebContent/pages/components/out.jsp.xml 2011-10-27 17:18:43 UTC (rev 36051)
@@ -1,7 +1,96 @@
<tests>
<test id="id1">
- <SPAN CLASS="vpe-text">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
cout_value
- </SPAN>
+ </DIV>
</test>
+
+ <test id="id2">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ escaped symbols defult behavior ==[ <,>,&,' ]==
+ </DIV>
+ </test>
+
+ <test id="id3">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ escaped quotes defult behavior ==[ " ]==
+ </DIV>
+ </test>
+
+ <test id="id4">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ <SPAN CLASS="vpe-text">
+ escaped symbols attr set to false ==[ <,>,&,' ]==
+ </SPAN>
+ </DIV>
+ </test>
+
+ <test id="id5">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ <SPAN CLASS="vpe-text">
+ escaped quotes attr set to false ==[ " ]==
+ </SPAN>
+ </DIV>
+ </test>
+
+ <test id="id6">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ escaped symbols defult behavior ==[ <xml><book> some&xml'inside </book></xml> ]==
+ </DIV>
+ </test>
+
+ <test id="id7">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ escaped quotes defult behavior ==[ <xml><book> "some xml inside" </book></xml> ]==
+ </DIV>
+ </test>
+
+ <test id="id8">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ <SPAN CLASS="vpe-text">
+ escaped symbols attr set to false ==[
+ </SPAN>
+ <DIV STYLE="-moz-user-modify: read-only; border: 1px solid green;">
+ <DIV CLASS="__any__tag__caption" STYLE="">
+ xml
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only; border: 1px solid green;">
+ <DIV CLASS="__any__tag__caption" STYLE="">
+ book
+ </DIV>
+ <SPAN CLASS="vpe-text">
+ some&xml'inside
+ </SPAN>
+ </DIV>
+ </DIV>
+ <SPAN CLASS="vpe-text">
+ ]==
+ </SPAN>
+ </DIV>
+ </test>
+
+ <test id="id9">
+ <DIV CLASS="vpe-text" STYLE="display: inline;">
+ <SPAN CLASS="vpe-text">
+ escaped quotes attr set to false ==[
+ </SPAN>
+ <DIV STYLE="-moz-user-modify: read-only; border: 1px solid green;">
+ <DIV CLASS="__any__tag__caption" STYLE="">
+ xml
+ </DIV>
+ <DIV STYLE="-moz-user-modify: read-only; border: 1px solid green;">
+ <DIV CLASS="__any__tag__caption" STYLE="">
+ book
+ </DIV>
+ <SPAN CLASS="vpe-text">
+ "some xml inside"
+ </SPAN>
+ </DIV>
+ </DIV>
+ <SPAN CLASS="vpe-text">
+ ]==
+ </SPAN>
+ </DIV>
+ </test>
+
</tests>
\ No newline at end of file
13 years, 1 month
JBoss Tools SVN: r36050 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: mapping and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-10-27 13:14:56 -0400 (Thu, 27 Oct 2011)
New Revision: 36050
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/mapping/VpeDomMapping.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
Log:
https://issues.jboss.org/browse/JBIDE-9417 - templates rendering was updated, "border" variable was removed from VVDB and other files.
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 2011-10-27 16:46:32 UTC (rev 36049)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2011-10-27 17:14:56 UTC (rev 36050)
@@ -320,7 +320,6 @@
nsIDOMNode visualOldContainer) throws VpeDisposeException {
boolean registerFlag = isCurrentMainDocument();
-
//it's check for initialization visualController,
//if we trying to process some event when controller
//hasn't been initialized, it's causes
@@ -387,21 +386,21 @@
} catch (XPCOMException ex) {
VpePlugin.getPluginLog().logError(ex);
VpeTemplate defTemplate = getTemplateManager().getDefTemplate();
- creationData = defTemplate.create(getPageContext(), sourceNode,
- getVisualDocument());
+ creationData = defTemplate.create(
+ getPageContext(), sourceNode, getVisualDocument());
} catch (RuntimeException ex) {
VpePlugin.getPluginLog().logError(ex);
VpeTemplate defTemplate = getTemplateManager().getDefTemplate();
- creationData = defTemplate.create(getPageContext(), sourceNode,
- getVisualDocument());
+ creationData = defTemplate.create(
+ getPageContext(), sourceNode, getVisualDocument());
}
if (creationData == null) {
VpePlugin.getDefault().logError(
"!ERROR! VpeCreationData is not initialized for source node '" //$NON-NLS-1$
+ sourceNode.getNodeName() + "'"); //$NON-NLS-1$
VpeTemplate defTemplate = getTemplateManager().getDefTemplate();
- creationData = defTemplate.create(getPageContext(), sourceNode,
- getVisualDocument());
+ creationData = defTemplate.create(
+ getPageContext(), sourceNode, getVisualDocument());
}
getPageContext().setCurrentVisualNode(null);
/*
@@ -411,7 +410,6 @@
if (sourceNode.getNodeType() == Node.ELEMENT_NODE && visualNewNode == null && isShowInvisibleTags()) {
visualNewNode = createInvisbleElementLabel(sourceNode);
}
- nsIDOMElement border = null;
if (visualNewNode != null
&& visualNewNode.getNodeType() == nsIDOMNode.ELEMENT_NODE) {
nsIDOMElement visualNewElement = queryInterface(visualNewNode, nsIDOMElement.class);
@@ -468,25 +466,41 @@
}
VpeElementMapping elementMapping = new VpeElementMapping(
- sourceNode, visualNewNode, border, template,
+ sourceNode, visualNewNode, template,
ifDependencySet, creationData.getData(), data);
registerNodes(elementMapping);
}
+ /*
+ * When in templates xml file specified that particular template
+ * cannot have children -- childrenInfoList will be ignored.
+ * But tags could have other html tags in value attribute.
+ * And while creating the template they will be put into childrenInfoList.
+ * Thus childrenInfoList should be checked in any way!
+ */
+ List<VpeChildrenInfo> childrenInfoList = creationData.getChildrenInfoList();
if (template.hasChildren()) {
- List<?> childrenInfoList = creationData.getChildrenInfoList();
if (childrenInfoList == null) {
addChildren(template, sourceNode,
- visualNewNode != null ? visualNewNode
- : visualOldContainer);
+ visualNewNode != null ? visualNewNode : visualOldContainer);
} else {
- addChildren(template, sourceNode, visualOldContainer,
- childrenInfoList);
+ addChildren(template, sourceNode, visualOldContainer, childrenInfoList);
}
- } else if(sourceNode.getNodeType() == Node.ELEMENT_NODE&&visualNewNode != null && isShowInvisibleTags()){
- nsIDOMElement span = getVisualDocument().createElement(HTML.TAG_SPAN);
- span.appendChild(visualNewNode);
- addChildren(template, sourceNode,span);
- visualNewNode= span;
+ } else {
+ /*
+ * https://issues.jboss.org/browse/JBIDE-9417
+ * Template has no children, but should add
+ * any additional children from childrenInfoList
+ */
+ if (childrenInfoList != null) {
+ addChildren(template, sourceNode, visualOldContainer, childrenInfoList);
+ }
+ if ((sourceNode.getNodeType() == Node.ELEMENT_NODE)
+ && (visualNewNode != null) && isShowInvisibleTags()) {
+ nsIDOMElement span = getVisualDocument().createElement(HTML.TAG_SPAN);
+ span.appendChild(visualNewNode);
+ addChildren(template, sourceNode,span);
+ visualNewNode= span;
+ }
}
getPageContext().setCurrentVisualNode(visualOldContainer);
try {
@@ -495,9 +509,6 @@
VpePlugin.getPluginLog().logError(ex);
}
getPageContext().setCurrentVisualNode(null);
- if (border != null) {
- return border;
- }
return visualNewNode;
}
@@ -823,12 +834,6 @@
((INodeNotifier) sourceNode).removeAdapter(getSorceAdapter());
}
if (visualOldNode != null) {
- if (elementMapping != null) {
- nsIDOMElement border = elementMapping.getBorder();
- if (border != null) {
- visualOldNode = border;
- }
- }
nsIDOMNode visualContainer = visualOldNode.getParentNode();
nsIDOMNode visualNextNode = visualOldNode.getNextSibling();
if (visualContainer != null) {
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2011-10-27 16:46:32 UTC (rev 36049)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeDomMapping.java 2011-10-27 17:14:56 UTC (rev 36050)
@@ -37,11 +37,6 @@
sourceMap.put(nodeMapping.getSourceNode(), nodeMapping);
if (nodeMapping.getVisualNode() != null) {
visualMap.put(nodeMapping.getVisualNode(), nodeMapping);
- if (nodeMapping instanceof VpeElementMapping) {
- if (((VpeElementMapping)nodeMapping).getBorder() != null) {
- visualMap.put(((VpeElementMapping)nodeMapping).getBorder(), nodeMapping);
- }
- }
}
}
@@ -298,9 +293,6 @@
// }
// elementMapping.setXmlnsMap(null);
// }
- if (elementMapping.getBorder() != null) {
- visualMap.remove(elementMapping.getBorder());
- }
elementMapping.getTemplate().beforeRemove(pageContext, elementMapping.getSourceNode(), elementMapping.getVisualNode(), elementMapping.getData());
}
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2011-10-27 16:46:32 UTC (rev 36049)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mapping/VpeElementMapping.java 2011-10-27 17:14:56 UTC (rev 36050)
@@ -29,10 +29,8 @@
*/
private Object data;
private VpeElementData elementData;
- private nsIDOMElement border;
- public VpeElementMapping(Node sourceElement,
- nsIDOMNode visualNode, nsIDOMElement border,
+ public VpeElementMapping(Node sourceElement, nsIDOMNode visualNode,
VpeTemplate template, Set ifDependencySet, Object data, VpeElementData elementData) {
super(sourceElement, visualNode);
this.template = template;
@@ -41,7 +39,6 @@
}
this.data = data;
this.elementData = elementData;
- this.border = border;
}
public VpeElementMapping(Element sourceElement,
@@ -54,7 +51,6 @@
this.ifDependencySet = ifDependencySet;
}
this.elementData = elementData;
- this.border = border;
}
public nsIDOMElement getVisualElement() {
@@ -84,26 +80,6 @@
return ifDependencySet.contains(VpeExpressionBuilder.SIGNATURE_ANY_ATTR);
}
- public nsIDOMElement getBorder() {
- return border;
- }
-
- public boolean isBorder(nsIDOMNode border) {
- if (this.border == null) return false;
- if (this.border.equals(border)) return true;
-
- nsIDOMNode element = border;
-
- while(true){
- if(this.border.equals(element)) return true;
- if(this.visualNode.equals(element)) return false;
-
- element = element.getParentNode();
- if(element == null) break;
- }
- return false;
- }
-
/**
* get element data
* @return
13 years, 1 month
JBoss Tools SVN: r36049 - branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 12:46:32 -0400 (Thu, 27 Oct 2011)
New Revision: 36049
Modified:
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10028 JBoss Central Editor Maximize/Restore actions freeze UI and loads CPU
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 16:45:49 UTC (rev 36048)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 16:46:32 UTC (rev 36049)
@@ -57,7 +57,6 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
@@ -65,7 +64,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
13 years, 1 month
JBoss Tools SVN: r36048 - trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 12:45:49 -0400 (Thu, 27 Oct 2011)
New Revision: 36048
Modified:
trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10028 JBoss Central Editor Maximize/Restore actions freeze UI and loads CPU
Modified: trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 16:44:12 UTC (rev 36047)
+++ trunk/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 16:45:49 UTC (rev 36048)
@@ -64,7 +64,6 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
-import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbenchWindow;
@@ -239,7 +238,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -286,7 +285,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -425,7 +424,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -498,6 +497,13 @@
toolBarManager.update(true);
projectsSection.setTextClient(headerComposite);
+ projectsSection.addExpansionListener(new ExpansionAdapter() {
+
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize(true);
+ }
+ });
projectsComposite = toolkit.createComposite(projectsSection);
GridLayout layout = new GridLayout(2, true);
@@ -644,6 +650,13 @@
addHyperlink(toolkit, documentationComposite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
documentationSection.setClient(documentationComposite);
+ documentationSection.addExpansionListener(new ExpansionAdapter() {
+
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize(true);
+ }
+ });
}
public void createSettingsSection(FormToolkit toolkit, Composite parent) {
@@ -842,7 +855,7 @@
} else {
expandedCategories.remove(category);
}
- resize();
+ resize(true);
}
});
@@ -1002,7 +1015,11 @@
recomputeScrollComposite(scrollable, pageBook);
}
- protected void resize() {
+ private void resize() {
+ resize(false);
+ }
+
+ protected void resize(boolean force) {
Point size;
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
size = form.getSize();
@@ -1010,7 +1027,7 @@
} else {
size = form.getBody().getSize();
}
- if (size.equals(oldSize)) {
+ if (!force && size.equals(oldSize)) {
return;
}
oldSize = size;
13 years, 1 month
JBoss Tools SVN: r36047 - branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-27 12:44:12 -0400 (Thu, 27 Oct 2011)
New Revision: 36047
Modified:
branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
Log:
JBIDE-10028 JBoss Central Editor Maximize/Restore actions freeze UI and loads CPU
Modified: branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java
===================================================================
--- branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 15:55:50 UTC (rev 36046)
+++ branches/jbosstools-3.3.0.M4/central/plugins/org.jboss.tools.central/src/org/jboss/tools/central/editors/GettingStartedPage.java 2011-10-27 16:44:12 UTC (rev 36047)
@@ -57,6 +57,7 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.layout.RowLayout;
@@ -239,7 +240,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -286,7 +287,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -425,7 +426,7 @@
@Override
public void expansionStateChanged(ExpansionEvent e) {
- resize();
+ resize(true);
}
});
@@ -498,6 +499,13 @@
toolBarManager.update(true);
projectsSection.setTextClient(headerComposite);
+ projectsSection.addExpansionListener(new ExpansionAdapter() {
+
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize(true);
+ }
+ });
projectsComposite = toolkit.createComposite(projectsSection);
GridLayout layout = new GridLayout(2, true);
@@ -644,6 +652,13 @@
addHyperlink(toolkit, documentationComposite, "Issue Tracker", "https://issues.jboss.org/browse/JBIDE");
documentationSection.setClient(documentationComposite);
+ documentationSection.addExpansionListener(new ExpansionAdapter() {
+
+ @Override
+ public void expansionStateChanged(ExpansionEvent e) {
+ resize(true);
+ }
+ });
}
public void createSettingsSection(FormToolkit toolkit, Composite parent) {
@@ -842,7 +857,7 @@
} else {
expandedCategories.remove(category);
}
- resize();
+ resize(true);
}
});
@@ -1002,7 +1017,11 @@
recomputeScrollComposite(scrollable, pageBook);
}
- protected void resize() {
+ private void resize() {
+ resize(false);
+ }
+
+ protected void resize(boolean force) {
Point size;
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
size = form.getSize();
@@ -1010,7 +1029,7 @@
} else {
size = form.getBody().getSize();
}
- if (size.equals(oldSize)) {
+ if (!force && size.equals(oldSize)) {
return;
}
oldSize = size;
13 years, 1 month
JBoss Tools SVN: r36046 - in trunk: jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: vpakan(a)redhat.com
Date: 2011-10-27 11:55:50 -0400 (Thu, 27 Oct 2011)
New Revision: 36046
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java
Log:
Fixes for JBT 3.3.0.M4
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.bot.test/src/org/jboss/tools/jsf/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -50,7 +50,7 @@
9,
0,
expectedProposals);
- // Check content assist for ${msg. prefix
+ // Check content assist for #{msg. prefix
expectedProposals.clear();
expectedProposals.add("name : String - Person");
ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot,
@@ -76,7 +76,7 @@
0);
contentAssist.checkContentAssist("msg", false);
contentAssist.checkContentAssist("person : Person", false);
- // Check content assist for ${msg. prefix
+ // Check content assist for #{msg. prefix
SWTJBTExt.selectTextInSourcePane(SWTTestExt.bot,
FACELETS_TEST_PAGE,
textForSelection,
@@ -235,7 +235,7 @@
bot.sleep(Timing.time2S());
compositeComponentDefEditor.save();
currentLineText = compositeComponentDefEditor.getTextOnCurrentLine();
- expectedInsertedText = "${cc.attrs}";
+ expectedInsertedText = "#{cc.attrs}";
assertTrue("Inserted text should be " + expectedInsertedText + " but is not.\n"
+ "Current line text is " + currentLineText,
currentLineText.toLowerCase().contains(expectedInsertedText.toLowerCase()));
@@ -244,14 +244,14 @@
// Check content assist menu content for Composite Components attributes
ContentAssistHelper.checkContentAssistContent(SWTTestExt.bot,
compositeComponentFileName,
- "${cc.attrs.}",
+ "#{cc.attrs.}",
11,
0,
getCompositeComponentsAttributeDefProposalList());
// check inserting of "submitlabel" content assist
String contentAssistToUse = "submitlabel";
contentAssist.checkContentAssist(contentAssistToUse, true);
- expectedInsertedText = "<h:commandButton action=\"${cc.attrs." + contentAssistToUse + "}\"";
+ expectedInsertedText = "<h:commandButton action=\"#{cc.attrs." + contentAssistToUse + "}\"";
assertTrue("Editor has to contain text '" + expectedInsertedText + "' but it doesn't\n" +
"Editor Text is\n" + compositeComponentDefEditor.getText(),
compositeComponentDefEditor.getText().toLowerCase().contains(expectedInsertedText.toLowerCase()));
@@ -291,7 +291,7 @@
9,
0,
expectedProposals);
- // Check content assist for ${user. prefix
+ // Check content assist for #{user. prefix
expectedProposals.clear();
expectedProposals.add("name : String - User");
expectedProposals.add("sayHello() : String - User");
@@ -554,7 +554,7 @@
result.add("onmouseup");
result.add("submitlabel");
result.add("value");
- result.add("\"${cc.attrs.}\"");
+ result.add("\"#{cc.attrs.}\"");
return result;
}
Modified: trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/jst/tests/org.jboss.tools.jst.ui.bot.test/src/org/jboss/tools/ui/bot/test/JBTSWTBotTestCase.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -18,6 +18,7 @@
import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.ext.view.ProblemsView;
public abstract class JBTSWTBotTestCase extends SWTTestExt implements
@@ -144,6 +145,10 @@
bot.viewByTitle(WidgetVariables.WELCOME).close();
} catch (WidgetNotFoundException e) {
}
+ try {
+ bot.editorByTitle(IDELabel.View.JBOSS_CENTRAL).close();
+ } catch (WidgetNotFoundException e) {
+ }
openErrorLog();
openPackageExplorer();
// openProgressStatus();
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/IDELabel.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -230,6 +230,7 @@
public static final String PROPERTIES = "Properties";
public static final String JBOSS_TOOLS_PALETTE = "JBoss Tools Palette";
public static final String PALETTE = "Palette";
+ public static final String JBOSS_CENTRAL = "JBoss Central";
}
public class ViewGroup {
@@ -416,6 +417,7 @@
public static final String JBOSS_EAP_5_x = "JBoss Enterprise Application Platform 5.x Runtime";
public static final String JBOSS_AS_5_1 = "JBoss 5.1 Runtime";
public static final String JBOSS_AS_6_0 = "JBoss 6.0 Runtime";
+ public static final String JBOSS_AS_6_x = "JBoss 6.x Runtime";
}
public static final class ServerType {
@@ -424,6 +426,7 @@
public static final String JBOSS_EAP_5_0 = "JBoss Enterprise Application Platform 5.0";
public static final String JBOSS_EAP_5_x = "JBoss Enterprise Application Platform 5.x";
public static final String JBOSS_AS_6_0 = "JBoss 6.0 Runtime";
+ public static final String JBOSS_AS_6_x = "JBoss 6.x Runtime";
}
public static final class DroolsRuntimeDialog {
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/types/ViewType.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -20,7 +20,7 @@
public enum ViewType {
PACKAGE_EXPLORER, PROJECT_EXPLORER, WELCOME, DATA_SOURCE_EXPLORER,
SERVERS,WEB_PROJECTS,PROBLEMS,DEBUG,GUVNOR_REPOSITORIES,PROPERTIES,
- GUVNOR_RESOURCE_HISTORY,JBOSS_TOOLS_PALETTE, PALETTE;
+ GUVNOR_RESOURCE_HISTORY,JBOSS_TOOLS_PALETTE, PALETTE, JBOSS_CENTRAL;
public String getGroupLabel() {
String viewLabel = "";
@@ -57,6 +57,7 @@
case GUVNOR_RESOURCE_HISTORY: viewLabel = IDELabel.View.GUVNOR_RESOURCE_HISTORY; break;
case JBOSS_TOOLS_PALETTE: viewLabel = IDELabel.View.JBOSS_TOOLS_PALETTE; break;
case PALETTE: viewLabel = IDELabel.View.PALETTE; break;
+ case JBOSS_CENTRAL: viewLabel = IDELabel.View.JBOSS_CENTRAL; break;
default: fail("Unknown View Type");
}
return viewLabel;
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/VPEAutoTestCase.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -96,8 +96,8 @@
"6.0");
if (version.equals("6.0")) {
JBOSS_AS_FOR_JSF2_SERVER_GROUP = IDELabel.ServerGroup.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_0;
- JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_0;
+ JBOSS_AS_FOR_JSF2_SERVER_RUNTIME_TYPE = IDELabel.ServerRuntimeType.JBOSS_AS_6_x;
+ JBOSS_AS_FOR_JSF2_SERVER_TYPE = IDELabel.ServerType.JBOSS_AS_6_x;
} else {
throw new RuntimeException(
"Unsupported version of JBoss AS runtime for JSF2 [version="
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/JspFileEditingTest.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -64,10 +64,9 @@
jspTextEditor.save();
botExt.sleep(Timing.time2S());
// Check if tag h:outputText was properly added
- String editorText = jspTextEditor.getText();
- assertTrue("File " + TEST_PAGE
- + " has to contain string '<h:outputText>' but it doesn't",
- editorText.contains("<h:outputText>"));
+ String editorText = VPEEditorTestCase.stripHTMLSourceText(jspTextEditor.getText()); assertTrue("File " + TEST_PAGE
+ + " has to contain string '<h:outputText></h:outputText>' but it doesn't",
+ editorText.contains("<h:outputText></h:outputText>"));
}
/**
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/MenuItemEntity.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -69,7 +69,9 @@
if (label == null) {
if (other.label != null)
return false;
- } else if (!label.equals(other.label))
+ } else if (!label.equals(other.label) &&
+ (!((label.equals("Seam") && other.label.equals("Seam 2")) || // Seam = Seam 2
+ (label.equals("Seam 2") && other.label.equals("Seam"))))) // Seam 2 = Seam
return false;
return true;
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VPEEditorTestCase.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -86,7 +86,8 @@
* @return String
*/
protected static String stripHTMLSourceText(String editorText){
- return editorText.replaceAll("\n", "").replaceAll("\t", "").replaceAll(" ", "");
+ return editorText.replaceAll("\n", "").replaceAll("\t", "").replaceAll("\b", "")
+ .replaceAll(" ", "").replaceAll("\r", "").replaceAll("\f", "");
}
/**
* Asserts if sourceEditorText of file with fileName contains textToContain
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/VisualEditorContextMenuTest.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -383,22 +383,11 @@
for (MenuItemEntity mieThirdLevel : mieSecondLevel.getChildren()){
String thirdLevelMenuItemLabel = mieThirdLevel.getLabel();
if (thirdLevelMenuItemLabel.endsWith(" taglib") ||
- (firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Ajax4Jsf") && thirdLevelMenuItemLabel.equals("queue")) ||
- (firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("RichFaces") && thirdLevelMenuItemLabel.equals("menuSeparator")) ||
(firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("convertEnum")) ||
(firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("convertDateTime")) ||
(firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("enumItem")) ||
(firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("fileUpload")) ||
- (firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("validate")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("commandButton")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("graphicImage")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("inputHidden")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("inputSecret")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("inputText")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("message")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("messages")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("outputText")) ||
- (firstLevelMenuItemLabel.equals("JSF") && secondLevelMenuItemLabel.equals("HTML") && thirdLevelMenuItemLabel.equals("selectBooleanCheckbox"))){
+ (firstLevelMenuItemLabel.equals("JBoss") && secondLevelMenuItemLabel.equals("Seam") && thirdLevelMenuItemLabel.equals("validate"))){
// Skip these Menu Items
}
else{
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/editor/preferences/ChangeEditorTabForTheFirstOpenPageTest.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -3,6 +3,7 @@
import org.eclipse.swtbot.swt.finder.SWTBot;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.widgets.TimeoutException;
+import org.jboss.tools.ui.bot.ext.SWTBotExt;
import org.jboss.tools.ui.bot.ext.gen.ActionItem;
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.jboss.tools.ui.bot.test.WidgetVariables;
@@ -15,7 +16,8 @@
openPage();
bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
bot.shell(PREF_FILTER_SHELL_TITLE).activate();
- bot.comboBoxWithLabel(SELECT_DEFAULT_TAB).setSelection("Source"); //$NON-NLS-1$
+ bot.comboBoxWithLabel(SELECT_DEFAULT_TAB)
+ .setSelection(IDELabel.VisualPageEditor.SOURCE_TAB_LABEL);
bot.button("OK").click(); //$NON-NLS-1$
//Create and open new page
@@ -47,14 +49,18 @@
public void tearDown() throws Exception {
//Delete test page if it has been created
+ new SWTBotExt().swtBotEditorExtByTitle(TEST_PAGE).selectPage(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL);
SWTBot innerBot = bot.viewByTitle(WidgetVariables.PACKAGE_EXPLORER).bot();
innerBot.tree().expandNode(JBT_TEST_PROJECT_NAME).expandNode("WebContent") //$NON-NLS-1$
.expandNode("pages").getNode("testPage.jsp").select(); //$NON-NLS-1$//$NON-NLS-2$
bot.menu("Edit").menu("Delete").click(); //$NON-NLS-1$ //$NON-NLS-2$
bot.shell("Confirm Delete").activate(); //$NON-NLS-1$
- bot.button("OK").click(); //$NON-NLS-1$
- bot.multiPageEditorByTitle(TEST_PAGE).selectTab("Visual/Source"); //$NON-NLS-1$
- super.tearDown();
+ bot.button(IDELabel.Button.OK).click(); //$NON-NLS-1$
+ bot.toolbarButtonWithTooltip(PREF_TOOLTIP).click();
+ bot.shell(PREF_FILTER_SHELL_TITLE).activate();
+ bot.comboBoxWithLabel(SELECT_DEFAULT_TAB).setSelection(IDELabel.VisualPageEditor.VISUAL_SOURCE_TAB_LABEL); //$NON-NLS-1$
+ bot.button(IDELabel.Button.OK).click();
+ super.tearDown();
}
}
Modified: trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java
===================================================================
--- trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27 14:32:05 UTC (rev 36045)
+++ trunk/vpe/tests/org.jboss.tools.vpe.ui.bot.test/src/org/jboss/tools/vpe/ui/bot/test/smoke/CodeCompletionTest.java 2011-10-27 15:55:50 UTC (rev 36046)
@@ -89,7 +89,7 @@
private static List<String> getJspPageProposalList(){
LinkedList<String> result = new LinkedList<String>();
- result.add("New JSF EL Expression - Create a new attribute value with ${}");
+ result.add("New JSF EL Expression - Create a new attribute value with #{}");
result.add("f:actionListener");
result.add("f:attribute");
result.add("f:convertDateTime");
13 years, 1 month