JBoss Tools SVN: r4093 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-10-10 09:02:31 -0400 (Wed, 10 Oct 2007)
New Revision: 4093
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
Log:
JBIDE-1055
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2007-10-10 12:58:20 UTC (rev 4092)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2007-10-10 13:02:31 UTC (rev 4093)
@@ -13,11 +13,13 @@
import java.io.File;
import java.util.*;
+import org.eclipse.core.internal.resources.ResourceException;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.jboss.tools.common.model.markers.ResourceMarkers;
import org.jboss.tools.common.model.plugin.ModelPlugin;
@@ -220,19 +222,32 @@
updateLock++;
Map<String,File> mf = new HashMap<String,File>();
linked.clear();
+ XModelObject fileSystem = getFileSystem();
+ if(fileSystem == null) return false;
+ FileSystemsImpl fsi = (FileSystemsImpl)fileSystem.getParent();
try {
- FileSystemsImpl fsi = (FileSystemsImpl)getFileSystem().getParent();
if(resource != null && resource.exists() && !resource.isSynchronized(IResource.DEPTH_ONE)) try {
fsi.lockUpdate();
resource.refreshLocal(IResource.DEPTH_ZERO, null);
- IResource[] rs = resource.members();
- for (int i = 0; i < rs.length; i++) {
- if(!rs[i].isSynchronized(IResource.DEPTH_ZERO)) {
- if(unsynchronized == null) unsynchronized = new HashSet<String>();
- unsynchronized.add(rs[i].getName().toLowerCase());
+ if(resource.exists()) {
+ IResource[] rs = resource.members();
+ for (int i = 0; i < rs.length; i++) {
+ if(!rs[i].isSynchronized(IResource.DEPTH_ZERO)) {
+ if(unsynchronized == null) unsynchronized = new HashSet<String>();
+ unsynchronized.add(rs[i].getName().toLowerCase());
+ }
}
+ if(resource.exists()) {
+ resource.refreshLocal(IResource.DEPTH_ONE, null);
+ }
}
- resource.refreshLocal(IResource.DEPTH_ONE, null);
+ } catch (ResourceException re) {
+ IPath p = resource.getLocation();
+ if(p != null && p.toFile().exists()) {
+ ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()", re);
+ } else {
+ //ignore we cannot prevent this when project is removed externally
+ }
} catch (Exception e) {
ModelPlugin.getPluginLog().logError("Exception caught in FolderImpl.update()",e);
} finally {
17 years, 3 months
JBoss Tools SVN: r4092 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-10-10 08:58:20 -0400 (Wed, 10 Oct 2007)
New Revision: 4092
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1061 "Content Assist" does not complete normally on #{var.pr|[]}
Issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-10-10 12:43:28 UTC (rev 4091)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/text/java/SeamELProposalProcessor.java 2007-10-10 12:58:20 UTC (rev 4092)
@@ -254,7 +254,7 @@
if (result == null || result.size() == 0)
return NO_PROPOSALS;
- ICompletionProposal[] resultArray = (ICompletionProposal[]) result.toArray(new ICompletionProposal[uniqueSuggestions.size()]);
+ ICompletionProposal[] resultArray = (ICompletionProposal[]) result.toArray(new ICompletionProposal[result.size()]);
Arrays.sort(resultArray, new Comparator<ICompletionProposal>() {
public int compare(ICompletionProposal arg0,
17 years, 3 months
JBoss Tools SVN: r4091 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: src/org/jboss/tools/jsf/vpe/richfaces/template and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: ezheleznyakov
Date: 2007-10-10 08:43:28 -0400 (Wed, 10 Oct 2007)
New Revision: 4091
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/collapsed.gif
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml
Log:
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/collapsed.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/collapsed.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-10 12:32:29 UTC (rev 4090)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2007-10-10 12:43:28 UTC (rev 4091)
@@ -1,17 +1,159 @@
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.template;
+import java.util.HashMap;
+import java.util.List;
+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;
+import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeToggableTemplate;
+import org.jboss.tools.vpe.editor.util.HTML;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
-public class RichFacesPanelMenuTemplate extends VpeAbstractTemplate {
-
+/**
+ *
+ * @author ezheleznyakov(a)exadel.com
+ *
+ */
+public class RichFacesPanelMenuTemplate extends VpeAbstractTemplate implements
+ VpeToggableTemplate {
+
+ private static final String WIDTH_ATTR_PANELMENU = "width";
+ private static final String STYLE_ATTR_PANELMENU = "style";
+ //private static final String DISABLED_ATTR_PANELMENU = "disabled";
+ //private static final String EXPANDSINGLE_ATTR_PANELMENU = "expandSingle";
+ private static final String STYLECLASS_ATTR_PANELMENU = "styleClass";
+
+ //private static final String PATH_TO_COLLAPSED_GROUP = "/panelMenuGroup/collapsed.gif";
+
+ @SuppressWarnings("unchecked")
+ private static Map toggleMap = new HashMap();
+
+ //private boolean collapsedFalg = false;
+
+ // private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
Document visualDocument) {
- // TODO Auto-generated method stub
- return null;
+
+ Element sourceElement = (Element) sourceNode;
+
+ String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
+ String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
+ // String disabled = sourceElement.getAttribute(DISABLED_ATTR_PANELMENU);
+ // String expandSingle = sourceElement
+ // .getAttribute(EXPANDSINGLE_ATTR_PANELMENU);
+ String styleClass = sourceElement
+ .getAttribute(STYLECLASS_ATTR_PANELMENU);
+
+ Element div = visualDocument.createElement(HTML.TAG_DIV);
+ VpeCreationData vpeCreationData = new VpeCreationData(div);
+
+ if (width != null) {
+ div.setAttribute(HtmlComponentUtil.HTML_WIDTH_ATTR, width);
+ }
+
+ if (style != null) {
+ div.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
+ }
+
+ if (styleClass != null) {
+ div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
+ }
+
+ VpeChildrenInfo childrenInfo = new VpeChildrenInfo(div);
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+ int activeId = getActiveId(sourceElement, children);
+ int i = 0;
+
+ for (Node child : children) {
+
+ boolean active = (i == activeId);
+
+ if(child.getNodeName().endsWith(":panelMenuGroup")) {
+ RichFacesPanelMenuGroupTemplate.encode(vpeCreationData, (Element)child, visualDocument, div, active);
+ } else if(child.getNodeName().endsWith(":panelMenuItem")) {
+ RichFacesPanelMenuItemTemplate.encode(vpeCreationData, (Element)child, visualDocument, div, active);
+ } else {
+ childrenInfo.addSourceChild(child);
+ }
+ i++;
+ }
+
+ return vpeCreationData;
}
+
+
+
+ /**
+ *
+ * @param sourceElement
+ * @param children
+ * @return
+ */
+ private int getActiveId(Element sourceElement, List<Node> children) {
+ int activeId = -1;
+ try {
+ activeId = Integer.valueOf((String) toggleMap.get(sourceElement));
+ } catch (NumberFormatException nfe) {
+ activeId = -1;
+ }
-}
+ if (activeId == -1)
+ activeId = 0;
+
+ int count = getChildrenCount(children);
+ if (count - 1 < activeId) {
+ activeId = count - 1;
+ }
+
+ return activeId;
+ }
+
+ /**
+ *
+ * @param children
+ * @return
+ */
+ private int getChildrenCount(List<Node> children) {
+ int count = 0;
+ for (Node child : children) {
+ if (child.getNodeName().endsWith(":panelMenuGroup")) {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ public void toggle(VpeVisualDomBuilder builder, Node sourceNode,
+ String toggleId) {
+ toggleMap.put(sourceNode, toggleId);
+ }
+
+ public void stopToggling(Node sourceNode) {
+ toggleMap.remove(sourceNode);
+ }
+
+ public boolean isRecreateAtAttrChange(VpePageContext pageContext,
+ Element sourceElement, Document visualDocument, Node visualNode,
+ Object data, String name, String value) {
+ return true;
+ }
+}
\ No newline at end of file
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-10 12:32:29 UTC (rev 4090)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/templates/vpe-templates-richfaces.xml 2007-10-10 12:43:28 UTC (rev 4091)
@@ -647,6 +647,17 @@
<vpe:drag start-enable="yes"/>
<vpe:drop container="yes"/>
</vpe:template>
+ <vpe:resize>
+ <vpe:width width-attr="width" />
+ <vpe:height height-attr="height" />
+ </vpe:resize>
+ <vpe:dnd>
+ <vpe:drag start-enable="yes" />
+ <vpe:drop container="yes">
+ <vpe:container-child tag-name="panelMenuGroup"/>
+ <vpe:container-child tag-name="panelMenuItem"/>
+ </vpe:drop>
+ </vpe:dnd>
</vpe:tag>
</vpe:templates>
\ No newline at end of file
17 years, 3 months
JBoss Tools SVN: r4090 - in trunk/documentation/GettingStartedGuide/docs/userguide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2007-10-10 08:32:29 -0400 (Wed, 10 Oct 2007)
New Revision: 4090
Added:
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome1.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome2.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome3.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome4.png
trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome5.png
Modified:
trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
Log:
http://jira.jboss.com/jira/browse/RHDS-185 Welcome page description added
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome1.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome2.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome3.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome4.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome5.png
===================================================================
(Binary files differ)
Property changes on: trunk/documentation/GettingStartedGuide/docs/userguide/en/images/welcome5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml
===================================================================
--- trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-10 12:21:49 UTC (rev 4089)
+++ trunk/documentation/GettingStartedGuide/docs/userguide/en/modules/GettingStartedWithRHDS.xml 2007-10-10 12:32:29 UTC (rev 4090)
@@ -180,7 +180,67 @@
</figure>
</section>
- </section>
+ </section>
+ <section id="Welcome">
+ <title>Welcome to Red Hat Developer Studio</title>
+ <para>The welcome page is the first page you see when you first launch Red Hat Developer Studio. </para>
+
+ <figure>
+ <title>Welcome to Red Hat Developer Studio</title>
+ <imageobject>
+ <imagedata fileref="images/welcome1.png"/>
+ </imageobject>
+ </figure>
+
+ <para>With the help of its page you will be able:</para>
+ <itemizedlist>
+ <listitem><para>to get quick access to Getting Started Documentation (guides, tutorials and viewlets)</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Getting Started Documentation</title>
+ <imageobject>
+ <imagedata fileref="images/welcome2.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to create new Seam, jBPM Process, JSF or Struts projects using RHDS wizards</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Create New...</title>
+ <imageobject>
+ <imagedata fileref="images/welcome3.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to get short description of perspectives that RHDS offers for more productive development</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Perspectives</title>
+ <imageobject>
+ <imagedata fileref="images/welcome4.png"/>
+ </imageobject>
+ </figure>
+
+ <itemizedlist>
+ <listitem><para>to visit Red Hat Developer Studio web resources.</para></listitem>
+ </itemizedlist>
+
+ <figure>
+ <title>Web Resources</title>
+ <imageobject>
+ <imagedata fileref="images/welcome5.png"/>
+ </imageobject>
+ </figure>
+
+ <para>Start work with Red Hat Developer Studio by clicking on <emphasis><property>Workbench</property></emphasis> button or simply close the welcome page.</para>
+
+ </section>
+
<section id="Upgrading">
<?dbhtml filename="Upgrading.html"?>
<title>Upgrading</title>
17 years, 3 months
JBoss Tools SVN: r4089 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup.
by jbosstools-commits@lists.jboss.org
Author: amakhtadui
Date: 2007-10-10 08:21:49 -0400 (Wed, 10 Oct 2007)
New Revision: 4089
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/point.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/pointer.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
Log:
Add icon from RichFasecPanelMenuGroupsTemplate
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/point.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/point.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/pointer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/pointer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 3 months
JBoss Tools SVN: r4088 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem.
by jbosstools-commits@lists.jboss.org
Author: asakharov
Date: 2007-10-10 08:14:40 -0400 (Wed, 10 Oct 2007)
New Revision: 4088
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
Log:
vpe richFaces panelMenuItem pictures
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/points.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
Added: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ image/gif
17 years, 3 months
JBoss Tools SVN: r4087 - 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: asakharov
Date: 2007-10-10 08:13:45 -0400 (Wed, 10 Oct 2007)
New Revision: 4087
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
Log:
vpe richFaces panelMenuItem
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2007-10-10 12:13:19 UTC (rev 4086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2007-10-10 12:13:45 UTC (rev 4087)
@@ -0,0 +1,68 @@
+
+.dr-pmenu-top-group-div {
+ border-color:#C4C0B9;
+}
+
+.dr-pmenu-top-group-div {
+ border:1px solid;
+ margin-bottom:3px;
+ padding:1px;
+ border-color:#C4C0B9;
+
+}
+
+.dr-pmenu-top-group {
+ background-color:#D4CFC7;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+ font-weight:bold;
+}
+
+.dr-pmenu-top-group {
+ background-position:left top;
+ background-repeat:repeat-x;
+ cursor:pointer;
+ height:20px;
+ padding:2px 1px 2px 2px;
+ width:100%;
+}
+
+.dr-pmenu-nowrap {
+ white-space:nowrap;
+}
+
+element.style {
+ width:100%;
+}
+
+.dr-pmenu-selected-item {
+ font-style:italic;
+}
+
+.dr-pmenu-group-self-label {
+ padding-left:5px;
+ width:100%;
+}
+
+
+
+
+
+.dr-pmenu-item {
+ border-top:1px solid;
+ cursor:pointer;
+ margin-top:1px;
+ padding:2px 1px 1px;
+}
+
+.dr-pmenu-item {
+ border-top-color: #C4C0B9;
+ color:#000000;
+ font-family:Arial,Verdana,sans-serif;
+ font-size:11px;
+}
+
+.dr-pmenu-nowrap {
+ white-space:nowrap;
+}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-10 12:13:19 UTC (rev 4086)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2007-10-10 12:13:45 UTC (rev 4087)
@@ -1,16 +1,142 @@
+/*******************************************************************************
+ * 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.jsf.vpe.richfaces.template;
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
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.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.Text;
public class RichFacesPanelMenuItemTemplate extends VpeAbstractTemplate {
+ private static final String STYLE_PATH = "/panelMenuItem/style.css";
+
+ private static final String PANEL_MENU_ITEM_CLASS = "dr-pmenu-item";
+
+ private static final String NO_SIZE_VALUE = "0";
+
+ private static final String DEFAULT_SIZE_VALUE = "16";
+
+ private static final String PANEL_MENU_NOWARP_CLASS = "dr-pmenu-nowrap";
+
+ private static final String PANEL_MENU_LABLE_CLASS = "dr-pmenu-group-self-label";
+
+ private static final String PANEL_MENU_ITEM = "panelMenuItem";
+
+ private static final String IMG_POINTS_SRC = "/panelMenuItem/points.gif";
+
+ private static final String IMG_SPACER_SRC = "/panelMenuItem/spacer.gif";
+
+ private static final String EMPTY_DIV_STYLE = "display: none;";
+
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
Document visualDocument) {
- // TODO Auto-generated method stub
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
+
+ Element sourceElement = (Element) sourceNode;
+
+ Element div = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ div.setAttribute("style", EMPTY_DIV_STYLE);
+ div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
+ VpeCreationData creationData = new VpeCreationData(div);
+ if (sourceElement.getParentNode().getNodeName().endsWith(
+ ":panelMenuGroup")
+ || (sourceElement.getParentNode().getNodeName()
+ .endsWith(":panelMenu"))) {
+ Element table = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TABLE);
+ div.appendChild(table);
+ table.setAttribute("class", PANEL_MENU_ITEM_CLASS);
+ table.setAttribute("cellpadding", NO_SIZE_VALUE);
+ table.setAttribute("cellspacing", NO_SIZE_VALUE);
+ table.setAttribute("border", NO_SIZE_VALUE);
+
+ Element tr = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tr);
+
+ Element tdNowrap = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(tdNowrap);
+ tdNowrap.setAttribute("class", PANEL_MENU_NOWARP_CLASS);
+
+ Element imgSpacer1 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ tdNowrap.appendChild(imgSpacer1);
+ imgSpacer1.setAttribute("width", DEFAULT_SIZE_VALUE);
+ imgSpacer1.setAttribute("vspace", NO_SIZE_VALUE);
+ imgSpacer1.setAttribute("hspace", NO_SIZE_VALUE);
+ imgSpacer1.setAttribute("height", DEFAULT_SIZE_VALUE);
+ ComponentUtil.setImg(imgSpacer1, IMG_SPACER_SRC);
+
+ Element imgPoints = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ tdNowrap.appendChild(imgPoints);
+ imgPoints.setAttribute("width", DEFAULT_SIZE_VALUE);
+ imgPoints.setAttribute("vspace", NO_SIZE_VALUE);
+ imgPoints.setAttribute("hspace", NO_SIZE_VALUE);
+ imgPoints.setAttribute("height", DEFAULT_SIZE_VALUE);
+ ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
+
+ Element tdLable = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(tdLable);
+ tdLable.setAttribute("class", PANEL_MENU_LABLE_CLASS);
+ tdLable.setAttribute("style", "element.style");
+ String value = sourceElement.getAttribute("label");
+ Text text = visualDocument.createTextNode(value == null ? ""
+ : value);
+ tdLable.appendChild(text);
+
+ Element td = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tr.appendChild(td);
+
+ Element imgSpacer2 = visualDocument
+ .createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ td.appendChild(imgSpacer2);
+ imgSpacer2.setAttribute("width", DEFAULT_SIZE_VALUE);
+ imgSpacer2.setAttribute("vspace", NO_SIZE_VALUE);
+ imgSpacer2.setAttribute("hspace", NO_SIZE_VALUE);
+ imgSpacer2.setAttribute("height", DEFAULT_SIZE_VALUE);
+ ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
+
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ if (!children.isEmpty()) {
+ VpeChildrenInfo childInfo = new VpeChildrenInfo(tdLable);
+ creationData.addChildrenInfo(childInfo);
+ for (Node child : children) {
+ if (!(child.getNodeName().endsWith(":panelMenuGroup") || child
+ .getNodeName().endsWith(":panelMenu"))) {
+ childInfo.addSourceChild(child);
+ }
+ }
+ }
+ }
+ return creationData;
+ }
+
+ public static VpeCreationData encode(VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean active){
return null;
}
}
17 years, 3 months
JBoss Tools SVN: r4086 - 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: amakhtadui
Date: 2007-10-10 08:13:19 -0400 (Wed, 10 Oct 2007)
New Revision: 4086
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
Log:
Realized RichFacesPanelMenuGroupTempate.
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup
___________________________________________________________________
Name: svn:ignore
+ point.gif
pointer.gif
spacer.gif
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2007-10-10 00:18:50 UTC (rev 4085)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2007-10-10 12:13:19 UTC (rev 4086)
@@ -0,0 +1,43 @@
+.dr-pmenu-top-group-div {
+ border-color: #C4C0B9;
+}
+
+.dr-pmenu-top-group-div {
+ border: 1px solid;
+ margin-bottom: 3px;
+ padding: 1px;
+ border-color: #C4C0B9;
+}
+
+.dr-pmenu-top-group {
+ background-color: #D4CFC7;
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+}
+
+.dr-pmenu-top-group {
+ background-position: left top;
+ background-repeat: repeat-x;
+ cursor: pointer;
+ height: 20px;
+ padding: 2px 1px 2px 2px;
+ width: 100%;
+}
+
+.dr-pmenu-selected-item {
+ font-style: italic;
+}
+
+.dr-pmenu-group-self-label {
+ padding-left: 5px;
+ width: 100%;
+}
+
+.rich-pmenu-group-self-label {
+ color: #000000;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-10 00:18:50 UTC (rev 4085)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2007-10-10 12:13:19 UTC (rev 4086)
@@ -1,16 +1,146 @@
package org.jboss.tools.jsf.vpe.richfaces.template;
+import java.util.List;
+
+import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.HtmlComponentUtil;
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.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
+import org.w3c.dom.Text;
public class RichFacesPanelMenuGroupTemplate extends VpeAbstractTemplate {
- public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
- Document visualDocument) {
- // TODO Auto-generated method stub
- return null;
+ private static String PANEL_MENU_GROUP_SPACER = "/panelMenuGroup/spacer.gif";
+
+ private static String PANEL_MENU_GROUP_POINTER = "/panelMenuGroup/pointer.gif";
+
+ private static String PANEL_MENU_GROUP_POINT = "/panelMenuGroup/point.gif";
+
+ private static String STYLE_PATH = "/panelMenuGroup/style.css";
+
+ public VpeCreationData create(VpePageContext pageContext, Node sourceNode, Document visualDocument) {
+
+ ComponentUtil.setCSSLink(pageContext, STYLE_PATH, "panelMenuGroup");
+
+ Element div = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_DIV);
+ VpeCreationData creationData = new VpeCreationData(div);
+
+ if (checkPanelMenuParent(sourceNode)) {
+ div.setAttribute("class", "dr-pmenu-top-group-div");
+ div.setAttribute("vpeSupport", "panelMenuGroup");
+
+ buildTable(sourceNode, visualDocument, div);
+
+ Element sourceElement = (Element) sourceNode;
+
+ List<Node> children = ComponentUtil.getChildren(sourceElement);
+
+ if (!children.isEmpty()) {
+ VpeChildrenInfo childInfo = new VpeChildrenInfo(div);
+ for (Node child : children) {
+ childInfo.addSourceChild(child);
+ }
+ creationData.addChildrenInfo(childInfo);
+ }
+ } else {
+ div.setAttribute("style", "display:none;");
}
+
+ return creationData;
+ }
+
+ public static VpeCreationData encode(VpeCreationData creationData, Element sourceElement, Document visualDocument, Element parentVisualElement, boolean active) {
+ return null;
+ }
+
+ private void buildTable(Node sourceNode, Document visualDocument, Element div) {
+ Node parent = getRichPanelParent(sourceNode);
+
+ Element table = visualDocument.createElement("table");
+ div.appendChild(table);
+ table.setAttribute("cellspacing", "0");
+ table.setAttribute("cellpadding", "0");
+ table.setAttribute("border", "0");
+
+ Element tableBody = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TR);
+ table.appendChild(tableBody);
+
+ Element column1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tableBody.appendChild(column1);
+
+ Element img1 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ column1.appendChild(img1);
+ img1.setAttribute("width", "16");
+ img1.setAttribute("vspace", "0");
+ img1.setAttribute("hspace", "0");
+ img1.setAttribute("height", "16");
+
+ Element column2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tableBody.appendChild(column2);
+ column2.setAttribute("style", "width: 100%;");
+
+ Text name = visualDocument.createTextNode(sourceNode.getAttributes().getNamedItem("label").getNodeValue());
+ column2.appendChild(name);
+
+ Element column3 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_TD);
+ tableBody.appendChild(column3);
+
+ Element img2 = visualDocument.createElement(HtmlComponentUtil.HTML_TAG_IMG);
+ column3.appendChild(img2);
+ img2.setAttribute("width", "16");
+ img2.setAttribute("vspace", "0");
+ img2.setAttribute("hspace", "0");
+ img2.setAttribute("height", "16");
+
+ if (parent.getNodeName().endsWith(":panelMenu")) {
+ ComponentUtil.setImg(img1, PANEL_MENU_GROUP_SPACER);
+ ComponentUtil.setImg(img2, PANEL_MENU_GROUP_POINTER);
+ column2.setAttribute("class", "dr-pmenu-group-self-label dr-pmenu-selected-item");
+ table.setAttribute("class", "dr-pmenu-top-group");
+ } else {
+ div.setAttribute("style", "display:none;");
+ ComponentUtil.setImg(img1, PANEL_MENU_GROUP_POINT);
+ img1.setAttribute("style", "vertical-align: middle");
+ ComponentUtil.setImg(img2, PANEL_MENU_GROUP_SPACER);
+ column2.setAttribute("class", "dr-pmenu-group rich-pmenu-group");
+ table.setAttribute("class", "dr-pmenu-group-self-label rich-pmenu-group-self-label");
+ }
+ }
+
+ private boolean checkPanelMenuParent(Node checkNode) {
+ boolean result = false;
+
+ Node parent = checkNode.getParentNode();
+
+ while (parent != null) {
+ if (parent.getNodeName().endsWith(":panelMenu")) {
+ result = true;
+ break;
+ }
+
+ parent = parent.getParentNode();
+ }
+
+ return result;
+ }
+
+ private Node getRichPanelParent(Node sourceNode) {
+ Node parent = sourceNode.getParentNode();
+
+ while (true) {
+ if (parent.getNodeName().endsWith(":panelMenu") || parent.getNodeName().endsWith(":panelMenuGroup")) {
+ break;
+ } else {
+ parent = parent.getParentNode();
+ }
+ }
+
+ return parent;
+
+ }
}
17 years, 3 months
JBoss Tools SVN: r4085 - in trunk/seam/plugins/org.jboss.tools.seam.core/templates: test and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-09 20:18:50 -0400 (Tue, 09 Oct 2007)
New Revision: 4085
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.settings/org.jboss.tools.seam.core.prefs
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/
trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/org.jboss.tools.seam.core.prefs
Log:
http://jira.jboss.com/jira/browse/JBIDE-982
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.settings/org.jboss.tools.seam.core.prefs
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.settings/org.jboss.tools.seam.core.prefs (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.settings/org.jboss.tools.seam.core.prefs 2007-10-10 00:18:50 UTC (rev 4085)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+seam.parent.project=@projectName@
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.core/templates/ejb/.settings/org.jboss.tools.seam.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/org.jboss.tools.seam.core.prefs
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/org.jboss.tools.seam.core.prefs (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/org.jboss.tools.seam.core.prefs 2007-10-10 00:18:50 UTC (rev 4085)
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+seam.parent.project=@projectName@
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.core/templates/test/.settings/org.jboss.tools.seam.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
17 years, 3 months
JBoss Tools SVN: r4084 - trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-09 18:39:54 -0400 (Tue, 09 Oct 2007)
New Revision: 4084
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
Log:
seam.ui does not have any dependencies upon jdt.core
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-10-09 19:38:17 UTC (rev 4083)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-10-09 22:39:54 UTC (rev 4084)
@@ -43,7 +43,6 @@
org.eclipse.wst.xml.ui,
org.eclipse.debug.core,
org.apache.ant,
- org.jboss.ide.eclipse.jdt.core,
org.eclipse.datatools.connectivity,
org.eclipse.datatools.connectivity.ui.dse,
org.eclipse.datatools.connectivity.db.generic.ui,
17 years, 3 months