Author: yradtsevich
Date: 2009-10-30 12:19:46 -0400 (Fri, 30 Oct 2009)
New Revision: 18369
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5105/
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5105/BrMozDirty.html
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MozDirtyTest_JBIDE5105.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
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.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
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/VpeEditorPart.java
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/other/xmp.xhtml.xml
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/pre.html.xml
Log:
issue JBIDE-5105: Move initialization and reinitialization of editor before building
visual tree.
https://jira.jboss.org/jira/browse/JBIDE-5105
- now initialization and reinitialization made before any visual node is created
- JUnit for the issue created
- JUnits with BR _MOZ_DIRTY corrected
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.facelets.test/resources/faceletsTest/WebContent/pages/components/compositionWithTaglibs.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -45,8 +45,6 @@
<TR>
<TD WIDTH="100%" VALIGN="bottom" HEIGHT="1"
BGCOLOR="#cad6e0"
COLSPAN="2">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
</TBODY>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/3144/jbide3214test.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -19,28 +19,23 @@
<TBODY HEIGHT="100px;" STYLE="background-color: blue;"
WIDTH="100px;">
</TBODY>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
-<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
-
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell">
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
-<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
-
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell">
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
-<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
-
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell">
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
-<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
-
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell">
</TD>
</TR>
<TR CLASS="dr-table-firstrow rich-table-firstrow">
-<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell"><BR _MOZ_DIRTY="" TYPE="_moz"/>
-
+<TD STYLE="background-color: rgb(160, 32, 240);" CLASS="dr-table-cell
rich-table-cell">
</TD>
</TR>
</TABLE>
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5105/BrMozDirty.html
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5105/BrMozDirty.html
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/JBIDE/5105/BrMozDirty.html 2009-10-30
16:19:46 UTC (rev 18369)
@@ -0,0 +1,7 @@
+<html>
+ <body>
+ <table>
+ <tr><td></td></tr>
+ </table>
+ </body>
+</html>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/resources/jsfTest/WebContent/pages/components/dataTable.jsp.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -6,7 +6,6 @@
<DIV>
<TABLE>
<CAPTION>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</CAPTION>
<TBODY>
<TR>
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 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/JsfAllTests.java 2009-10-30
16:19:46 UTC (rev 18369)
@@ -69,6 +69,7 @@
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.JBIDE924Test;
+import org.jboss.tools.jsf.vpe.jsf.test.jbide.MozDirtyTest_JBIDE5105;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.VpeI18nTest_JBIDE4887;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1467Test;
import org.jboss.tools.jsf.vpe.jsf.test.jbide.JsfJbide1501Test;
@@ -103,6 +104,7 @@
TestSuite suite = new TestSuite("Tests for Vpe Jsf components");
//$NON-NLS-1$
// $JUnit-BEGIN$
+ suite.addTestSuite(MozDirtyTest_JBIDE5105.class);
suite.addTestSuite(VpeI18nTest_JBIDE4887.class);
suite.addTestSuite(JsfComponentTest.class);
suite.addTestSuite(Jsf20ComponentContentTest.class);
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MozDirtyTest_JBIDE5105.java
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MozDirtyTest_JBIDE5105.java
(rev 0)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.jsf.test/src/org/jboss/tools/jsf/vpe/jsf/test/jbide/MozDirtyTest_JBIDE5105.java 2009-10-30
16:19:46 UTC (rev 18369)
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * Copyright (c) 2007-2009 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.jsf.test.jbide;
+
+import org.jboss.tools.jsf.vpe.jsf.test.JsfAllTests;
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.jboss.tools.vpe.ui.test.TestUtil;
+import org.jboss.tools.vpe.ui.test.VpeTest;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDOMNodeList;
+
+/**
+ * Tests for _MOZ_DIRTY tags.
+ * See <a
href="https://jira.jboss.org/jira/browse/JBIDE-5105">JBIDE-5...;.
+ *
+ * @author yradtsevich
+ *
+ */
+public class MozDirtyTest_JBIDE5105 extends VpeTest {
+ private static final String MOZ_DIRTY = "_MOZ_DIRTY"; //$NON-NLS-1$
+ private static final String TEST_PAGE_NAME
+ = "JBIDE/5105/BrMozDirty.html"; //$NON-NLS-1$
+
+ public MozDirtyTest_JBIDE5105(String name) {
+ super(name);
+ }
+
+ /**
+ * Test if there are no BR tags with _MOZ_DIRTY attribute.
+ * See
+ * <a
href="https://jira.jboss.org/jira/browse/JBIDE-5105">JBIDE-5...;.
+ *
+ * @throws Throwable
+ */
+ public void testBrMozDirty() throws Throwable {
+ VpeController vpeController = openInVpe(JsfAllTests.IMPORT_PROJECT_NAME,
+ TEST_PAGE_NAME);
+
+ TestUtil.waitForIdle();
+ assertFalse(MOZ_DIRTY + " element detected before refresh.",//$NON-NLS-1$
+ hasBrMozDirty(vpeController));
+
+ vpeController.visualRefresh();
+ TestUtil.waitForIdle();
+ assertFalse(MOZ_DIRTY + " element detected after refresh.", //$NON-NLS-1$
+ hasBrMozDirty(vpeController));
+ }
+
+ private boolean hasBrMozDirty(VpeController vpeController) {
+ nsIDOMNodeList brNodeList = vpeController.getXulRunnerEditor()
+ .getDOMDocument().getElementsByTagName(HTML.TAG_BR);
+ for (int i = 0; i < brNodeList.getLength(); i++) {
+ nsIDOMNode brNode = brNodeList.item(i);
+ if (brNode.getAttributes().getNamedItem(MOZ_DIRTY) != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -28,10 +28,8 @@
</THEAD>
<TFOOT>
<TR CLASS="dr-table-footer rich-table-footer">
+ <TD CLASS="dr-table-footercell rich-table-footercell"></TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
- </TD>
- <TD CLASS="dr-table-footercell rich-table-footercell">
<SPAN> footer1</SPAN>
</TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/datascroller.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -8,7 +8,6 @@
<TD ALIGN="center" CLASS="rich-datascr-button
rich-datascr-button-dsbld">««</TD>
<TD ALIGN="center" CLASS="rich-datascr-button
rich-datascr-button-dsbld">«</TD>
<TD ALIGN="center" CLASS="rich-datascr-button
rich-datascr-button-dsbld">
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
</TD>
<TD ALIGN="center" CLASS="rich-datascr-act">
1</TD>
<TD ALIGN="center" CLASS="rich-datascr-inact">
2</TD>
@@ -21,7 +20,6 @@
<TD ALIGN="center" CLASS="rich-datascr-inact">
9</TD>
<TD ALIGN="center" CLASS="rich-datascr-inact">
10</TD>
<TD ALIGN="center" CLASS="rich-datascr-button">
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
</TD>
<TD ALIGN="center"
CLASS="rich-datascr-button">»</TD>
<TD ALIGN="center"
CLASS="rich-datascr-button">»»</TD>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -39,13 +39,11 @@
</SPAN>
</TH>
<TH CLASS="dr-table-subheadercell rich-table-subheadercell">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TH>
</TR>
<TR CLASS="dr-table-subheader rich-table-subheader">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
@@ -61,10 +59,8 @@
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
</THEAD>
@@ -73,26 +69,21 @@
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter"
SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD
CLASS="dr-table-subfootercell rich-table-subfootercell dr-table-subfooter
rich-table-subfooter">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
</TFOOT>
@@ -134,7 +125,6 @@
<TD WIDTH="17px" ALIGN="right">
<DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
</TBODY>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -42,14 +42,12 @@
<TD>
<DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
</TD>
</TR>
<TR>
<TD>
<DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
</TD>
</TR>
</TABLE>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/pickList.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -89,14 +89,10 @@
CLASS="rich-picklist-body">
<TR>
<TD STYLE="border: 0px none ; padding: 0px;">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
</TABLE>
</DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
</TR>
</TBODY>
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml
===================================================================
---
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/toolBar.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -48,7 +48,6 @@
</TABLE>
</TD>
<TD WIDTH="100%">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item" STYLE="padding:
0px;">
<TABLE
@@ -116,8 +115,6 @@
</TABLE>
</TD>
<TD WIDTH="100%">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item btn"
STYLE="padding: 0px;">
<TABLE
@@ -268,8 +265,6 @@
</TABLE>
</TD>
<TD WIDTH="100%">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item"
STYLE="padding: 0px; color: PaleVioletRed; font-size: medium; font-style:
italic; background-color: FloralWhite; font-family: Arial TUR; font-weight:
bolder;">
@@ -430,8 +425,6 @@
</TABLE>
</TD>
<TD>
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item btn"
STYLE="padding: 0px; color: PaleVioletRed; font-size: medium; font-style:
italic; background-color: FloralWhite; font-family: Arial TUR; font-weight:
bolder;">
@@ -456,8 +449,6 @@
</TABLE>
</TD>
<TD WIDTH="100%">
- <BR _MOZ_DIRTY="" TYPE="_moz" />
-
</TD>
<TD CLASS="dr-toolbar-int rich-toolbar-item btn"
STYLE="padding: 0px; color: PaleVioletRed; font-size: medium; font-style:
italic; background-color: FloralWhite; font-family: Arial TUR; font-weight:
bolder;">
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 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2009-10-30
16:19:46 UTC (rev 18369)
@@ -2728,10 +2728,15 @@
private void reinitImpl() {
try {
- if(switcher==null||!switcher
- .startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
- return;
+ if(switcher==null ||
+ !switcher.startActiveEditor(ActiveEditorSwitcher.ACTIVE_EDITOR_SOURCE)) {
+ return;
}
+
+ // this method must be invoked before any visual
+ // node is created, see JBIDE-5105
+ visualEditor.reinitDesignMode();
+
visualBuilder.setSelectionRectangle(null);
visualEditor.setEditorDomEventListener(this);
IDOMModel sourceModel = (IDOMModel) getModel();
@@ -2742,7 +2747,6 @@
visualBuilder.rebuildDom(null);
}
//reinits selection controller+ controller
- visualEditor.reinitDesignMode();
visualSelectionController = new
VpeSelectionController(visualEditor.getEditor().getSelectionController());
selectionBuilder = new VpeSelectionBuilder(domMapping, sourceBuilder,
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeEditorPart.java 2009-10-30
16:19:46 UTC (rev 18369)
@@ -909,6 +909,11 @@
toolBar = visualEditor.createVisualToolbar(verticalToolbarSplitter);
visualEditor.createPartControl(visualContent);
+
+ // initialize editor
+ // this method must be invoked before any visual
+ // node is created, see JBIDE-5105
+ visualEditor.getEditor();
}
public void createPreviewBrowser() {
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/other/xmp.xhtml.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/other/xmp.xhtml.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/other/xmp.xhtml.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -1,48 +1,27 @@
<tests>
<test id="xmp">
<XMP ID="xmp" STYLE="-moz-user-modify: read-only;" >
-<SPAN><BR _MOZ_DIRTY=""/>
-
-while (<>) {<BR _MOZ_DIRTY=""/>
-
-$org=$_;<BR _MOZ_DIRTY=""/>
-
-s/\\["']//g;<BR _MOZ_DIRTY=""/>
-
-s/\/\/[^:].*//;<BR _MOZ_DIRTY=""/>
-
-s/\/\*.*\*\///g;<BR _MOZ_DIRTY=""/>
-
-if ($comment == 1) {<BR _MOZ_DIRTY=""/>
-
-if (s/.*\*\///) {<BR _MOZ_DIRTY=""/>
-
-$comment = 0;<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
-else {<BR _MOZ_DIRTY=""/>
-
-next;<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
-if (s/\/\*.*//) {<BR _MOZ_DIRTY=""/>
-
-$comment = 1;<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
-if (/^\s*#/) {<BR _MOZ_DIRTY=""/>
-
-next;<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
-}<BR _MOZ_DIRTY=""/>
-
+<SPAN>
+while (<>) {
+ $org=$_;
+ s/\\["']//g;
+ s/\/\/[^:].*//;
+ s/\/\*.*\*\///g;
+ if ($comment == 1) {
+ if (s/.*\*\///) {
+ $comment = 0;
+ }
+ else {
+ next;
+ }
+ }
+ if (s/\/\*.*//) {
+ $comment = 1;
+ }
+ if (/^\s*#/) {
+ next;
+ }
+ }
</SPAN>
</XMP>
</test>
Modified:
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/pre.html.xml
===================================================================
---
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/pre.html.xml 2009-10-30
16:07:36 UTC (rev 18368)
+++
trunk/vpe/tests/org.jboss.tools.vpe.html.test/resources/htmlTest/WebContent/pages/components/text/pre.html.xml 2009-10-30
16:19:46 UTC (rev 18369)
@@ -3,14 +3,8 @@
<PRE WIDTH="30" ID="pre" CLASS="preClass"
STYLE="color: red; -moz-user-modify: read-write;">
<SPAN CLASS="vpe-text">
- <BR _MOZ_DIRTY="" />
-
- string 1
- <BR _MOZ_DIRTY="" />
-
- string 2
- <BR _MOZ_DIRTY="" />
-
+ string 1
+ string 2
</SPAN>
</PRE>
</test>