JBoss Tools SVN: r4306 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-10-17 15:09:00 -0400 (Wed, 17 Oct 2007)
New Revision: 4306
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847 Fix treeNodeAdaptor and recursiveNodeAdaptor
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java 2007-10-17 19:05:41 UTC (rev 4305)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesRecursiveTreeNodesAdaptorTemplate.java 2007-10-17 19:09:00 UTC (rev 4306)
@@ -60,7 +60,7 @@
visualElement.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-tree-h-ic-div");
if (getShowLinesAttr(sourceNode)
- && isHasNextParentAdaptorElement(sourceNode)) {
+ && (isAdapterBetweenNodes(sourceNode) || isHasNextParentAdaptorElement(sourceNode))) {
String path = RichFacesTemplatesActivator
.getPluginResourcePath()
+ ICON_DIV_LINE;
@@ -199,4 +199,44 @@
}
return false;
}
+
+ /**
+ * Is adapter between treeNodes
+ *
+ * @param sourceNode
+ * @return
+ */
+ private boolean isAdapterBetweenNodes(Node sourceNode) {
+ Node parentNode = sourceNode.getParentNode();
+ NodeList childs = parentNode.getChildNodes();
+ Node beforeAdapterNode = null;
+ Node afterAdapterNode = null;
+ Node adapterNode = null;
+ String treeNodeName = sourceNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODE_NAME;
+ for (int i = 0; i < childs.getLength(); i++) {
+ Node el = childs.item(i);
+ if (!(el instanceof Element)) {
+ continue;
+ }
+ if (el.equals(sourceNode)) {
+ adapterNode = el;
+ } else {
+ if (el.getNodeName().equals(treeNodeName)) {
+ if (adapterNode == null) {
+ beforeAdapterNode = el;
+ } else {
+ afterAdapterNode = el;
+ }
+ }
+
+ }
+
+ }
+
+ if (beforeAdapterNode != null && afterAdapterNode != null) {
+ return true;
+ }
+ return false;
+ }
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2007-10-17 19:05:41 UTC (rev 4305)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2007-10-17 19:09:00 UTC (rev 4306)
@@ -224,6 +224,9 @@
// creates icon with status of node(collapsed or not) node
nsIDOMElement td1 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
+
+ Element element = (Element) sourceNode;
+ String id = element.getAttribute("id");
// sets icon node
if (!isLastElement(sourceNode) && isAdaptorChild(sourceNode)
&& !isHasNextAdaptorElement(sourceNode)) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java 2007-10-17 19:05:41 UTC (rev 4305)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodesAdaptorTemplate.java 2007-10-17 19:09:00 UTC (rev 4306)
@@ -57,7 +57,7 @@
visualElement.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
"dr-tree-h-ic-div");
if (getShowLinesAttr(sourceNode)
- && isHasNextParentAdaptorElement(sourceNode)) {
+ && (isAdapterBetweenNodes(sourceNode) || isHasNextParentAdaptorElement(sourceNode))) {
String path = RichFacesTemplatesActivator
.getPluginResourcePath()
+ ICON_DIV_LINE;
@@ -162,7 +162,11 @@
* @return
*/
private boolean isHasNextParentAdaptorElement(Node sourceNode) {
- Node parentTree = sourceNode.getParentNode();
+ Node tree = sourceNode.getParentNode();
+ if (!(tree instanceof Element)) {
+ return true;
+ }
+ Node parentTree = tree.getParentNode();
if (!(parentTree instanceof Element)) {
return true;
}
@@ -185,10 +189,11 @@
if (lastElement != null) {
break;
}
- if (el.equals(sourceNode)) {
+ if (el.equals(tree)) {
lastElement = el;
}
}
+
if (el.getNodeName().equals(treeNodeName)
|| el.getNodeName().equals(treeNodesAdaptorName)
|| el.getNodeName().equals(treeRecursiveNodesAdaptorName)) {
@@ -196,4 +201,44 @@
}
return false;
}
+
+ /**
+ * Is adapter between treeNodes
+ * @param sourceNode
+ * @return
+ */
+ private boolean isAdapterBetweenNodes(Node sourceNode) {
+ Node parentNode = sourceNode.getParentNode();
+ NodeList childs = parentNode.getChildNodes();
+ Node beforeAdapterNode = null;
+ Node afterAdapterNode = null;
+ Node adapterNode = null;
+ String treeNodeName = sourceNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODE_NAME;
+ for (int i = 0; i < childs.getLength(); i++) {
+ Node el = childs.item(i);
+ if (!(el instanceof Element)) {
+ continue;
+ }
+ if (el.equals(sourceNode)) {
+ adapterNode = el;
+ } else {
+ if (el.getNodeName().equals(treeNodeName)) {
+ if (adapterNode == null) {
+ beforeAdapterNode = el;
+ } else {
+ afterAdapterNode = el;
+ }
+ }
+
+ }
+
+ }
+
+ if (beforeAdapterNode != null && afterAdapterNode != null) {
+ return true;
+ }
+ return false;
+ }
+
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2007-10-17 19:05:41 UTC (rev 4305)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeTemplate.java 2007-10-17 19:09:00 UTC (rev 4306)
@@ -178,7 +178,30 @@
super.validate(pageContext, sourceNode, visualDocument, data);
revertTableRows(data.getNode());
}
+
+ public void checkConnectingLines(nsIDOMNode node) {
+ try {
+ nsIDOMNodeList list = node.getChildNodes();
+ nsIDOMElement element = (nsIDOMElement) node
+ .queryInterface(nsIDOMElement.NS_IDOMELEMENT_IID);
+ String id = element
+ .getAttribute(RichFacesTreeNodesAdaptorTemplate.ID_ATTR_NAME);
+ if (id == null)
+ id = "";
+ if (node.getNodeName().equalsIgnoreCase(
+ HtmlComponentUtil.HTML_TAG_DIV)) {
+
+ }
+ nsIDOMNodeList list2 = node.getChildNodes();
+ for (int i = 0; i < list2.getLength(); i++) {
+ revertTableRows(list2.item(i));
+ }
+ } catch (XPCOMException e) {
+ return;
+ }
+ }
+
/**
* Revert tree elements in right order.
*
17 years, 2 months
JBoss Tools SVN: r4305 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-17 15:05:41 -0400 (Wed, 17 Oct 2007)
New Revision: 4305
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
Log:
JBIDE-576
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-10-17 18:49:14 UTC (rev 4304)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/JBossServerStartupLaunchConfiguration.java 2007-10-17 19:05:41 UTC (rev 4305)
@@ -27,6 +27,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
@@ -73,6 +74,8 @@
String serverHome = getServerHome(jbs);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, getDefaultArgs(jbs));
+ wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, getDefaultVMArgs(jbs));
+
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME, START_MAIN_TYPE);
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, serverHome + Path.SEPARATOR + "bin");
ArrayList<IRuntimeClasspathEntry> classpath = new ArrayList<IRuntimeClasspathEntry>();
@@ -92,7 +95,14 @@
}
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Runtime not found"));
}
+
+ public static String getDefaultVMArgs(JBossServer jbs) throws CoreException {
+ if( Platform.getOS().equals(Platform.OS_LINUX))
+ return "-Djava.net.preferIPv4Stack=true";
+ return "";
+ }
+
protected void preLaunch(ILaunchConfiguration configuration,
String mode, ILaunch launch, IProgressMonitor monitor) {
try {
17 years, 2 months
JBoss Tools SVN: r4304 - in trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor: mozilla and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2007-10-17 14:49:14 -0400 (Wed, 17 Oct 2007)
New Revision: 4304
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/VpeSelectionBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1097
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 2007-10-17 17:54:58 UTC (rev 4303)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeController.java 2007-10-17 18:49:14 UTC (rev 4304)
@@ -887,6 +887,16 @@
sourceSelectionChanged();
}
+ public void dragGesture(nsIDOMEvent domEvent) {
+
+ nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
+ boolean canDragFlag = canInnerDrag(mouseEvent);
+ //start drag sessionvpe-element
+ if(canDragFlag) {
+ startDragSession(domEvent);
+ }
+ }
+
private void createMenuForNode(Node node, MenuManager manager) {
createMenuForNode(node, manager, false);
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-17 17:54:58 UTC (rev 4303)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeSelectionBuilder.java 2007-10-17 18:49:14 UTC (rev 4304)
@@ -38,6 +38,7 @@
import org.mozilla.interfaces.nsISelection;
import org.mozilla.interfaces.nsISelectionController;
import org.mozilla.interfaces.nsISelectionDisplay;
+import org.mozilla.xpcom.XPCOMException;
import org.w3c.dom.Attr;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -1193,12 +1194,25 @@
//when we select input this function return null
//but we select elemnt
if(focusNode==null && anchorNode==null) {
-
+
nsIDOMNode visualNode =(nsIDOMNode) event.getTarget().queryInterface(nsIDOMNode.NS_IDOMNODE_IID);
+ //fix of JBIDE-1097
+ if(HTML.TAG_SPAN.equalsIgnoreCase(visualNode.getNodeName()))
+ {
+ if(visualBuilder.getXulRunnerEditor().getLastSelectedElement()!=null&&!visualBuilder.getNodeBounds(visualBuilder.getXulRunnerEditor().getLastSelectedElement()).contains(VisualDomUtil.getMousePoint(event))){
+ return null;
+ }
+ }
int offset = (int) VisualDomUtil.getOffset(visualNode);
selection.removeAllRanges();
selection.collapse(visualNode.getParentNode(), offset);
+ try {
selection.extend(visualNode.getParentNode(), offset + 1);
+ } catch(XPCOMException ex) {
+ //just ignore exception
+ // throws when we trying drag element which already resizing
+ return null;
+ }
focusNode = selection.getFocusNode();
anchorNode = selection.getAnchorNode();
}
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 2007-10-17 17:54:58 UTC (rev 4303)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/VpeVisualDomBuilder.java 2007-10-17 18:49:14 UTC (rev 4304)
@@ -2012,4 +2012,18 @@
return visualNewTextNode;
}
+
+ /**
+ * @return the xulRunnerEditor
+ */
+ public XulRunnerEditor getXulRunnerEditor() {
+ return xulRunnerEditor;
+ }
+
+ /**
+ * @param xulRunnerEditor the xulRunnerEditor to set
+ */
+ public void setXulRunnerEditor(XulRunnerEditor xulRunnerEditor) {
+ this.xulRunnerEditor = xulRunnerEditor;
+ }
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-10-17 17:54:58 UTC (rev 4303)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/EditorDomEventListener.java 2007-10-17 18:49:14 UTC (rev 4304)
@@ -48,6 +48,11 @@
void dragExit(nsIDOMEvent event);
void dragOver(nsIDOMEvent event);
void drop(nsIDOMEvent event);
+ /**
+ * Drag gesture event handler
+ * @param event xulrunner drag event
+ */
+ void dragGesture(nsIDOMEvent event);
boolean canInnerDrag(nsIDOMMouseEvent mouseEvent);
MozillaDropInfo canInnerDrop(nsIDOMMouseEvent mouseEvent);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-10-17 17:54:58 UTC (rev 4303)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/mozilla/MozillaDomEventListener.java 2007-10-17 18:49:14 UTC (rev 4304)
@@ -124,9 +124,8 @@
* @see org.mozilla.interfaces.nsIDOMEventListener#handleEvent(org.mozilla.interfaces.nsIDOMEvent)
*/
public void handleEvent(nsIDOMEvent domEvent) {
- //TODO To many information in LOG
- //VpePlugin.getDefault().logInfo("VPE was handled+EventType is["+domEvent.getType()+"]");
try{
+
if(getEditorDomEventListener()==null){
return;
@@ -136,46 +135,43 @@
mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
getEditorDomEventListener().mouseMove(mouseEvent);
} else if(MOUSEDOWNEVENTTYPE.equals(domEvent.getType())) {
-
+
nsIDOMMouseEvent mouseEvent;
mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
getEditorDomEventListener().mouseDown(mouseEvent);
} else if(MOUSEUPEVENTTYPE.equals(domEvent.getType())) {
-
+
nsIDOMMouseEvent mouseEvent;
mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
getEditorDomEventListener().mouseUp(mouseEvent);
} else if(CLICKEVENTTYPE.equals(domEvent.getType())) {
-
+
nsIDOMMouseEvent mouseEvent;
mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
getEditorDomEventListener().mouseClick(mouseEvent);
} else if(DBLCLICK.equals(domEvent.getType())) {
-
+
nsIDOMMouseEvent mouseEvent;
mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
getEditorDomEventListener().mouseDblClick(mouseEvent);
} else if(KEYPRESS.equals(domEvent.getType())) {
-
+
nsIDOMKeyEvent keyEvent = (nsIDOMKeyEvent) domEvent.queryInterface(nsIDOMKeyEvent.NS_IDOMKEYEVENT_IID);
getEditorDomEventListener().keyPress(keyEvent);
} else if(CONTEXTMENUEVENTTYPE.equals(domEvent.getType())) {
+
//first param are null 0, because this not used in event handler
getEditorDomEventListener().onShowContextMenu(0, domEvent, (nsIDOMNode) domEvent.getTarget().queryInterface(nsIDOMNode.NS_IDOMNODE_IID));
} else if(DRAGGESTUREEVENT.equals(domEvent.getType())) {
- nsIDOMMouseEvent mouseEvent = (nsIDOMMouseEvent) domEvent.queryInterface(nsIDOMMouseEvent.NS_IDOMMOUSEEVENT_IID);
+
+ if(getEditorDomEventListener()!=null) {
- if (editorDomEventListener != null && !isXulElement(mouseEvent)) {
- boolean canDragFlag = editorDomEventListener.canInnerDrag(mouseEvent);
- //start drag sessionvpe-element
- if(canDragFlag) {
-
- getEditorDomEventListener().startDragSession(domEvent);
- }
+ getEditorDomEventListener().dragGesture(domEvent);
}
} else if(DRAGDROPEVENT.equals(domEvent.getType())) {
// calls when drop event occure
+
getEditorDomEventListener().dragDrop(domEvent);
domEvent.stopPropagation();
domEvent.preventDefault();
@@ -184,6 +180,7 @@
} else if(DRAGEXITEVENT.equals(domEvent.getType())) {
//just ignore this event
} else if(DRAGOVEREVENT.equals(domEvent.getType())) {
+
getEditorDomEventListener().dragOver(domEvent);
}
17 years, 2 months
JBoss Tools SVN: r4303 - in trunk/seam/plugins/org.jboss.tools.seam.core: src/org/jboss/tools/seam/internal/core/project/facet and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-17 13:54:58 -0400 (Wed, 17 Oct 2007)
New Revision: 4303
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
Log:
http://jira.jboss.org/jira/browse/JBIDE-926 DataSourceXMLDeployer chooses first server that matches runtime when several may match
Registration in the server selected is added
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2007-10-17 17:38:27 UTC (rev 4302)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/META-INF/MANIFEST.MF 2007-10-17 17:54:58 UTC (rev 4303)
@@ -37,7 +37,8 @@
org.jboss.ide.eclipse.as.core,
org.eclipse.wst.server.core,
org.eclipse.core.filesystem,
- org.eclipse.jst.j2ee.ejb
+ org.eclipse.jst.j2ee.ejb,
+ org.jboss.tools.jst.web
Provide-Package: org.jboss.tools.seam.core,
org.jboss.tools.seam.internal.core,
org.jboss.tools.seam.internal.core.scanner,
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java 2007-10-17 17:38:27 UTC (rev 4302)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPostInstallDelegate.java 2007-10-17 17:54:58 UTC (rev 4303)
@@ -32,6 +32,8 @@
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.server.core.IServer;
+import org.jboss.tools.jst.web.server.RegistrationHelper;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.osgi.service.prefs.BackingStoreException;
@@ -81,6 +83,11 @@
} catch (BackingStoreException e) {
SeamCorePlugin.getPluginLog().logError(e);
}
+
+ IServer server = (IServer)model.getProperty(JBOSS_AS_TARGET_SERVER);
+ if (server != null) {
+ RegistrationHelper.runRegisterInServerJob(project, server);
+ }
}
/**
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-17 17:38:27 UTC (rev 4302)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-17 17:54:58 UTC (rev 4303)
@@ -80,6 +80,10 @@
FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
IDataModel seamFacet = map.getFacetDataModel( ISeamCoreConstants.SEAM_CORE_FACET_ID );
seamFacet.setProperty( ISeamFacetDataModelProperties.JBOSS_AS_TARGET_RUNTIME, propertyValue );
+ } else if (propertyName.equals(ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER)) {
+ FacetDataModelMap map = (FacetDataModelMap) getProperty(FACET_DM_MAP);
+ IDataModel seamFacet = map.getFacetDataModel( ISeamCoreConstants.SEAM_CORE_FACET_ID );
+ seamFacet.setProperty( ISeamFacetDataModelProperties.JBOSS_AS_TARGET_SERVER, propertyValue );
}
return super.propertySet(propertyName, propertyValue);
17 years, 2 months
JBoss Tools SVN: r4302 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-17 13:38:27 -0400 (Wed, 17 Oct 2007)
New Revision: 4302
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java
Log:
JBIDE-800
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java 2007-10-17 17:36:19 UTC (rev 4301)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/select/XModelObjectSelectionProvider.java 2007-10-17 17:38:27 UTC (rev 4302)
@@ -36,10 +36,8 @@
public void dispose() {
setHost(null);
listeners.clear();
- listeners = null;
hosts = new ISelectionProvider[0];
hostsMap.clear();
- hostsMap = null;
}
public void addHost(String name, ISelectionProvider host) {
17 years, 2 months
JBoss Tools SVN: r4301 - trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-17 13:36:19 -0400 (Wed, 17 Oct 2007)
New Revision: 4301
Modified:
trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
Log:
JBIDE-800
Modified: trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2007-10-17 17:35:28 UTC (rev 4300)
+++ trunk/common/plugins/org.jboss.tools.common.gef/src/org/jboss/tools/common/gef/GEFEditor.java 2007-10-17 17:36:19 UTC (rev 4301)
@@ -272,11 +272,17 @@
protected void createOutputStream(OutputStream os) throws IOException {
}
+
+ protected DiagramContentOutlinePage outline;
public void dispose() {
getSite().getWorkbenchWindow().getPartService().removePartListener(
partListener);
partListener = null;
+ if(outline != null) {
+ outline.dispose();
+ outline = null;
+ }
super.dispose();
}
@@ -301,7 +307,8 @@
if (type == CommandStackInspectorPage.class)
return new CommandStackInspectorPage(getCommandStack());
if (type == IContentOutlinePage.class) {
- DiagramContentOutlinePage outline = new DiagramContentOutlinePage(
+ if(outline != null) return outline;
+ outline = new DiagramContentOutlinePage(
new TreeViewer());
outline.setGraphicalViewer(getGraphicalViewer());
outline.setSelectionSynchronizer(getSelectionSynchronizer());
17 years, 2 months
JBoss Tools SVN: r4300 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor: model/impl and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-17 13:35:28 -0400 (Wed, 17 Oct 2007)
New Revision: 4300
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/FacesConfigGuiEditor.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/JSFModel.java
Log:
JBIDE-800
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/FacesConfigGuiEditor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/FacesConfigGuiEditor.java 2007-10-17 16:17:23 UTC (rev 4299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/FacesConfigGuiEditor.java 2007-10-17 17:35:28 UTC (rev 4300)
@@ -34,6 +34,7 @@
if(model == null) return;
model.dispose();
model = null;
+ gui.dispose();
disposeGui();
gui = null;
input = null;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java 2007-10-17 16:17:23 UTC (rev 4299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java 2007-10-17 17:35:28 UTC (rev 4300)
@@ -370,7 +370,8 @@
if (type == CommandStackInspectorPage.class)
return new CommandStackInspectorPage(getCommandStack());
if (type == IContentOutlinePage.class) {
- DiagramContentOutlinePage outline = new DiagramContentOutlinePage(
+ if(outline != null) return outline;
+ outline = new DiagramContentOutlinePage(
new TreeViewer());
outline.setGraphicalViewer(getGraphicalViewer());
outline.setSelectionSynchronizer(getSelectionSynchronizer());
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/JSFModel.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/JSFModel.java 2007-10-17 16:17:23 UTC (rev 4299)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/JSFModel.java 2007-10-17 17:35:28 UTC (rev 4300)
@@ -280,7 +280,7 @@
}
public void removeJSFModelListener(IJSFModelListener listener) {
- strutsModelListeners.remove(listener);
+ if(strutsModelListeners != null) strutsModelListeners.remove(listener);
}
public void remove() {
17 years, 2 months
JBoss Tools SVN: r4299 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-10-17 12:17:23 -0400 (Wed, 17 Oct 2007)
New Revision: 4299
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
Log:
more unlikely name - just to make sure it doesn't trigger something weird.
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-17 15:47:30 UTC (rev 4298)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetProjectCreationDataModelProvider.java 2007-10-17 16:17:23 UTC (rev 4299)
@@ -43,7 +43,7 @@
if(IFacetProjectCreationDataModelProperties.FACET_PROJECT_NAME.equals(propertyName)) {
// Any not empty string should be returned by default
// to workaround https://bugs.eclipse.org/bugs/show_bug.cgi?id=206541
- return "dummy";
+ return "__d_u_m_m_y__for__bug206541__";
}
return super.getDefaultProperty(propertyName);
}
17 years, 2 months
JBoss Tools SVN: r4298 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-17 11:47:30 -0400 (Wed, 17 Oct 2007)
New Revision: 4298
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-791
Little fix with attributes "width" and "height"
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-17 14:59:59 UTC (rev 4297)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-17 15:47:30 UTC (rev 4298)
@@ -392,8 +392,8 @@
<vpe:tag name="rich:simpleTogglePanel" case-sensitive="yes">
<vpe:template children="yes" modify="yes" class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSimpleTogglePanelTemplate">
<vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
+ <vpe:width width-attr="width" />
+ <vpe:height height-attr="height" />
</vpe:resize>
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
17 years, 2 months
JBoss Tools SVN: r4297 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-17 10:59:59 -0400 (Wed, 17 Oct 2007)
New Revision: 4297
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/simpleTogglePanel/simpleTogglePanel.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-791
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/simpleTogglePanel/simpleTogglePanel.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/simpleTogglePanel/simpleTogglePanel.css 2007-10-17 14:51:02 UTC (rev 4296)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/simpleTogglePanel/simpleTogglePanel.css 2007-10-17 14:59:59 UTC (rev 4297)
@@ -27,6 +27,7 @@
color: #000000;
font-weight: bold;
font-family: Arial, Verdana, sans-serif;
+ height: 14px;
}
.dr-stglpnl-b{
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2007-10-17 14:51:02 UTC (rev 4296)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesSimpleTogglePanelTemplate.java 2007-10-17 14:59:59 UTC (rev 4297)
@@ -15,6 +15,7 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
@@ -32,6 +33,9 @@
private static Map toggleMap = new HashMap();
private nsIDOMElement storedSwitchDiv = null;
+ private static final String COLLAPSED_STYLE ="; display: none;";
+ private static final String HEADER_NAME_FACET = "header";
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode, nsIDOMDocument visualDocument) {
@@ -51,8 +55,17 @@
headerDiv.setAttribute("class", "dr-stglpnl-h rich-stglpanel-header " + ComponentUtil.getAttribute(sourceElement, "headerClass"));
headerDiv.setAttribute("style", "position : relative; " + ComponentUtil.getHeaderBackgoundImgStyle());
- String label = ComponentUtil.getAttribute(sourceElement, "label");
- headerDiv.appendChild(visualDocument.createTextNode(label));
+ //http://jira.jboss.com/jira/browse/JBIDE-791
+ Element firstElementOfHeaderFacet = ComponentUtil.getFacet(sourceElement, HEADER_NAME_FACET);
+ if(firstElementOfHeaderFacet != null) {
+ VpeChildrenInfo headerInfo = new VpeChildrenInfo(headerDiv);
+ headerInfo.addSourceChild(firstElementOfHeaderFacet);
+ creationData.addChildrenInfo(headerInfo);
+ } else {
+ String label = ComponentUtil.getAttribute(sourceElement, "label");
+ headerDiv.appendChild(visualDocument.createTextNode(label));
+ }
+ /////
nsIDOMElement switchDiv = visualDocument.createElement("div");
headerDiv.appendChild(switchDiv);
@@ -62,6 +75,8 @@
char defaultMarkerCode = 187;
boolean opened = getActiveState(sourceElement);
switchDiv.setAttribute("vpe-user-toggle-id", (opened ? "false" : "true"));
+
+ headerDiv.setAttribute("vpe-user-toggle-id", (opened ? "false" : "true"));
storedSwitchDiv = switchDiv;
if(opened) {
@@ -78,7 +93,7 @@
}
// Encode Body
- if(opened) {
+ //if(opened) {
nsIDOMElement bodyDiv = visualDocument.createElement("div");
div.appendChild(bodyDiv);
bodyDiv.setAttribute("style", "overflow: auto; height: " + ComponentUtil.getAttribute(sourceElement, "height") + "; width: 100%;");
@@ -99,7 +114,15 @@
bodyInfo.addSourceChild(child);
}
creationData.addChildrenInfo(bodyInfo);
- }
+
+ //http://jira.jboss.com/jira/browse/JBIDE-791
+ if(!opened) {
+ String newStyle = bodyDiv.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
+ newStyle += COLLAPSED_STYLE;
+ bodyDiv.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, newStyle);
+ }
+ //-------------------------
+ //}
return creationData;
}
@@ -141,7 +164,7 @@
opennedStr = ComponentUtil.getAttribute(sourceElement, "opened");
}
- if (opennedStr == null) {
+ if (opennedStr == null || "".equals(opennedStr)) {
opennedStr = "true";
}
@@ -155,4 +178,11 @@
public void stopToggling(Node sourceNode) {
toggleMap.remove(sourceNode);
}
+
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, nsIDOMDocument visualDocument,
+ nsIDOMElement visualNode, Object data, String name, String value) {
+ return true;
+ }
}
\ No newline at end of file
17 years, 2 months