JBoss Tools SVN: r7209 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-31 09:24:09 -0400 (Mon, 31 Mar 2008)
New Revision: 7209
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OrderedChildren.java
Log:
JBIDE-1957
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OrderedChildren.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OrderedChildren.java 2008-03-31 13:08:09 UTC (rev 7208)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OrderedChildren.java 2008-03-31 13:24:09 UTC (rev 7209)
@@ -51,7 +51,7 @@
if(!super.removeObject(o)) return false;
int i = getIndex(o);
if(i >= 0) synchronized (this) {
- if(list.length == 1) {
+ if(alist.size() == 1) {
list = EMPTY;
alist.clear();
} else {
16 years, 4 months
JBoss Tools SVN: r7208 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-31 09:08:09 -0400 (Mon, 31 Mar 2008)
New Revision: 7208
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/DnDUtil.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/DnDUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/DnDUtil.java 2008-03-31 13:01:18 UTC (rev 7207)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/dnd/DnDUtil.java 2008-03-31 13:08:09 UTC (rev 7208)
@@ -59,7 +59,7 @@
return (action != null) ? action : getEnabledAction(object, null, "MoveActions.Move");
}
- public static void paste(XModelObject object, Properties properties) throws Exception {
+ public static void paste(XModelObject object, Properties properties) throws XModelException {
XAction paste = getEnabledPasteAction(object);
if(paste != null) paste.executeHandler(object, properties);
}
16 years, 4 months
JBoss Tools SVN: r7207 - trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-31 09:01:18 -0400 (Mon, 31 Mar 2008)
New Revision: 7207
Modified:
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java 2008-03-31 12:52:19 UTC (rev 7206)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/util/FileUtil.java 2008-03-31 13:01:18 UTC (rev 7207)
@@ -135,7 +135,7 @@
if(f.isFile() && !isSameFile(f)) f.delete();
if(!f.exists()) f.createNewFile();
} catch (Exception e) {
- CommonPlugin.getPluginLog().logError(e);
+ CommonPlugin.getPluginLog().logError("Problem writing to file " + f, e);
}
PrintWriter pw = new PrintWriter(new FileWriter(f));
pw.print(value);
@@ -404,7 +404,7 @@
}
}
- public static void unzip(File dest, String jar) throws Exception {
+ public static void unzip(File dest, String jar) throws IOException {
dest.mkdirs();
ZipFile zf = new ZipFile(jar);
try {
16 years, 4 months
JBoss Tools SVN: r7206 - in trunk/documentation/guides/GettingStartedGuide/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ykryvinchanka
Date: 2008-03-31 08:52:19 -0400 (Mon, 31 Mar 2008)
New Revision: 7206
Modified:
trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_12.png
trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_13.png
trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-226 ?\208?\159?\208?\171?\208?\159?\209?\142 Scale param was redefined
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_12.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/images/jsp_application/jsp_application_13.png
===================================================================
(Binary files differ)
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-03-31 12:47:57 UTC (rev 7205)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/jsp_application.xml 2008-03-31 12:52:19 UTC (rev 7206)
@@ -270,7 +270,7 @@
<imageobject>
<imagedata
fileref="images/jsp_application/jsp_application_12.png"
- scale="75"/>
+ />
</imageobject>
</mediaobject>
</figure>
@@ -284,7 +284,7 @@
<mediaobject>
<imageobject>
<imagedata fileref="images/jsp_application/jsp_application_13.png"
- scale="75"/>
+ />
</imageobject>
</mediaobject>
</figure>
16 years, 4 months
JBoss Tools SVN: r7205 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-31 08:47:57 -0400 (Mon, 31 Mar 2008)
New Revision: 7205
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelException.java
Log:
JBIDE-893
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelException.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelException.java 2008-03-31 12:28:27 UTC (rev 7204)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/XModelException.java 2008-03-31 12:47:57 UTC (rev 7205)
@@ -10,24 +10,43 @@
******************************************************************************/
package org.jboss.tools.common.model;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+
/**
* @author Viacheslav Kabanovich
*/
-public class XModelException extends Exception {
+public class XModelException extends CoreException {
private static final long serialVersionUID = 1L;
- public XModelException() {}
+ public XModelException() {
+ super(createStatus(null, null));
+ }
public XModelException(String message) {
- super(message);
+ super(createStatus(message, null));
}
public XModelException(String message, Throwable cause) {
- super(message, cause);
+ super(createStatus(message, cause));
}
public XModelException(Throwable cause) {
- super(cause);
+ super(createStatus(null, cause));
}
+
+ static IStatus createStatus(String message, Throwable cause) {
+ return new Status(IStatus.ERROR, ModelPlugin.PLUGIN_ID, message, cause);
+
+ }
+
+ public static void rethrow(Throwable cause) throws CoreException {
+ if(cause instanceof XModelException) {
+ throw (XModelException)cause;
+ }
+ throw new XModelException(cause);
+ }
}
16 years, 4 months
JBoss Tools SVN: r7204 - in trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model: filesystems/impl and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2008-03-31 08:28:27 -0400 (Mon, 31 Mar 2008)
New Revision: 7204
Added:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FilePathHelper.java
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileObjectComparator.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemPeer.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
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/JarFolderImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OpenedProjectsImpl.java
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
Log:
JBIDE-1973
Added: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FilePathHelper.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FilePathHelper.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/FilePathHelper.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -0,0 +1,53 @@
+/*******************************************************************************
+ * 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.common.model.filesystems;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.model.plugin.ModelPlugin;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
+import org.osgi.framework.Bundle;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public class FilePathHelper {
+ private static Check check = null;
+
+ public static boolean isCaseSensitive() {
+ if(check == null) check = new Check();
+ return check.isCaseSensitive;
+ }
+
+ public static String toPathPath(String name) {
+ return name == null || isCaseSensitive() ? name : name.toLowerCase();
+ }
+
+ private static class Check {
+ boolean isCaseSensitive = false;
+ public Check() {
+ Bundle b = Platform.getBundle(ModelPlugin.PLUGIN_ID);
+ String path = EclipseResourceUtil.getInstallPath(b);
+ if(path == null) return;
+ String file = path + "/images/default.gif";
+ if(!new File(file).isFile()) {
+ ModelPlugin.getPluginLog().logWarning("Cannot find file " + file);
+ return;
+ }
+ String file2 = path + "/images/Default.gif";
+ if(!new File(file2).isFile()) {
+ isCaseSensitive = true;
+ }
+ }
+ }
+
+}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileAnyImpl.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -117,7 +117,8 @@
public String getPathPart() {
String n = name();
- return (n == null) ? null : n.toLowerCase();
+ String pp = FilePathHelper.toPathPath(n);
+ return (n == null) ? null : pp;
}
public static String toFileName(XProperty p) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileObjectComparator.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileObjectComparator.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileObjectComparator.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -12,6 +12,7 @@
import java.util.*;
import org.jboss.tools.common.model.XModelObject;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
public class FileObjectComparator implements Comparator<XModelObject> {
@@ -21,7 +22,9 @@
int i1 = o1.getFileType();
int i2 = o2.getFileType();
if(i1 != i2) return (i2 - i1);
- return o1.getPathPart().toLowerCase().compareTo(o2.getPathPart().toLowerCase());
+ String p1 = FilePathHelper.toPathPath(o1.getPathPart());
+ String p2 = FilePathHelper.toPathPath(o2.getPathPart());
+ return p1.compareTo(p2);
}
public boolean equals(Object obj) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemPeer.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemPeer.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemPeer.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -13,6 +13,8 @@
import java.io.*;
import java.util.*;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
+
public class FileSystemPeer {
private Hashtable<String,Long> p = new Hashtable<String,Long>();
@@ -53,7 +55,8 @@
}
private String toKey(File f, boolean asDir) {
- String s = f.getAbsolutePath().replace('\\', '/').toLowerCase();
+ String s = f.getAbsolutePath().replace('\\', '/');
+ s = FilePathHelper.toPathPath(s);
return (asDir) ? s + "/" : s;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FileSystemsImpl.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -20,6 +20,7 @@
import org.eclipse.ui.IContributorResourceAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
import org.jboss.tools.common.model.impl.*;
import org.jboss.tools.common.model.plugin.ModelPlugin;
import org.jboss.tools.common.model.util.*;
@@ -121,7 +122,8 @@
String path = XModelObjectUtil.getExpandedValue(cs[i], "location", null);
try {
File f = new File(path);
- path = f.getCanonicalPath().replace('\\', '/').toLowerCase();
+ path = f.getCanonicalPath().replace('\\', '/');
+ path = FilePathHelper.toPathPath(path);
if (path.charAt(path.length()-1) != '/') path += '/';
paths[i] = path;
} catch (IOException e) {
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 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/FolderImpl.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -30,12 +30,12 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.BodySource;
import org.jboss.tools.common.model.filesystems.FileAuxiliary;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
import org.jboss.tools.common.model.filesystems.XFileObject;
import org.jboss.tools.common.model.impl.RegularObjectImpl;
import org.jboss.tools.common.model.impl.XModelImpl;
import org.jboss.tools.common.model.loaders.Reloadable;
import org.jboss.tools.common.model.loaders.XObjectLoader;
-import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.Paths;
import org.jboss.tools.common.model.util.XModelObjectLoaderUtil;
import org.jboss.tools.common.util.FileUtil;
@@ -141,8 +141,9 @@
if(!rs[i].isAccessible()) continue;
if(!rs[i].isLinked()) continue;
File f = rs[i].getLocation().toFile();
- linked.put(f.getName().toLowerCase(), f);
- linkedResources.put(f.getName().toLowerCase(), rs[i]);
+ String pp = FilePathHelper.toPathPath(f.getName());
+ linked.put(pp, f);
+ linkedResources.put(pp, rs[i]);
_loadChild(peer, f);
}
fire = true;
@@ -153,8 +154,9 @@
Properties p = new Properties();
p.setProperty("name", f.getName());
XModelObject c = getModel().createModelObject("FileFolder", p);
- if(linked.containsKey(f.getName().toLowerCase())) {
- c.setObject("file", linked.get(f.getName().toLowerCase()));
+ String pp = FilePathHelper.toPathPath(f.getName());
+ if(linked.containsKey(pp)) {
+ c.setObject("file", linked.get(pp));
}
addChild(c);
} else {
@@ -234,7 +236,8 @@
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());
+ String pp = FilePathHelper.toPathPath(rs[i].getName());
+ unsynchronized.add(pp);
}
}
if(resource.exists()) {
@@ -258,7 +261,7 @@
for (int i = 0; i < rs.length; i++) {
if(rs[i].isLinked()) {
File f = rs[i].getLocation().toFile();
- String p = f.getName().toLowerCase();
+ String p = FilePathHelper.toPathPath(f.getName());
mf.put(p, f);
linked.put(p, f);
linkedResources.put(p, rs[i]);
@@ -269,16 +272,19 @@
}
File[] fs = getFiles();
- for (int i = 0; i < fs.length; i++) mf.put(fs[i].getName().toLowerCase(), fs[i]);
+ for (int i = 0; i < fs.length; i++) {
+ String p = FilePathHelper.toPathPath(fs[i].getName());
+ mf.put(p, fs[i]);
+ }
Map<String,XModelObject> mc = children.getObjectsMap();
updateAuxiliary(mc, mf);
Map<String,XModelObject> toRemove = new HashMap<String,XModelObject>();
- Iterator io = mc.keySet().iterator();
+ Iterator<String> io = mc.keySet().iterator();
while(io.hasNext()) {
- String nm = (String)io.next();
+ String nm = io.next();
if(mf.containsKey(nm)) continue;
XModelObject o = (XModelObject)mc.get(nm);
File of = getChildIOFile(o);
@@ -291,9 +297,9 @@
io.remove();
}
- Iterator it = mf.keySet().iterator();
+ Iterator<String> it = mf.keySet().iterator();
while(it.hasNext()) {
- String nm = (String)it.next();
+ String nm = it.next();
File f = (File)mf.get(nm);
XModelObject o = (XModelObject)mc.get(nm);
if(o != null) {
@@ -334,8 +340,9 @@
protected File getChildIOFile(String filename) {
File f = null;
- if(linked.containsKey(filename.toLowerCase())) {
- f = linked.get(filename.toLowerCase());
+ String p = FilePathHelper.toPathPath(filename);
+ if(linked.containsKey(p)) {
+ f = linked.get(p);
}
if(f == null) {
f = new File(getFile(), filename);
@@ -343,12 +350,12 @@
return f;
}
- private void updateAuxiliary(Map mc, Map mf) {
- Iterator it = mf.keySet().iterator();
+ private void updateAuxiliary(Map<String,XModelObject> mc, Map<String,File> mf) {
+ Iterator<String> it = mf.keySet().iterator();
while(it.hasNext()) {
String nm = (String)it.next();
- File f = (File)mf.get(nm);
- XModelObject o = (XModelObject)mc.get(nm);
+ File f = mf.get(nm);
+ XModelObject o = mc.get(nm);
if(o == null || !o.getModelEntity().getName().equals(FileAuxiliary.AUX_FILE_ENTITY)) continue;
it.remove();
FileAnyAuxiliaryImpl aux = (FileAnyAuxiliaryImpl)o;
@@ -457,7 +464,8 @@
}
return;
}
- int i = (!o.isModified() || unsynchronized == null || !unsynchronized.contains(f.getName().toLowerCase())) ? 0 : question(f);
+ String p = FilePathHelper.toPathPath(f.getName());
+ int i = (!o.isModified() || unsynchronized == null || !unsynchronized.contains(p)) ? 0 : question(f);
if(i == 0) {
reload(o, f);
} else if(i == -100) {
@@ -530,7 +538,7 @@
}
}
- protected boolean updateNew(String pathpart, File f, Map toRemove) {
+ protected boolean updateNew(String pathpart, File f, Map<String,XModelObject> toRemove) {
FileSystemPeer peer = getFileSystem().getPeer();
if(peer.contains(f) && !peer.isUpdated(f)) return false;
XModelObject c = null;
@@ -538,8 +546,9 @@
Properties p = new Properties();
p.setProperty("name", f.getName());
c = getModel().createModelObject("FileFolder", p);
- if(linked.containsKey(f.getName().toLowerCase())) {
- c.setObject("file", linked.get(f.getName().toLowerCase()));
+ String pp = FilePathHelper.toPathPath(f.getName());
+ if(linked.containsKey(pp)) {
+ c.setObject("file", linked.get(pp));
}
} else {
Properties ep = getEntityProperties(f);
@@ -562,9 +571,9 @@
return (c != null && addChild(c));
}
- private XModelObject findOldObject(String entity, Map toRemove) {
+ private XModelObject findOldObject(String entity, Map<String,XModelObject> toRemove) {
if(entity == null || toRemove.size() == 0) return null;
- Iterator it = toRemove.keySet().iterator();
+ Iterator<String> it = toRemove.keySet().iterator();
while(it.hasNext()) {
String nm = it.next().toString();
XModelObject o = (XModelObject)toRemove.get(nm);
@@ -678,7 +687,10 @@
}
File[] fs = getFiles();
Map<String,File> t = new HashMap<String,File>();
- for (int i = 0; i < fs.length; i++) t.put(fs[i].getName().toLowerCase(), fs[i]);
+ for (int i = 0; i < fs.length; i++) {
+ String p = FilePathHelper.toPathPath(fs[i].getName());
+ t.put(p, fs[i]);
+ }
FileSystemPeer peer = getFileSystem().getPeer();
peer.register(f);
XModelObject[] cs = getChildren();
@@ -706,9 +718,9 @@
t.remove(cs[i].getPathPart());
}
- Iterator it = t.values().iterator();
+ Iterator<File> it = t.values().iterator();
while(it.hasNext()) {
- File df = (File)it.next();
+ File df = it.next();
boolean d = df.isDirectory();
boolean r = (d && peer.containsDir(df)) || ((!d) && peer.contains(df));
if(!r) continue;
@@ -837,11 +849,12 @@
public String getPathPart() {
String s = get("NAME");
- return (s == null) ? null : s.toLowerCase();
+ return FilePathHelper.toPathPath(s);
}
public XModelObject getChildByPathPart(String pathpart) {
- return super.getChildByPathPart(pathpart.toLowerCase());
+ pathpart = FilePathHelper.toPathPath(pathpart);
+ return super.getChildByPathPart(pathpart);
}
static boolean isLateloadFile(XModelObject o) {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/JarFolderImpl.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -123,11 +123,12 @@
public String getPathPart() {
String s = super.getPathPart();
- return (s == null) ? null : s.toLowerCase();
+ return FilePathHelper.toPathPath(s);
}
public XModelObject getChildByPathPart(String pathpart) {
- return super.getChildByPathPart(pathpart.toLowerCase());
+ pathpart = FilePathHelper.toPathPath(pathpart);
+ return super.getChildByPathPart(pathpart);
}
public boolean update() {
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/filesystems/impl/SelectOverlappedFileSystemHandler.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -16,9 +16,9 @@
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.meta.action.impl.*;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
import org.jboss.tools.common.model.impl.*;
import org.jboss.tools.common.model.util.*;
-import org.jboss.tools.common.model.util.FindObjectHelper;
public class SelectOverlappedFileSystemHandler extends AbstractHandler {
@@ -62,7 +62,8 @@
private static String getAbsoluteFileSystemPath(XModelObject fso) {
String path = XModelObjectUtil.getExpandedValue(fso, "location", null);
try {
- return new File(path).getCanonicalPath().replace('\\', '/').toLowerCase();
+ path = new File(path).getCanonicalPath().replace('\\', '/');
+ return FilePathHelper.toPathPath(path);
} catch (Exception e) {
//ignore
return null;
@@ -74,7 +75,8 @@
String rpath = XModelObjectLoaderUtil.getResourcePath(f);
if(path == null || rpath == null) return null;
XModelObject fso = f.getModel().getByPath(path.substring(0, path.length() - rpath.length()));
- return (getAbsoluteFileSystemPath(fso) + rpath).toLowerCase();
+ String pp = getAbsoluteFileSystemPath(fso) + rpath;
+ return FilePathHelper.toPathPath(pp);
}
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OpenedProjectsImpl.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OpenedProjectsImpl.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/impl/OpenedProjectsImpl.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -13,6 +13,7 @@
import java.util.*;
import org.jboss.tools.common.model.*;
import org.jboss.tools.common.model.event.XModelTreeEvent;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
import org.jboss.tools.common.model.util.XModelObjectUtil;
public class OpenedProjectsImpl extends OrderedObjectImpl {
@@ -47,10 +48,13 @@
public XModelObject getChildByFile(String name) {
if(name == null) return null;
- name = name.toLowerCase().replace('\\', '/');
+ name = FilePathHelper.toPathPath(name);
+ name = name.replace('\\', '/');
XModelObject[] os = children.getObjects();
for (int i = 0; i < os.length; i++) {
- if(name.equals(XModelObjectUtil.getExpandedValue(os[i], "name", null).toLowerCase().replace('\\', '/'))) return os[i];
+ String p = XModelObjectUtil.getExpandedValue(os[i], "name", null);
+ p = FilePathHelper.toPathPath(p);
+ if(name.equals(p.replace('\\', '/'))) return os[i];
}
return null;
}
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-03-31 11:46:52 UTC (rev 7203)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/EclipseResourceUtil.java 2008-03-31 12:28:27 UTC (rev 7204)
@@ -28,6 +28,7 @@
import org.jboss.tools.common.meta.action.XActionInvoker;
import org.jboss.tools.common.model.*;
+import org.jboss.tools.common.model.filesystems.FilePathHelper;
import org.jboss.tools.common.model.filesystems.FileSystemsHelper;
import org.jboss.tools.common.model.filesystems.XFileObject;
import org.jboss.tools.common.model.filesystems.impl.*;
@@ -404,7 +405,8 @@
properties.setProperty("name", f.getParentFile().getName());
FileSystemImpl s = (FileSystemImpl)model.createModelObject("FileSystemFolder", properties);
fs.addChild(s);
- return model.getByPath("/" + f.getName().toLowerCase());
+ String pp = FilePathHelper.toPathPath(f.getName());
+ return model.getByPath("/" + pp);
}
public static String[] getJavaProjectSrcLocations(IProject project) {
16 years, 4 months
JBoss Tools SVN: r7203 - trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2008-03-31 07:46:52 -0400 (Mon, 31 Mar 2008)
New Revision: 7203
Modified:
trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
Log:
JBIDE-1258
Modified: trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-03-31 11:15:56 UTC (rev 7202)
+++ trunk/common/plugins/org.jboss.tools.common.model/src/org/jboss/tools/common/model/util/TypeInfoCollector.java 2008-03-31 11:46:52 UTC (rev 7203)
@@ -109,19 +109,24 @@
}
public Type(String signature, IType source) {
- String erasureSignature = Signature.getTypeErasure(signature);
- String typeOfArraySiganture = Signature.getElementType(erasureSignature);
- fName = String.valueOf(Signature.toString(erasureSignature));
- if(!erasureSignature.equals(typeOfArraySiganture)) {
- // this is an array
- fIsArray = true;
- fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
+ if(signature!=null) {
+ String erasureSignature = Signature.getTypeErasure(signature);
+ String typeOfArraySiganture = Signature.getElementType(erasureSignature);
+ fName = String.valueOf(Signature.toString(erasureSignature));
+ if(!erasureSignature.equals(typeOfArraySiganture)) {
+ // this is an array
+ fIsArray = true;
+ fTypeOfArrayElement = new Type(typeOfArraySiganture, source);
+ }
+ String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
+ fParameters = new Type[signaturesOfParametersOfType.length];
+ for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
+ fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
+ }
+ } else {
+ fName = source.getFullyQualifiedName();
+ setParameters(new Type[0]);
}
- String[] signaturesOfParametersOfType = Signature.getTypeArguments(signature);
- fParameters = new Type[signaturesOfParametersOfType.length];
- for (int i = 0; i < signaturesOfParametersOfType.length; i++) {
- fParameters[i] = new Type(signaturesOfParametersOfType[i], source);
- }
fSource = source;
}
16 years, 4 months
JBoss Tools SVN: r7202 - 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: dmaliarevich
Date: 2008-03-31 07:15:56 -0400 (Mon, 31 Mar 2008)
New Revision: 7202
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css
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/RichFacesPanelMenuItemTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1588, style classes and attributes updated
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css 2008-03-31 11:00:47 UTC (rev 7201)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/tabPanel/tabPanel.css 2008-03-31 11:15:56 UTC (rev 7202)
@@ -20,14 +20,10 @@
}
.rich-tabhdr-side-border {
- border-top-width: 1px;
- border-top-style: solid;
}
.rich-tabhdr-side-cell {
- border-top-color: #C4C0B9;
- background-repeat: no-repeat;
- background-position: top;
+
}
.rich-tabhdr-cell-active {
@@ -45,6 +41,13 @@
}
.rich-tab-header {
+ border-style: solid;
+ border-width: 1px 1px 0pt;
+ /*border-top-width: 1px;
+ border-top-style: solid;
+ border-top-color: #C4C0B9;*/
+ background-repeat: no-repeat;
+ background-position: top;
padding: 2px 10px 2px 10px;
text-align: center;
color: #000000;
@@ -57,10 +60,6 @@
}
.rich-tab-active {
- border-width: 1px;
- border-style: solid;
- padding: 3px 10px 4px 10px;
- border-bottom: 0px;
background-repeat: repeat-x;
background-position: top;
cursor: default;
@@ -70,9 +69,6 @@
}
.rich-tab-inactive {
- border-width: 1px;
- border-style: solid;
- border-bottom: 0px;
background-repeat: repeat-x;
background-position: top;
cursor: default;
@@ -80,9 +76,6 @@
}
.rich-tab-disabled {
- border-width: 1px;
- border-style: solid;
- border-bottom: 0px;
background-repeat: repeat-x;
background-position: top;
cursor: default;
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 2008-03-31 11:00:47 UTC (rev 7201)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2008-03-31 11:15:56 UTC (rev 7202)
@@ -31,84 +31,83 @@
public class RichFacesPanelMenuGroupTemplate extends VpeAbstractTemplate {
- private static final String NAME_COMPONENT = "panelMenuGroup";
+ /*
+ * pich:panelMenuGroup attributes
+ */
+ private static final String DISABLED = "disabled"; //$NON-NLS-1$
+ private static final String DISABLED_CLASS = "disabledClass"; //$NON-NLS-1$
+ private static final String DISABLED_STYLE = "disabledStyle"; //$NON-NLS-1$
+ private static final String ICON_EXPANDED = "iconExpanded"; //$NON-NLS-1$
+ private static final String ICON_COLLAPSED = "iconCollapsed"; //$NON-NLS-1$
+ private static final String ICON_DISABLED = "iconDisabled"; //$NON-NLS-1$
+ private static final String ICON_LABEL = "label"; //$NON-NLS-1$
+ private static final String STYLE = "style"; //$NON-NLS-1$
+ private static final String STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+
+ private static final String NAME_COMPONENT = "panelMenuGroup"; //$NON-NLS-1$
+ private static final String PANEL_MENU_END_TAG = ":panelMenu"; //$NON-NLS-1$
+ private static final String PANEL_MENU_GROUP_END_TAG = ":panelMenuGroup"; //$NON-NLS-1$
+ private static final String PANEL_MENU_ITEM_END_TAG = ":panelMenuItem"; //$NON-NLS-1$
- private static final String PANEL_MENU_END_TAG = ":panelMenu";
-
- private static final String PANEL_MENU_GROUP_END_TAG = ":panelMenuGroup";
-
- private static final String PANEL_MENU_ITEM_END_TAG = ":panelMenuItem";
-
- // *******************************************************************************
- // * Panel menu attribytes.
- // ******************************************************************************/
- private static final String PANEL_MENU_ATTR_ICON_GROUP_POSITION = "iconGroupPosition";
-
- private static final String PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION = "iconGroupTopPosition";
-
- private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP = "iconCollapsedGroup";
-
- private static final String PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP = "iconCollapsedTopGroup";
-
- private static final String PANEL_MENU_ATTR_ICON_EXPANDED_GROUP = "iconExpandedGroup";
-
- private static final String PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP = "iconExpandedTopGroup";
-
- private static final String PANEL_MENU_ATTR_ICON_DISABLE_GROUP = "iconDisableGroup";
-
- private static final String PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP = "iconTopDisableGroup";
-
- private static final String PANEL_MENU_ATTR_DISABLED_GROUP_CLASS = "disabledGroupClass";
-
- private static final String PANEL_MENU_ATTR_DISABLED_GROUP_STYLE = "disabledGroupStyle";
-
- private static final String PANEL_MENU_ATTR_TOP_GROUP_CLASS = "topGroupClass";
-
- private static final String PANEL_MENU_ATTR_GROUP_CLASS = "groupClass";
-
- private static final String PANEL_MENU_ATTR_TOP_GROUP_STYLE = "topGroupStyle";
-
- private static final String PANEL_MENU_ATTR_GROUP_STYLE = "groupStyle";
-
- // *******************************************************************************
- // * Panel menu group attribytes.
- // ******************************************************************************/
- private static final String PANEL_MENU_GROUP_ATTR_DISABLED_STYLE = "disabledStyle";
-
- private static final String PANEL_MENU_GROUP_ATTR_DISABLED_CLASS = "disabledClass";
-
- private static final String PANEL_MENU_GROUP_ATTR_DISABLED = "disabled";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_EXPANDED = "iconExpanded";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED = "iconCollapsed";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_DISABLED = "iconDisabled";
-
- private static final String PANEL_MENU_GROUP_ATTR_ICON_LABEL = "label";
-
- private static final String COMPONENT_ATTR_VPE_SUPPORT = "vpeSupport";
-
- private static final String COMPONENT_ATTR_VPE_USER_TOGGLE_ID = "vpe-user-toggle-id";
-
- private static final String PANEL_MENU_GROUP_ICON_SPACER_PATH = "/panelMenuGroup/spacer.gif";
-
- private static final String STYLE_PATH = "/panelMenuGroup/style.css";
-
- private static final String EMPTY_DIV_STYLE = "display: none;";
-
+ private static final String COMPONENT_ATTR_VPE_SUPPORT = "vpeSupport"; //$NON-NLS-1$
+ private static final String COMPONENT_ATTR_VPE_USER_TOGGLE_ID = "vpe-user-toggle-id"; //$NON-NLS-1$
+ private static final String PANEL_MENU_GROUP_ICON_SPACER_PATH = "/panelMenuGroup/spacer.gif"; //$NON-NLS-1$
+ private static final String STYLE_PATH = "/panelMenuGroup/style.css"; //$NON-NLS-1$
+ private static final String EMPTY_DIV_STYLE = "display: none;"; //$NON-NLS-1$
+
private static final Map<String, String> DEFAULT_ICON_MAP = new HashMap<String, String>();
+
+ private static final String TRUE = "true"; //$NON-NLS-1$
+ private static final String RIGHT = "right"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu attributes for groups
+ */
+ private static String pm_iconGroupPosition;
+ private static String pm_iconGroupTopPosition;
+ private static String pm_iconCollapsedGroup;
+ private static String pm_iconCollapsedTopGroup;
+ private static String pm_iconExpandedGroup;
+ private static String pm_iconExpandedTopGroup;
+ private static String pm_iconDisableGroup;
+ private static String pm_iconTopDisableGroup;
+
+ /*
+ * rich:panelMenu style classes for groups
+ */
+ private static String pm_disabled;
+ private static String pm_disabledGroupClass;
+ private static String pm_disabledGroupStyle;
+ private static String pm_topGroupClass;
+ private static String pm_topGroupStyle;
+ private static String pm_groupClass;
+ private static String pm_groupStyle;
+ private static String pm_style;
+ private static String pm_styleClass;
+
+ /*
+ * pich:panelMenuGroup attributes
+ */
+ private static String pmg_disabledStyle;
+ private static String pmg_disabledClass;
+ private static String pmg_disabled;
+ private static String pmg_iconExpanded;
+ private static String pmg_iconCollapsed;
+ private static String pmg_iconDisabled;
+ private static String pmg_label;
+ private static String pmg_style;
+ private static String pmg_styleClass;
static {
- DEFAULT_ICON_MAP.put("chevron", "/panelMenuGroup/chevron.gif");
- DEFAULT_ICON_MAP.put("chevronUp", "/panelMenuGroup/chevronUp.gif");
- DEFAULT_ICON_MAP.put("chevronDown", "/panelMenuGroup/chevronDown.gif");
- DEFAULT_ICON_MAP.put("triangle", "/panelMenuGroup/triangle.gif");
- DEFAULT_ICON_MAP.put("triangleUp", "/panelMenuGroup/triangleUp.gif");
+ DEFAULT_ICON_MAP.put("chevron", "/panelMenuGroup/chevron.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("chevronUp", "/panelMenuGroup/chevronUp.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("chevronDown", "/panelMenuGroup/chevronDown.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("triangle", "/panelMenuGroup/triangle.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("triangleUp", "/panelMenuGroup/triangleUp.gif"); //$NON-NLS-1$ //$NON-NLS-2$
DEFAULT_ICON_MAP
- .put("triangleDown", "/panelMenuGroup/triangleDown.gif");
- DEFAULT_ICON_MAP.put("disc", "/panelMenuGroup/disc.gif");
- DEFAULT_ICON_MAP.put("grid", "/panelMenuGroup/grid.gif");
+ .put("triangleDown", "/panelMenuGroup/triangleDown.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("disc", "/panelMenuGroup/disc.gif"); //$NON-NLS-1$ //$NON-NLS-2$
+ DEFAULT_ICON_MAP.put("grid", "/panelMenuGroup/grid.gif"); //$NON-NLS-1$ //$NON-NLS-2$
}
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
@@ -137,7 +136,10 @@
int childGroupCount = 1;
boolean disabled = false;
Element parent = getRichPanelParent(sourceElement);
-
+
+ readPanelMenuGroupAttributes(sourceElement);
+ readPanelMenuAttributes(sourceParentElement);
+
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
boolean expanded = activeIds.contains(childId);
nsIDOMElement div = visualDocument
@@ -146,14 +148,12 @@
div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
div.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, childId);
- if ("true".equalsIgnoreCase(sourceParentElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ if (TRUE.equalsIgnoreCase(pm_disabled)) {
disabled = true;
- } else if ("true".equalsIgnoreCase(parent
- .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ } else if (TRUE.equalsIgnoreCase(parent
+ .getAttribute(DISABLED))) {
disabled = true;
- } else if ("true".equalsIgnoreCase(sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED))) {
+ } else if (TRUE.equalsIgnoreCase(pmg_disabled)) {
disabled = true;
}
@@ -182,7 +182,7 @@
RichFacesPanelMenuGroupTemplate.encode(pageContext,
creationData, sourceParentElement,
(Element) child, visualDocument, div, activeIds,
- childId + "-" + childGroupCount);
+ childId + "-" + childGroupCount); //$NON-NLS-1$
childGroupCount++;
} else {
RichFacesPanelMenuItemTemplate
@@ -215,36 +215,31 @@
Element sourceParentElement, Element parent, Element sourceElement,
nsIDOMDocument visualDocument, nsIDOMElement div, boolean expanded,
boolean disabled, String activeChildId) {
- String disabledStyle = sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_STYLE);
+ String disabledStyle = pmg_disabledStyle;
String disableClass = null;
String style = sourceElement
.getAttribute(HtmlComponentUtil.HTML_STYLE_ATTR);
String styleClass = sourceElement
.getAttribute(HtmlComponentUtil.HTML_STYLECLASS_ATTR);
- if (disabledStyle == null) {
- disabledStyle = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_STYLE);
+ if (disabledStyle == null){
+ disabledStyle = pm_disabledGroupStyle;
}
- if (sourceElement.getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS) != null) {
- disableClass = sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_DISABLED_CLASS);
- } else if (sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS) != null) {
- disableClass = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_DISABLED_GROUP_CLASS);
+ if (attrPresents(pmg_disabledClass)) {
+ disableClass = pmg_disabledClass;
+ } else if (attrPresents(pm_disabledGroupClass)) {
+ disableClass = pm_disabledGroupClass;
} else {
- disableClass = "rich-pmenu-group-disabled";
+ disableClass = "rich-pmenu-group-disabled"; //$NON-NLS-1$
}
nsIDOMElement table = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
div.appendChild(table);
- table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0");
- table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0");
+ table.setAttribute(HtmlComponentUtil.HTML_CELLSPACING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_CELLPADDING_ATTR, "0"); //$NON-NLS-1$
+ table.setAttribute(HtmlComponentUtil.HTML_BORDER_ATTR, "0"); //$NON-NLS-1$
nsIDOMElement tableBody = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TR);
@@ -261,15 +256,14 @@
column1.appendChild(img1);
ComponentUtil.setImg(img1, PANEL_MENU_GROUP_ICON_SPACER_PATH);
img1.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-pmenu-group-icon");
+ "rich-pmenu-group-icon"); //$NON-NLS-1$
nsIDOMElement column2 = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TD);
tableBody.appendChild(column2);
- column2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 100%;");
+ column2.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, "width: 100%;"); //$NON-NLS-1$
- nsIDOMText name = visualDocument.createTextNode(sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_LABEL));
+ nsIDOMText name = visualDocument.createTextNode(pmg_label);
column2.appendChild(name);
column2.setAttribute(COMPONENT_ATTR_VPE_USER_TOGGLE_ID, String
.valueOf(activeChildId));
@@ -284,7 +278,7 @@
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
column3.appendChild(img2);
img2.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "rich-pmenu-group-icon");
+ "rich-pmenu-group-icon"); //$NON-NLS-1$
ComponentUtil.setImg(img2, PANEL_MENU_GROUP_ICON_SPACER_PATH);
setIcon(pageContext, parent, sourceParentElement, sourceElement, img1,
@@ -294,57 +288,50 @@
|| ((parent.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG))
&& (sourceElement.getNodeName().endsWith(PANEL_MENU_GROUP_END_TAG)))) {
if (styleClass != null
- && sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS) != null) {
- styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group"
- + " "
- + sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_CLASS);
+ && attrPresents(pm_topGroupClass)) {
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group" //$NON-NLS-1$
+ + " " //$NON-NLS-1$
+ + pm_topGroupClass;
} else {
- styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group";
+ styleClass = "dr-pmenu-group-self-label dr-pmenu-top-group"; //$NON-NLS-1$
}
+
if (style != null
- && sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE) != null) {
- style = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_TOP_GROUP_STYLE);
+ && attrPresents(pm_topGroupStyle)) {
+ style = pm_topGroupStyle;
} else {
- style = "";
+ style = ""; //$NON-NLS-1$
}
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-pmenu-top-group-div");
+ "dr-pmenu-top-group-div"); //$NON-NLS-1$
} else {
if (styleClass != null
- && sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_GROUP_CLASS) != null) {
- styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label"
- + " "
- + sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_GROUP_CLASS);
+ && attrPresents(pm_groupClass)) {
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label" //$NON-NLS-1$
+ + " " //$NON-NLS-1$
+ + pm_groupClass;
} else {
- styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label";
+ styleClass = "dr-pmenu-group-self-label rich-pmenu-group-self-label"; //$NON-NLS-1$
}
if (style != null
- && sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_GROUP_STYLE) != null) {
- style = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_GROUP_STYLE);
+ && attrPresents(pm_groupStyle)) {
+ style = pm_groupStyle;
} else {
- style = "";
+ style = ""; //$NON-NLS-1$
}
div.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
- "dr-pmenu-top-self-div");
+ "dr-pmenu-top-self-div"); //$NON-NLS-1$
}
if (disabled) {
- styleClass = styleClass + " " + disableClass;
+ styleClass = styleClass + " " + disableClass; //$NON-NLS-1$
if (disabledStyle != null) {
- style = style + " " + disabledStyle;
+ style = style + " " + disabledStyle; //$NON-NLS-1$
}
}
- if (!"".equals(style.trim())) {
+ if (!"".equals(style.trim())) { //$NON-NLS-1$
table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, style);
}
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, styleClass);
@@ -370,47 +357,36 @@
nsIDOMElement img1, nsIDOMElement img2, boolean expanded,
boolean disabled) {
boolean needChangePosition = false;
- String pathIconExpanded = sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_EXPANDED);
- String pathIconCollapsed = sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_COLLAPSED);
- String pathIconDisabled = sourceElement
- .getAttribute(PANEL_MENU_GROUP_ATTR_ICON_DISABLED);
+ String pathIconExpanded = pmg_iconExpanded;
+ String pathIconCollapsed = pmg_iconCollapsed;
+ String pathIconDisabled = pmg_iconDisabled;
if (parent.getNodeName().endsWith(PANEL_MENU_END_TAG)) {
if (pathIconExpanded == null) {
- pathIconExpanded = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_TOP_GROUP);
+ pathIconExpanded = pm_iconExpandedTopGroup;
}
if (pathIconCollapsed == null) {
- pathIconCollapsed = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_TOP_GROUP);
+ pathIconCollapsed = pm_iconCollapsedTopGroup;
}
if (pathIconDisabled == null) {
- pathIconDisabled = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_TOP_DISABLE_GROUP);
+ pathIconDisabled = pm_iconTopDisableGroup;
}
- if ("right".equals(sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_TOP_GROUP_POSITION))) {
+ if (RIGHT.equals(pm_iconGroupTopPosition)) {
needChangePosition = true;
}
} else {
if (pathIconExpanded == null) {
- pathIconExpanded = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_EXPANDED_GROUP);
+ pathIconExpanded = pm_iconExpandedGroup;
}
if (pathIconCollapsed == null) {
- pathIconCollapsed = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_COLLAPSED_GROUP);
+ pathIconCollapsed = pm_iconCollapsedGroup;
}
if (pathIconDisabled == null) {
- pathIconDisabled = sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_DISABLE_GROUP);
+ pathIconDisabled = pm_iconDisableGroup;
}
- if ("right".equals(sourceParentElement
- .getAttribute(PANEL_MENU_ATTR_ICON_GROUP_POSITION))) {
+ if (RIGHT.equals(pm_iconGroupPosition)) {
needChangePosition = true;
}
}
@@ -455,4 +431,78 @@
}
}
}
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private static void readPanelMenuAttributes(Element sourceParentElement) {
+
+ if (null == sourceParentElement) {
+ return;
+ }
+
+ /*
+ * rich:panelMenu attributes for groups
+ */
+ pm_iconGroupPosition = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_GROUP_POSITION);
+ pm_iconGroupTopPosition = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_GROUP_TOP_POSITION);
+ pm_iconCollapsedGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_COLLAPSED_GROUP);
+ pm_iconCollapsedTopGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_COLLAPSED_TOP_GROUP);
+ pm_iconExpandedGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_EXPANDED_GROUP);
+ pm_iconExpandedTopGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_EXPANDED_TOP_GROUP);
+ pm_iconDisableGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_DISABLE_GROUP);
+ pm_iconTopDisableGroup = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_TOP_DISABLE_GROUP);
+
+ /*
+ * rich:panelMenu style classes for groups
+ */
+ pm_disabled = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.DISABLED);
+ pm_disabledGroupClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.DISABLED_GROUP_CLASS);
+ pm_disabledGroupStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.DISABLED_GROUP_STYLE);
+ pm_topGroupClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.TOP_GROUP_CLASS);
+ pm_topGroupStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.TOP_GROUP_STYLE);
+ pm_groupClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.GROUP_CLASS);
+ pm_groupStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.GROUP_STYLE);
+ pm_style = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.STYLE);
+ pm_styleClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.STYLE_CLASS);
+ }
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private static void readPanelMenuGroupAttributes(Element sourceElement) {
+
+ if (null == sourceElement) {
+ return;
+ }
+
+ /*
+ * pich:panelMenuGroup attributes
+ */
+ pmg_disabledStyle = sourceElement.getAttribute(DISABLED_STYLE);
+ pmg_disabledClass = sourceElement.getAttribute(DISABLED_CLASS);
+ pmg_disabled = sourceElement.getAttribute(DISABLED);
+ pmg_iconExpanded = sourceElement.getAttribute(ICON_EXPANDED);
+ pmg_iconCollapsed = sourceElement.getAttribute(ICON_COLLAPSED);
+ pmg_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
+ pmg_label = sourceElement.getAttribute(ICON_LABEL);
+ pmg_style = sourceElement.getAttribute(STYLE);
+ pmg_styleClass = sourceElement.getAttribute(STYLE_CLASS);
+ }
+
+
+ /**
+ * Checks is attribute presents.
+ *
+ * @param attr the attribute
+ *
+ * @return true, if successful
+ */
+ private static boolean attrPresents(String attr) {
+ return ((null != attr) && (!"".equals(attr))); //$NON-NLS-1$
+ }
}
\ 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 2008-03-31 11:00:47 UTC (rev 7201)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2008-03-31 11:15:56 UTC (rev 7202)
@@ -27,66 +27,69 @@
public class RichFacesPanelMenuItemTemplate extends VpeAbstractTemplate {
- private static final String STYLE_PATH = "/panelMenuItem/style.css";
+ /*
+ * rich:panelMenuItem attributes
+ */
+ private static final String DISABLED = "disabled"; //$NON-NLS-1$
+ private static final String ICON = "icon"; //$NON-NLS-1$
+ private static final String ICON_DISABLED = "iconDisabled"; //$NON-NLS-1$
+ private static final String ITEM_CLASS = "itemClass"; //$NON-NLS-1$
+ private static final String ITEM_STYLE = "itemStyle"; //$NON-NLS-1$
+ private static final String DISABLED_CLASS = "disabledClass"; //$NON-NLS-1$
+ private static final String DISABLED_STYLE = "disabledStyle"; //$NON-NLS-1$
+ private static final String STYLE = "style"; //$NON-NLS-1$
+ private static final String STYLE_CLASS = "styleClass"; //$NON-NLS-1$
- private static final String PANEL_MENU_ITEM_CLASS = "dr-pmenu-item";
+
+ private static final String PANEL_MENU_ITEM_CLASS = "dr-pmenu-item"; //$NON-NLS-1$
+ private static final String PANEL_MENU_NOWARP_CLASS = "dr-pmenu-nowrap"; //$NON-NLS-1$
+ private static final String PANEL_MENU_LABLE_CLASS = "dr-pmenu-group-self-label"; //$NON-NLS-1$
+ private static final String PANEL_MENU_DIV = "dr-pmenu-top-self-div"; //$NON-NLS-1$
+ private static final String DISABLED_CLASS_NAME = "dr-pmenu-item-disabled"; //$NON-NLS-1$
+
+ private static final String IMG_POINTS_SRC = "/panelMenuItem/points.gif"; //$NON-NLS-1$
+ private static final String IMG_SPACER_SRC = "/panelMenuItem/spacer.gif"; //$NON-NLS-1$
+ private static final String STYLE_PATH = "/panelMenuItem/style.css"; //$NON-NLS-1$
+
+ private static final String NO_SIZE_VALUE = "0"; //$NON-NLS-1$
+ private static final String DEFAULT_SIZE_VALUE = "16"; //$NON-NLS-1$
+
+ private static final String PANEL_MENU_ITEM = "panelMenuItem"; //$NON-NLS-1$
+ private static final String EMPTY_DIV_STYLE = "display: none;"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu attributes for items
+ */
+ private static String pm_iconItem;
+ private static String pm_iconDisabledItem;
+ private static String pm_iconItemPosition;
+ private static String pm_iconTopItem;
+ private static String pm_iconTopDisabledItem;
+ private static String pm_iconItemTopPosition;
+
+ /*
+ * rich:panelMenu style classes for items
+ */
+ private static String pm_disabledItemClass;
+ private static String pm_disabledItemStyle;
+ private static String pm_topItemClass;
+ private static String pm_topItemStyle;
+ private static String pm_itemClass;
+ private static String pm_itemStyle;
+
+ /*
+ * rich:panelMenuItem attributes
+ */
+ private static String pmi_disabled;
+ private static String pmi_icon;
+ private static String pmi_iconDisabled;
+ private static String pmi_itemClass;
+ private static String pmi_itemStyle;
+ private static String pmi_disabledClass;
+ private static String pmi_disabledStyle;
+ private static String pmi_style;
+ private static String pmi_styleClass;
- 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_DIV = "dr-pmenu-top-self-div";
-
- 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;";
-
- private static final String DISABLED_CLASS = "dr-pmenu-item-disabled";
-
- private static final String DISABLED_ITEM_STYLE = "disabledItemStyle";
-
- private static final String ITEM_CLASS = "itemClass";
-
- private static final String ICON_ITEM_TOP_POSITION = "iconItemTopPosition";
-
- private static final String TOP_ITEM_STYLE = "topItemStyle";
-
- private static final String ICON_TOP_DISABLED_ITEM = "iconTopDisabledItem";
-
- private static final String DISABLE_ITEM_CLASS = "disableItemClass";
-
- private static final String ICON_DISABLED_ITEM = "iconDisabledItem";
-
- private static final String ICON_ITEM_POSITION = "iconItemPosition";
-
- private static final String ICON_ITEM = "iconItem";
-
- private static final String ICON_TOP_ITEM = "iconTopItem";
-
- private static final String TOP_ITEM_CLASS = "topItemClass";
-
- private static final String ITEM_STYLE = "itemStyle";
-
- private static final String ICON_DISABLED = "iconDisabled";
-
- private static final String ICON = "icon";
-
- private static final String STYLE_CLASS = "styleClass";
-
- private static final String STYLE = "style";
-
- private static final String DISABLED = "disabledClass";
-
- private static final String DISABLED_STYLE = "disabledStyle";
-
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
nsIDOMElement div = visualDocument
@@ -103,8 +106,11 @@
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, PANEL_MENU_ITEM);
- nsIDOMElement parentDiv = visualDocument.createElement("div");
- parentDiv.setAttribute("CLASS", PANEL_MENU_DIV);
+ readPanelMenuAttributes(sourceParentElement);
+ readPanelMenuItemAttributes(sourceElement);
+
+ nsIDOMElement parentDiv = visualDocument.createElement("div"); //$NON-NLS-1$
+ parentDiv.setAttribute("CLASS", PANEL_MENU_DIV); //$NON-NLS-1$
parentVisualElement.appendChild(parentDiv);
nsIDOMElement div = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_DIV);
@@ -112,10 +118,10 @@
parentDiv.appendChild(div);
if (sourceElement.getParentNode().getNodeName().endsWith(
- ":panelMenuGroup")
+ ":panelMenuGroup") //$NON-NLS-1$
|| (sourceElement.getParentNode().getNodeName()
- .endsWith(":panelMenu"))) {
- div.setAttribute("vpeSupport", PANEL_MENU_ITEM);
+ .endsWith(":panelMenu"))) { //$NON-NLS-1$
+ div.setAttribute("vpeSupport", PANEL_MENU_ITEM); //$NON-NLS-1$
nsIDOMElement table = visualDocument
.createElement(HtmlComponentUtil.HTML_TAG_TABLE);
div.appendChild(table);
@@ -145,10 +151,10 @@
tdLable.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR,
PANEL_MENU_LABLE_CLASS);
tdLable.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR,
- "element.style");
+ "element.style"); //$NON-NLS-1$
- String value = sourceElement.getAttribute("label");
- nsIDOMText text = visualDocument.createTextNode(value == null ? ""
+ String value = sourceElement.getAttribute("label"); //$NON-NLS-1$
+ nsIDOMText text = visualDocument.createTextNode(value == null ? "" //$NON-NLS-1$
: value);
tdLable.appendChild(text);
@@ -171,54 +177,41 @@
.createElement(HtmlComponentUtil.HTML_TAG_IMG);
if (sourceElement.getParentNode().getNodeName().endsWith(
- ":panelMenu")) {
+ ":panelMenu")) { //$NON-NLS-1$
- if (isDisabledItem(sourceElement.getAttribute("disabled"))) {
+ if ("true".equalsIgnoreCase(pmi_disabled)) { //$NON-NLS-1$
setIcon(pageContext, imgPoints, sourceElement,
- sourceParentElement, ICON_TOP_DISABLED_ITEM,
- ICON_DISABLED);
- setItemClassAndStyle(table, sourceParentElement
- .getAttribute(DISABLE_ITEM_CLASS), sourceElement
- .getAttribute(DISABLED), DISABLED_CLASS,
- sourceParentElement
- .getAttribute(DISABLED_ITEM_STYLE),
- sourceElement.getAttribute(DISABLED_STYLE));
+ sourceParentElement, pm_iconTopDisabledItem,
+ pmi_iconDisabled);
+ setItemClassAndStyle(table, pm_disabledItemClass,
+ pmi_disabledClass, DISABLED_CLASS_NAME,
+ pm_disabledItemStyle, pmi_disabledStyle);
} else {
setIcon(pageContext, imgPoints, sourceElement,
- sourceParentElement, ICON_TOP_ITEM, ICON);
- setItemClassAndStyle(table, sourceParentElement
- .getAttribute(TOP_ITEM_CLASS), sourceElement
- .getAttribute(STYLE_CLASS), PANEL_MENU_ITEM_CLASS,
- sourceParentElement.getAttribute(TOP_ITEM_STYLE),
- sourceElement.getAttribute(STYLE));
+ sourceParentElement, pm_iconTopItem, pmi_icon);
+ setItemClassAndStyle(table, pm_topItemClass,
+ pmi_styleClass, PANEL_MENU_ITEM_CLASS,
+ pm_topItemStyle, pmi_style);
}
- setIconPosition(sourceParentElement
- .getAttribute(ICON_ITEM_TOP_POSITION), td, tdNowrap,
+ setIconPosition(pm_iconItemTopPosition, td, tdNowrap,
imgPoints, imgSpacer2);
} else {
- if (isDisabledItem(sourceElement.getAttribute("disabled"))) {
+ if ("true".equalsIgnoreCase(pmi_disabled)) { //$NON-NLS-1$
setIcon(pageContext, imgPoints, sourceElement,
- sourceParentElement, ICON_DISABLED_ITEM,
- ICON_DISABLED);
- setItemClassAndStyle(table, sourceParentElement
- .getAttribute(DISABLE_ITEM_CLASS), sourceElement
- .getAttribute(DISABLED), DISABLED_CLASS,
- sourceParentElement
- .getAttribute(DISABLED_ITEM_STYLE),
- sourceElement.getAttribute(DISABLED_STYLE));
+ sourceParentElement, pm_iconDisabledItem,
+ pmi_iconDisabled);
+ setItemClassAndStyle(table, pm_disabledItemClass,
+ pmi_disabledClass, DISABLED_CLASS_NAME,
+ pm_disabledItemStyle, pmi_disabledStyle);
} else {
setIcon(pageContext, imgPoints, sourceElement,
- sourceParentElement, ICON_ITEM, ICON);
- setItemClassAndStyle(table, sourceParentElement
- .getAttribute(ITEM_CLASS), sourceElement
- .getAttribute(STYLE_CLASS), PANEL_MENU_ITEM_CLASS,
- sourceParentElement.getAttribute(ITEM_STYLE),
- sourceElement.getAttribute(STYLE));
+ sourceParentElement, pm_iconItem, pmi_icon);
+ setItemClassAndStyle(table, pm_itemClass, pmi_styleClass,
+ PANEL_MENU_ITEM_CLASS, pm_itemStyle, pmi_style);
}
- setIconPosition(sourceParentElement
- .getAttribute(ICON_ITEM_POSITION), td, tdNowrap,
- imgPoints, imgSpacer2);
+ setIconPosition(pm_iconItemPosition, td, tdNowrap, imgPoints,
+ imgSpacer2);
}
List<Node> children = ComponentUtil.getChildren(sourceElement);
@@ -227,8 +220,8 @@
VpeChildrenInfo childInfo = new VpeChildrenInfo(tdLable);
creationData.addChildrenInfo(childInfo);
for (Node child : children) {
- if (!(child.getNodeName().endsWith(":panelMenuGroup") || child
- .getNodeName().endsWith(":panelMenu"))) {
+ if (!(child.getNodeName().endsWith(":panelMenuGroup") || child //$NON-NLS-1$
+ .getNodeName().endsWith(":panelMenu"))) { //$NON-NLS-1$
childInfo.addSourceChild(child);
}
}
@@ -246,8 +239,8 @@
private static void setDefaultImgAttributes(nsIDOMElement element) {
element.setAttribute(HtmlComponentUtil.HTML_ATR_WIDTH,
DEFAULT_SIZE_VALUE);
- element.setAttribute("vspace", NO_SIZE_VALUE);
- element.setAttribute("hspace", NO_SIZE_VALUE);
+ element.setAttribute("vspace", NO_SIZE_VALUE); //$NON-NLS-1$
+ element.setAttribute("hspace", NO_SIZE_VALUE); //$NON-NLS-1$
element.setAttribute(HtmlComponentUtil.HTML_ATR_HEIGHT,
DEFAULT_SIZE_VALUE);
}
@@ -257,28 +250,19 @@
setDefaultImgAttributes(image);
}
- private static boolean isDisabledItem(String disabled) {
- if ("true".equals(disabled)) {
- return true;
- }
- return false;
- }
-
private static void setIcon(VpePageContext pageContext,
nsIDOMElement imgPoints, Element sourceElement,
- Element parentElement, String parentIconAttribute,
- String iconAttribute) {
- String icon = sourceElement.getAttribute(iconAttribute);
- String parentIcon = parentElement.getAttribute(parentIconAttribute);
- if (icon == null || icon.length() == 0) {
- if (!(parentIcon == null || parentIcon.length() == 0)) {
+ Element parentElement, String parentIconPath,
+ String iconPath) {
+ if (iconPath == null || iconPath.length() == 0) {
+ if (!(parentIconPath == null || parentIconPath.length() == 0)) {
ComponentUtil.setImgFromResources(pageContext, imgPoints,
- parentIcon, IMG_SPACER_SRC);
+ parentIconPath, IMG_SPACER_SRC);
} else {
ComponentUtil.setImg(imgPoints, IMG_POINTS_SRC);
}
} else {
- ComponentUtil.setImgFromResources(pageContext, imgPoints, icon,
+ ComponentUtil.setImgFromResources(pageContext, imgPoints, iconPath,
IMG_SPACER_SRC);
}
}
@@ -287,12 +271,12 @@
nsIDOMElement right, nsIDOMElement left, nsIDOMElement imgPoints,
nsIDOMElement imgSpacer2) {
if (!(iconPosition == null)) {
- if (iconPosition.equals("right")) {
+ if (iconPosition.equals("right")) { //$NON-NLS-1$
setItemImage(right, imgPoints);
} else {
setItemImage(right, imgSpacer2);
ComponentUtil.setImg(imgSpacer2, IMG_SPACER_SRC);
- if (iconPosition.equals("left")) {
+ if (iconPosition.equals("left")) { //$NON-NLS-1$
setItemImage(left, imgPoints);
}
}
@@ -306,7 +290,7 @@
private static void setItemClassAndStyle(nsIDOMElement table,
String parentClass, String itemClass, String defaultClass,
String parentStyle, String itemStyle) {
- String resultClass = "";
+ String resultClass = ""; //$NON-NLS-1$
if (!(parentClass == null || parentClass.length() == 0)) {
resultClass += parentClass;
}
@@ -314,9 +298,9 @@
resultClass += itemClass;
}
table.setAttribute(HtmlComponentUtil.HTML_CLASS_ATTR, defaultClass
- + " " + resultClass);
+ + " " + resultClass); //$NON-NLS-1$
- String resultStyle = "";
+ String resultStyle = ""; //$NON-NLS-1$
if (!(parentStyle == null || parentStyle.length() == 0)) {
resultStyle += parentStyle;
}
@@ -325,4 +309,63 @@
}
table.setAttribute(HtmlComponentUtil.HTML_STYLE_ATTR, resultStyle);
}
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private static void readPanelMenuAttributes(Element sourceParentElement) {
+
+ if (null == sourceParentElement) {
+ return;
+ }
+
+ /*
+ * rich:panelMenu attributes for items
+ */
+ pm_iconItem = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_ITEM);
+ pm_iconDisabledItem = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_DISABLED_ITEM);
+ pm_iconItemPosition = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_ITEM_POSITION);
+ pm_iconTopItem = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_TOP_ITEM);
+ pm_iconTopDisabledItem = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_TOP_DISABLED_ITEM);
+ pm_iconItemTopPosition = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ICON_ITEM_TOP_POSITION);
+
+ /*
+ * rich:panelMenu style classes for items
+ */
+ pm_disabledItemClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.DISABLED_ITEM_CLASS);
+ pm_disabledItemStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.DISABLED_ITEM_STYLE);
+ pm_topItemClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.TOP_ITEM_CLASS);
+ pm_topItemStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.TOP_ITEM_STYLE);
+ pm_itemClass = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ITEM_CLASS);
+ pm_itemStyle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.ITEM_STYLE);
+
+ }
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private static void readPanelMenuItemAttributes(Element sourceElement) {
+
+ if (null == sourceElement) {
+ return;
+ }
+
+ /*
+ * pich:panelMenuItem attributes
+ */
+ pmi_disabled = sourceElement.getAttribute(DISABLED);
+ pmi_icon = sourceElement.getAttribute(ICON);
+ pmi_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
+ pmi_itemClass = sourceElement.getAttribute(ITEM_CLASS);
+ pmi_itemStyle = sourceElement.getAttribute(ITEM_STYLE);
+ pmi_disabledClass = sourceElement.getAttribute(DISABLED_CLASS);
+ pmi_disabledStyle = sourceElement.getAttribute(DISABLED_STYLE);
+ pmi_style = sourceElement.getAttribute(STYLE);
+ pmi_styleClass = sourceElement.getAttribute(STYLE_CLASS);
+
+ }
}
\ No newline at end of file
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 2008-03-31 11:00:47 UTC (rev 7201)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuTemplate.java 2008-03-31 11:15:56 UTC (rev 7202)
@@ -39,13 +39,61 @@
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 STYLECLASS_ATTR_PANELMENU = "styleClass";
+ /*
+ * rich:panelMenu attributes for groups
+ */
+ public static final String ICON_GROUP_POSITION = "iconGroupPosition"; //$NON-NLS-1$
+ public static final String ICON_GROUP_TOP_POSITION = "iconGroupTopPosition"; //$NON-NLS-1$
+ public static final String ICON_COLLAPSED_GROUP = "iconCollapsedGroup"; //$NON-NLS-1$
+ public static final String ICON_COLLAPSED_TOP_GROUP = "iconCollapsedTopGroup"; //$NON-NLS-1$
+ public static final String ICON_EXPANDED_GROUP = "iconExpandedGroup"; //$NON-NLS-1$
+ public static final String ICON_EXPANDED_TOP_GROUP = "iconExpandedTopGroup"; //$NON-NLS-1$
+ public static final String ICON_DISABLE_GROUP = "iconDisableGroup"; //$NON-NLS-1$
+ public static final String ICON_TOP_DISABLE_GROUP = "iconTopDisableGroup"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu attributes for items
+ */
+ public static final String ICON_ITEM = "iconItem"; //$NON-NLS-1$
+ public static final String ICON_DISABLED_ITEM = "iconDisabledItem"; //$NON-NLS-1$
+ public static final String ICON_ITEM_POSITION = "iconItemPosition"; //$NON-NLS-1$
+ public static final String ICON_TOP_ITEM = "iconTopItem"; //$NON-NLS-1$
+ public static final String ICON_TOP_DISABLED_ITEM = "iconTopDisabledItem"; //$NON-NLS-1$
+ public static final String ICON_ITEM_TOP_POSITION = "iconItemTopPosition"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu style classes
+ */
+ public static final String DISABLED = "disabled"; //$NON-NLS-1$
+ public static final String STYLE = "style"; //$NON-NLS-1$
+ public static final String STYLE_CLASS = "styleClass"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu style classes for groups
+ */
+ public static final String DISABLED_GROUP_CLASS = "disabledGroupClass"; //$NON-NLS-1$
+ public static final String DISABLED_GROUP_STYLE = "disabledGroupStyle"; //$NON-NLS-1$
+ public static final String TOP_GROUP_CLASS = "topGroupClass"; //$NON-NLS-1$
+ public static final String TOP_GROUP_STYLE = "topGroupStyle"; //$NON-NLS-1$
+ public static final String GROUP_CLASS = "groupClass"; //$NON-NLS-1$
+ public static final String GROUP_STYLE = "groupStyle"; //$NON-NLS-1$
+
+ /*
+ * rich:panelMenu style classes for items
+ */
+ public static final String DISABLED_ITEM_CLASS = "disabledItemClass"; //$NON-NLS-1$
+ public static final String DISABLED_ITEM_STYLE = "disabledItemStyle"; //$NON-NLS-1$
+ public static final String TOP_ITEM_CLASS = "topItemClass"; //$NON-NLS-1$
+ public static final String TOP_ITEM_STYLE = "topItemStyle"; //$NON-NLS-1$
+ public static final String ITEM_CLASS = "itemClass"; //$NON-NLS-1$
+ public static final String ITEM_STYLE = "itemStyle"; //$NON-NLS-1$
- private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup";
- private static final String PANEL_MENU_ITEM_END = ":panelMenuItem";
+
+ private static final String WIDTH_ATTR_PANELMENU = "width"; //$NON-NLS-1$
+ private static final String PANEL_MENU_GROUP_END = ":panelMenuGroup"; //$NON-NLS-1$
+ private static final String PANEL_MENU_ITEM_END = ":panelMenuItem"; //$NON-NLS-1$
+
private List<String> activeIds = new ArrayList<String>();
// private static final String DISABLED_STYLE_FOR_TABLE = "color:#B1ADA7";
@@ -56,12 +104,12 @@
Element sourceElement = (Element) sourceNode;
String width = sourceElement.getAttribute(WIDTH_ATTR_PANELMENU);
- String style = sourceElement.getAttribute(STYLE_ATTR_PANELMENU);
+ String style = sourceElement.getAttribute(STYLE);
String styleClass = sourceElement
- .getAttribute(STYLECLASS_ATTR_PANELMENU);
+ .getAttribute(STYLE_CLASS);
if (width != null) {
- style += "" + "; width:" + width;
+ style += "" + "; width:" + width; //$NON-NLS-1$ //$NON-NLS-2$
}
nsIDOMElement div = visualDocument.createElement(HTML.TAG_DIV);
16 years, 4 months
JBoss Tools SVN: r7201 - trunk/seam/docs/reference/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-03-31 07:00:47 -0400 (Mon, 31 Mar 2008)
New Revision: 7201
Modified:
trunk/seam/docs/reference/en/modules/intro.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-268 "Installation into Eclipse" section was updated according Seam plugin dependency.
Modified: trunk/seam/docs/reference/en/modules/intro.xml
===================================================================
--- trunk/seam/docs/reference/en/modules/intro.xml 2008-03-31 10:04:37 UTC (rev 7200)
+++ trunk/seam/docs/reference/en/modules/intro.xml 2008-03-31 11:00:47 UTC (rev 7201)
@@ -30,11 +30,8 @@
<para>Here, we are going to explain how to install Seam plugin into Eclipse.</para>
- <para>The first thing you should do is to download <ulink
- url="http://labs.jboss.com/jbossseam/download/index.html">Seam distribution</ulink>
- and extract it in any folder. Then, simply put /plugins and /features folders
- from your distribution into the same ones of your eclipse directory. To ensure the
- eclipse have detected a new plugin run it with -clean option, i.e. eclipse -clean.</para>
+ <para>Seam is a one module of JBoss Tools project. Since Seam has a dependence on other JBoss Tools modules we recommend you to install
+ a bundle of all <ulink url="http://labs.jboss.com/tools/download/index.html">JBoss Tools plug-ins</ulink>. Installation instruction you can find on JBoss Wiki in <ulink url="http://labs.jboss.com/wiki/InstallingJBossTools">InstallingJBossTools</ulink> section.</para>
</section>
16 years, 4 months
JBoss Tools SVN: r7200 - trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2008-03-31 06:04:37 -0400 (Mon, 31 Mar 2008)
New Revision: 7200
Modified:
trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml
Log:
JBIDE-1494
Modified: trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml 2008-03-31 09:09:31 UTC (rev 7199)
+++ trunk/struts/plugins/org.jboss.tools.struts.vpe.struts/templates/vpe-templates-struts.xml 2008-03-31 10:04:37 UTC (rev 7200)
@@ -34,29 +34,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="no">
@@ -70,29 +49,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -111,29 +69,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="no">
@@ -149,29 +86,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -294,29 +210,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -340,30 +235,12 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
+ <vpe:textFormatting use-default-formats="yes">
<vpe:format type="BlockFormat" handler="org.jboss.tools.vpe.editor.toolbar.format.handler.BlockFormatHandler" />
<vpe:format type="UnderlineFormat" setDefault="true">
<vpe:formatAttribute type="style" />
</vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ </vpe:textFormatting>
</vpe:template>
</vpe:tag>
@@ -411,29 +288,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style"/>
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -463,29 +319,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="yes" modify="yes">
@@ -499,29 +334,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -539,29 +353,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -575,29 +368,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -611,29 +383,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -650,29 +401,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="yes" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -690,29 +420,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -726,29 +435,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -762,29 +450,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -802,29 +469,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:if>
<vpe:template children="no" modify="yes">
@@ -838,29 +484,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
@@ -879,29 +504,8 @@
<vpe:drag start-enable="yes" />
<vpe:drop container="no" />
</vpe:dnd>
- <vpe:textFormating>
- <vpe:format type="UnderlineFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BoldFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ItalicFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontNameFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="FontSizeFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="BackgroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- <vpe:format type="ForegroundColorFormat">
- <vpe:formatAttribute type="style" />
- </vpe:format>
- </vpe:textFormating>
+ <textFormatting use-default-formats="yes">
+ </textFormatting>
</vpe:template>
</vpe:tag>
16 years, 4 months