You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shale.apache.org by gv...@apache.org on 2007/07/23 19:51:18 UTC
svn commit: r558812 [1/4] - in /shale/sandbox/shale-eclipse-plugins: ./
plugins/ plugins/shale_clay_plugin_for_eclipse/
plugins/shale_clay_plugin_for_eclipse/META-INF/
plugins/shale_clay_plugin_for_eclipse/icons/
plugins/shale_clay_plugin_for_eclipse/l...
Author: gvanmatre
Date: Mon Jul 23 10:51:09 2007
New Revision: 558812
URL: http://svn.apache.org/viewvc?view=rev&rev=558812
Log:
This commit constitutes the shale clay plugin for eclipse donated by Ryan Wynn (SHALE-444).
I've restructured the project in order to use maven to build the eclipse plugin. The maven build is not currently working. In addition, I checked in the eclipse plugin's build dependencies. These will need to be removed after finding a way to allow maven to manage.
Added:
shale/sandbox/shale-eclipse-plugins/
shale/sandbox/shale-eclipse-plugins/plugins/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/Thumbs.db (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/clay.gif (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/README.txt
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-beanutils-1.7.0.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-collections-3.1.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-digester-1.8.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-logging-1.1.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/servlet-api-2.4.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-clay-1.1.0-SNAPSHOT.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-core-1.1.0-SNAPSHOT.jar (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDropTargetListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ComponentBeanDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ComponentsLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ConverterLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/DropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ValidatorLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ValueChangeListenerLabelDropHandler.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/ClayMultipageEditor.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/ComponentEditedListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/VisualEditorContentProvider.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/VisualEditorEditorPart.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/editor/VisualEditorViewer.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/ext/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/ext/ComponentConfigBeanExt.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/FacesConfigModel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/FacesConfigParser.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/FacesManagedBeanDialog.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/ManagedBean.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/ManagedBeanIntrospector.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/faces/ManagedBeanProperty.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/general/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/general/GeneralMetadataComponent.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/jobs/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/jobs/ClayJobChangeListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/jobs/ClaySearchJob.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/jobs/EditorListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ActionListenersLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/BaseLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ChildrenLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ComponentsLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ConverterLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ILabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ValidatorLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/labels/ValueChangeListenersLabel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/metapane/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/metapane/MetaPaneComponent.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/model/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/model/ClayXMLModel.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/SymbolsMetadataCellModifier.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/SymbolsMetadataComponent.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/SymbolsMetadataLabelProvider.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/SymbolsMetadataList.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/symbols/SymbolsMetadataViewer.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/AbstractXMLVisitor.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/ArrayUtils.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/ClayResourceDeltaVisitor.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/ClayXMLResourceChangeListener.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/ClayXMLVisitor.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/CloneUtil.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/FacesConfigVisitor.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/JarUtils.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/PaletteDrawers.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/util/StringUtils.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/wizard/
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/wizard/ClayConfigNewWizard.java (with props)
shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/wizard/ClayConfigNewWizardPage.java (with props)
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath Mon Jul 23 10:51:09 2007
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.classpath
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project Mon Jul 23 10:51:09 2007
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>shale_clay_plugin</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.ibm.etools.common.migration.MigrationBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/.project
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF Mon Jul 23 10:51:09 2007
@@ -0,0 +1,113 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Shale Clay Plugin for Eclipse
+Bundle-SymbolicName: org.apache.shale.shale_clay_plugin;singleton:=true
+Bundle-Version: 1.0.0
+Bundle-Activator: clay_plugin.Activator
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.jdt,
+ org.eclipse.ui.editors,
+ org.eclipse.ui.browser,
+ org.eclipse.ui.cheatsheets,
+ org.eclipse.ui.console,
+ org.eclipse.ui.externaltools,
+ org.eclipse.ui.forms,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.intro,
+ org.eclipse.ui.intro.universal,
+ org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator.resources,
+ org.eclipse.ui.presentations.r21,
+ org.eclipse.ui.views,
+ org.eclipse.ui.views.properties.tabbed,
+ org.eclipse.ui.workbench.texteditor,
+ org.eclipse.core.resources,
+ org.eclipse.jface.text,
+ org.eclipse.jdt.apt.core,
+ org.eclipse.jdt.apt.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.jdt.core.manipulation,
+ org.eclipse.jdt.debug,
+ org.eclipse.jdt.debug.ui,
+ org.eclipse.jdt.doc.user,
+ org.eclipse.jdt.junit,
+ org.eclipse.jdt.junit.runtime,
+ org.eclipse.jdt.junit4.runtime,
+ org.eclipse.jdt.launching,
+ org.eclipse.jdt.ui,
+ org.eclipse.gef,
+ org.apache.xerces
+Eclipse-LazyStart: true
+Bundle-ClassPath: .,
+ lib/commons-beanutils-1.7.0.jar,
+ lib/commons-collections-3.1.jar,
+ lib/commons-digester-1.8.jar,
+ lib/commons-logging-1.1.jar,
+ lib/shale-clay-1.1.0-SNAPSHOT.jar,
+ lib/shale-core-1.1.0-SNAPSHOT.jar,
+ lib/servlet-api-2.4.jar
+Export-Package: META-INF,
+ META-INF.maven.org.apache.shale.shale-clay,
+ META-INF.maven.org.apache.shale.shale-core,
+ clay_plugin,
+ clay_plugin.attributes,
+ clay_plugin.cassist,
+ clay_plugin.dnd,
+ clay_plugin.editor,
+ clay_plugin.ext,
+ clay_plugin.faces,
+ clay_plugin.general,
+ clay_plugin.jobs,
+ clay_plugin.labels,
+ clay_plugin.metapane,
+ clay_plugin.model,
+ clay_plugin.symbols,
+ clay_plugin.util,
+ clay_plugin.wizard,
+ javax.servlet,
+ javax.servlet.http,
+ javax.servlet.resources,
+ org.apache.commons.beanutils,
+ org.apache.commons.beanutils.converters,
+ org.apache.commons.beanutils.locale,
+ org.apache.commons.beanutils.locale.converters,
+ org.apache.commons.collections,
+ org.apache.commons.collections.bag,
+ org.apache.commons.collections.bidimap,
+ org.apache.commons.collections.buffer,
+ org.apache.commons.collections.collection,
+ org.apache.commons.collections.comparators,
+ org.apache.commons.collections.functors,
+ org.apache.commons.collections.iterators,
+ org.apache.commons.collections.keyvalue,
+ org.apache.commons.collections.list,
+ org.apache.commons.collections.map,
+ org.apache.commons.collections.set,
+ org.apache.commons.digester,
+ org.apache.commons.digester.parser,
+ org.apache.commons.digester.plugins,
+ org.apache.commons.digester.plugins.strategies,
+ org.apache.commons.digester.substitution,
+ org.apache.commons.digester.xmlrules,
+ org.apache.commons.logging,
+ org.apache.commons.logging.impl,
+ org.apache.shale.clay,
+ org.apache.shale.clay.component,
+ org.apache.shale.clay.component.chain,
+ org.apache.shale.clay.config,
+ org.apache.shale.clay.config.beans,
+ org.apache.shale.clay.convert,
+ org.apache.shale.clay.faces,
+ org.apache.shale.clay.parser,
+ org.apache.shale.clay.parser.builder,
+ org.apache.shale.clay.parser.builder.chain,
+ org.apache.shale.clay.taglib,
+ org.apache.shale.clay.utils,
+ org.apache.shale.component,
+ org.apache.shale.faces,
+ org.apache.shale.renderer,
+ org.apache.shale.resources,
+ org.apache.shale.taglib,
+ org.apache.shale.util
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/META-INF/MANIFEST.MF
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties Mon Jul 23 10:51:09 2007
@@ -0,0 +1,19 @@
+source.. = src/main/java/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ lib/commons-beanutils-1.7.0.jar,\
+ lib/commons-collections-3.1.jar,\
+ lib/commons-digester-1.8.jar,\
+ lib/commons-logging-1.1.jar,\
+ lib/shale-clay-1.1.0-SNAPSHOT.jar,\
+ lib/shale-core-1.1.0-SNAPSHOT.jar,\
+ lib/servlet-api-2.4.jar
+jars.extra.classpath = lib/commons-beanutils-1.7.0.jar,\
+ lib/commons-collections-3.1.jar,\
+ lib/commons-digester-1.8.jar,\
+ lib/commons-logging-1.1.jar,\
+ lib/servlet-api-2.4.jar,\
+ lib/shale-clay-1.1.0-SNAPSHOT.jar,\
+ lib/shale-core-1.1.0-SNAPSHOT.jar
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/build.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/Thumbs.db
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/Thumbs.db?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/Thumbs.db
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/clay.gif
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/clay.gif?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/icons/clay.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/README.txt
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/README.txt?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/README.txt (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/README.txt Mon Jul 23 10:51:09 2007
@@ -0,0 +1 @@
+remove jars after finding a maven solution for handling dependencies
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-beanutils-1.7.0.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-beanutils-1.7.0.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-beanutils-1.7.0.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-collections-3.1.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-collections-3.1.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-collections-3.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-digester-1.8.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-digester-1.8.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-digester-1.8.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-logging-1.1.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-logging-1.1.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/commons-logging-1.1.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/servlet-api-2.4.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/servlet-api-2.4.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/servlet-api-2.4.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-clay-1.1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-clay-1.1.0-SNAPSHOT.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-clay-1.1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-core-1.1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-core-1.1.0-SNAPSHOT.jar?view=auto&rev=558812
==============================================================================
Binary file - no diff available.
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/lib/shale-core-1.1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml Mon Jul 23 10:51:09 2007
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.editors">
+ <editor
+ name="Clay XML Editor"
+ extensions="xml"
+ icon="icons/clay.gif"
+ class="clay_plugin.editor.ClayMultipageEditor"
+ id="clay_plugin_3_2.editors.XMLEditor">
+ </editor>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.newWizards">
+ <category
+ name="Shale Clay"
+ id="NewClayConfigDialog">
+ </category>
+ <wizard
+ name="Clay Config File"
+ icon="icons/clay.gif"
+ category="NewClayConfigDialog"
+ class="clay_plugin.wizard.ClayConfigNewWizard"
+ id="clay_plugin.wizard.ClayConfigNewWizard">
+ </wizard>
+ </extension>
+
+</plugin>
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/plugin.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml Mon Jul 23 10:51:09 2007
@@ -0,0 +1,133 @@
+<!--
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <!--
+ <parent>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>sandbox-parent</artifactId>
+ <version>1-SNAPSHOT</version>
+ </parent>
+
+ -->
+
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale_clay_plugin</artifactId>
+ <version>1-SNAPSHOT</version>
+ <packaging>zip</packaging>
+ <name>Shale Clay Plugin for Eclipse</name>
+ <description></description>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>pde-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <eclipseInstall>C:/IBM/eclipse-3-2</eclipseInstall>
+ <antDebug>true</antDebug>
+ <antVerbose>true</antVerbose>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>dependent-libs</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+
+
+ <!--
+ <copy todir="${basedir}/target/lib">
+ <fileset refid="${project.compileArtifacts}" />
+ <mapper type="flatten" />
+ </copy>
+ -->
+
+
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-core</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.shale</groupId>
+ <artifactId>shale-clay</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ </dependency>
+
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.8</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.7.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+
+ </dependencies>
+
+</project>
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties Mon Jul 23 10:51:09 2007
@@ -0,0 +1 @@
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
\ No newline at end of file
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/commons-logging.properties
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "clay_plugin_3_2";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/Activator.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.attributes;
+
+import org.apache.shale.clay.config.beans.AttributeBean;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.widgets.TableItem;
+
+
+
+public class AttributesMetadataCellModifier implements ICellModifier {
+
+ private AttributesMetadataComponent metadataComponent;
+
+
+ public AttributesMetadataCellModifier(
+ AttributesMetadataComponent metadataComponent) {
+ super();
+ this.metadataComponent = metadataComponent;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellModifier#canModify(java.lang.Object,
+ * java.lang.String)
+ */
+ public boolean canModify(Object element, String property) {
+ return true;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellModifier#getValue(java.lang.Object,
+ * java.lang.String)
+ */
+ public Object getValue(Object element, String property) {
+
+ // Find the index of the column
+ int columnIndex = metadataComponent.getColumnNames().indexOf(property);
+
+ Object result = null;
+ AttributeBean attribute = (AttributeBean) element;
+ String stringValue;
+ int i;
+ String[] choices;
+
+ switch (columnIndex) {
+ case 0:
+ // result = attribute.getName();
+ stringValue = attribute.getName();
+ choices = metadataComponent.getAvailableAttributes();
+ i = choices.length - 1;
+ while (i >= 0 && !stringValue.equals(choices[i]))
+ --i;
+ result = new Integer(i);
+ break;
+ case 1:
+ result = attribute.getValue();
+ break;
+ case 2:
+ stringValue = attribute.getBindingType();
+ choices = metadataComponent.getChoices(property);
+ i = choices.length - 1;
+ while (!stringValue.equals(choices[i]) && i > 0)
+ --i;
+ result = new Integer(i);
+ break;
+ case 3:
+ result = attribute.getDescription();
+ break;
+ default:
+ result = "";
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ICellModifier#modify(java.lang.Object,
+ * java.lang.String, java.lang.Object)
+ */
+ public void modify(Object element, String property, Object value) {
+
+ // Find the index of the column
+ int columnIndex = metadataComponent.getColumnNames().indexOf(property);
+
+ TableItem item = (TableItem) element;
+ AttributeBean attribute = (AttributeBean) item.getData();
+ String valueString;
+ String oldName = null;
+
+ switch (columnIndex) {
+ case 0:
+ oldName = attribute.getName();
+ // valueString = ((String) value).trim();
+ int index = ((Integer) value).intValue();
+ if (index == -1) {
+ ComboBoxCellEditor nameEditor = (ComboBoxCellEditor) metadataComponent
+ .getTableViewer().getCellEditors()[0];
+ CCombo combo = (CCombo) nameEditor.getControl();
+ valueString = combo.getText();
+ // nameEditor.setItems((String[]) ArrayUtils.concat(nameEditor
+ // .getItems(), new String[] { valueString }));
+ } else {
+ valueString = metadataComponent.getAvailableAttributes()[index];
+ }
+ attribute.setName(valueString);
+ if (valueString != null) {
+ attribute.setDescription(metadataComponent
+ .getDescriptionForAttribute(valueString));
+ }
+ break;
+ case 1:
+ valueString = ((String) value).trim();
+ attribute.setValue(valueString);
+ break;
+ case 2:
+ valueString = metadataComponent.getChoices(property)[((Integer) value)
+ .intValue()].trim();
+ attribute.setBindingType(valueString);
+ break;
+ case 3:
+ valueString = ((String) value).trim();
+ attribute.setDescription(valueString);
+ break;
+ default:
+ }
+ metadataComponent.getMetadataList().updateAttribute(oldName, attribute);
+ }
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataCellModifier.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,477 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.attributes;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.shale.clay.config.beans.AttributeBean;
+import org.apache.shale.clay.config.beans.ComponentBean;
+import org.apache.shale.clay.config.beans.InnerComponentBean;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.jface.viewers.CellEditor;
+import org.eclipse.jface.viewers.ComboBoxCellEditor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.Text;
+
+import clay_plugin.editor.VisualEditorViewer;
+import clay_plugin.ext.ComponentConfigBeanExt;
+import clay_plugin.faces.FacesManagedBeanDialog;
+import clay_plugin.model.ClayXMLModel;
+
+public class AttributesMetadataComponent extends Composite implements
+ ISelectionChangedListener, MouseListener {
+
+ /**
+ * @param parent
+ */
+ public AttributesMetadataComponent(VisualEditorViewer viewer,
+ IProject project, ComponentBean component, Composite parent) {
+
+ super(parent, SWT.NULL);
+
+ this.project = project;
+
+ this.viewer = viewer;
+
+ this.component = component;
+
+ this.addChildControls();
+ }
+
+ private VisualEditorViewer viewer;
+
+ private IProject project;
+
+ // private Shell shell;
+ private Table table;
+
+ private TableViewer tableViewer;
+
+ private AttributesMetadataList metadataList;
+
+ private ComponentBean component;
+
+ // Set the table column property names
+ private final String NAME_COLUMN = "name";
+
+ private final String VALUE_COLUMN = "value";
+
+ private final String BINDING_COLUMN = "bindingType";
+
+ private final String DESC_COLUMN = "description";
+
+ // Set column names
+ private String[] columnNames = new String[] { NAME_COLUMN, VALUE_COLUMN,
+ BINDING_COLUMN, DESC_COLUMN };
+
+ /**
+ * Release resources
+ */
+ public void dispose() {
+
+ // Tell the label provider to release its resources
+ tableViewer.getLabelProvider().dispose();
+ }
+
+ /**
+ * Create a new shell, add the widgets, open the shell
+ *
+ * @return the shell that was created
+ */
+ private void addChildControls() {
+
+ // Create a composite to hold the children
+ GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL
+ | GridData.FILL_BOTH);
+ this.setLayoutData(gridData);
+
+ // Set numColumns to 3 for the buttons
+ GridLayout layout = new GridLayout(3, false);
+ layout.marginWidth = 4;
+ this.setLayout(layout);
+
+ // Create the table
+ createTable(this);
+
+ // Create and setup the TableViewer
+ createTableViewer();
+ tableViewer.setContentProvider(new ExampleContentProvider());
+ tableViewer.setLabelProvider(new AttributesMetadataLabelProvider());
+ // The input for the table viewer is the instance of ExampleTaskList
+ metadataList = new AttributesMetadataList(viewer, component);
+ tableViewer.setInput(metadataList);
+
+ // Add the buttons
+ createButtons(this);
+ }
+
+ /**
+ * Create the Table
+ */
+ private void createTable(Composite parent) {
+ int style = SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL
+ | SWT.FULL_SELECTION | SWT.HIDE_SELECTION;
+
+ table = new Table(parent, style);
+
+ GridData gridData = new GridData(GridData.FILL_BOTH);
+ gridData.grabExcessVerticalSpace = true;
+ gridData.horizontalSpan = 3;
+ table.setLayoutData(gridData);
+
+ table.setLinesVisible(true);
+ table.setHeaderVisible(true);
+
+ TableColumn column = new TableColumn(table, SWT.LEFT, 0);
+ column.setText("Name");
+ column.setWidth(200);
+
+ column = new TableColumn(table, SWT.LEFT, 1);
+ column.setText("Value");
+ column.setWidth(200);
+
+ column = new TableColumn(table, SWT.LEFT, 2);
+ column.setText("BindingType");
+ column.setWidth(100);
+
+ column = new TableColumn(table, SWT.LEFT, 3);
+ column.setText("Description");
+ column.setWidth(400);
+
+ }
+
+ /**
+ * Create the TableViewer
+ */
+ private void createTableViewer() {
+
+ tableViewer = new TableViewer(table);
+ tableViewer.setUseHashlookup(true);
+
+ tableViewer.setColumnProperties(columnNames);
+
+ // Create the cell editors
+ CellEditor[] editors = new CellEditor[columnNames.length];
+
+ // TextCellEditor textEditor = new TextCellEditor(table);
+ // ((Text) textEditor.getControl()).setTextLimit(60);
+ // editors[0] = textEditor;
+
+ editors[0] = new ComboBoxCellEditor(table, getAvailableAttributes(),
+ SWT.NULL);
+
+
+ TextCellEditor textEditor = new TextCellEditor(table);
+ ((Text) textEditor.getControl()).setTextLimit(60);
+ ((Text) textEditor.getControl()).addMouseListener(this);
+ ((Text) textEditor.getControl())
+ .setToolTipText("Double click this field to map a faces managed bean");
+
+ editors[1] = textEditor;
+
+ editors[2] = new ComboBoxCellEditor(table,
+ AttributesMetadataList.bindingTypes, SWT.READ_ONLY);
+
+ textEditor = new TextCellEditor(table);
+ ((Text) textEditor.getControl()).setTextLimit(400);
+ editors[3] = textEditor;
+
+ // Assign the cell editors to the viewer
+ tableViewer.setCellEditors(editors);
+ // Set the cell modifier for the viewer
+ tableViewer.setCellModifier(new AttributesMetadataCellModifier(this));
+
+ // tableViewer.setSorter(new ExampleTaskSorter(
+ // ExampleTaskSorter.DESCRIPTION));
+ }
+
+ /**
+ * InnerClass that acts as a proxy for the ExampleTaskList providing content
+ * for the Table. It implements the ITaskListViewer interface since it must
+ * register changeListeners with the ExampleTaskList
+ */
+ class ExampleContentProvider implements IStructuredContentProvider,
+ IAttributesMetadataViewer {
+
+ public void inputChanged(Viewer v, Object oldInput, Object newInput) {
+
+ if (newInput != null)
+ ((AttributesMetadataList) newInput).addChangeListener(this);
+ if (oldInput != null)
+ ((AttributesMetadataList) oldInput).removeChangeListener(this);
+ }
+
+ public void dispose() {
+ metadataList.removeChangeListener(this);
+ }
+
+ public Object[] getElements(Object parent) {
+ return component.getAttributes().values().toArray();
+ }
+
+ public void addAttribute(AttributeBean attribute) {
+ tableViewer.add(attribute);
+ }
+
+ public void removeAttribute(AttributeBean attribute) {
+ tableViewer.remove(attribute);
+ }
+
+ public void updateAttribute(AttributeBean attribute) {
+ tableViewer.update(attribute, null);
+ }
+ }
+
+ /**
+ * Return the array of choices for a multiple choice cell
+ */
+ public String[] getChoices(String property) {
+ if (BINDING_COLUMN.equals(property))
+ return AttributesMetadataList.bindingTypes;
+ else
+ return new String[] {};
+ }
+
+ /**
+ * Add the "Add", "Delete" and "Close" buttons
+ *
+ * @param parent
+ * the parent composite
+ */
+ private void createButtons(Composite parent) {
+
+ // Create and configure the "Add" button
+ Button add = new Button(parent, SWT.PUSH | SWT.CENTER);
+ add.setText("Add Attribute");
+
+ GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gridData.widthHint = 150;
+ add.setLayoutData(gridData);
+ add.addSelectionListener(new SelectionAdapter() {
+
+ // Add a task to the ExampleTaskList and refresh the view
+ public void widgetSelected(SelectionEvent e) {
+ metadataList.addAttribute();
+ }
+ });
+
+ // Create and configure the "Delete" button
+ Button delete = new Button(parent, SWT.PUSH | SWT.CENTER);
+ delete.setText("Delete Attribute");
+ gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
+ gridData.widthHint = 150;
+ delete.setLayoutData(gridData);
+
+ delete.addSelectionListener(new SelectionAdapter() {
+
+ // Remove the selection and refresh the view
+ public void widgetSelected(SelectionEvent e) {
+ AttributeBean attribute = (AttributeBean) ((IStructuredSelection) tableViewer
+ .getSelection()).getFirstElement();
+ if (attribute != null) {
+ metadataList.removeAttribute(attribute);
+ }
+ }
+ });
+
+ }
+
+ /**
+ * Return the column names in a collection
+ *
+ * @return List containing column names
+ */
+ public java.util.List getColumnNames() {
+ return Arrays.asList(columnNames);
+ }
+
+ /**
+ * @return currently selected item
+ */
+ public ISelection getSelection() {
+ return tableViewer.getSelection();
+ }
+
+ public AttributesMetadataList getMetadataList() {
+ return metadataList;
+ }
+
+ /**
+ * Return the parent composite
+ */
+ public Control getControl() {
+ return table.getParent();
+ }
+
+ public String getDescriptionForAttribute(String attributeName) {
+ ClayXMLModel model = viewer.getProjectModel();
+
+ if (model == null) {
+ // this means search thread has not come back yet
+ return "";
+ }
+
+ Set attributes = new HashSet();
+ ComponentBean current = null;
+ if (component instanceof InnerComponentBean) {
+
+ ComponentConfigBeanExt config = (ComponentConfigBeanExt) model
+ .getConfig(project);
+ Map displayElements = config.getDisplayElements();
+ current = (ComponentBean) displayElements.get(component.getJsfid());
+
+ } else {
+
+ current = component;
+ }
+
+ attributes.addAll(current.getAttributes().values());
+
+ while (current.getExtends() != null) {
+
+ current = (ComponentBean) model.getConfig(project)
+ .getDisplayElements().get(current.getExtends());
+ attributes.addAll(current.getAttributes().values());
+
+ }
+
+ Iterator i = attributes.iterator();
+ while (i.hasNext()) {
+ AttributeBean next = (AttributeBean) i.next();
+ if (attributeName.equals(next.getName())) {
+ return next.getDescription();
+ }
+
+ }
+
+ return "";
+
+ }
+
+ public String[] getAvailableAttributes() {
+
+ ClayXMLModel model = viewer.getProjectModel();
+
+ if (model == null) {
+ // this means search thread has not come back yet
+ return new String[] {};
+ }
+
+ Set attributes = new HashSet();
+ ComponentBean current = null;
+ if (component instanceof InnerComponentBean) {
+
+ ComponentConfigBeanExt config = (ComponentConfigBeanExt) model
+ .getConfig(project);
+ Map displayElements = config.getDisplayElements();
+ current = (ComponentBean) displayElements.get(component.getJsfid());
+
+ } else {
+
+ current = component;
+ }
+
+ attributes.addAll(current.getAttributes().keySet());
+
+ while (current.getExtends() != null) {
+
+ current = (ComponentBean) model.getConfig(project)
+ .getDisplayElements().get(current.getExtends());
+ attributes.addAll(current.getAttributes().keySet());
+
+ }
+
+ List asList = new ArrayList();
+ asList.addAll(attributes);
+
+ Collections.sort(asList);
+
+ return (String[]) asList.toArray(new String[] {});
+ }
+
+ public TableViewer getTableViewer() {
+ return tableViewer;
+ }
+
+ public void selectionChanged(SelectionChangedEvent event) {
+
+ ISelection selection = event.getSelection();
+
+ Object obj = ((IStructuredSelection) selection).getFirstElement();
+
+ if (obj instanceof ComponentBean) {
+
+ tableViewer.getTable().clearAll();
+
+ component = (ComponentBean) obj;
+
+ metadataList = new AttributesMetadataList(viewer, component);
+
+ tableViewer.setInput(metadataList);
+
+ ComboBoxCellEditor cellEditor = (ComboBoxCellEditor) tableViewer
+ .getCellEditors()[0];
+
+ cellEditor.setItems(getAvailableAttributes());
+ }
+
+ }
+
+ public void mouseDoubleClick(MouseEvent e) {
+
+ FacesManagedBeanDialog dialog = new FacesManagedBeanDialog(tableViewer,
+ getShell(), viewer.getFacesModel(), project);
+
+ dialog.open();
+
+ }
+
+ public void mouseDown(MouseEvent e) {
+ }
+
+ public void mouseUp(MouseEvent e) {
+
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.attributes;
+
+import org.apache.shale.clay.config.beans.AttributeBean;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+
+
+public class AttributesMetadataLabelProvider extends LabelProvider implements
+ ITableLabelProvider {
+
+ /**
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object,
+ * int)
+ */
+ public String getColumnText(Object element, int columnIndex) {
+ String result = "";
+ AttributeBean attribute = (AttributeBean) element;
+ switch (columnIndex) {
+ case 0:
+ result = attribute.getName();
+ break;
+ case 1:
+ result = attribute.getValue();
+ break;
+ case 2:
+ result = attribute.getBindingType();
+ break;
+ case 3:
+ result = attribute.getDescription();
+ break;
+ default:
+ break;
+ }
+ return result;
+ }
+
+ /**
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object,
+ * int)
+ */
+ public Image getColumnImage(Object element, int columnIndex) {
+ return null;
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataLabelProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.attributes;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Set;
+
+import org.apache.shale.clay.config.beans.AttributeBean;
+import org.apache.shale.clay.config.beans.ComponentBean;
+
+import clay_plugin.editor.ComponentEditedListener;
+
+public class AttributesMetadataList {
+
+ private ComponentBean component;
+
+ private Set changeListeners = new HashSet();
+
+ private ComponentEditedListener listener = null;
+
+ public static final String[] bindingTypes = new String[] { "None", "VB",
+ "MB" };
+
+ public AttributesMetadataList(ComponentEditedListener listener,
+ ComponentBean component) {
+ this.listener = listener;
+ this.component = component;
+ }
+
+ public void removeChangeListener(IAttributesMetadataViewer viewer) {
+ changeListeners.remove(viewer);
+ }
+
+ public void addChangeListener(IAttributesMetadataViewer viewer) {
+ changeListeners.add(viewer);
+ }
+
+ public void addAttribute() {
+ AttributeBean a = new AttributeBean();
+ a.setName(createAttributeName());
+ a.setValue("");
+ a.setBindingType("VB");
+ component.addAttribute(a);
+ Iterator iterator = changeListeners.iterator();
+ while (iterator.hasNext())
+ ((IAttributesMetadataViewer) iterator.next()).addAttribute(a);
+
+ listener.componentEdited(component);
+ }
+
+ public void removeAttribute(AttributeBean attribute) {
+ component.getAttributes().remove(attribute.getName().toLowerCase());
+ Iterator iterator = changeListeners.iterator();
+ while (iterator.hasNext())
+ ((IAttributesMetadataViewer) iterator.next())
+ .removeAttribute(attribute);
+
+ listener.componentEdited(component);
+ }
+
+ public void updateAttribute(String oldName, AttributeBean attribute) {
+ if (oldName != null) {
+ component.getAttributes().remove(oldName.toLowerCase());
+ }
+
+ component.addAttribute(attribute);
+ Iterator iterator = changeListeners.iterator();
+ while (iterator.hasNext())
+ ((IAttributesMetadataViewer) iterator.next())
+ .updateAttribute(attribute);
+
+ listener.componentEdited(component);
+ }
+
+ protected String createAttributeName() {
+ StringBuffer attributeName = new StringBuffer();
+ attributeName.append("attribute");
+ int suffix = 1;
+ int start = attributeName.length();
+ attributeName.append(suffix);
+ while (component.getAttributes().containsKey(
+ attributeName.toString().toLowerCase())) {
+ attributeName = attributeName.delete(start, attributeName.length());
+ suffix++;
+ attributeName.append(suffix);
+
+ }
+ return attributeName.toString();
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/AttributesMetadataList.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.attributes;
+
+import org.apache.shale.clay.config.beans.AttributeBean;
+
+public interface IAttributesMetadataViewer {
+
+ public void addAttribute(AttributeBean attribute);
+
+ public void removeAttribute(AttributeBean attribute);
+
+ public void updateAttribute(AttributeBean attribute);
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/attributes/IAttributesMetadataViewer.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.cassist;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jface.fieldassist.IContentProposal;
+import org.eclipse.jface.fieldassist.IContentProposalProvider;
+
+import clay_plugin.faces.FacesConfigModel;
+import clay_plugin.faces.ManagedBean;
+import clay_plugin.faces.ManagedBeanProperty;
+
+public class JSFExpressionProvider implements IContentProposalProvider {
+
+ protected FacesConfigModel model;
+
+ protected IResource resource;
+
+ public JSFExpressionProvider(IResource resource, FacesConfigModel model) {
+
+ this.model = model;
+
+ this.resource = resource;
+
+ }
+
+ public IContentProposal[] getProposals(String text, int pos) {
+
+ ManagedBean[] beans = model.getManagedBeans(resource);
+
+ if (text.trim().length() == 0) {
+
+ return completeBeanNames(text, pos, true, "#{");
+
+ }
+
+ else if (text.equals("#")) {
+ return completeBeanNames(text, pos, true, "{");
+ }
+
+ else if (text.startsWith("#{")) {
+
+ if (text.equals("#{")) {
+ return completeBeanNames(text, pos, false, null);
+ }
+
+ for (int i = 0; i < beans.length; ++i) {
+
+ String beanName = beans[i].getManagedBeanName();
+
+ if (text.endsWith(beanName + ".")) {
+ return completeBeanProperties(beans[i], text, pos);
+ } else {
+ int index = -1;
+
+ if ((index = beanName.indexOf(text)) != -1) {
+
+ return completeBeanName(beanName, index, text, pos);
+
+ }
+ }
+
+ }
+ }
+
+ return null;
+
+ }
+
+ protected IContentProposal[] completeBeanNames(String text, int pos,
+ boolean prefix, String prefixStr) {
+
+ List completions = new ArrayList();
+ ManagedBean[] beans = model.getManagedBeans(resource);
+ for (int i = 0; i < beans.length; ++i) {
+ ManagedBean nextBean = beans[i];
+
+ String cpVal = (prefix) ? prefixStr + nextBean.getManagedBeanName()
+ : nextBean.getManagedBeanName();
+
+ ContentProposal cp = new ContentProposal(cpVal, pos
+ + cpVal.length());
+
+ completions.add(cp);
+
+ }
+
+ return (IContentProposal[]) completions
+ .toArray(new ContentProposal[completions.size()]);
+
+ }
+
+ protected IContentProposal[] completeBeanProperties(ManagedBean bean,
+ String text, int pos) {
+
+ List completions = new ArrayList();
+
+ ManagedBeanProperty[] props = bean.getManagedBeanProperties();
+
+ for (int i = 0; i < props.length; ++i) {
+
+ ManagedBeanProperty nextProp = props[i];
+
+ ContentProposal cp = new ContentProposal(
+ nextProp.getPropertyName(), pos
+ + nextProp.getPropertyName().length());
+
+ completions.add(cp);
+
+ }
+
+ return (IContentProposal[]) completions
+ .toArray(new ContentProposal[completions.size()]);
+
+ }
+
+ protected IContentProposal[] completeBeanName(String beanName, int beanPos,
+ String text, int pos) {
+
+ String rest = beanName.substring(beanPos + text.length());
+
+ return new IContentProposal[] { new ContentProposal(rest, pos
+ + rest.length()) };
+
+ }
+
+ protected class ContentProposal implements IContentProposal {
+
+ protected String text;
+
+ protected int pos;
+
+ public ContentProposal(String text, int pos) {
+ this.text = text;
+ this.pos = pos;
+ }
+
+ public String getContent() {
+ return text;
+ }
+
+ public int getCursorPosition() {
+
+ return pos;
+ }
+
+ public String getDescription() {
+ return text;
+ }
+
+ public String getLabel() {
+ return text;
+ }
+
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/cassist/JSFExpressionProvider.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.dnd;
+
+import org.apache.shale.clay.config.beans.ActionListenerBean;
+import org.apache.shale.clay.config.beans.ComponentBean;
+
+import clay_plugin.editor.VisualEditorViewer;
+import clay_plugin.labels.ActionListenersLabel;
+
+public class ActionListenersLabelDropHandler extends BaseDropHandler {
+
+ public ActionListenersLabelDropHandler(VisualEditorViewer viewer,
+ Object target, ComponentBean dropped) {
+ super(viewer, target, dropped);
+
+ }
+
+ public Object doDrop() {
+
+ ActionListenersLabel label = (ActionListenersLabel) target;
+
+ ActionListenerBean actionListener = new ActionListenerBean();
+
+ actionListener.setJsfid(dropped.getJsfid());
+
+ actionListener.setComponentType(dropped.getComponentType());
+
+ label.getComponent().addActionListener(actionListener);
+
+ return actionListener;
+
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ActionListenersLabelDropHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.dnd;
+
+import org.apache.shale.clay.config.beans.ComponentBean;
+
+import clay_plugin.editor.VisualEditorViewer;
+
+public abstract class BaseDropHandler implements DropHandler {
+
+ protected VisualEditorViewer viewer;
+
+ protected Object target;
+
+ protected ComponentBean dropped;
+
+ public BaseDropHandler(VisualEditorViewer viewer, Object target,
+ ComponentBean dropped) {
+ super();
+
+ this.viewer = viewer;
+ this.target = target;
+ this.dropped = dropped;
+ }
+
+ public final void execute() {
+ Object newNode = doDrop();
+ updateView(newNode);
+ }
+
+ public abstract Object doDrop();
+
+ public void updateView(Object newNode) {
+
+ viewer.add(target, newNode);
+ viewer.refresh(target, true);
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/BaseDropHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.dnd;
+
+import org.apache.shale.clay.config.beans.ComponentBean;
+import org.apache.shale.clay.config.beans.ElementBean;
+
+import clay_plugin.editor.VisualEditorViewer;
+import clay_plugin.labels.ChildrenLabel;
+
+public class ChildrenLabelDropHandler extends BaseDropHandler {
+
+ public ChildrenLabelDropHandler(VisualEditorViewer viewer, Object target,
+ ComponentBean dropped) {
+ super(viewer, target, dropped);
+ }
+
+ public Object doDrop() {
+ ChildrenLabel label = (ChildrenLabel) target;
+
+ ElementBean newBean = new ElementBean();
+
+ newBean.setJsfid(dropped.getJsfid());
+ newBean.setExtends(null);
+ newBean.setComponentType(dropped.getComponentType());
+
+ int renderId = label.getComponent().getChildren().size();
+
+ newBean.setRenderId(renderId);
+
+ label.getComponent().addChild(newBean);
+
+ return newBean;
+
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ChildrenLabelDropHandler.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.dnd;
+
+import org.apache.shale.clay.config.beans.ComponentBean;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.swt.dnd.DragSourceAdapter;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.TextTransfer;
+
+public class ClayComponentDragSourceListener extends DragSourceAdapter {
+
+ private TreeViewer treeViewer;
+
+ public ClayComponentDragSourceListener(TreeViewer treeViewer) {
+ this.treeViewer = treeViewer;
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+
+ if (TextTransfer.getInstance().isSupportedType(event.dataType)) {
+
+ IStructuredSelection selection = (IStructuredSelection) treeViewer
+ .getSelection();
+ Object selected = selection.getFirstElement();
+
+ if (selected instanceof ComponentBean) {
+
+ ComponentBean component = (ComponentBean) selected;
+
+ event.data = component.getJsfid();
+
+ }
+
+ }
+ }
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java
URL: http://svn.apache.org/viewvc/shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java?view=auto&rev=558812
==============================================================================
--- shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java (added)
+++ shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java Mon Jul 23 10:51:09 2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package clay_plugin.dnd;
+
+import org.eclipse.gef.palette.ToolEntry;
+import org.eclipse.gef.ui.palette.PaletteViewer;
+import org.eclipse.jface.util.TransferDragSourceListener;
+import org.eclipse.swt.dnd.DragSourceEvent;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+
+public class ClayComponentDragSourceListener2 implements
+ TransferDragSourceListener {
+
+ private PaletteViewer paletteViewer;
+
+ private ToolEntry activeTool = null;
+
+ public ClayComponentDragSourceListener2(PaletteViewer paletteViewer) {
+ super();
+ this.paletteViewer = paletteViewer;
+ }
+
+ public void dragSetData(DragSourceEvent event) {
+ event.data = activeTool.getLabel();
+ activeTool = null;
+ }
+
+ public Transfer getTransfer() {
+ return TextTransfer.getInstance();
+ }
+
+ public void dragFinished(DragSourceEvent event) {
+
+ }
+
+ public void dragStart(DragSourceEvent event) {
+ activeTool = paletteViewer.getActiveTool();
+ if (activeTool == null) {
+ event.doit = false;
+ }
+ }
+
+}
Propchange: shale/sandbox/shale-eclipse-plugins/plugins/shale_clay_plugin_for_eclipse/src/main/java/clay_plugin/dnd/ClayComponentDragSourceListener2.java
------------------------------------------------------------------------------
svn:eol-style = native