JBoss Tools SVN: r13592 - in trunk/esb/plugins/org.jboss.tools.esb.project.core: src/org/jboss/tools/esb/core and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-12 02:59:40 -0500 (Thu, 12 Feb 2009)
New Revision: 13592
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainerInitializer.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorations.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorationsManager.java
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
Log:
JBIDE-3800 - decouple esb from AS
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2009-02-12 07:22:33 UTC (rev 13591)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2009-02-12 07:59:40 UTC (rev 13592)
@@ -25,7 +25,6 @@
org.eclipse.jst.common.frameworks,
org.eclipse.wst.server.core,
org.eclipse.jst.common.project.facet.core,
- org.jboss.ide.eclipse.as.classpath.core,
org.eclipse.wst.web;bundle-version="1.1.204",
org.eclipse.jem.util;bundle-version="2.0.100",
org.eclipse.wst.common.emfworkbench.integration;bundle-version="1.1.201",
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java 2009-02-12 07:22:33 UTC (rev 13591)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -10,6 +10,9 @@
******************************************************************************/
package org.jboss.tools.esb.core;
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -57,4 +60,9 @@
return plugin;
}
+ public static void log(String msg,Throwable e) {
+ ILog log = ESBProjectCorePlugin.getDefault().getLog();
+ IStatus status = new Status(Status.ERROR,ESBProjectCorePlugin.PLUGIN_ID,msg,e);
+ log.log(status);
+ }
}
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2009-02-12 07:22:33 UTC (rev 13591)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -26,12 +26,12 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
-import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainer;
-import org.jboss.ide.eclipse.as.classpath.core.jee.AbstractClasspathContainerInitializer;
-import org.jboss.ide.eclipse.as.classpath.core.xpl.ClasspathDecorations;
import org.jboss.tools.esb.core.ESBProjectCorePlugin;
import org.jboss.tools.esb.core.StatusUtils;
import org.jboss.tools.esb.core.messages.JBossFacetCoreMessages;
+import org.jboss.tools.esb.core.runtime.classpath.AbstractClasspathContainer;
+import org.jboss.tools.esb.core.runtime.classpath.AbstractClasspathContainerInitializer;
+import org.jboss.tools.esb.core.runtime.classpath.ClasspathDecorations;
/**
* @author Denny Xu
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainer.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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.esb.core.runtime.classpath;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IAccessRule;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
+
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public abstract class AbstractClasspathContainer implements IClasspathContainer {
+
+ public static final String LIB_FOLDER = "lib"; //$NON-NLS-1$
+ public static final String LIB_SOURCE_FOLDER = "libsrc"; //$NON-NLS-1$
+
+ protected IClasspathEntry[] entries;
+ protected IPath path;
+ protected String description;
+ protected String libFolder;
+ protected IJavaProject javaProject;
+
+ protected static ClasspathDecorationsManager decorations;
+ static {
+
+ decorations = new ClasspathDecorationsManager();
+ }
+
+ public AbstractClasspathContainer(IPath path, String description,
+ String libFolder, IJavaProject project) {
+ this.path = path;
+ this.description = description;
+ this.libFolder = libFolder;
+ this.javaProject = project;
+ }
+
+ public IClasspathEntry[] getClasspathEntries() {
+ if (entries == null) {
+ entries = computeEntries();
+ }
+ return entries;
+ }
+
+ public String getDescription() {
+ return this.description;
+ }
+
+ public int getKind() {
+ return IClasspathContainer.K_APPLICATION;
+ }
+
+ public IPath getPath() {
+ return this.path;
+ }
+
+ protected IClasspathEntry[] computeEntries() {
+ ArrayList<IClasspathEntry> entries = new ArrayList<IClasspathEntry>();
+
+ String baseDir = getBaseDir();
+ if (baseDir == null)
+ return new IClasspathEntry[0];
+
+ File libDir = new File(baseDir
+ + "/" + LIB_FOLDER + "/" + getLibFolder());//$NON-NLS-1$ //$NON-NLS-2$
+ File libSrcDir = new File(baseDir
+ + "/" + LIB_SOURCE_FOLDER + "/" + getLibFolder());//$NON-NLS-1$ //$NON-NLS-2$
+
+ // Lists every modules in the lib dir
+ File[] jars = libDir.listFiles(new FileFilter() {
+ public boolean accept(File file) {
+ return (file.toString().endsWith(".jar"));//$NON-NLS-1$
+ }
+ });
+
+ if (jars != null) {
+ for (int i = 0; i < jars.length; i++) {
+ File jarFile = jars[i];
+ String jarFileName = jarFile.getName();
+ File jarSrcFile = new File(libSrcDir, jarFileName);
+
+ IPath entryPath = new Path(jarFile.toString());
+
+ IPath sourceAttachementPath = null;
+ IPath sourceAttachementRootPath = null;
+
+ final ClasspathDecorations dec
+ = decorations.getDecorations( getDecorationManagerKey(getPath().toString()), entryPath.toString() );
+
+
+ IClasspathAttribute[] attrs = {};
+ if( dec != null ) {
+ sourceAttachementPath = dec.getSourceAttachmentPath();
+ sourceAttachementRootPath = dec.getSourceAttachmentRootPath();
+ attrs = dec.getExtraAttributes();
+ } else if (jarSrcFile.exists()) {
+ sourceAttachementPath = new Path(jarSrcFile.toString());
+ sourceAttachementRootPath = new Path("/");//$NON-NLS-1$
+ }
+
+ IAccessRule[] access = {};
+ IClasspathEntry entry = JavaCore.newLibraryEntry( entryPath, sourceAttachementPath,
+ sourceAttachementRootPath, access, attrs, false );
+ entries.add(entry);
+ }
+ }
+
+ return entries.toArray(new IClasspathEntry[entries.size()]);
+ }
+
+ protected String getLibFolder() {
+ return this.libFolder;
+ }
+
+ protected String getBaseDir() {
+ try {
+ URL installURL = FileLocator.toFileURL(ESBProjectCorePlugin
+ .getDefault().getBundle().getEntry("/")); //$NON-NLS-1$
+ return installURL.getFile().toString();
+ } catch (IOException ioe) {
+ // LOG THE ERROR (one day)
+ IStatus status = new Status(IStatus.ERROR, ESBProjectCorePlugin.PLUGIN_ID, "Error loading classpath container", ioe);
+ ESBProjectCorePlugin.getDefault().getLog().log(status);
+ }
+ return null;
+ }
+
+ public static String getDecorationManagerKey( String container){
+ return container;
+ }
+
+ protected static ClasspathDecorationsManager getDecorationsManager() {
+ return decorations;
+ }
+
+ public void install() {
+ entries = computeEntries();
+ IJavaProject[] javaProjects = new IJavaProject[] {javaProject};
+ final IClasspathContainer[] conts = new IClasspathContainer[] { this };
+ try {
+ JavaCore.setClasspathContainer(path, javaProjects, conts, null);
+ } catch (CoreException e) {
+ ESBProjectCorePlugin.log(e.getMessage(), e);
+ }
+ }
+
+ public abstract void refresh();
+
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainerInitializer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainerInitializer.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/AbstractClasspathContainerInitializer.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -0,0 +1,115 @@
+/*******************************************************************************
+ * 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.esb.core.runtime.classpath;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.ClasspathContainerInitializer;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.IClasspathContainer;
+import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ *
+ * @author Rob Stryker <rob.stryker(a)redhat.com>
+ *
+ */
+public abstract class AbstractClasspathContainerInitializer extends
+ ClasspathContainerInitializer {
+
+ protected IJavaProject javaProject;
+ public AbstractClasspathContainerInitializer() {
+ }
+
+ /**
+ * Description of the Method
+ *
+ * @param containerPath
+ * Description of the Parameter
+ * @param project
+ * Description of the Parameter
+ * @exception CoreException
+ * Description of the Exception
+ */
+ public void initialize(IPath containerPath, IJavaProject project)
+ throws CoreException {
+ this.javaProject = project;
+ int size = containerPath.segmentCount();
+ if (size > 0) {
+ AbstractClasspathContainer container = createClasspathContainer(containerPath);
+ JavaCore.setClasspathContainer(containerPath,
+ new IJavaProject[] { project },
+ new IClasspathContainer[] { container }, null);
+ }
+ }
+
+ /**
+ * Description of the Method
+ *
+ * @param path
+ * Description of the Parameter
+ * @return Description of the Return Value
+ */
+ protected abstract AbstractClasspathContainer createClasspathContainer(
+ IPath path);
+
+ /**
+ * Gets the classpathContainerID attribute of the
+ * AbstractClasspathContainerInitializer object
+ *
+ * @return The classpathContainerID value
+ */
+ protected abstract String getClasspathContainerID();
+
+ public boolean canUpdateClasspathContainer(IPath containerPath,
+ IJavaProject project) {
+ return true;
+ }
+
+ public void requestClasspathContainerUpdate(final IPath containerPath,
+ final IJavaProject project, final IClasspathContainer sg)
+
+ throws CoreException
+
+ {
+ String key = AbstractClasspathContainer
+ .getDecorationManagerKey(containerPath.toString());
+
+ IClasspathEntry[] entries = sg.getClasspathEntries();
+ ClasspathDecorationsManager decorations = AbstractClasspathContainer
+ .getDecorationsManager();
+ decorations.clearAllDecorations(key);
+
+ for (int i = 0; i < entries.length; i++) {
+ final IClasspathEntry entry = entries[i];
+
+ final IPath srcpath = entry.getSourceAttachmentPath();
+ final IPath srcrootpath = entry.getSourceAttachmentRootPath();
+ final IClasspathAttribute[] attrs = entry.getExtraAttributes();
+ final String eid = entry.getPath().toString();
+ final ClasspathDecorations dec = new ClasspathDecorations();
+
+ dec.setSourceAttachmentPath(srcpath);
+ dec.setSourceAttachmentRootPath(srcrootpath);
+ dec.setExtraAttributes(attrs);
+
+ decorations.setDecorations(key, eid, dec);
+ }
+ decorations.save();
+ final IClasspathContainer container = JavaCore.getClasspathContainer(
+ containerPath, project);
+ ((AbstractClasspathContainer) container).refresh();
+ }
+
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorations.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorations.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorations.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Konstantin Komissarchik - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.esb.core.runtime.classpath;
+
+import java.util.ArrayList;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.eclipse.jdt.core.JavaCore;
+
+/**
+ * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
+ */
+
+public final class ClasspathDecorations {
+ private IPath sourceAttachmentPath;
+ private IPath sourceAttachmentRootPath;
+ private ArrayList extraAttributes = new ArrayList();
+
+ public IPath getSourceAttachmentPath() {
+ return this.sourceAttachmentPath;
+ }
+
+ public void setSourceAttachmentPath(final IPath sourceAttachmentPath) {
+ this.sourceAttachmentPath = sourceAttachmentPath;
+ }
+
+ public IPath getSourceAttachmentRootPath() {
+ return this.sourceAttachmentRootPath;
+ }
+
+ public void setSourceAttachmentRootPath(final IPath sourceAttachmentRootPath) {
+ this.sourceAttachmentRootPath = sourceAttachmentRootPath;
+ }
+
+ public IClasspathAttribute[] getExtraAttributes() {
+ final IClasspathAttribute[] array = new IClasspathAttribute[this.extraAttributes
+ .size()];
+
+ return (IClasspathAttribute[]) this.extraAttributes.toArray(array);
+ }
+
+ public void setExtraAttributes(final IClasspathAttribute[] attrs) {
+ for (int i = 0; i < attrs.length; i++) {
+ this.extraAttributes.add(attrs[i]);
+ }
+ }
+
+ public void addExtraAttribute(final String name, final String value) {
+ final IClasspathAttribute attr = JavaCore.newClasspathAttribute(name,
+ value);
+
+ this.extraAttributes.add(attr);
+ }
+
+}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorationsManager.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorationsManager.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/classpath/ClasspathDecorationsManager.java 2009-02-12 07:59:40 UTC (rev 13592)
@@ -0,0 +1,315 @@
+/******************************************************************************
+ * Copyright (c) 2005 BEA Systems, Inc.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * Konstantin Komissarchik - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.esb.core.runtime.classpath;
+
+import java.io.StringReader;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.NoSuchElementException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.jdt.core.IClasspathAttribute;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
+import org.osgi.service.prefs.BackingStoreException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * @author <a href="mailto:kosta@bea.com">Konstantin Komissarchik</a>
+ */
+
+public final class ClasspathDecorationsManager {
+ private static final String CLASSPATH_PREFERENCES = "classpathPreferences"; //$NON-NLS-1$
+ private static final String SEPARATOR = System
+ .getProperty("line.separator"); //$NON-NLS-1$
+ private final HashMap decorations;
+
+ public ClasspathDecorationsManager() {
+ this.decorations = read();
+ }
+
+ private IEclipsePreferences getEclipsePreferences() {
+ IEclipsePreferences node = (IEclipsePreferences) Platform
+ .getPreferencesService().getRootNode()
+ .node(InstanceScope.SCOPE).node(ESBProjectCorePlugin.PLUGIN_ID);
+ return node;
+ }
+
+ private String getPreferences() {
+ return getEclipsePreferences().get(CLASSPATH_PREFERENCES, null);
+ }
+
+ public ClasspathDecorations getDecorations(final String key,
+ final String entry) {
+ final HashMap submap = (HashMap) this.decorations.get(key);
+
+ if (submap == null) {
+ return null;
+ }
+
+ return (ClasspathDecorations) submap.get(entry);
+ }
+
+ public void setDecorations(final String key, final String entry,
+ final ClasspathDecorations dec) {
+ HashMap submap = (HashMap) this.decorations.get(key);
+
+ if (submap == null) {
+ submap = new HashMap();
+ this.decorations.put(key, submap);
+ }
+
+ submap.put(entry, dec);
+ }
+
+ public void clearAllDecorations(final String key) {
+ this.decorations.remove(key);
+ }
+
+ public void save() {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("<classpath>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ for (Iterator itr1 = decorations.entrySet().iterator(); itr1.hasNext();) {
+ final Map.Entry entry1 = (Map.Entry) itr1.next();
+ final Map submap = (Map) entry1.getValue();
+
+ buffer.append(" <container id=\""); //$NON-NLS-1$
+ buffer.append((String) entry1.getKey());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ for (Iterator itr2 = submap.entrySet().iterator(); itr2.hasNext();) {
+ final Map.Entry entry2 = (Map.Entry) itr2.next();
+
+ final ClasspathDecorations dec = (ClasspathDecorations) entry2
+ .getValue();
+
+ buffer.append(" <entry id=\""); //$NON-NLS-1$
+ buffer.append((String) entry2.getKey());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ String src = ""; //$NON-NLS-1$
+ if (dec.getSourceAttachmentPath() != null) {
+ src = dec.getSourceAttachmentPath().toString();
+ }
+ buffer.append(" <source-attachment-path>"); //$NON-NLS-1$
+ buffer.append(src);
+ buffer.append("</source-attachment-path>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+
+ if (dec.getSourceAttachmentRootPath() != null) {
+ buffer.append(" <source-attachment-root-path>"); //$NON-NLS-1$
+ buffer.append(dec.getSourceAttachmentRootPath().toString());
+ buffer.append("</source-attachment-root-path>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ final IClasspathAttribute[] attrs = dec.getExtraAttributes();
+
+ for (int i = 0; i < attrs.length; i++) {
+ final IClasspathAttribute attr = attrs[i];
+
+ buffer.append(" <attribute name=\""); //$NON-NLS-1$
+ buffer.append(attr.getName());
+ buffer.append("\">"); //$NON-NLS-1$
+ buffer.append(attr.getValue());
+ buffer.append("</attribute>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append(" </entry>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append(" </container>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ }
+
+ buffer.append("</classpath>"); //$NON-NLS-1$
+ buffer.append(SEPARATOR);
+ IEclipsePreferences ep = getEclipsePreferences();
+ ep.put(CLASSPATH_PREFERENCES, buffer.toString());
+ try {
+ ep.flush();
+ } catch (BackingStoreException e) {
+ String msg = "Encountered an unexpected exception.";
+ ESBProjectCorePlugin.log(msg, e);
+ }
+ }
+
+ private HashMap read() {
+ final HashMap map = new HashMap();
+ String prefs = getPreferences();
+ if (prefs == null || prefs.length() <= 0)
+ return map;
+
+ Element root = null;
+ try {
+ final DocumentBuilderFactory factory = DocumentBuilderFactory
+ .newInstance();
+
+ final DocumentBuilder docbuilder = factory.newDocumentBuilder();
+
+ StringReader reader = new StringReader(prefs);
+ InputSource source = new InputSource(reader);
+ root = docbuilder.parse(source).getDocumentElement();
+ } catch (Exception e) {
+ String msg = "Encountered an unexpected exception.";
+ ESBProjectCorePlugin.log(msg, e);
+ return map;
+ }
+
+ for (Iterator itr1 = elements(root, "container"); itr1.hasNext();) //$NON-NLS-1$
+ {
+ final Element e1 = (Element) itr1.next();
+ final String cid = e1.getAttribute("id"); //$NON-NLS-1$
+
+ final HashMap submap = new HashMap();
+ map.put(cid, submap);
+
+ for (Iterator itr2 = elements(e1, "entry"); itr2.hasNext();) //$NON-NLS-1$
+ {
+ final Element e2 = (Element) itr2.next();
+ final String eid = e2.getAttribute("id"); //$NON-NLS-1$
+ final ClasspathDecorations dec = new ClasspathDecorations();
+
+ submap.put(eid, dec);
+
+ for (Iterator itr3 = elements(e2); itr3.hasNext();) {
+ final Element e3 = (Element) itr3.next();
+ final String n = e3.getNodeName();
+ String text = text(e3);
+ if (text != null) {
+ if (n.equals("source-attachment-path")) //$NON-NLS-1$
+ {
+ dec.setSourceAttachmentPath(new Path(text(e3)));
+ } else if (n.equals("source-attachment-root-path")) //$NON-NLS-1$
+ {
+ dec.setSourceAttachmentRootPath(new Path(text(e3)));
+ }
+ }
+ if (n.equals("attribute")) //$NON-NLS-1$
+ {
+ final String name = e3.getAttribute("name"); //$NON-NLS-1$
+ dec.addExtraAttribute(name, text(e3));
+ }
+
+ }
+ }
+ }
+
+ return map;
+ }
+
+ private static String text(final Element el) {
+ final NodeList nodes = el.getChildNodes();
+
+ String str = null;
+ StringBuffer buf = null;
+
+ for (int i = 0, n = nodes.getLength(); i < n; i++) {
+ final Node node = nodes.item(i);
+
+ if (node.getNodeType() == Node.TEXT_NODE) {
+ final String val = node.getNodeValue();
+
+ if (buf != null) {
+ buf.append(val);
+ } else if (str != null) {
+ buf = new StringBuffer();
+ buf.append(str);
+ buf.append(val);
+
+ str = null;
+ } else {
+ str = val;
+ }
+ }
+ }
+
+ if (buf != null) {
+ return buf.toString();
+ }
+ return str;
+ }
+
+ private static Iterator elements(final Element el, final String name) {
+ return new ElementsIterator(el, name);
+ }
+
+ private static Iterator elements(final Element el) {
+ return new ElementsIterator(el, null);
+ }
+
+ private static final class ElementsIterator implements Iterator {
+ private final NodeList nodes;
+ private final int length;
+ private final String name;
+ private int position;
+ private Element element;
+
+ public ElementsIterator(final Element parent, final String name) {
+ this.nodes = parent.getChildNodes();
+ this.length = nodes.getLength();
+ this.position = -1;
+ this.name = name;
+
+ advance();
+ }
+
+ private void advance() {
+ this.element = null;
+ this.position++;
+
+ for (; this.position < this.length && this.element == null; this.position++) {
+ final Node node = this.nodes.item(this.position);
+
+ if (node.getNodeType() == Node.ELEMENT_NODE
+ && (this.name == null || node.getNodeName().equals(
+ this.name))) {
+ this.element = (Element) node;
+ }
+ }
+ }
+
+ public boolean hasNext() {
+ return (this.element != null);
+ }
+
+ public Object next() {
+ final Element el = this.element;
+
+ if (el == null) {
+ throw new NoSuchElementException();
+ }
+
+ advance();
+
+ return el;
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ }
+
+}
15 years, 2 months
JBoss Tools SVN: r13591 - in trunk/esb/plugins: org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-12 02:22:33 -0500 (Thu, 12 Feb 2009)
New Revision: 13591
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/UninstallJBossClassPathCommand.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleArtifactAdapter.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectDecorator.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectPlugin.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/JBossESBFacetProjectCreationDataModelProvider.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
Log:
Headers on Denny's code. EPL
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectConstant.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core;
public class ESBProjectConstant {
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/ESBProjectCorePlugin.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core;
import org.eclipse.ui.plugin.AbstractUIPlugin;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/IJBossESBFacetDataModelProperties.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.facet;
import org.eclipse.core.runtime.QualifiedName;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetDataModelProvider.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.facet;
import java.util.Set;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/JBossESBFacetInstallationDelegate.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.facet;
import java.io.ByteArrayInputStream;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/UninstallJBossClassPathCommand.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/UninstallJBossClassPathCommand.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/facet/UninstallJBossClassPathCommand.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.facet;
import java.util.ArrayList;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModule.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.module;
import org.eclipse.core.resources.IProject;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleArtifactAdapter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleArtifactAdapter.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleArtifactAdapter.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.module;
import org.eclipse.core.resources.IProject;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.module;
import java.util.ArrayList;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.module;
import org.eclipse.core.resources.IProject;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeListConverter.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.core.runtime;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectDecorator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectDecorator.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectDecorator.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui;
import java.net.URL;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectPlugin.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectPlugin.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/ESBProjectPlugin.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui;
import org.eclipse.swt.graphics.Image;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/ESBProjectWizard.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards;
import java.lang.reflect.InvocationTargetException;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/JBossESBFacetProjectCreationDataModelProvider.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/JBossESBFacetProjectCreationDataModelProvider.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/JBossESBFacetProjectCreationDataModelProvider.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards;
import org.eclipse.core.runtime.IStatus;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.pages;
import java.util.ArrayList;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBProjectFirstPage.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.pages;
import org.eclipse.swt.SWT;
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-02-12 07:16:16 UTC (rev 13590)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-02-12 07:22:33 UTC (rev 13591)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.esb.project.ui.wizards.pages;
import java.util.ArrayList;
15 years, 2 months
JBoss Tools SVN: r13590 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core: ejb3 and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-12 02:16:16 -0500 (Thu, 12 Feb 2009)
New Revision: 13590
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
Log:
Re-Licensing as EPL. Yes this is ok. I wrote all the code except for Marshall but he wrote it when he was an employee and thus we own the copyright.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ClasspathConstants.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.classpath.core;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.ejb3;
import java.util.ArrayList;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/ejb3/EJB3ClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.ejb3;
import org.eclipse.core.runtime.CoreException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.jee;
import java.io.File;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/AbstractClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.jee;
import org.eclipse.core.runtime.CoreException;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.jee;
import org.eclipse.core.runtime.IPath;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * 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.ide.eclipse.as.classpath.core.jee;
import org.eclipse.core.runtime.IPath;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.jee;
import org.eclipse.core.runtime.IPath;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ClientAllRuntimeClasspathProvider.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.runtime;
import java.io.File;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/ProjectRuntimeClasspathProvider.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.runtime;
import java.util.Arrays;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/WebtoolsProjectJBossClasspathContainerInitializer.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,24 +1,14 @@
-/**
- * JBoss, a Division of Red Hat
- * Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
+/*******************************************************************************
+ * 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
*
-* This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
package org.jboss.ide.eclipse.as.classpath.core.runtime;
import java.util.ArrayList;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java 2009-02-12 04:52:35 UTC (rev 13589)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/xpl/ClasspathDecorationsManager.java 2009-02-12 07:16:16 UTC (rev 13590)
@@ -1,5 +1,3 @@
-package org.jboss.ide.eclipse.as.classpath.core.xpl;
-
/******************************************************************************
* Copyright (c) 2005 BEA Systems, Inc.
* All rights reserved. This program and the accompanying materials
@@ -10,6 +8,7 @@
* Contributors:
* Konstantin Komissarchik - initial API and implementation
******************************************************************************/
+package org.jboss.ide.eclipse.as.classpath.core.xpl;
import java.io.StringReader;
import java.util.HashMap;
15 years, 2 months
JBoss Tools SVN: r13589 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-02-11 23:52:35 -0500 (Wed, 11 Feb 2009)
New Revision: 13589
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
Log:
JBIDE-3770 - classpath issues
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-11 21:43:42 UTC (rev 13588)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/RunJarContainerWrapper.java 2009-02-12 04:52:35 UTC (rev 13589)
@@ -83,7 +83,7 @@
}
public String getDescription() {
- return "Test Desc";
+ return null;
}
public int getKind() {
15 years, 2 months
JBoss Tools SVN: r13588 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-02-11 16:43:42 -0500 (Wed, 11 Feb 2009)
New Revision: 13588
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
Log:
print resource name that is about to be deleted
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2009-02-11 21:03:51 UTC (rev 13587)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2009-02-11 21:43:42 UTC (rev 13588)
@@ -111,6 +111,7 @@
JobUtils.waitForIdle();
for (IResource r : this.resourcesToCleanup) {
try {
+ System.out.println("Deleting resource " + r.getLocation());
r.delete(true, null);
JobUtils.waitForIdle();
} catch(Exception e) {
15 years, 2 months
JBoss Tools SVN: r13587 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2009-02-11 16:03:51 -0500 (Wed, 11 Feb 2009)
New Revision: 13587
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
Log:
fix compilation errors under wtp 3.0.4
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2009-02-11 19:01:48 UTC (rev 13586)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/Seam2FacetInstallDelegateTest.java 2009-02-11 21:03:51 UTC (rev 13587)
@@ -22,8 +22,6 @@
import org.eclipse.core.resources.IResourceChangeEvent;
import org.eclipse.core.resources.IResourceProxy;
import org.eclipse.core.resources.IResourceProxyVisitor;
-import org.eclipse.core.resources.IResourceVisitor;
-import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -32,7 +30,6 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.validation.ValidationFramework;
import org.eclipse.wst.validation.internal.EventManager;
-import org.eclipse.wst.validation.internal.ValOperationManager;
import org.jboss.tools.common.model.XJob;
import org.jboss.tools.seam.core.SeamProjectsSet;
import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
@@ -60,7 +57,8 @@
ValidationFramework.getDefault().suspendAllValidation(true);
ws.removeResourceChangeListener( EventManager.getManager() );
- ws.removeResourceChangeListener( ValOperationManager.getDefault() );
+// commented to run tests on wtp 3.0.4 build
+// ws.removeResourceChangeListener( ValManager.getDefault() );
//EventManager.getManager().shutdown();
suspendXJobs = XJob.isSuspended();
@@ -95,8 +93,8 @@
ws.addResourceChangeListener(EventManager.getManager(),
IResourceChangeEvent.PRE_CLOSE | IResourceChangeEvent.PRE_DELETE |
IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD | IResourceChangeEvent.POST_CHANGE);
- ws.addResourceChangeListener(ValOperationManager.getDefault(),
- IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD);
+// ws.addResourceChangeListener(ValOperationManager.getDefault(),
+// IResourceChangeEvent.POST_BUILD | IResourceChangeEvent.PRE_BUILD);
}
15 years, 2 months
JBoss Tools SVN: r13586 - trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2009-02-11 14:01:48 -0500 (Wed, 11 Feb 2009)
New Revision: 13586
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3650, problems with selection from visual panel to source has been resolved
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2009-02-11 17:28:23 UTC (rev 13585)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/SelectionUtil.java 2009-02-11 19:01:48 UTC (rev 13586)
@@ -18,6 +18,7 @@
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
import org.eclipse.wst.sse.core.internal.provisional.IndexedRegion;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.eclipse.wst.xml.core.internal.document.TextImpl;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.mapping.VpeDomMapping;
import org.jboss.tools.vpe.editor.mapping.VpeNodeMapping;
@@ -208,9 +209,11 @@
Point sourceRange = new Point(0, 0);
// converts to source selection
if ((sourceNode != null) && (sourceNode.getNodeValue() != null)) {
- sourceRange.x = TextUtil.sourcePosition(sourceNode.getNodeValue(),
+ //fix for JBIDE-3650
+ TextImpl textImpl = (TextImpl) sourceNode;
+ sourceRange.x = TextUtil.sourcePosition(textImpl.getSource(),
focusedNode.getNodeValue(), selection.getFocusOffset());
- sourceRange.y = TextUtil.sourcePosition(sourceNode.getNodeValue(),
+ sourceRange.y = TextUtil.sourcePosition(textImpl.getSource(),
focusedNode.getNodeValue(), selection.getAnchorOffset())
- sourceRange.x;
}
Modified: trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2009-02-11 17:28:23 UTC (rev 13585)
+++ trunk/vpe/plugins/org.jboss.tools.vpe/src/org/jboss/tools/vpe/editor/util/TextUtil.java 2009-02-11 19:01:48 UTC (rev 13586)
@@ -29,7 +29,7 @@
textSet.put(new Character('&'),"&"); //$NON-NLS-1$
textSet.put(new Character('<'),"<"); //$NON-NLS-1$
textSet.put(new Character('>'),">"); //$NON-NLS-1$
-// textSet.put(new Character(' ')," ");
+ textSet.put(new Character('\u00A0')," "); //$NON-NLS-1$
textSet.put(new Character('\u00A1'),"¡"); //$NON-NLS-1$
textSet.put(new Character('\u00A2'),"¢"); //$NON-NLS-1$
textSet.put(new Character('\u00A3'),"£"); //$NON-NLS-1$
@@ -43,6 +43,7 @@
textSet.put(new Character('\u00AB'),"«"); //$NON-NLS-1$
textSet.put(new Character('\u00AC'),"¬"); //$NON-NLS-1$
//textSet.put(new Character('\u00AD'),"­");
+ textSet.put(new Character('\u2022'), "•"); //$NON-NLS-1$
textSet.put(new Character('\u00AE'),"®"); //$NON-NLS-1$
textSet.put(new Character('\u00AF'),"¯"); //$NON-NLS-1$
textSet.put(new Character('\u00B0'),"°"); //$NON-NLS-1$
@@ -135,6 +136,7 @@
}
public static boolean containsKey(char key){
+
return textSet.containsKey(new Character(key));
}
@@ -227,11 +229,9 @@
// }
// return s3.length()+(sourceIndex-visualIndex);
// }
-
public static int sourcePosition(String sourceText, String visualText, int visualPosition) {
int sourceIndex = 0;
int visualIndex = 0;
-
while (sourceIndex < sourceText.length() && visualIndex < visualPosition) {
char sourceChar = sourceText.charAt(sourceIndex);
if (sourceChar == '\r') {
15 years, 2 months
JBoss Tools SVN: r13585 - trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2009-02-11 12:28:23 -0500 (Wed, 11 Feb 2009)
New Revision: 13585
Modified:
trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_3.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3637 Fixed
Modified: trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_3.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_3.xml 2009-02-11 17:27:55 UTC (rev 13584)
+++ trunk/common/plugins/org.jboss.tools.common.kb/schemas/tld/Richfaces3_3.xml 2009-02-11 17:28:23 UTC (rev 13585)
@@ -8946,7 +8946,7 @@
<proposal type="jsfVariables"/>
<proposal type="enumeration">
<param value="Fade"/>
- <param value="BlindDown"/>
+ <param value="Blind"/>
<param value="BlindUp"/>
<param value="Opacity"/>
<param value="SwitchOff"/>
15 years, 2 months
JBoss Tools SVN: r13584 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dataTable.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2009-02-11 12:27:55 -0500 (Wed, 11 Feb 2009)
New Revision: 13584
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dataTable/dataTable.css
Log:
RESOLVED - issue JBIDE-3794: Text color of rich:dataTable shouldn't be applied for header of rich:colomn inside
https://jira.jboss.org/jira/browse/JBIDE-3794
- The style of the header has been adjusted
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dataTable/dataTable.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dataTable/dataTable.css 2009-02-11 17:02:20 UTC (rev 13583)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/dataTable/dataTable.css 2009-02-11 17:27:55 UTC (rev 13584)
@@ -61,7 +61,7 @@
padding: 4px 4px 4px 4px;
text-align: center;
font-size: 11px;
- font-color: #000000;
+ color: #000000;
font-family: Arial, Verdana, sans-serif;
}
15 years, 2 months
JBoss Tools SVN: r13583 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces: resources/panelMenuItem and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2009-02-11 12:02:20 -0500 (Wed, 11 Feb 2009)
New Revision: 13583
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronUp.gif
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3740, new icons, subgpoups and subicons icon positions were updated, disabled functionality was added, top items position was updated.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronDown.gif
===================================================================
(Binary files differ)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/chevronUp.gif
===================================================================
(Binary files differ)
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2009-02-11 16:11:54 UTC (rev 13582)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuGroup/style.css 2009-02-11 17:02:20 UTC (rev 13583)
@@ -1,7 +1,5 @@
.rich-pmenu-group{
- /*padding: 0px;
- height: 20px;
- width: 100%;*/
+
}
.rich-pmenu-group-icon {
width: 16;
@@ -12,36 +10,46 @@
}
.dr-pmenu-top-group-div, .dr-pmenu-group-div {
- border:1px solid #C4C0B9;
- margin-bottom:3px;
overflow:hidden;
padding:1px;
width:100%;
cursor: pointer;
}
-.dr-pmenu-top-group, .dr-pmenu-group {
- background-color: #D4CFC7;
+.dr-pmenu-top-group-div {
+ border:1px solid #C4C0B9;
+ margin-bottom:3px;
+}
+
+.dr-pmenu-group {
+ border-top: 1px solid;
+ border-top-color: #C4C0B9;
font-family: Arial, Verdana, sans-serif;
font-size: 11px;
font-weight: bold;
- background-position: left top;
- background-repeat: repeat-x;
cursor: pointer;
- height: 20px;
- adding:2px 1px 2px 2px;
+ padding:2px 1px 2px 2px;
}
.dr-pmenu-top-group {
+ background-color: #D4CFC7;
background-image: url(topGroupBkgImg.png);
+ background-position: left top;
+ background-repeat: repeat-x;
+ height: 20px;
+ font-family: Arial, Verdana, sans-serif;
+ font-size: 11px;
+ font-weight: bold;
+ cursor: pointer;
+ padding:2px 1px 2px 2px;
}
.rich-pmenu-top-group-self-label, .rich-pmenu-group-self-label {
- padding-left: 5px;
+ /*padding-left: 5px;
width: 100%;
font-family: Arial, Verdana, sans-serif;
font-size: 11px;
- font-weight: bold;
+ font-weight: bold;*/
}
.rich-pmenu-disabled-element {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2009-02-11 16:11:54 UTC (rev 13582)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/resources/panelMenuItem/style.css 2009-02-11 17:02:20 UTC (rev 13583)
@@ -1,5 +1,4 @@
.rich-pmenu-item-label, .rich-pmenu-top-item-label {
- font-size: 11px;
padding-left: 5px;
width: 100%;
}
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 2009-02-11 16:11:54 UTC (rev 13582)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuGroupTemplate.java 2009-02-11 17:02:20 UTC (rev 13583)
@@ -18,6 +18,7 @@
import java.util.Map;
import org.jboss.tools.jsf.vpe.richfaces.ComponentUtil;
+import org.jboss.tools.jsf.vpe.richfaces.template.RichFacesFileUploadTemplate.StyleClasses;
import org.jboss.tools.jsf.vpe.richfaces.template.util.RichFaces;
import org.jboss.tools.vpe.editor.VpeSourceDomBuilder;
import org.jboss.tools.vpe.editor.VpeVisualDomBuilder;
@@ -48,7 +49,6 @@
/*
* 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_CLASS = "iconClass"; //$NON-NLS-1$
@@ -95,46 +95,6 @@
private static final String WIDTH_100_PERSENTS = "width: 100%; "; //$NON-NLS-1$
private static final String DEFAULT_SIZE_VALUE = "16"; //$NON-NLS-1$
- /*
- * rich:panelMenu attributes for groups
- */
- private String pm_iconGroupPosition;
- private String pm_iconGroupTopPosition;
- private String pm_iconCollapsedGroup;
- private String pm_iconCollapsedTopGroup;
- private String pm_iconExpandedGroup;
- private String pm_iconExpandedTopGroup;
- private String pm_iconDisableGroup;
- private String pm_iconTopDisableGroup;
- private String pm_expandSingle;
-
- /*
- * rich:panelMenu style classes for groups
- */
- private String pm_disabled;
- private String pm_disabledGroupClass;
- private String pm_disabledGroupStyle;
- private String pm_topGroupClass;
- private String pm_topGroupStyle;
- private String pm_groupClass;
- private String pm_groupStyle;
- private String pm_style;
- private String pm_styleClass;
-
- /*
- * pich:panelMenuGroup attributes
- */
- private String pmg_disabledStyle;
- private String pmg_disabledClass;
- private String pmg_disabled;
- private String pmg_iconClass;
- private String pmg_iconStyle;
- private String pmg_iconExpanded;
- private String pmg_iconCollapsed;
- private String pmg_iconDisabled;
- private String pmg_style;
- private String pmg_styleClass;
-
private List<String> expandedIds = new ArrayList<String>();
static {
@@ -152,34 +112,18 @@
@SuppressWarnings("unchecked")
public VpeCreationData create(VpePageContext pageContext, Node sourceNode,
nsIDOMDocument visualDocument) {
-
Element groupSourceElement = (Element) sourceNode;
- Element srcNode = null;
+ expandedIds = (List<String>) groupSourceElement.getUserData(VPE_EXPANDED_TOGGLE_IDS);
+ String childId = (String) groupSourceElement.getUserData(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID);
-// if ((groupSourceElement.getUserData(VpeVisualDomBuilder.SRC_NODE) != null)
-// && (groupSourceElement.getUserData(VpeVisualDomBuilder.SRC_NODE) instanceof Element)) {
-// srcNode = (Element) groupSourceElement.getUserData(VpeVisualDomBuilder.SRC_NODE);
-// }
-// nsIDOMElement creationDataDiv = visualDocument
-// .createElement(HTML.TAG_DIV);
-// VpeCreationData creationData = new VpeCreationData(creationDataDiv);
- //added by estherbin fixed https://jira.jboss.org/jira/browse/JBIDE-1605 issue.
- final Element elementToPass = (srcNode != null ? srcNode : groupSourceElement);
-
- expandedIds = (List<String>) elementToPass.getUserData(VPE_EXPANDED_TOGGLE_IDS);
- String childId = (String) elementToPass.getUserData(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID);
-
/*
* Counts child groups in a parent group
*/
int childGroupCount = 1;
-
- Element anySuitableParent = getGroupParent(elementToPass, false);
- Element panelMenuParent = getGroupParent(elementToPass, true);
-
- readPanelMenuGroupAttributes(groupSourceElement);
- readPanelMenuAttributes(panelMenuParent);
+ Element anySuitableParent = getGroupParent(groupSourceElement, false);
+ Element panelMenuParent = getGroupParent(groupSourceElement, true);
+ final Attributes attrs = new Attributes(groupSourceElement, panelMenuParent);
ComponentUtil.setCSSLink(pageContext, STYLE_PATH, NAME_COMPONENT);
boolean expanded = false;
@@ -189,12 +133,11 @@
nsIDOMElement div = visualDocument
.createElement(HTML.TAG_DIV);
VpeCreationData creationData = new VpeCreationData(div);
-// creationDataDiv.appendChild(div);
div.setAttribute(COMPONENT_ATTR_VPE_SUPPORT, NAME_COMPONENT);
div.setAttribute(VpeVisualDomBuilder.VPE_USER_TOGGLE_ID, childId);
buildTable(pageContext, anySuitableParent, groupSourceElement,
- visualDocument, div, expanded, childId);
+ visualDocument, div, expanded, childId, attrs);
nsIDOMElement childSpan = visualDocument
.createElement(HTML.TAG_SPAN);
@@ -240,7 +183,7 @@
private void buildTable(VpePageContext pageContext,
Element anySuitableParent, Element groupSourceElement,
nsIDOMDocument visualDocument, nsIDOMElement div,
- boolean expanded, String activeChildId) {
+ boolean expanded, String activeChildId, Attributes attrs) {
String tableStyle = Constants.EMPTY;
String tableClass = Constants.EMPTY;
String iconCellClass = Constants.EMPTY;
@@ -348,8 +291,8 @@
*/
nsIDOMElement iconCell = column1;
nsIDOMElement emptyCell = column3;
- if (ComponentUtil.isNotBlank(pm_iconGroupPosition)) {
- if (RIGHT.equalsIgnoreCase(pm_iconGroupPosition)) {
+ if (!childOfPanelMenu && ComponentUtil.isNotBlank(attrs.getPm_iconGroupPosition())) {
+ if (RIGHT.equalsIgnoreCase(attrs.getPm_iconGroupPosition())) {
/*
* Set icon image on the right
*/
@@ -357,14 +300,14 @@
emptyCell = column1;
}
}
- if (childOfPanelMenu && ComponentUtil.isNotBlank(pm_iconGroupTopPosition)) {
- if (RIGHT.equalsIgnoreCase(pm_iconGroupTopPosition)) {
+ if (childOfPanelMenu && ComponentUtil.isNotBlank(attrs.getPm_iconGroupTopPosition())) {
+ if (RIGHT.equalsIgnoreCase(attrs.getPm_iconGroupTopPosition())) {
/*
* Set icon image on the right
*/
iconCell = column3;
emptyCell = column1;
- } else if (LEFT.equalsIgnoreCase(pm_iconGroupTopPosition)) {
+ } else if (LEFT.equalsIgnoreCase(attrs.getPm_iconGroupTopPosition())) {
iconCell = column1;
emptyCell = column3;
}
@@ -382,7 +325,7 @@
emptyCell.appendChild(imgSpacer);
setIcon(pageContext, anySuitableParent, groupSourceElement,
- imgIcon, expanded);
+ imgIcon, expanded, attrs);
/*
* Group Style Classes Routine
@@ -399,49 +342,49 @@
divClass += Constants.WHITE_SPACE + CSS_DR_GROUP_DIV;
}
- if (TRUE.equalsIgnoreCase(pm_disabled)) {
+ if (TRUE.equalsIgnoreCase(attrs.getPm_disabled())) {
if (childOfPanelMenu) {
tableClass += Constants.WHITE_SPACE + CSS_DISABLED_ELEMENT;
- if (ComponentUtil.isNotBlank(pm_disabledGroupClass)) {
- tableClass += Constants.WHITE_SPACE + pm_disabledGroupClass;
+ if (ComponentUtil.isNotBlank(attrs.getPm_disabledGroupClass())) {
+ tableClass += Constants.WHITE_SPACE + attrs.getPm_disabledGroupClass();
}
- if (ComponentUtil.isNotBlank(pm_topGroupStyle)) {
- tableStyle += Constants.WHITE_SPACE + pm_topGroupStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPm_topGroupStyle())) {
+ tableStyle += Constants.WHITE_SPACE + attrs.getPm_topGroupStyle();
}
}
}
- if ((TRUE.equalsIgnoreCase(pmg_disabled))) {
- if (!(TRUE.equalsIgnoreCase(pm_disabled))) {
+ if ((TRUE.equalsIgnoreCase(attrs.getPmg_disabled()))) {
+ if (!(TRUE.equalsIgnoreCase(attrs.getPm_disabled()))) {
tableClass += Constants.WHITE_SPACE + CSS_DISABLED_ELEMENT;
- if (ComponentUtil.isNotBlank(pm_disabledGroupClass)){
- tableClass += Constants.WHITE_SPACE + pm_disabledGroupClass;
+ if (ComponentUtil.isNotBlank(attrs.getPm_disabledGroupClass())){
+ tableClass += Constants.WHITE_SPACE + attrs.getPm_disabledGroupClass();
}
}
- if (ComponentUtil.isNotBlank(pmg_disabledClass)) {
- tableClass += Constants.WHITE_SPACE + pmg_disabledClass;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_disabledClass())) {
+ tableClass += Constants.WHITE_SPACE + attrs.getPmg_disabledClass();
}
- if (ComponentUtil.isNotBlank(pm_disabledGroupStyle)) {
- tableStyle += Constants.WHITE_SPACE + pm_disabledGroupStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPm_disabledGroupStyle())) {
+ tableStyle += Constants.WHITE_SPACE + attrs.getPm_disabledGroupStyle();
}
- if (ComponentUtil.isNotBlank(pmg_disabledStyle)) {
- tableStyle += Constants.WHITE_SPACE + pmg_disabledStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_disabledStyle())) {
+ tableStyle += Constants.WHITE_SPACE + attrs.getPmg_disabledStyle();
}
}
- if (!(TRUE.equalsIgnoreCase(pm_disabled))
- && (!(TRUE.equalsIgnoreCase(pmg_disabled)))) {
+ if (!(TRUE.equalsIgnoreCase(attrs.getPm_disabled()))
+ && (!(TRUE.equalsIgnoreCase(attrs.getPmg_disabled())))) {
tableClass = Constants.WHITE_SPACE + CSS_DR_GROUP + Constants.WHITE_SPACE + CSS_GROUP;
iconCellClass = Constants.WHITE_SPACE + CSS_GROUP_ICON;
labelCellClass += Constants.WHITE_SPACE + CSS_GROUP_LABEL;
emptyCellClass += Constants.WHITE_SPACE + CSS_GROUP_ICON;
- if (ComponentUtil.isNotBlank(pmg_iconClass)) {
- iconCellClass += Constants.WHITE_SPACE + pmg_iconClass;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_iconClass())) {
+ iconCellClass += Constants.WHITE_SPACE + attrs.getPmg_iconClass();
}
- if (ComponentUtil.isNotBlank(pmg_iconStyle)) {
- iconCellStyle += Constants.WHITE_SPACE + pmg_iconStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_iconStyle())) {
+ iconCellStyle += Constants.WHITE_SPACE + attrs.getPmg_iconStyle();
}
if (childOfPanelMenu) {
@@ -449,33 +392,33 @@
iconCellClass = Constants.WHITE_SPACE + CSS_GROUP_ICON + Constants.WHITE_SPACE + CSS_TOP_GROUP_ICON;
labelCellClass = Constants.WHITE_SPACE + CSS_TOP_GROUP_LABEL;
emptyCellClass = Constants.WHITE_SPACE + CSS_TOP_GROUP_ICON;
- if (ComponentUtil.isNotBlank(pm_topGroupClass)) {
- tableClass += Constants.WHITE_SPACE + pm_topGroupClass;
+ if (ComponentUtil.isNotBlank(attrs.getPm_topGroupClass())){
+ tableClass += Constants.WHITE_SPACE + attrs.getPm_topGroupClass();
}
- if (ComponentUtil.isNotBlank(pm_topGroupStyle)) {
- tableStyle += pm_topGroupStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPm_topGroupStyle())) {
+ tableStyle += attrs.getPm_topGroupStyle();
}
- if (ComponentUtil.isNotBlank(pmg_iconClass)) {
- iconCellClass += Constants.WHITE_SPACE + pmg_iconClass;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_iconClass())) {
+ iconCellClass += Constants.WHITE_SPACE + attrs.getPmg_iconClass();
}
- if (ComponentUtil.isNotBlank(pmg_iconStyle)) {
- iconCellStyle += Constants.WHITE_SPACE + pmg_iconStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_iconStyle())) {
+ iconCellStyle += Constants.WHITE_SPACE + attrs.getPmg_iconStyle();
}
} else {
- if (ComponentUtil.isNotBlank(pm_groupClass)) {
- tableClass += Constants.WHITE_SPACE + pm_groupClass;
+ if (ComponentUtil.isNotBlank(attrs.getPm_groupClass())) {
+ tableClass += Constants.WHITE_SPACE + attrs.getPm_groupClass();
}
- if (ComponentUtil.isNotBlank(pm_groupStyle)) {
- tableStyle += Constants.WHITE_SPACE + pm_groupStyle;
+ if (ComponentUtil.isNotBlank(attrs.getPm_groupStyle())) {
+ tableStyle += Constants.WHITE_SPACE + attrs.getPm_groupStyle();
}
}
}
- if (ComponentUtil.isNotBlank(pmg_styleClass)) {
- tableClass += Constants.WHITE_SPACE + pmg_styleClass;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_styleClass())) {
+ tableClass += Constants.WHITE_SPACE + attrs.getPmg_styleClass();
}
- if (ComponentUtil.isNotBlank(pmg_style)) {
- tableStyle += Constants.WHITE_SPACE + pmg_style;
+ if (ComponentUtil.isNotBlank(attrs.getPmg_style())) {
+ tableStyle += Constants.WHITE_SPACE + attrs.getPmg_style();
}
iconCell.setAttribute(HTML.ATTR_CLASS, iconCellClass);
@@ -536,26 +479,26 @@
}
private void setIcon(VpePageContext pageContext, Node anySuitableParent,
- Element groupSourceElement, nsIDOMElement imgIcon, boolean expanded) {
- String pathIconExpanded = pmg_iconExpanded;
- String pathIconCollapsed = pmg_iconCollapsed;
- String pathIconDisabled = pmg_iconDisabled;
+ Element groupSourceElement, nsIDOMElement imgIcon, boolean expanded, Attributes attrs) {
+ String pathIconExpanded = attrs.getPmg_iconExpanded();
+ String pathIconCollapsed = attrs.getPmg_iconCollapsed();
+ String pathIconDisabled = attrs.getPmg_iconDisabled();
if ((anySuitableParent != null)
&& (anySuitableParent.getNodeName()
.endsWith(PANEL_MENU_END_TAG))) {
if (pathIconExpanded == null) {
- pathIconExpanded = pm_iconExpandedTopGroup;
+ pathIconExpanded = attrs.getPm_iconExpandedTopGroup();
}
if (pathIconCollapsed == null) {
- pathIconCollapsed = pm_iconCollapsedTopGroup;
+ pathIconCollapsed = attrs.getPm_iconCollapsedTopGroup();
}
if (pathIconDisabled == null) {
- pathIconDisabled = pm_iconTopDisableGroup;
+ pathIconDisabled = attrs.getPm_iconTopDisableGroup();
}
}
- if (TRUE.equalsIgnoreCase(pmg_disabled)) {
+ if (TRUE.equalsIgnoreCase(attrs.getPmg_disabled())) {
if (ComponentUtil.isNotBlank(pathIconDisabled)) {
if (DEFAULT_ICON_MAP.containsKey(pathIconDisabled)) {
pathIconDisabled = DEFAULT_ICON_MAP.get(pathIconDisabled);
@@ -604,93 +547,27 @@
}
}
- /**
- * Read attributes from the source element.
- *
- * @param sourceNode the source node
- */
- private 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);
- pm_expandSingle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.EXPAND_SINGLE);
-
- /*
- * rich:panelMenu style classes for groups
- */
- pm_disabled = sourceParentElement.getAttribute(HTML.ATTR_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(RichFaces.ATTR_STYLE);
- pm_styleClass = sourceParentElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
- }
-
- /**
- * Read attributes from the source element.
- *
- * @param sourceNode the source node
- */
- private 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_iconClass = sourceElement.getAttribute(ICON_CLASS);
- pmg_iconStyle = sourceElement.getAttribute(ICON_STYLE);
- pmg_iconExpanded = sourceElement.getAttribute(ICON_EXPANDED);
- pmg_iconCollapsed = sourceElement.getAttribute(ICON_COLLAPSED);
- pmg_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
- pmg_style = sourceElement.getAttribute(STYLE);
- pmg_styleClass = sourceElement.getAttribute(STYLE_CLASS);
- }
-
/* (non-Javadoc)
* @see org.jboss.tools.vpe.editor.template.VpeToggableTemplate#toggle(org.jboss.tools.vpe.editor.VpeVisualDomBuilder, org.w3c.dom.Node, java.lang.String)
*/
@SuppressWarnings("unchecked")
public void toggle(VpeVisualDomBuilder builder, Node sourceNode,
String toggleId) {
- if ((null != sourceNode) && (sourceNode instanceof Element)) {
- Element sourceElement = (Element) sourceNode;
- pmg_disabled = sourceElement.getAttribute(DISABLED);
- Element panelMenu = getGroupParent(sourceElement, true);
- if (null != panelMenu) {
- pm_disabled = panelMenu.getAttribute(DISABLED);
- pm_expandSingle = panelMenu.getAttribute(RichFacesPanelMenuTemplate.EXPAND_SINGLE);
- }
- }
+
+ Element groupSourceElement = (Element) sourceNode;
+ Element panelMenuParent = getGroupParent(groupSourceElement, true);
+
+ String pmg_disabled = groupSourceElement.getAttribute(HTML.ATTR_DISABLED);
+ String pm_disabled = panelMenuParent.getAttribute(HTML.ATTR_DISABLED);
+ String pm_expandSingle = panelMenuParent.getAttribute(RichFacesPanelMenuTemplate.EXPAND_SINGLE);
/*
* Do nothing when panel menu or panel group are disabled.
*/
-// if ((TRUE.equalsIgnoreCase(pm_disabled))
-// || (TRUE.equalsIgnoreCase(pmg_disabled))) {
-// return;
-// }
+ if ((TRUE.equalsIgnoreCase(pm_disabled))
+ || (TRUE.equalsIgnoreCase(pmg_disabled))) {
+ return;
+ }
expandedIds = (List<String>) sourceNode.getUserData(VPE_EXPANDED_TOGGLE_IDS);
if (null == expandedIds) {
@@ -788,4 +665,230 @@
VpeSourceDomBuilder sourceBuilder = pageContext.getSourceBuilder();
sourceBuilder.setSelection(sourceElement, 0, 0);
}
+
+ class Attributes {
+
+ /*
+ * rich:panelMenu attributes for groups
+ */
+ private String pm_iconGroupPosition;
+ private String pm_iconGroupTopPosition;
+ private String pm_iconCollapsedGroup;
+ private String pm_iconCollapsedTopGroup;
+ private String pm_iconExpandedGroup;
+ private String pm_iconExpandedTopGroup;
+ private String pm_iconDisableGroup;
+ private String pm_iconTopDisableGroup;
+ private String pm_expandSingle;
+
+ /*
+ * rich:panelMenu style classes for groups
+ */
+ private String pm_disabled;
+ private String pm_disabledGroupClass;
+ private String pm_disabledGroupStyle;
+ private String pm_topGroupClass;
+ private String pm_topGroupStyle;
+ private String pm_groupClass;
+ private String pm_groupStyle;
+ private String pm_style;
+ private String pm_styleClass;
+
+ /*
+ * pich:panelMenuGroup attributes
+ */
+ private String pmg_disabledStyle;
+ private String pmg_disabledClass;
+ private String pmg_disabled;
+ private String pmg_iconClass;
+ private String pmg_iconStyle;
+ private String pmg_iconExpanded;
+ private String pmg_iconCollapsed;
+ private String pmg_iconDisabled;
+ private String pmg_style;
+ private String pmg_styleClass;
+
+ public Attributes(final Element panelGroupElement, final Element panelMenuElement) {
+ readPanelMenuGroupAttributes(panelGroupElement);
+ readPanelMenuAttributes(panelMenuElement);
+
+ }
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private 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);
+ pm_expandSingle = sourceParentElement.getAttribute(RichFacesPanelMenuTemplate.EXPAND_SINGLE);
+
+ /*
+ * rich:panelMenu style classes for groups
+ */
+ pm_disabled = sourceParentElement.getAttribute(HTML.ATTR_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(RichFaces.ATTR_STYLE);
+ pm_styleClass = sourceParentElement.getAttribute(RichFaces.ATTR_STYLE_CLASS);
+ }
+
+ /**
+ * Read attributes from the source element.
+ *
+ * @param sourceNode the source node
+ */
+ private 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(HTML.ATTR_DISABLED);
+ pmg_iconClass = sourceElement.getAttribute(ICON_CLASS);
+ pmg_iconStyle = sourceElement.getAttribute(ICON_STYLE);
+ pmg_iconExpanded = sourceElement.getAttribute(ICON_EXPANDED);
+ pmg_iconCollapsed = sourceElement.getAttribute(ICON_COLLAPSED);
+ pmg_iconDisabled = sourceElement.getAttribute(ICON_DISABLED);
+ pmg_style = sourceElement.getAttribute(STYLE);
+ pmg_styleClass = sourceElement.getAttribute(STYLE_CLASS);
+ }
+
+ public String getPm_iconGroupPosition() {
+ return pm_iconGroupPosition;
+ }
+
+ public String getPm_iconGroupTopPosition() {
+ return pm_iconGroupTopPosition;
+ }
+
+ public String getPm_iconCollapsedGroup() {
+ return pm_iconCollapsedGroup;
+ }
+
+ public String getPm_iconCollapsedTopGroup() {
+ return pm_iconCollapsedTopGroup;
+ }
+
+ public String getPm_iconExpandedGroup() {
+ return pm_iconExpandedGroup;
+ }
+
+ public String getPm_iconExpandedTopGroup() {
+ return pm_iconExpandedTopGroup;
+ }
+
+ public String getPm_iconDisableGroup() {
+ return pm_iconDisableGroup;
+ }
+
+ public String getPm_iconTopDisableGroup() {
+ return pm_iconTopDisableGroup;
+ }
+
+ public String getPm_expandSingle() {
+ return pm_expandSingle;
+ }
+
+ public String getPm_disabled() {
+ return pm_disabled;
+ }
+
+ public String getPm_disabledGroupClass() {
+ return pm_disabledGroupClass;
+ }
+
+ public String getPm_disabledGroupStyle() {
+ return pm_disabledGroupStyle;
+ }
+
+ public String getPm_topGroupClass() {
+ return pm_topGroupClass;
+ }
+
+ public String getPm_topGroupStyle() {
+ return pm_topGroupStyle;
+ }
+
+ public String getPm_groupClass() {
+ return pm_groupClass;
+ }
+
+ public String getPm_groupStyle() {
+ return pm_groupStyle;
+ }
+
+ public String getPm_style() {
+ return pm_style;
+ }
+
+ public String getPm_styleClass() {
+ return pm_styleClass;
+ }
+
+ public String getPmg_disabledStyle() {
+ return pmg_disabledStyle;
+ }
+
+ public String getPmg_disabledClass() {
+ return pmg_disabledClass;
+ }
+
+ public String getPmg_disabled() {
+ return pmg_disabled;
+ }
+
+ public String getPmg_iconClass() {
+ return pmg_iconClass;
+ }
+
+ public String getPmg_iconStyle() {
+ return pmg_iconStyle;
+ }
+
+ public String getPmg_iconExpanded() {
+ return pmg_iconExpanded;
+ }
+
+ public String getPmg_iconCollapsed() {
+ return pmg_iconCollapsed;
+ }
+
+ public String getPmg_iconDisabled() {
+ return pmg_iconDisabled;
+ }
+
+ public String getPmg_style() {
+ return pmg_style;
+ }
+
+ public String getPmg_styleClass() {
+ return pmg_styleClass;
+ }
+
+ }
}
\ 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 2009-02-11 16:11:54 UTC (rev 13582)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesPanelMenuItemTemplate.java 2009-02-11 17:02:20 UTC (rev 13583)
@@ -277,7 +277,7 @@
nsIDOMElement iconCell = tdNowrapLeft;
nsIDOMElement emptyCell = tdRight;
- if (ComponentUtil.isNotBlank(pm_iconItemPosition)) {
+ if (!childOfPanelMenu && ComponentUtil.isNotBlank(pm_iconItemPosition)) {
if (RIGHT.equalsIgnoreCase(pm_iconItemPosition)) {
/*
* Set icon image on the right
15 years, 2 months