JBoss Tools SVN: r3832 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server: extensions and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 20:50:58 -0400 (Wed, 26 Sep 2007)
New Revision: 3832
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
Log:
change to updating of view to fix bug where viewer wouldnt update properly.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-26 23:56:32 UTC (rev 3831)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/ExtensionTableViewer.java 2007-09-27 00:50:58 UTC (rev 3832)
@@ -19,6 +19,7 @@
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
+import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.part.PageBook;
@@ -437,5 +438,10 @@
}
}
+ public boolean elementInTree(Object element) {
+ Widget[] w = super.findItems(element);
+ return w != null && w.length > 0;
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-26 23:56:32 UTC (rev 3831)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/JBossServerViewExtension.java 2007-09-27 00:50:58 UTC (rev 3832)
@@ -13,6 +13,7 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.ui.preferencepages.ViewProviderPreferenceComposite;
+import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer;
import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer.ContentWrapper;
@@ -89,7 +90,12 @@
if( o == null || o == provider ) {
JBossServerView.getDefault().getExtensionFrame().getViewer().refresh(provider);
} else {
- JBossServerView.getDefault().getExtensionFrame().getViewer().refresh(new ContentWrapper(o, provider));
+ ExtensionTableViewer viewer = JBossServerView.getDefault().getExtensionFrame().getViewer();
+ ContentWrapper wrapped = new ContentWrapper(o, provider);
+ if( viewer.elementInTree(wrapped))
+ viewer.refresh(new ContentWrapper(o, provider));
+ else
+ viewer.refresh(provider);
}
} catch(Exception e) {
}
17 years, 3 months
JBoss Tools SVN: r3831 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates.
by jbosstools-commits@lists.jboss.org
Author: dsakovich
Date: 2007-09-26 19:56:32 -0400 (Wed, 26 Sep 2007)
New Revision: 3831
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-847 fix rich:recursiveTreeNodesAdaptor
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-09-26 23:07:31 UTC (rev 3830)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-09-26 23:56:32 UTC (rev 3831)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
-<vpe:templates>
+<vpe:templates>
- <vpe:template-taglib uri="http://richfaces.org/rich" prefix="rich" />
+ <vpe:template-taglib uri="http://richfaces.org/rich" prefix="rich" />
<vpe:template-taglib uri="http://richfaces.ajax4jsf.org/rich" prefix="rich" />
<vpe:tag name="rich:paint2D" case-sensitive="yes">
@@ -16,8 +16,8 @@
<vpe:drop container="no"></vpe:drop>
</vpe:dnd>
</vpe:template>
- </vpe:tag>
-
+ </vpe:tag>
+
<vpe:tag name="rich:gmap" case-sensitive="yes">
<vpe:template children="no" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesGMapTemplate">
@@ -30,8 +30,8 @@
<vpe:drop container="no"></vpe:drop>
</vpe:dnd>
</vpe:template>
- </vpe:tag>
-
+ </vpe:tag>
+
<vpe:tag name="rich:tree" case-sensitive="yes">
<vpe:template children="yes" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTreeTemplate">
@@ -78,10 +78,6 @@
<vpe:tag name="rich:treeNodesAdaptor" case-sensitive="yes">
<vpe:template children="yes" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTreeNodesAdaptorTemplate">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
@@ -93,11 +89,7 @@
<vpe:tag name="rich:recursiveTreeNodesAdaptor" case-sensitive="yes">
<vpe:template children="yes" modify="no"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTreeNodesAdaptorTemplate">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesRecursiveTreeNodesAdaptorTemplate">
<vpe:dnd>
<vpe:drag start-enable="yes" />
<vpe:drop container="yes">
@@ -111,35 +103,35 @@
<vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesTreeNodeTemplate">
</vpe:template>
- </vpe:tag>
-
- <vpe:tag name="rich:inputNumberSpinner" case-sensitive="yes">
- <vpe:template children="no" modify="no"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInputNumberSpinnerTemplate">
- <vpe:resize>
- <vpe:width width-attr="style.width" />
- <vpe:height height-attr="style.height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="rich:inputNumberSlider" case-sensitive="yes">
+ </vpe:tag>
+
+ <vpe:tag name="rich:inputNumberSpinner" case-sensitive="yes">
+ <vpe:template children="no" modify="no"
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInputNumberSpinnerTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="style.width" />
+ <vpe:height height-attr="style.height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:inputNumberSlider" case-sensitive="yes">
<vpe:template children="no" modify="yes"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInputNumberSliderTemplate">
- <vpe:resize>
- <vpe:width width-attr="width" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesInputNumberSliderTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:dataDefinitionList" case-sensitive="yes">
<vpe:template children="yes" modify="yes"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesDataDefinitionListTemplate">
@@ -152,29 +144,29 @@
<vpe:drop container="no"></vpe:drop>
</vpe:dnd>
</vpe:template>
- </vpe:tag>
-
- <vpe:tag name="rich:modalPanel" case-sensitive="yes">
- <vpe:template children="no" modify="yes">
- <div style="display:none">
- </div>
- </vpe:template>
- </vpe:tag>
-
- <vpe:tag name="rich:spacer" case-sensitive="yes">
+ </vpe:tag>
+
+ <vpe:tag name="rich:modalPanel" case-sensitive="yes">
+ <vpe:template children="no" modify="yes">
+ <div style="display:none">
+ </div>
+ </vpe:template>
+ </vpe:tag>
+
+ <vpe:tag name="rich:spacer" case-sensitive="yes">
<vpe:template children="no" modify="yes"
- class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSpacerTemplate">
- <vpe:resize>
- <vpe:width width-attr="width" />
- <vpe:height height-attr="height" />
- </vpe:resize>
- <vpe:dnd>
- <vpe:drag start-enable="yes" />
- <vpe:drop container="no" />
- </vpe:dnd>
- </vpe:template>
- </vpe:tag>
-
+ class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSpacerTemplate">
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ <vpe:height height-attr="height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="no" />
+ </vpe:dnd>
+ </vpe:template>
+ </vpe:tag>
+
<vpe:tag name="rich:separator" case-sensitive="yes">
<vpe:template children="no" modify="no"
class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesSeparatorTemplate">
@@ -216,7 +208,7 @@
</vpe:dnd>
</vpe:template>
</vpe:tag>
-
+
<vpe:tag name="rich:toolBar" case-sensitive="yes" >
<vpe:template class="org.jboss.tools.jsf.vpe.richfaces.template.RichFacesToolBarTemplate"
children="yes" modify="no">
17 years, 3 months
JBoss Tools SVN: r3830 - 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: dsakovich
Date: 2007-09-26 19:07:31 -0400 (Wed, 26 Sep 2007)
New Revision: 3830
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeafWithLines.gif
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeafWithLines.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-847 Add rich:treeNodesAdaptor, rich:recursiveTreeNodesAdaptor
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif
===================================================================
(Binary files differ)
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif 2007-09-26 23:07:31 UTC (rev 3830)
@@ -0,0 +1,3 @@
+GIF89a
+a<l #JX�`��/�7��l�B�䗭 G��<��
+�o�H< ��@}�Ɖ�ݾ��6�8���H��z�;s�������@y��ʕ�������ԝ��}%j�^��p��h�m;�S����� ;u�fG��@n��M�m`7����L�rc�l�̹�4'bƆ-^]�I�^=1
\ No newline at end of file
Deleted: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeafWithLines.gif
===================================================================
(Binary files differ)
Copied: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeafWithLines.gif (from rev 3804, trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tree/iconLeaf.gif)
===================================================================
(Binary files differ)
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-09-26 21:37:12 UTC (rev 3829)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesTreeNodeTemplate.java 2007-09-26 23:07:31 UTC (rev 3830)
@@ -1,12 +1,12 @@
-/*******************************************************************************
- * 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
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.template;
@@ -25,9 +25,9 @@
import org.w3c.dom.NodeList;
/**
- * Creates VPE content for rich:treeNode
+ * Create template for rich:treeNodes element
*
- * @author Max Areshkau
+ * @author dsakovich(a)exadel.com
*
*/
public class RichFacesTreeNodeTemplate extends VpeAbstractTemplate {
@@ -60,7 +60,7 @@
public static final String ICON_EXPANDED_ADAPTER_WITHOUT_LINES = "/tree/iconClosedNode.gif";
- public static final String ICON_LEAF_WITH_LINES = "/tree/iconLeaf.gif";
+ public static final String ICON_LEAF_WITH_LINES = "/tree/iconLeafWithLines.gif";
public static final String ICON_RIGHT_LINE = "/tree/rightLine.gif";
@@ -68,7 +68,7 @@
public static final String ICON_LINE = "/tree/line.gif";
- public static final String ICON_LEAF_WITHOUT_LINES = "/tree/iconLeafWithLines.gif";
+ public static final String ICON_LEAF_WITHOUT_LINES = "/tree/iconLeaf.gif";
private static final String TREE_TABLE_PICTURE_STYLE_CLASS_NAME = "treePictureStyle";
@@ -86,10 +86,6 @@
private static final String TREE_TABLE_ATR_BORDER_VALUE = "0px";
- private static final String TREE_NODES_ADAPTOR_NAME = "treeNodesAdaptor";
-
- private static final String TREE_NODES_RECURSIVE_ADAPTOR_NAME = "recursiveTreeNodesAdaptor";
-
private static final String TREE_NAME = "tree";
private static final String NODE_LINES_STYLE = "background-position: center; background-repeat: repeat-y;";
@@ -175,8 +171,10 @@
String imgName = sourceNode.getAttribute(nodeAttrName);
// if in tree node image doesn't exist we get image attr from tree
if (imgName == null || imgName.length() == 0) {
- imgName = ((Element) sourceNode.getParentNode())
- .getAttribute(nodeAttrName);
+ Node parentElement = sourceNode.getParentNode();
+ if (parentElement instanceof Element) {
+ imgName = ((Element) parentElement).getAttribute(nodeAttrName);
+ }
} else {
img.setAttribute(ICON_PARAM_NAME, "");
}
@@ -211,7 +209,7 @@
Document visualDocument, Element treeRow, Node sourceNode,
VpeCreationData vpeCreationData) {
// creates icon node
- String backgroundImagePath;
+ String backgroundLinePath = null;
if (RichFacesTemplatesActivator.getDefault().isDebugging()) {
System.out.println("call createBasicTree");
}
@@ -224,81 +222,59 @@
.createElement(HtmlComponentUtil.HTML_TAG_TD);
// sets icon node
- if (!isLastElement(sourceNode.getParentNode(), sourceNode)) {
- // sets attribute for icon expanded picture or not
-
- if (!isAdaptorsChild(sourceNode.getParentNode())) {
- backgroundImagePath = RichFacesTemplatesActivator
- .getPluginResourcePath()
- + ICON_RIGHT_LINE;
- setAttributeForPictureNode(pageContext, visualDocument,
- (Element) sourceNode, td1,
- NODE_ICON_EXPANDED_ATTR_NAME,
- showLinesValue == true ? ICON_EXPANDED_WITH_LINES
- : ICON_EXPANDED_WITHOUT_LINES);
- setAttributeForPictureNode(pageContext, visualDocument,
- (Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
- showLinesValue == true ? ICON_NODE_WITH_LINES
- : ICON_NODE_WITHOUT_LINES);
- String path = RichFacesTemplatesActivator
- .getPluginResourcePath()
- + ICON_LEFT_LINE;
- if (showLinesValue) {
- iconNode.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- "background-image: url(file://" + path + "); "
- + NODE_LINES_STYLE);
- }
-
- } else {
- backgroundImagePath = RichFacesTemplatesActivator
- .getPluginResourcePath()
- + ICON_LINE;
- setAttributeForPictureNode(
- pageContext,
- visualDocument,
- (Element) sourceNode,
- td1,
- NODE_ICON_EXPANDED_ATTR_NAME,
- showLinesValue == true ? ICON_EXPANDED_ADAPTER_WITH_LINES
- : ICON_EXPANDED_ADAPTER_WITHOUT_LINES);
- setAttributeForPictureNode(pageContext, visualDocument,
- (Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
- showLinesValue == true ? ICON_NODE_WITH_LINE
- : ICON_NODE_WITHOUT_LINES);
- }
-
- } else {
- backgroundImagePath = RichFacesTemplatesActivator
+ if (!isLastElement(sourceNode) && isAdaptorChild(sourceNode)) {
+ backgroundLinePath = RichFacesTemplatesActivator
.getPluginResourcePath()
+ + ICON_LINE;
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, td1, NODE_ICON_EXPANDED_ATTR_NAME,
+ showLinesValue == true ? ICON_EXPANDED_ADAPTER_WITH_LINES
+ : ICON_EXPANDED_ADAPTER_WITHOUT_LINES);
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
+ showLinesValue == true ? ICON_NODE_WITH_LINE
+ : ICON_NODE_WITHOUT_LINES);
+ } else if ((isAdaptorChild(sourceNode) && isLastElement(sourceNode) && isLastElementAfterAdaptor(sourceNode))
+ || (!isAdaptorChild(sourceNode) && isLastElement(sourceNode))) {
+ backgroundLinePath = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ ICON_RIGHT_LINE;
setAttributeForPictureNode(pageContext, visualDocument,
(Element) sourceNode, td1, NODE_ICON_EXPANDED_ATTR_NAME,
showLinesValue == true ? ICON_NOT_EXPANDED_WITH_LINES
: ICON_NOT_EXPANDED_WITHOUT_LINES);
- if (isAdaptorsChild(sourceNode.getParentNode())) {
- if (!isLastNodesAdaptor(sourceNode)) {
- String path = RichFacesTemplatesActivator
- .getPluginResourcePath()
- + ICON_LEFT_LINE;
- if (showLinesValue) {
- iconNode.setAttribute(
- HtmlComponentUtil.HTML_STYLE_ATTR,
- "background-image: url(file://" + path + "); "
- + NODE_LINES_STYLE);
- }
-
- }
- }
setAttributeForPictureNode(pageContext, visualDocument,
(Element) sourceNode, iconNode, NODE_ICON_LEAF_ATTR_NAME,
showLinesValue == true ? ICON_LEAF_WITH_LINES
: ICON_LEAF_WITHOUT_LINES);
+ } else {
+ backgroundLinePath = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_RIGHT_LINE;
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, td1, NODE_ICON_EXPANDED_ATTR_NAME,
+ showLinesValue == true ? ICON_EXPANDED_WITH_LINES
+ : ICON_EXPANDED_WITHOUT_LINES);
+
+ if (showLinesValue) {
+ String path = RichFacesTemplatesActivator
+ .getPluginResourcePath()
+ + ICON_LEFT_LINE;
+ iconNode.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
+ "background-image: url(file://" + path + "); "
+ + NODE_LINES_STYLE);
+ }
+
+ setAttributeForPictureNode(pageContext, visualDocument,
+ (Element) sourceNode, iconNode, NODE_ICON_ATTR_NAME,
+ showLinesValue == true ? ICON_NODE_WITH_LINES
+ : ICON_NODE_WITHOUT_LINES);
}
+
if (showLinesValue) {
td1.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- "background-image: url(file://" + backgroundImagePath
+ "background-image: url(file://" + backgroundLinePath
+ "); " + NODE_LINES_STYLE);
-
}
treeRow.appendChild(td1);
treeRow.appendChild(iconNode);
@@ -317,6 +293,7 @@
}
vpeCreationData.addChildrenInfo(tdInfo);
treeRow.appendChild(nodeTitle);
+
}
/**
@@ -346,14 +323,14 @@
UNDEFINED_ICON);
img.setAttribute(ICON_PARAM_NAME, "");
} else if (NODE_ICON_ATTR_NAME.equals(name)
- && !isLastElement(visualNode.getParentNode(), visualNode)) {
+ && !isLastElement(visualNode)) {
Element iconCell = (Element) visualNode.getChildNodes().item(1);
Element img = (Element) iconCell.getChildNodes().item(0);
ComponentUtil.setImgFromResources(pageContext, img, value,
UNDEFINED_ICON);
img.setAttribute(ICON_PARAM_NAME, "");
} else if (NODE_ICON_LEAF_ATTR_NAME.equals(name)
- && isLastElement(sourceElement.getParentNode(), sourceElement)) {
+ && isLastElement(sourceElement)) {
Element iconCell = (Element) visualNode.getChildNodes().item(1);
Element img = (Element) iconCell.getChildNodes().item(0);
ComponentUtil.setImgFromResources(pageContext, img, value,
@@ -391,7 +368,7 @@
.setAttribute(ICON_PARAM_NAME,
DEFAULT_ICON_EXPANDED_PARAM_VALUE);
} else if (NODE_ICON_ATTR_NAME.equalsIgnoreCase(name)
- && !isLastElement(sourceElement.getParentNode(), sourceElement)) {
+ && !isLastElement(sourceElement)) {
Element iconCell = (Element) visualNode.getChildNodes().item(1);
Element img = (Element) iconCell.getChildNodes().item(0);
String parentAttrName = ((Element) sourceElement.getParentNode())
@@ -407,7 +384,7 @@
img.setAttribute(ICON_PARAM_NAME, DEFAULT_ICON_PARAM_VALUE);
} else if (NODE_ICON_LEAF_ATTR_NAME.equalsIgnoreCase(name)
- && isLastElement(sourceElement.getParentNode(), sourceElement)) {
+ && isLastElement(sourceElement)) {
Element iconCell = (Element) visualNode.getChildNodes().item(1);
Element img = (Element) iconCell.getChildNodes().item(0);
String parentAttrName = ((Element) sourceElement.getParentNode())
@@ -429,37 +406,53 @@
* @param sourceNode
* @return
*/
- private boolean isAdaptorsChild(Node sourceNode) {
- String treeNodesAdaptor = sourceNode.getPrefix() + ":"
- + TREE_NODES_ADAPTOR_NAME;
- String recursiveTreeNodesAdaptor = sourceNode.getPrefix() + ":"
- + TREE_NODES_RECURSIVE_ADAPTOR_NAME;
- if (sourceNode.getNodeName().equals(treeNodesAdaptor)
- || sourceNode.getNodeName().equals(recursiveTreeNodesAdaptor)) {
+ private boolean isAdaptorChild(Node sourceNode) {
+ Node parentNode = sourceNode.getParentNode();
+ if (!(parentNode instanceof Element)) {
return true;
}
+
+ String treeNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODES_ADAPTOR;
+ String treeRecursiveNodesAdaptorName = sourceNode.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_RECURSIVE_NODES_ADAPTOR;
+ if (parentNode.getNodeName().equals(treeNodesAdaptorName)
+ || parentNode.getNodeName().equals(
+ treeRecursiveNodesAdaptorName)) {
+ return true;
+ }
return false;
}
/**
*
* @param parentTree
- * @param currentNode
+ * @param sourceNode
* @return
*/
- private boolean isLastElement(Node parentTree, Node currentNode) {
+ private boolean isLastElement(Node sourceNode) {
+ Node parentTree = sourceNode.getParentNode();
+ if (!(parentTree instanceof Element)) {
+ return true;
+ }
NodeList childs = parentTree.getChildNodes();
String treeNodeName = parentTree.getPrefix() + ":"
+ RichFacesTreeTemplate.TREE_NODE_NAME;
+ String treeNodesAdaptorName = parentTree.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_NODES_ADAPTOR;
+ String treeRecursiveNodesAdaptorName = parentTree.getPrefix() + ":"
+ + RichFacesTreeTemplate.TREE_RECURSIVE_NODES_ADAPTOR;
Node lastElement = null;
Node el = null;
for (int i = 0; i < childs.getLength(); i++) {
el = childs.item(i);
- if (el.getNodeName().equals(treeNodeName)) {
+ if (el.getNodeName().equals(treeNodeName)
+ || el.getNodeName().equals(treeNodesAdaptorName)
+ || el.getNodeName().equals(treeRecursiveNodesAdaptorName)) {
lastElement = el;
}
}
- return currentNode.equals(lastElement);
+ return sourceNode.equals(lastElement);
}
/**
@@ -522,16 +515,11 @@
* @param sourceNode
* @return
*/
- private boolean isLastNodesAdaptor(Node sourceNode) {
+ private boolean isLastElementAfterAdaptor(Node sourceNode) {
Node nodeAdaptor = sourceNode.getParentNode();
if (!(nodeAdaptor instanceof Element)) {
return true;
}
- Node parentNode = nodeAdaptor.getParentNode();
- if (!(parentNode instanceof Element)) {
- return true;
- }
- Node lastNode = parentNode.getLastChild();
- return lastNode.equals(nodeAdaptor);
+ return isLastElement(nodeAdaptor);
}
}
17 years, 3 months
JBoss Tools SVN: r3829 - trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-26 17:37:12 -0400 (Wed, 26 Sep 2007)
New Revision: 3829
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.1
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.2
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.3
trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.4
Log:
fix for junit tests problems
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.1
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.1 2007-09-26 21:27:42 UTC (rev 3828)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.1 2007-09-26 21:37:12 UTC (rev 3829)
@@ -25,6 +25,17 @@
</property>
</component>
+ <component class="java.lang.Boolean" name="package1.package2.package3.package4.myComponent" scope="page">
+ <property name="property1">value1</property>
+ <property name="myList">
+ <value>value1</value>
+ </property>
+ <property name="myMap">
+ <key>key1</key>
+ <value>map value 1</value>
+ </property>
+ </component>
+
<core:managed-persistence-context name="myPersistenceContext1"/>
<core:resource-bundle>
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.2
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.2 2007-09-26 21:27:42 UTC (rev 3828)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.2 2007-09-26 21:37:12 UTC (rev 3829)
@@ -24,6 +24,17 @@
</property>
</component>
+<component class="java.lang.Boolean" name="package1.package2.package3.package4.myComponent" scope="page">
+ <property name="property1">value1</property>
+ <property name="myList">
+ <value>value1</value>
+ </property>
+ <property name="myMap">
+ <key>key1</key>
+ <value>map value 1</value>
+ </property>
+ </component>
+
<core:managed-persistence-context name="myPersistenceContext1"/>
<core:resource-bundle>
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.3
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.3 2007-09-26 21:27:42 UTC (rev 3828)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.3 2007-09-26 21:37:12 UTC (rev 3829)
@@ -13,6 +13,17 @@
</property>
</component>
+ <component class="java.lang.Boolean" name="package1.package2.package3.package4.myComponent" scope="page">
+ <property name="property1">value1</property>
+ <property name="myList">
+ <value>value1</value>
+ </property>
+ <property name="myMap">
+ <key>key1</key>
+ <value>map value 1</value>
+ </property>
+ </component>
+
<component class="java.lang.String" name="myNewPackage.myTextComponent" scope="application">
<property name="property1">value1</property>
<property name="myList">
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.4
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.4 2007-09-26 21:27:42 UTC (rev 3828)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/projects/TestComponentView/WebContent/WEB-INF/components.4 2007-09-26 21:37:12 UTC (rev 3829)
@@ -12,6 +12,18 @@
<value>map value 1</value>
</property>
</component>
+
+ <component class="java.lang.Boolean" name="package1.package2.package3.package4.myComponent" scope="page">
+ <property name="property1">value1</property>
+ <property name="myList">
+ <value>value1</value>
+ </property>
+ <property name="myMap">
+ <key>key1</key>
+ <value>map value 1</value>
+ </property>
+ </component>
+
<core:managed-persistence-context name="myPersistenceContext1"/>
<core:resource-bundle>
17 years, 3 months
JBoss Tools SVN: r3828 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server: util and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 17:27:42 -0400 (Wed, 26 Sep 2007)
New Revision: 3828
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
Log:
error caused in UI when trying to activate parts when other part is in the middle of being activated
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-09-26 20:37:00 UTC (rev 3827)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/descriptors/DescriptorXPathPropertySheetPage.java 2007-09-26 21:27:42 UTC (rev 3828)
@@ -121,7 +121,12 @@
if( element != null //)&& element != provider.getActiveCategory()
&& element instanceof XPathCategory) {
// show loading
- book.showPage(loading);
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ book.showPage(loading);
+ }
+ });
+
final XPathCategory cat = (XPathCategory)element;
new Thread() {
public void run() {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-09-26 20:37:00 UTC (rev 3827)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/util/ViewUtilityMethods.java 2007-09-26 21:27:42 UTC (rev 3828)
@@ -1,5 +1,6 @@
package org.jboss.ide.eclipse.as.ui.views.server.util;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -13,20 +14,23 @@
public class ViewUtilityMethods {
- public static void activatePropertiesView(IPropertySheetPage propertyPage) {
+ public static void activatePropertiesView(final IPropertySheetPage propertyPage) {
// show properties view
- String propsId = "org.eclipse.ui.views.PropertySheet";
- try {
- IWorkbench work = PlatformUI.getWorkbench();
- IWorkbenchWindow window = work.getActiveWorkbenchWindow();
- if( !isPropertiesOnTop()) {
- window.getActivePage().showView(propsId);
- if( propertyPage != null ) {
- propertyPage.selectionChanged(JBossServerView.getDefault().getViewSite().getPart(), JBossServerView.getDefault().getExtensionFrame().getViewer().getSelection());
+ Runnable run = new Runnable() { public void run() {
+ String propsId = "org.eclipse.ui.views.PropertySheet";
+ try {
+ IWorkbench work = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = work.getActiveWorkbenchWindow();
+ if( !isPropertiesOnTop()) {
+ window.getActivePage().showView(propsId);
+ if( propertyPage != null ) {
+ propertyPage.selectionChanged(JBossServerView.getDefault().getViewSite().getPart(), JBossServerView.getDefault().getExtensionFrame().getViewer().getSelection());
+ }
}
+ } catch( PartInitException pie ) {
}
- } catch( PartInitException pie ) {
- }
+ }};
+ Display.getDefault().asyncExec(run);
}
protected static boolean isPropertiesOnTop() {
17 years, 3 months
JBoss Tools SVN: r3827 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 16:37:00 -0400 (Wed, 26 Sep 2007)
New Revision: 3827
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
name change
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-09-26 20:31:07 UTC (rev 3826)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-09-26 20:37:00 UTC (rev 3827)
@@ -167,12 +167,12 @@
#Filesets
-FilesetsCreateFilter=Create Filter
-FilesetsDeleteFilter=Delete Filter
-FilesetsEditFilter=Edit Filter
+FilesetsCreateFilter=Create File Filter
+FilesetsDeleteFilter=Delete File Filter
+FilesetsEditFilter=Edit File Filter
FilesetsDeleteFile=Delete File
FilesetsEditFile=Edit File
-FilesetsNewFileset=New Fileset
+FilesetsNewFileset=New File Filter
FilesetsNewName=Name:
FilesetsNewRootDir=Root Directory:
FilesetsNewBrowse=Browse...
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-26 20:31:07 UTC (rev 3826)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2007-09-26 20:37:00 UTC (rev 3827)
@@ -155,7 +155,7 @@
description="A front end to open, edit, or view files in your server's directories."
icon="icons/multiple_files.gif"
id="org.jboss.ide.eclipse.as.ui.FilesetViewProvider"
- name="Filesets"
+ name="File Filters"
providerClass="org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider"/>
<ViewProvider
description="Lists inactive categories and allows you to turn them back on."
17 years, 3 months
JBoss Tools SVN: r3826 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 16:31:07 -0400 (Wed, 26 Sep 2007)
New Revision: 3826
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
Log:
cleanup for publishing events
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-26 20:26:46 UTC (rev 3825)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-09-26 20:31:07 UTC (rev 3826)
@@ -31,7 +31,6 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.server.core.IEnterpriseApplication;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleFolder;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-26 20:26:46 UTC (rev 3825)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-26 20:31:07 UTC (rev 3826)
@@ -76,6 +76,16 @@
protected void publishFinish(IProgressMonitor monitor) throws CoreException {
publishEvent = null;
+
+ IModule[] modules = this.getServer().getModules();
+ boolean allpublished= true;
+ for (int i = 0; i < modules.length; i++) {
+ if(this.getServer().getModulePublishState(new IModule[]{modules[i]})!=IServer.PUBLISH_STATE_NONE)
+ allpublished=false;
+ }
+ if(allpublished)
+ setServerPublishState(IServer.PUBLISH_STATE_NONE);
+
}
17 years, 3 months
JBoss Tools SVN: r3825 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 16:26:46 -0400 (Wed, 26 Sep 2007)
New Revision: 3825
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
Log:
cleanup for publishing events
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-09-26 20:26:44 UTC (rev 3824)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PackagesPublishLabelProvider.java 2007-09-26 20:26:46 UTC (rev 3825)
@@ -18,8 +18,8 @@
protected void addSupportedTypes() {
supported = new ArrayList();
- supported.add(PublisherEventLogger.SINGLE_MODULE_TOP_EVENT);
- supported.add(PublisherEventLogger.MULTIPLE_MODULE_TOP_EVENT);
+ supported.add(PublisherEventLogger.ROOT_EVENT);
+ supported.add(PublisherEventLogger.MODULE_ROOT_EVENT);
supported.add(PublisherEventLogger.FILE_COPPIED_EVENT);
supported.add(PublisherEventLogger.FILE_DELETED_EVENT);
supported.add(PublisherEventLogger.FOLDER_DELETED_EVENT);
@@ -53,20 +53,21 @@
}
public Image getImage(EventLogTreeItem item) {
+ String type = item.getSpecificType();
+
+ if( type.equals(PublisherEventLogger.ROOT_EVENT)) {
+ return JBossServerUISharedImages.getImage(JBossServerUISharedImages.PUBLISH_IMAGE);
+ }
+ if( type.equals(PublisherEventLogger.MODULE_ROOT_EVENT)) {
+ int deltaKind = ((Integer)item.getProperty(PublisherEventLogger.DELTA_KIND)).intValue();
+ if( deltaKind == ServerBehaviourDelegate.REMOVED)
+ return JBossServerUISharedImages.getImage(JBossServerUISharedImages.UNPUBLISH_IMAGE);
+ return JBossServerUISharedImages.getImage(JBossServerUISharedImages.PUBLISH_IMAGE);
+ }
+
if( item.getProperty(PublisherEventLogger.EXCEPTION_MESSAGE) != null )
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
- String type = item.getSpecificType();
- if( type.equals(PublisherEventLogger.MULTIPLE_MODULE_TOP_EVENT) || type.equals(PublisherEventLogger.SINGLE_MODULE_TOP_EVENT)) {
- try {
- int deltaKind = ((Integer)item.getProperty(PublisherEventLogger.DELTA_KIND)).intValue();
- Image unpubIcon = JBossServerUISharedImages.getImage(JBossServerUISharedImages.UNPUBLISH_IMAGE);
- Image pubIcon = JBossServerUISharedImages.getImage(JBossServerUISharedImages.PUBLISH_IMAGE);
- if( deltaKind == ServerBehaviourDelegate.REMOVED )
- return unpubIcon;
- return pubIcon;
- } catch( NullPointerException npe ) { return null; }
- }
if( type.equals(PublisherEventLogger.FILE_COPPIED_EVENT))
return PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
if( type.equals(PublisherEventLogger.FILE_DELETED_EVENT) || type.equals(PublisherEventLogger.FOLDER_DELETED_EVENT))
@@ -87,6 +88,8 @@
default: r += "Unknown, ";
}
switch( deltaKind ) {
+
+ case ServerBehaviourDelegate.NO_CHANGE: r += "No Change]"; break;
case ServerBehaviourDelegate.ADDED: r += "Added]"; break;
case ServerBehaviourDelegate.CHANGED: r += "Changed]"; break;
case ServerBehaviourDelegate.REMOVED: r += "Removed]"; break;
@@ -97,7 +100,10 @@
public String getText(EventLogTreeItem item) {
String type = item.getSpecificType();
- if( type.equals(PublisherEventLogger.SINGLE_MODULE_TOP_EVENT)) {
+ if( type.equals(PublisherEventLogger.ROOT_EVENT)) {
+ return "Publishing to server";
+ }
+ if( type.equals(PublisherEventLogger.MODULE_ROOT_EVENT)) {
return getKindDeltaKind(item) + " " + item.getProperty(PublisherEventLogger.MODULE_NAME);
}
if( type.equals(PublisherEventLogger.FILE_COPPIED_EVENT)) {
17 years, 3 months
JBoss Tools SVN: r3824 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core: server/internal and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-09-26 16:26:44 -0400 (Wed, 26 Sep 2007)
New Revision: 3824
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
Log:
cleanup for publishing events
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-09-26 19:40:35 UTC (rev 3823)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PackagesPublisher.java 2007-09-26 20:26:44 UTC (rev 3824)
@@ -95,7 +95,7 @@
protected void removeModule(IModule module, int kind, int deltaKind, IProgressMonitor monitor) {
IArchive pack = getPackage(module);
// remove all of the deployed items
- PublishEvent event = PublisherEventLogger.createSingleModuleTopEvent(eventRoot, module, kind, deltaKind);
+ PublishEvent event = PublisherEventLogger.createModuleRootEvent(eventRoot, new IModule[]{module}, kind, deltaKind);
if( pack != null ) {
IPath sourcePath = pack.getArchiveFilePath();
IPath destPath = new Path(server.getDeployDirectory()).append(sourcePath.lastSegment());
@@ -108,7 +108,7 @@
protected void publishModule(IModule module, int kind, int deltaKind, int modulePublishState, IProgressMonitor monitor) {
- PublishEvent event = PublisherEventLogger.createSingleModuleTopEvent(eventRoot, module, kind, deltaKind);
+ PublishEvent event = PublisherEventLogger.createModuleRootEvent(eventRoot, new IModule[]{module}, kind, deltaKind);
IArchive pack = getPackage(module);
IPath sourcePath = pack.getArchiveFilePath();
IPath destPathRoot = new Path(server.getDeployDirectory());
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java 2007-09-26 19:40:35 UTC (rev 3823)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublisherEventLogger.java 2007-09-26 20:26:44 UTC (rev 3824)
@@ -2,6 +2,7 @@
import java.io.File;
+import org.eclipse.core.runtime.Path;
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
@@ -21,30 +22,26 @@
setProperty(MODULE_NAME, module.getName());
}
}
-
- // type
- public static final String MULTIPLE_MODULE_TOP_EVENT = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MULTIPLE_MODULE_TOP_EVENT";
- // properties
- public static final String MULTIPLE_MODULE_MODULE_COUNT = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MULTIPLE_MODULE_MODULE_COUNT";
-
- public static PublishEvent createMultipleModuleTopLevelEvent(EventLogTreeItem parent, int numMods) {
- PublishEvent event = new PublishEvent(parent, MULTIPLE_MODULE_TOP_EVENT );
- event.setProperty(MULTIPLE_MODULE_MODULE_COUNT, new Integer(numMods));
- EventLogModel.markChanged(parent);
- return event;
+ public static PublishEvent createTopEvent(EventLogTreeItem parent) {
+ return new PublishEvent(parent, ROOT_EVENT);
}
// type
- public static final String SINGLE_MODULE_TOP_EVENT = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.SINGLE_MODULE_TOP_EVENT";
+ public static final String ROOT_EVENT = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.ROOT_EVENT";
+ public static final String MODULE_ROOT_EVENT = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MODULE_ROOT_EVENT";
// properties
public static final String MODULE_KIND = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.MODULE_KIND";
public static final String DELTA_KIND = "org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.DELTA_KIND";
- public static PublishEvent createSingleModuleTopEvent(EventLogTreeItem parent, IModule module, int kind, int deltaKind) {
- PublishEvent event = new PublishEvent(parent, SINGLE_MODULE_TOP_EVENT);
+ public static PublishEvent createModuleRootEvent(EventLogTreeItem parent, IModule[] module, int kind, int deltaKind) {
+ PublishEvent event = new PublishEvent(parent, MODULE_ROOT_EVENT);
+ String name = "";
+ for( int i = 0; i < module.length; i++ ) {
+ name += module[i].getName() + Path.SEPARATOR;
+ }
event.setProperty(MODULE_KIND, new Integer(kind));
event.setProperty(DELTA_KIND, new Integer(deltaKind));
- event.setProperty(MODULE_NAME, module.getName());
+ event.setProperty(MODULE_NAME, name);
EventLogModel.markChanged(parent);
return event;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-26 19:40:35 UTC (rev 3823)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2007-09-26 20:26:44 UTC (rev 3824)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.publishers.PackagesPublisher;
import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger;
import org.jboss.ide.eclipse.as.core.publishers.SingleFilePublisher;
+import org.jboss.ide.eclipse.as.core.publishers.PublisherEventLogger.PublishEvent;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration;
@@ -67,6 +68,17 @@
System.out.println(" to server " + getServer().getName() + "(" + getServer().getId() + ")");
}
+ protected PublishEvent publishEvent;
+ protected void publishStart(IProgressMonitor monitor) throws CoreException {
+ EventLogTreeItem root = EventLogModel.getModel(getServer()).getRoot();
+ publishEvent = PublisherEventLogger.createTopEvent(root);
+ }
+
+ protected void publishFinish(IProgressMonitor monitor) throws CoreException {
+ publishEvent = null;
+ }
+
+
/*
* The module is a list of module trail points, from parent to child
* Thus:
@@ -82,35 +94,25 @@
IJBossServerPublisher publisher;
print(kind, deltaKind, module);
int modulePublishState = getServer().getModulePublishState(module) + 0;
-
- EventLogTreeItem root = EventLogModel.getModel(getServer()).getRoot();
- if( module.length > 1 ) {
- root = PublisherEventLogger.createMultipleModuleTopLevelEvent(root, module.length);
- }
-
+ PublishEvent root = PublisherEventLogger.createModuleRootEvent(publishEvent, module, kind, deltaKind);
+
if( module.length > 0 ) {
IModule lastMod = module[module.length -1];
- try {
- if( isJstModule(lastMod) ) {
- publisher = new JstPublisher(getServer(), root);
- } else if( isPackagesTypeModule(lastMod) ) {
- publisher = new PackagesPublisher(getServer(), root);
- } else if( lastMod.getModuleType().getId().equals("jboss.singlefile")){
- publisher = new SingleFilePublisher(getServer());
- } else {
- publisher = new NullPublisher();
- }
- publisher.setDelta(getPublishedResourceDelta(module));
- publisher.publishModule(kind, deltaKind, modulePublishState, module, monitor);
- setModulePublishState(module, publisher.getPublishState());
- } catch( Throwable e ) {
- e.printStackTrace();
+ if( isJstModule(lastMod) ) {
+ publisher = new JstPublisher(getServer(), root);
+ } else if( isPackagesTypeModule(lastMod) ) {
+ publisher = new PackagesPublisher(getServer(), root);
+ } else if( lastMod.getModuleType().getId().equals("jboss.singlefile")){
+ publisher = new SingleFilePublisher(getServer());
+ } else {
+ publisher = new NullPublisher();
}
+ publisher.setDelta(getPublishedResourceDelta(module));
+ publisher.publishModule(kind, deltaKind, modulePublishState, module, monitor);
+ setModulePublishState(module, publisher.getPublishState());
}
}
-
-
/* Temporary and will need to be fixed */
// TODO: Change to if it is a flex project. Don't know how to do that yet.
protected boolean isJstModule(IModule mod) {
17 years, 3 months
JBoss Tools SVN: r3823 - trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-09-26 15:40:35 -0400 (Wed, 26 Sep 2007)
New Revision: 3823
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-951
i've forsed update for WTP model during installing Seam Facet
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-26 19:05:12 UTC (rev 3822)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDelegete.java 2007-09-26 19:40:35 UTC (rev 3823)
@@ -319,6 +319,7 @@
AntCopyUtils.copyFileToFolder(new File(seamGenResFolder,"seam.properties"), srcFolder, true);
IContainer source = srcRootFolder.getUnderlyingFolder();
+ srcRootFolder.delete(IVirtualFolder.FORCE, monitor);
WtpUtils.createSourceFolder(project, new Path(source.getFullPath().lastSegment()+"/action"),new Path(source.getFullPath().lastSegment()));
WtpUtils.createSourceFolder(project, new Path(source.getFullPath().lastSegment()+"/model"),new Path(source.getFullPath().lastSegment()));
17 years, 3 months