JBoss Tools SVN: r4265 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 13:31:41 -0400 (Tue, 16 Oct 2007)
New Revision: 4265
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
Log:
Update version to 2.1.0 for plugins connected to XulRunner
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2007-10-16 17:31:37 UTC (rev 4264)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/META-INF/MANIFEST.MF 2007-10-16 17:31:41 UTC (rev 4265)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Browser (XULRunner) Plug-in
Bundle-SymbolicName: org.jboss.tools.vpe.xulrunner;singleton:=true
-Bundle-Version: 1.0.0
+Bundle-Version: 2.1.0
Bundle-Activator: org.jboss.tools.vpe.xulrunner.BrowserPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
17 years, 3 months
JBoss Tools SVN: r4264 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 13:31:37 -0400 (Tue, 16 Oct 2007)
New Revision: 4264
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
Log:
Update version to 2.1.0 for plugins connected to XulRunner
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2007-10-16 17:31:33 UTC (rev 4263)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.ajax4jsf/META-INF/MANIFEST.MF 2007-10-16 17:31:37 UTC (rev 4264)
@@ -3,7 +3,7 @@
Bundle-Name: Ajax4jsf VPE Plug-in
Bundle-SymbolicName: org.jboss.tools.jsf.vpe.ajax4jsf;singleton:=true
Bundle-Activator: org.jboss.tools.jsf.vpe.ajax4jsf.Activator
-Bundle-Version: 2.0.0
+Bundle-Version: 2.1.0
Bundle-Localization: plugin
Require-Bundle: org.jboss.tools.vpe,
org.eclipse.ui,
17 years, 3 months
JBoss Tools SVN: r4263 - trunk/vpe/plugins/org.jboss.tools.vpe/META-INF.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 13:31:33 -0400 (Tue, 16 Oct 2007)
New Revision: 4263
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
Log:
Update version to 2.1.0 for plugins connected to XulRunner
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2007-10-16 17:31:28 UTC (rev 4262)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/META-INF/MANIFEST.MF 2007-10-16 17:31:33 UTC (rev 4263)
@@ -62,5 +62,5 @@
org.eclipse.ui.ide,
org.jboss.tools.vpe.xulrunner,
org.mozilla.xpcom
-Bundle-Version: 2.0.0
+Bundle-Version: 2.1.0
17 years, 3 months
JBoss Tools SVN: r4262 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 13:31:28 -0400 (Tue, 16 Oct 2007)
New Revision: 4262
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
Log:
Update version to 2.1.0 for plugins connected to XulRunner
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2007-10-16 17:31:24 UTC (rev 4261)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2007-10-16 17:31:28 UTC (rev 4262)
@@ -15,5 +15,5 @@
org.jboss.tools.jst.jsp,
org.mozilla.xpcom
Export-Package: org.jboss.tools.jsf.vpe.facelets
-Bundle-Version: 2.0.0
+Bundle-Version: 2.1.0
17 years, 3 months
JBoss Tools SVN: r4261 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/META-INF.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 13:31:24 -0400 (Tue, 16 Oct 2007)
New Revision: 4261
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/META-INF/MANIFEST.MF
Log:
Update version to 2.1.0 for plugins connected to XulRunner
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/META-INF/MANIFEST.MF 2007-10-16 16:36:31 UTC (rev 4260)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.tomahawk/META-INF/MANIFEST.MF 2007-10-16 17:31:24 UTC (rev 4261)
@@ -13,5 +13,5 @@
org.eclipse.wst.sse.core,
org.eclipse.wst.xml.core
Export-Package: org.jboss.tools.jsf.vpe.tomahawk
-Bundle-Version: 2.0.0
+Bundle-Version: 2.1.0
17 years, 3 months
JBoss Tools SVN: r4260 - trunk/vpe/plugins.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 12:36:31 -0400 (Tue, 16 Oct 2007)
New Revision: 4260
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe.mozilla.gtk/
trunk/vpe/plugins/org.jboss.tools.vpe.mozilla.win32/
trunk/vpe/plugins/org.jboss.tools.vpe.mozilla/
Log:
Sync with jbosstools_xulrunner branch
17 years, 3 months
JBoss Tools SVN: r4259 - in trunk/vpe/plugins/org.jboss.tools.vpe: src/org/jboss/tools/vpe/dnd and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 12:35:21 -0400 (Tue, 16 Oct 2007)
New Revision: 4259
Added:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/ve/
trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
Removed:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/MozillaSupports.java
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/
Log:
Sync with jbosstools_xulrunner branch
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe
___________________________________________________________________
Name: svn:ignore
- bin
+ bin
.options
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/dnd/VpeDnD.java 2007-10-16 16:35:21 UTC (rev 4259)
@@ -0,0 +1,190 @@
+/*******************************************************************************
+
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.dnd;
+
+import org.jboss.tools.vpe.editor.VpeController;
+import org.jboss.tools.vpe.editor.mozilla.EditorDomEventListener;
+import org.jboss.tools.vpe.editor.mozilla.MozillaDropInfo;
+import org.mozilla.interfaces.nsIComponentManager;
+import org.mozilla.interfaces.nsIDOMEvent;
+import org.mozilla.interfaces.nsIDOMMouseEvent;
+import org.mozilla.interfaces.nsIDOMNode;
+import org.mozilla.interfaces.nsIDragService;
+import org.mozilla.interfaces.nsIServiceManager;
+import org.mozilla.interfaces.nsISupportsArray;
+import org.mozilla.interfaces.nsISupportsString;
+import org.mozilla.interfaces.nsITransferable;
+import org.mozilla.xpcom.Mozilla;
+
+/**
+ * @author Max Areshkau
+ *
+ *Class which response for drag and drop functionality
+ */
+public class VpeDnD {
+
+ private static final String CID_DRAGSERVICE = "@mozilla.org/widget/dragservice;1";
+ private static final String CID_TRANSFERABLE = "@mozilla.org/widget/transferable;1";
+ private static final String CID_SUPPORTSSTRING = "@mozilla.org/supports-string;1";
+
+ private static final String CID_SUPPORTSARRAY = "@mozilla.org/supports-array;1";
+
+ /**
+ * service manager */
+ private nsIServiceManager serviceManager;
+
+ /**
+ * component manager
+ */
+ private nsIComponentManager componentManager;
+
+ /**
+ * drag service
+ */
+ private nsIDragService dragService;
+
+
+ /**
+ * Starts drag session
+ * @param dragetElement
+ */
+ public void startDragSession(nsIDOMEvent domEvent) {
+ nsISupportsArray transArray = (nsISupportsArray) getComponentManager()
+ .createInstanceByContractID(CID_SUPPORTSARRAY, null,
+ nsISupportsArray.NS_ISUPPORTSARRAY_IID);
+ transArray.appendElement(createTransferable());
+ getDragService().invokeDragSession((nsIDOMNode) domEvent.getTarget().queryInterface(nsIDOMNode.NS_IDOMNODE_IID), transArray, null,
+ nsIDragService.DRAGDROP_ACTION_MOVE
+ | nsIDragService.DRAGDROP_ACTION_COPY
+ | nsIDragService.DRAGDROP_ACTION_LINK);
+
+ domEvent.stopPropagation();
+ domEvent.preventDefault();
+
+ }
+
+ /**
+ * Creates transferable object to start drag session
+ *
+ * @return transferable object
+ */
+ private nsITransferable createTransferable() {
+
+ nsITransferable iTransferable = (nsITransferable) getComponentManager()
+ .createInstanceByContractID(CID_TRANSFERABLE, null,
+ nsITransferable.NS_ITRANSFERABLE_IID);
+ nsISupportsString transferData = (nsISupportsString) getComponentManager()
+ .createInstanceByContractID(CID_SUPPORTSSTRING, null,
+ nsISupportsString.NS_ISUPPORTSSTRING_IID);
+ String data="vpe-element";
+ transferData.setData(data);
+ iTransferable.setTransferData(VpeController.MODEL_FLAVOR, transferData, data.length());
+ iTransferable.setTransferData("text/plain", transferData, data.length());
+ iTransferable.setTransferData("text/unicode", transferData,data.length()*2);
+ iTransferable.setTransferData("text/html", transferData, data.length()*2);
+ iTransferable.setTransferData("text/xml", transferData, data.length()*2);
+ iTransferable.setTransferData("text/rtf", transferData, data.length()*2);
+ iTransferable.setTransferData("text/enriched", transferData, data.length()*2);
+ iTransferable.setTransferData("text/richtext", transferData, data.length()*2);
+ iTransferable.setTransferData("text/t140", transferData, data.length()*2);
+
+ return iTransferable;
+ }
+ /**
+ * @return the componentManager
+ */
+ public nsIComponentManager getComponentManager() {
+
+ if(componentManager==null) {
+
+ componentManager = Mozilla.getInstance()
+ .getComponentManager();
+ }
+ return componentManager;
+ }
+
+ /**
+ * @return the serviceManager
+ */
+ public nsIServiceManager getServiceManager() {
+
+ if(serviceManager==null) {
+ serviceManager = Mozilla.getInstance()
+ .getServiceManager();
+ }
+ return serviceManager;
+ }
+
+ /**
+ * @return the dragService
+ */
+ public nsIDragService getDragService() {
+
+ if(dragService==null) {
+ dragService = (nsIDragService) getServiceManager()
+ .getServiceByContractID(CID_DRAGSERVICE,
+ nsIDragService.NS_IDRAGSERVICE_IID);
+ }
+ return dragService;
+ }
+ /**
+ * Calls when drag over event ocure
+ * @param event
+ */
+ public void dragOver(nsIDOMEvent event, EditorDomEventListener editorDomEventListener) {
+ boolean canDrop = false;
+
+ nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) event.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
+ //in this condition early was check for xulelement
+ if (editorDomEventListener != null) {
+ if (getDragService().getCurrentSession().isDataFlavorSupported(VpeController.MODEL_FLAVOR)) {
+
+ MozillaDropInfo info;
+
+ if(getDragService().getCurrentSession().getSourceNode()==null){
+ //external drag
+ info = editorDomEventListener.canExternalDrop(mouseEvent, VpeController.MODEL_FLAVOR, "");
+ } else {
+ //internal drag
+ info = editorDomEventListener.canInnerDrop(mouseEvent);
+ }
+ if (info != null) {
+ canDrop = info.canDrop();
+ }
+ }
+ }
+ //sets possability to drop current element here
+ getDragService().getCurrentSession().setCanDrop(canDrop);
+ mouseEvent.preventDefault();
+ mouseEvent.stopPropagation();
+
+ }
+ /**
+ * Drop Event handler
+ * @param domEvent
+ * @param editorDomEventListener
+ */
+ public void dragDrop(nsIDOMEvent domEvent, EditorDomEventListener editorDomEventListener) {
+
+ if(editorDomEventListener!=null) {
+
+ if(getDragService().getCurrentSession().getSourceDocument()==null) {
+ //in this case it's is external drag
+ editorDomEventListener.externalDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID), VpeController.MODEL_FLAVOR, "");
+ } else {
+ // in this case it's is an internal drag
+ editorDomEventListener.innerDrop((nsIDOMMouseEvent)domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID));
+ }
+ }
+ }
+
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/selection/VpeSelectionController.java 2007-10-16 16:35:21 UTC (rev 4259)
@@ -0,0 +1,52 @@
+/*******************************************************************************
+
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.editor.selection;
+
+import org.mozilla.interfaces.nsISelection;
+
+/**
+ * @author Maxim Areshkau
+ * Class which replace nsISelectionController functionality
+ */
+public class VpeSelectionController {
+
+ private nsISelection selection;
+
+ /**
+ * @param selection
+ */
+ public VpeSelectionController(nsISelection selection) {
+ this.selection = selection;
+ }
+
+ /**
+ * type - not used in
+ * @return the selection
+ */
+ public nsISelection getSelection(long type) {
+ return selection;
+ }
+
+ /**
+ * @param selection the selection to set
+ */
+ public void setSelection(nsISelection selection) {
+ this.selection = selection;
+ }
+
+ //method stub just because it is exist in nsISelectionController
+ public void setCaretEnabled(boolean value){
+ }
+ //method stub just because it is exist in nsISelectionController
+ public void setSelectionFlags(short selectionFlags){
+ }
+}
Deleted: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/MozillaSupports.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/MozillaSupports.java 2007-10-16 16:30:17 UTC (rev 4258)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/MozillaSupports.java 2007-10-16 16:35:21 UTC (rev 4259)
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.vpe.editor.util;
-
-import org.jboss.tools.vpe.mozilla.internal.swt.xpl.nsID;
-import org.jboss.tools.vpe.mozilla.internal.swt.xpl.nsIDOMNode;
-import org.jboss.tools.vpe.mozilla.internal.swt.xpl.nsISupports;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-public class MozillaSupports {
-
- public static void addRef(Object obj) {
- if (obj instanceof nsISupports) {
- ((nsISupports) obj).AddRef();
- }
- }
-
- public static void release(Object obj) {
- if (obj instanceof nsISupports) {
- ((nsISupports) obj).Release();
- }
- }
-
- public static void release(Object obj0, Object obj1) {
- release(obj0);
- release(obj1);
- }
-
- public static void release(Object obj0, Object obj1, Object obj2) {
- release(obj0);
- release(obj1);
- release(obj2);
- }
-
- public static int getRefCount(Object obj) {
- if (obj instanceof nsISupports) {
- return ((nsISupports) obj).getRefCount();
- }
- return 0;
- }
-
- public static int getAddress(Object obj) {
- if (obj instanceof nsISupports) {
- return ((nsISupports) obj).getAddress();
- }
- return 0;
- }
-
- public static int getChildCount(Node node) {
- int count = 0;
- NodeList children = node.getChildNodes();
- if (children != null) {
- count = children.getLength();
- release(children);
- }
- return count;
- }
-
- public static Node getChildNode(Node node, int index) {
- Node child = null;
- NodeList children = node.getChildNodes();
- if (children != null && index >= 0 && index < children.getLength()) {
- child = children.item(index);
- release(children);
- }
- return child;
- }
-
- public static int getOffset(Node node) {
- return ((nsIDOMNode)node).getOffset();
- }
-
- public static int queryInterface(Object obj, nsID uuid) {
- if (obj instanceof nsISupports) {
- return ((nsISupports) obj).queryInterface(uuid);
- }
- return 0;
- }
-}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/VpeDebugUtil.java 2007-10-16 16:35:21 UTC (rev 4259)
@@ -0,0 +1,50 @@
+/*******************************************************************************
+
+* Copyright (c) 2007 Red Hat, Inc.
+* Distributed under license by Red Hat, Inc. All rights reserved.
+* This program is made available under the terms of the
+* Eclipse Public License v1.0 which accompanies this distribution,
+* and is available at http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+* Red Hat, Inc. - initial API and implementation
+******************************************************************************/
+package org.jboss.tools.vpe.editor.util;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.vpe.VpeDebug;
+
+/**
+ * @author Max Areshkau (mareshkau(a)exadel.com)
+ *
+ *Class created to print debug info
+ */
+public class VpeDebugUtil {
+
+ private static final SimpleDateFormat formatter = new SimpleDateFormat();
+ static {
+ formatter.applyPattern("hh:mm:ss.SSS");
+ }
+ /**
+ * Prints debug info on console
+ * @param msg
+ */
+ public static void debugInfo(String msg) {
+
+ if(Platform.inDebugMode()) {
+
+ System.out.print(formatter.format(new Date())+":"+ msg);
+ }
+ }
+ /**
+ *
+ */
+ public static void debugVPEDnDEvents(String msg) {
+ if(VpeDebug.PRINT_VISUAL_DRAGDROP_EVENT) {
+
+ System.out.println(formatter.format(new Date())+":"+ msg);
+ }
+ }
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/ve/EditorOverride.css 2007-10-16 16:35:21 UTC (rev 4259)
@@ -0,0 +1,330 @@
+/*
+ * The contents of this file are subject to the Netscape Public
+ * License Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the License is distributed on an "AS
+ * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * rights and limitations under the License.
+ *
+ * The Original Code is Mozilla Communicator client code, released
+ * March 31, 1998.
+ *
+ * The Initial Developer of the Original Code is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998-1999 Netscape Communications Corporation. All
+ * Rights Reserved.
+ *
+ * Contributor(s):
+ */
+
+/* Styles to alter look of things in the Editor content window
+ * that should NOT be removed when we display in completely WYSIWYG
+ * "Browser Preview" mode.
+ * Anything that should change, like appearance of table borders
+ * and Named Anchors, should be placed in EditorContent.css instead of here.
+*/
+
+/* Primary cursor is text I-beam */
+
+a:link {
+ cursor: text;
+}
+
+/* Use default arrow over objects with size that
+ are selected when clicked on.
+ Override the browser's pointer cursor over links
+*/
+
+img, img[usemap], area,
+object, object[usemap],
+applet, hr, button, input, isindex, textarea, select,
+a:link img, a:visited img, a:active img,
+a[name]:empty {
+ cursor: default;
+}
+
+a:visited, a:active {
+ cursor: text;
+ color : inherit;
+}
+
+a:link img, a:visited img {
+ -moz-user-input: none;
+}
+
+a:link {
+ text-decoration: underline -moz-anchor-decoration;
+ color: -moz-hyperlinktext;
+}
+
+input, button, textarea {
+ -moz-user-select: all !important;
+ -moz-user-input: auto !important;
+ -moz-user-focus: none !important;
+}
+
+select, input[disabled], input[type="checkbox"], input[type="radio"], input[type="file"] {
+ -moz-user-select: all !important;
+ -moz-user-input: auto !important;
+ -moz-user-focus: none !important;
+}
+
+isindex[prompt]
+{
+ -moz-user-select: none !important;
+ -moz-user-input: none !important;
+ -moz-user-focus: none !important;
+}
+
+input[type="hidden"] {
+ border: 1px solid black !important;
+ visibility: visible !important;
+}
+
+/*
+label {
+ -moz-user-select: all !important;
+}
+*/
+
+::-moz-display-comboboxcontrol-frame {
+ -moz-user-select: text !important;
+}
+
+option {
+ -moz-user-select: text !important;
+}
+
+#mozToc.readonly {
+ -moz-user-select: all !important;
+ -moz-user-input: none !important;
+}
+
+span[\_moz_anonclass="mozResizer"] {
+ width: 5px;
+ height: 5px;
+ position: absolute;
+ border: 1px black solid;
+ background-color: white;
+ -moz-user-select: none;
+ z-index: 2147483646;
+}
+
+span[\_moz_anonclass="mozResizer"][\_moz_activated],
+span[\_moz_anonclass="mozResizer"]:hover {
+ background-color: black;
+}
+
+span[\_moz_anonclass="mozResizer"].hidden,
+span[\_moz_anonclass="mozResizingShadow"].hidden,
+img[\_moz_anonclass="mozResizingShadow"].hidden,
+span[\_moz_anonclass="mozGrabber"].hidden,
+span[\_moz_anonclass="mozResizingInfo"].hidden,
+a[\_moz_anonclass="mozTableRemoveRow"].hidden,
+a[\_moz_anonclass="mozTableRemoveColumn"].hidden {
+ display: none !important;
+}
+
+span[\_moz_anonclass="mozResizer"][anonlocation="nw"] {
+ cursor: nw-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="n"] {
+ cursor: n-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="ne"] {
+ cursor: ne-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="w"] {
+ cursor: w-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="e"] {
+ cursor: e-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="sw"] {
+ cursor: sw-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="s"] {
+ cursor: s-resize;
+}
+span[\_moz_anonclass="mozResizer"][anonlocation="se"] {
+ cursor: se-resize;
+}
+
+span[\_moz_anonclass="mozResizingShadow"],
+img[\_moz_anonclass="mozResizingShadow"] {
+ -moz-outline: thin dashed black;
+ -moz-user-select: none;
+ -moz-opacity: 0.5;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+span[\_moz_anonclass="mozResizingInfo"] {
+ font-family: sans-serif;
+ font-size: x-small;
+ color: black;
+ background-color: #d0d0d0;
+ border: ridge 2px #d0d0d0;
+ padding: 2px;
+ position: absolute;
+ z-index: 2147483647;
+}
+
+*[\_moz_abspos] {
+ -moz-outline: silver ridge 2px;
+ z-index: 2147483645 !important;
+}
+*[\_moz_abspos="white"] {
+ background-color: white !important;
+}
+*[\_moz_abspos="black"] {
+ background-color: black !important;
+}
+
+span[\_moz_anonclass="mozGrabber"] {
+ -moz-outline: ridge 2px silver;
+ padding: 2px;
+ position: absolute;
+ width: 12px;
+ height: 12px;
+ background-image: url("resource:/res/grabber.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none;
+ cursor: move;
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 4px;
+ height: 8px;
+ background-image: url("resource:/res/table-add-column-before.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"]:hover {
+ background-image: url("resource:/res/table-add-column-before-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnBefore"]:active {
+ background-image: url("resource:/res/table-add-column-before-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 4px;
+ height: 8px;
+ background-image: url("resource:/res/table-add-column-after.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"]:hover {
+ background-image: url("resource:/res/table-add-column-after-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddColumnAfter"]:active {
+ background-image: url("resource:/res/table-add-column-after-active.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 8px;
+ background-image: url("resource:/res/table-remove-column.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"]:hover {
+ background-image: url("resource:/res/table-remove-column-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveColumn"]:active {
+ background-image: url("resource:/res/table-remove-column-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 4px;
+ background-image: url("resource:/res/table-add-row-before.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"]:hover {
+ background-image: url("resource:/res/table-add-row-before-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowBefore"]:active {
+ background-image: url("resource:/res/table-add-row-before-active.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 4px;
+ background-image: url("resource:/res/table-add-row-after.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"]:hover {
+ background-image: url("resource:/res/table-add-row-after-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableAddRowAfter"]:active {
+ background-image: url("resource:/res/table-add-row-after-active.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"] {
+ position: absolute;
+ z-index: 2147483647;
+ text-decoration: none !important;
+ border: none 0px !important;
+ width: 8px;
+ height: 8px;
+ background-image: url("resource:/res/table-remove-row.gif");
+ background-repeat: no-repeat;
+ background-position: center center;
+ -moz-user-select: none !important;
+ -moz-user-focus: none !important;
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"]:hover {
+ background-image: url("resource:/res/table-remove-row-hover.gif");
+}
+
+a[\_moz_anonclass="mozTableRemoveRow"]:active {
+ background-image: url("resource:/res/table-remove-row-active.gif");
+}
Added: trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html (rev 0)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/ve/init.html 2007-10-16 16:35:21 UTC (rev 4259)
@@ -0,0 +1,68 @@
+<html>
+
+<head>
+ <title>Test Page</title>
+ <script src="mozileLoader.js" type="text/javascript"></script>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+
+ <link href="EditorOverride.css" rel="stylesheet" type="text/css">
+
+<style type="text/css" vpe="yes">
+<!--
+ .__any__tag__block {
+ display:block;
+ border: 1px solid black;
+ margin: 1px 1px 1px 1px;
+ padding: 2px 1px 1px 1px;
+ }
+ .__any__tag__caption {
+ color:#006727;
+ font-size: 12px;
+ padding: 0px 2px 0px 2px;
+ -moz-user-modify: read-only;
+ }
+ .__any__tag__inline {
+ display: inline;
+ border: 1px solid black;
+ margin: 2px 1px 1px 1px;
+ }
+ .__any__tag__none {
+ display: none;
+ }
+
+ #__content__area__ {
+ width:100%;
+ height:100%;
+ min-height:50px;
+ margin:0px;
+ padding:0px;
+ -moz-user-modify: read-write;
+ -moz-user-input: enabled;
+ -moz-user-select: normal;
+ }
+ .__button__tag {
+ background-color: buttonface;
+ padding: 2px 9px 2px 9px;
+ text-align: center;
+ border: 2px outset threedface;
+ font-family: "MS Sans Serif";
+ font-size: 13.3333px;
+ line-height:1.85;
+ }
+ .__input__tag {
+ background-color: window;
+ text-align: left;
+ border: 2px inset threedface;
+ font-family: "MS Sans Serif";
+ font-size: 13.3333px;
+ line-height:1.6;
+ -moz-user-select: normal;
+ }
+-->
+</style>
+</head>
+
+
+<body id="__content__area__"></body>
+
+</html>
17 years, 3 months
JBoss Tools SVN: r4257 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 12:24:26 -0400 (Tue, 16 Oct 2007)
New Revision: 4257
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/
Log:
Sync with jbosstools_xulrunner branch
Property changes on: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner
___________________________________________________________________
Name: svn:ignore
+ .options
17 years, 3 months
JBoss Tools SVN: r4255 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets: src/org/jboss/tools/jsf/vpe/facelets/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-16 12:22:23 -0400 (Tue, 16 Oct 2007)
New Revision: 4255
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java
Log:
Sync with jbosstools_xulrunner branch
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/META-INF/MANIFEST.MF 2007-10-16 16:22:23 UTC (rev 4255)
@@ -12,7 +12,8 @@
org.jboss.tools.common,
org.jboss.tools.vpe,
org.eclipse.core.resources,
- org.jboss.tools.jst.jsp
+ org.jboss.tools.jst.jsp,
+ org.mozilla.xpcom
Export-Package: org.jboss.tools.jsf.vpe.facelets
Bundle-Version: 2.0.0
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeCompositionTemplate.java 2007-10-16 16:22:23 UTC (rev 4255)
@@ -10,23 +10,24 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.facelets.template;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
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.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
public class VpeCompositionTemplate extends VpeDefineContainerTemplate {
- protected VpeCreationData createStub(String fileName, Node sourceElement, Document visualDocument) {
- Element container = visualDocument.createElement("div");
+ protected VpeCreationData createStub(String fileName, Node sourceElement, nsIDOMDocument visualDocument) {
+ nsIDOMElement container = visualDocument.createElement(HTML.TAG_DIV);
container.setAttribute("style", "border: 1px dashed #2A7F00");
VpeVisualDomBuilder.markIncludeElement(container);
- Element title = visualDocument.createElement("div");
- Element tag = visualDocument.createElement("span");
+ nsIDOMElement title = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement tag = visualDocument.createElement(HTML.TAG_SPAN);
tag.setAttribute("class", "__any__tag__caption");
tag.appendChild(visualDocument.createTextNode(sourceElement.getNodeName()));
title.appendChild(tag);
@@ -37,8 +38,8 @@
return new VpeCreationData(container);
}
-
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument,nsIDOMElement visualNode, Object data, String name, String value) {
return true;
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDecorateTemplate.java 2007-10-16 16:22:23 UTC (rev 4255)
@@ -10,24 +10,24 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.facelets.template;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class VpeDecorateTemplate extends VpeDefineContainerTemplate {
- protected VpeCreationData createStub(String fileName, Node sourceElement, Document visualDocument) {
- Element container = visualDocument.createElement("div");
+ protected VpeCreationData createStub(String fileName, Node sourceElement, nsIDOMDocument visualDocument) {
+ nsIDOMElement container = visualDocument.createElement(HTML.TAG_DIV);
container.setAttribute("style", "border: 1px dashed #2A7F00");
VpeVisualDomBuilder.markIncludeElement(container);
- Element title = visualDocument.createElement("div");
- Element tag = visualDocument.createElement("span");
+ nsIDOMElement title = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement tag = visualDocument.createElement(HTML.TAG_SPAN);
tag.setAttribute("class", "__any__tag__caption");
tag.appendChild(visualDocument.createTextNode(sourceElement.getNodeName()));
title.appendChild(tag);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineContainerTemplate.java 2007-10-16 16:22:23 UTC (rev 4255)
@@ -12,14 +12,12 @@
import java.util.HashSet;
import java.util.Set;
-
import org.eclipse.core.resources.IFile;
import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
-
import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
@@ -30,11 +28,15 @@
import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.template.VpeTemplateManager;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
public abstract class VpeDefineContainerTemplate extends VpeAbstractTemplate {
private static final String ATTR_TEMPLATE = "template";
- private static Set defineContainer = new HashSet();
+ private static Set<Node> defineContainer = new HashSet<Node>();
+ @Override
protected void init(Element templateElement) {
children = true;
modify = false;
@@ -42,7 +44,7 @@
}
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
String fileName = null;
Attr attr = ((Element)sourceNode).getAttributeNode(ATTR_TEMPLATE);
if (attr != null && attr.getNodeValue().trim().length() > 0) {
@@ -64,8 +66,8 @@
creationData.setData(null);
return creationData;
}
-
- public void validate(VpePageContext pageContext, Node sourceNode, Document visualDocument, VpeCreationData creationData) {
+ @Override
+ public void validate(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, VpeCreationData creationData) {
TemplateFileInfo templateFileInfo = (TemplateFileInfo)creationData.getData();
if (templateFileInfo != null) {
VpeIncludeInfo includeInfo = pageContext.getVisualBuilder().popIncludeStack();
@@ -82,8 +84,9 @@
pageContext.getEditPart().getController().getIncludeList().removeIncludeModel(templateFileInfo.templateFile);
}
}
+ @Override
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, nsIDOMDocument visualDocument, nsIDOMElement visualNode, Object data, String name, String value) {
- public boolean isRecreateAtAttrChange(VpePageContext pageContext, Element sourceElement, Document visualDocument, Node visualNode, Object data, String name, String value) {
return true;
}
@@ -106,8 +109,8 @@
}
}
- private VpeCreationData createInclude(Document sourceDocument, Document visualDocument) {
- Element visualNewElement = visualDocument.createElement("div");
+ private VpeCreationData createInclude(Document sourceDocument, nsIDOMDocument visualDocument) {
+ nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
VpeVisualDomBuilder.markIncludeElement(visualNewElement);
VpeCreationData creationData = new VpeCreationData(visualNewElement);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(visualNewElement);
@@ -119,7 +122,7 @@
creationData.addChildrenInfo(childrenInfo);
return creationData;
}
-
+ @Override
public boolean containsText() {
return false;
}
@@ -129,7 +132,7 @@
}
- protected abstract VpeCreationData createStub(String fileName, Node sourceElement, Document visualDocument);
+ protected abstract VpeCreationData createStub(String fileName, Node sourceElement, nsIDOMDocument visualDocument);
static class TemplateFileInfo {
IFile templateFile;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeDefineTemplate.java 2007-10-16 16:22:23 UTC (rev 4255)
@@ -10,16 +10,16 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.facelets.template;
+import org.jboss.tools.vpe.editor.context.VpePageContext;
+import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
+import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
-import org.jboss.tools.vpe.editor.context.VpePageContext;
-import org.jboss.tools.vpe.editor.mapping.VpeElementMapping;
-import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
-import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
-import org.jboss.tools.vpe.editor.template.VpeCreationData;
-
public class VpeDefineTemplate extends VpeAbstractTemplate {
protected void init(Element templateElement) {
@@ -28,9 +28,9 @@
initTemplateSections(templateElement, true, true, true, true, true);
}
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
if (VpeDefineContainerTemplate.isDefineContainer(sourceNode.getParentNode())) {
- Element visualNewElement = visualDocument.createElement("div");
+ nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
return new VpeCreationData(visualNewElement);
}
return createStub((Element)sourceNode, visualDocument);
@@ -44,12 +44,12 @@
return true;
}
- private VpeCreationData createStub(Element sourceElement, Document visualDocument) {
- Element container = visualDocument.createElement("div");
+ private VpeCreationData createStub(Element sourceElement, nsIDOMDocument visualDocument) {
+ nsIDOMElement container = visualDocument.createElement(HTML.TAG_DIV);
container.setAttribute("style", "border: 1px solid gray");
- Element title = visualDocument.createElement("div");
- Element tag = visualDocument.createElement("span");
+ nsIDOMElement title = visualDocument.createElement(HTML.TAG_DIV);
+ nsIDOMElement tag = visualDocument.createElement(HTML.TAG_SPAN);
tag.setAttribute("class", "__any__tag__caption");
tag.appendChild(visualDocument.createTextNode(sourceElement.getNodeName()));
title.appendChild(tag);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java 2007-10-16 16:22:13 UTC (rev 4254)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.facelets/src/org/jboss/tools/jsf/vpe/facelets/template/VpeInsertTemplate.java 2007-10-16 16:22:23 UTC (rev 4255)
@@ -10,17 +10,19 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.facelets.template;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
import org.jboss.tools.vpe.editor.VpeIncludeInfo;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.util.HTML;
+import org.mozilla.interfaces.nsIDOMDocument;
+import org.mozilla.interfaces.nsIDOMElement;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
public class VpeInsertTemplate extends VpeAbstractTemplate {
@@ -30,7 +32,7 @@
initTemplateSections(templateElement, false, true, false, false, false);
}
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
VpeVisualDomBuilder visualBuilder = pageContext.getVisualBuilder();
VpeIncludeInfo includeInfo = visualBuilder.getCurrentIncludeInfo();
if (includeInfo != null && includeInfo.getElement() != null) {
@@ -53,7 +55,7 @@
return creationData;
}
- public void validate(VpePageContext pageContext, Node sourceNode, Document visualDocument, VpeCreationData creationData) {
+ public void validate(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument, VpeCreationData creationData) {
VpeIncludeInfo includeInfo = (VpeIncludeInfo)creationData.getData();
if (includeInfo != null) {
pageContext.getVisualBuilder().pushIncludeStack((VpeIncludeInfo)includeInfo);
@@ -79,7 +81,7 @@
return defineElement;
}
- private VpeCreationData createInsert(Element defineElement, Document visualDocument) {
+ private VpeCreationData createInsert(Element defineElement, nsIDOMDocument visualDocument) {
VpeCreationData creationData = new VpeCreationData(null);
VpeChildrenInfo childrenInfo = new VpeChildrenInfo(null);
childrenInfo.addSourceChild(defineElement);
@@ -87,8 +89,8 @@
return creationData;
}
- private VpeCreationData createStub(Element element, Document visualDocument) {
- Element visualNewElement = visualDocument.createElement("div");
+ private VpeCreationData createStub(Element element, nsIDOMDocument visualDocument) {
+ nsIDOMElement visualNewElement = visualDocument.createElement(HTML.TAG_DIV);
return new VpeCreationData(visualNewElement);
}
}
17 years, 3 months