JBoss Tools SVN: r11659 - in trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console: preferences and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-11-11 06:06:14 -0500 (Tue, 11 Nov 2008)
New Revision: 11659
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2740
dialect option added.
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2008-11-11 11:06:07 UTC (rev 11658)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/ConsoleConfiguration.java 2008-11-11 11:06:14 UTC (rev 11659)
@@ -123,6 +123,10 @@
if(StringHelper.isNotEmpty( prefs.getNamingStrategy())) {
overrides.put( "hibernate.ejb.naming_strategy", prefs.getNamingStrategy() ); //$NON-NLS-1$
}
+
+ if(StringHelper.isNotEmpty( prefs.getDialectName())) {
+ overrides.put( "hibernate.dialect", prefs.getDialectName() ); //$NON-NLS-1$
+ }
if(!includeMappings) {
overrides.put( "hibernate.archive.autodetection", "none" ); //$NON-NLS-1$//$NON-NLS-2$
@@ -571,9 +575,14 @@
throw new HibernateConsoleRuntimeException(ConsoleMessages.ConsoleConfiguration_could_not_configure_naming_strategy + prefs.getNamingStrategy(), c);
}
}
-
+
localCfg = loadConfigurationXML( localCfg, includeMappings, entityResolver );
localCfg = configureConnectionProfile(localCfg);
+
+ // replace dialect if it is set in preferences
+ if(StringHelper.isNotEmpty( prefs.getDialectName())) {
+ localCfg.setProperty("hibernate.dialect", prefs.getDialectName());
+ }
return localCfg;
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2008-11-11 11:06:07 UTC (rev 11658)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/AbstractConsoleConfigurationPreferences.java 2008-11-11 11:06:14 UTC (rev 11659)
@@ -54,12 +54,13 @@
private String persistenceUnitName;
private String namingStrategy;
private String connectionProfile;
+ private String dialectName;
public AbstractConsoleConfigurationPreferences(String name, ConfigurationMode configurationMode,
String projectName, boolean useProjectclassPath, String entityResolver,
String persistenceUnitName, String namingStrategy,
- String connectionProfile) {
+ String connectionProfile, String dialectName) {
setName(name);
this.persistenceUnitName = persistenceUnitName;
this.namingStrategy = namingStrategy;
@@ -68,6 +69,7 @@
this.projectName = projectName;
this.useProjectClasspath = useProjectclassPath;
this.connectionProfile = connectionProfile;
+ this.dialectName = dialectName;
}
protected AbstractConsoleConfigurationPreferences() {
@@ -89,6 +91,10 @@
public String getConnectionProfileName() {
return connectionProfile;
}
+
+ public String getDialectName() {
+ return dialectName;
+ }
public void setName(String name) {
if(name==null || name.trim().length()==0) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2008-11-11 11:06:07 UTC (rev 11658)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/ConsoleConfigurationPreferences.java 2008-11-11 11:06:14 UTC (rev 11659)
@@ -122,4 +122,6 @@
public abstract String getNamingStrategy();
public abstract String getConnectionProfileName();
+
+ public abstract String getDialectName();
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2008-11-11 11:06:07 UTC (rev 11658)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/preferences/StandAloneConsoleConfigurationPreferences.java 2008-11-11 11:06:14 UTC (rev 11659)
@@ -46,7 +46,7 @@
private File[] customClasspath;
public StandAloneConsoleConfigurationPreferences(String name, File xmlconfig, File propertiesFile, File[] mappingFiles, File[] customClasspath) {
- super(name, ConfigurationMode.CORE, null, false, null, null, null, null);
+ super(name, ConfigurationMode.CORE, null, false, null, null, null, null, null);
this.cfgFile = xmlconfig;
this.propertyFilename = propertiesFile;
this.mappings = mappingFiles;
17 years, 5 months
JBoss Tools SVN: r11658 - trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2008-11-11 06:06:07 -0500 (Tue, 11 Nov 2008)
New Revision: 11658
Modified:
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateErrorsTest2.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-2740
dialect option added.
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2008-11-11 11:03:50 UTC (rev 11657)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HQLQueryValidatorTest.java 2008-11-11 11:06:07 UTC (rev 11658)
@@ -112,7 +112,7 @@
String prjName = getProject().getIProject().getName();
EclipseConsoleConfigurationPreferences preferences = new EclipseConsoleConfigurationPreferences(prjName,
- ConfigurationMode.JPA, prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, false);
+ ConfigurationMode.JPA, prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, null);
ccfg = KnownConfigurations.getInstance().addConfiguration(new EclipseConsoleConfiguration(preferences), false);
Modified: trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateErrorsTest2.java
===================================================================
--- trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateErrorsTest2.java 2008-11-11 11:03:50 UTC (rev 11657)
+++ trunk/hibernatetools/tests/org.hibernate.eclipse.jdt.ui.test/src/org/hibernate/eclipse/jdt/ui/test/HibernateErrorsTest2.java 2008-11-11 11:06:07 UTC (rev 11658)
@@ -125,7 +125,7 @@
String prjName = getProject().getIProject().getName();
EclipseConsoleConfigurationPreferences preferences = new EclipseConsoleConfigurationPreferences(prjName,
- ConfigurationMode.JPA, prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, false);
+ ConfigurationMode.JPA, prjName, true, null, null, null, new IPath[0], new IPath[0], null, null, null, null);
ccfg = KnownConfigurations.getInstance().addConfiguration(new EclipseConsoleConfiguration(preferences), false);
17 years, 5 months
JBoss Tools SVN: r11656 - in trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui: editors and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: DartPeng
Date: 2008-11-11 04:50:46 -0500 (Tue, 11 Nov 2008)
New Revision: 11656
Added:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/ISaveListener.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SaveResult.java
Modified:
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java
trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
Log:
JBIDE-3143
Add a source text page/
if there are any errors during parsing the smooks configuration file , the mulit editor will show the xml text editor , other page will be disable.
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java 2008-11-11 09:29:54 UTC (rev 11655)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/SmooksTextEdtor.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -4,38 +4,106 @@
package org.jboss.tools.smooks.ui;
import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
-import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.editors.text.TextEditor;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
+import org.jboss.tools.smooks.ui.editors.ISaveListener;
+import org.jboss.tools.smooks.ui.editors.SaveResult;
import org.jboss.tools.smooks.utils.SmooksGraphConstants;
/**
* @author Dart
*
*/
-public class SmooksTextEdtor extends TextEditor {
+public class SmooksTextEdtor extends StructuredTextEditor {
+ private List<ISaveListener> saveListenerList = new ArrayList<ISaveListener>();
+
private Throwable error;
+ private Composite errorComposite;
+ private Label messageLabel;
public SmooksTextEdtor(Throwable error) {
super();
- Assert.isNotNull(error);
+ this.setErrorMessage(error);
+ }
+
+ public SmooksTextEdtor() {
+ this(null);
+ }
+
+ public void addSaveListener(ISaveListener listener) {
+ if (listener != null)
+ this.saveListenerList.add(listener);
+ }
+
+ public void removeSaveListener(ISaveListener listener){
+ if (listener != null)
+ this.saveListenerList.remove(listener);
+ }
+
+ public void cleanSaveListenerList(){
+ saveListenerList.clear();
+ }
+
+ public void setErrorMessage(Throwable error) {
+ if (error == null)
+ return;
this.error = error;
- while(this.error != null && this.error instanceof InvocationTargetException){
- this.error = ((InvocationTargetException)this.error).getTargetException();
+ while (this.error != null
+ && this.error instanceof InvocationTargetException) {
+ this.error = ((InvocationTargetException) this.error)
+ .getTargetException();
}
+ String errorMessage = null;
+ if (error != null)
+ errorMessage = error.getLocalizedMessage();
+ if (errorMessage == null)
+ errorMessage = Messages
+ .getString("SmooksTextEdtor.UnKnownErrorMessage"); //$NON-NLS-1$
+ if (messageLabel != null)
+ messageLabel.setText(errorMessage);
}
+ public void setErrorMessage(String message) {
+ if (message == null) {
+ GridData gd = new GridData();
+ gd.exclude = true;
+ this.errorComposite.setLayoutData(gd);
+ } else {
+ GridData gd = new GridData(GridData.FILL_HORIZONTAL);
+ errorComposite.setLayoutData(gd);
+ messageLabel.setText(message);
+ }
+ }
+
+ public void doSave(IProgressMonitor monitor) {
+ SaveResult result = new SaveResult();
+ result.setSourceEdtior(this);
+ for (Iterator<ISaveListener> iterator = saveListenerList.iterator(); iterator.hasNext();) {
+ ISaveListener l = (ISaveListener) iterator.next();
+ l.preSave(result);
+ }
+ super.doSave(monitor);
+ for (Iterator<ISaveListener> iterator = saveListenerList.iterator(); iterator.hasNext();) {
+ ISaveListener l = (ISaveListener) iterator.next();
+ l.endSave(result);
+ }
+ }
+
public void createPartControl(Composite parent) {
GridLayout gridLayout = new GridLayout();
parent.setLayout(gridLayout);
- Composite errorComposite = new Composite(parent, SWT.BORDER);
+ errorComposite = new Composite(parent, SWT.BORDER);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
errorComposite.setLayoutData(gd);
@@ -43,8 +111,8 @@
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.horizontalSpan = 2;
noticeLabel.setLayoutData(gd);
- noticeLabel
- .setText(Messages.getString("SmooksTextEdtor.NotifyTitleMessage")); //$NON-NLS-1$
+ noticeLabel.setText(Messages
+ .getString("SmooksTextEdtor.NotifyTitleMessage")); //$NON-NLS-1$
GridLayout gl = new GridLayout();
gl.numColumns = 2;
@@ -56,13 +124,23 @@
imagelabel.setImage(SmooksUIActivator.getDefault().getImageRegistry()
.get(SmooksGraphConstants.IMAGE_ERROR));
- Label messageLabel = new Label(errorComposite, SWT.NONE);
- String errorMessage = error.getLocalizedMessage();
- if(errorMessage == null ) errorMessage = Messages.getString("SmooksTextEdtor.UnKnownErrorMessage"); //$NON-NLS-1$
+ messageLabel = new Label(errorComposite, SWT.NONE);
+ String errorMessage = null;
+ if (error != null)
+ errorMessage = error.getLocalizedMessage();
+ if (errorMessage == null)
+ errorMessage = Messages
+ .getString("SmooksTextEdtor.UnKnownErrorMessage"); //$NON-NLS-1$
messageLabel.setText(errorMessage);
gd = new GridData(GridData.FILL_HORIZONTAL);
messageLabel.setLayoutData(gd);
+ if (error == null) {
+ gd = new GridData(GridData.FILL_HORIZONTAL);
+ gd.exclude = true;
+ errorComposite.setLayoutData(gd);
+ }
+
Composite textComposite = new Composite(parent, SWT.NONE);
gd = new GridData(GridData.FILL_BOTH);
textComposite.setLayoutData(gd);
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/ISaveListener.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/ISaveListener.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/ISaveListener.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -0,0 +1,14 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.ui.editors;
+
+/**
+ * @author Dart
+ *
+ */
+public interface ISaveListener {
+ public void preSave(SaveResult result);
+
+ public void endSave(SaveResult result);
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/ISaveListener.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SaveResult.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SaveResult.java (rev 0)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SaveResult.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -0,0 +1,33 @@
+/**
+ *
+ */
+package org.jboss.tools.smooks.ui.editors;
+
+import org.eclipse.ui.IEditorPart;
+
+/**
+ * @author Dart
+ *
+ */
+public class SaveResult {
+ private Throwable error;
+
+ private IEditorPart sourceEdtior;
+
+ public IEditorPart getSourceEdtior() {
+ return sourceEdtior;
+ }
+
+ public void setSourceEdtior(IEditorPart sourceEdtior) {
+ this.sourceEdtior = sourceEdtior;
+ }
+
+ public Throwable getError() {
+ return error;
+ }
+
+ public void setError(Throwable error) {
+ this.error = error;
+ }
+
+}
Property changes on: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SaveResult.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-11-11 09:29:54 UTC (rev 11655)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksFormEditor.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -34,7 +34,6 @@
import org.eclipse.ui.views.properties.IPropertySheetPage;
import org.eclipse.ui.views.properties.tabbed.ITabbedPropertySheetPageContributor;
import org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPage;
-import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.smooks.analyzer.MappingResourceConfigList;
import org.jboss.tools.smooks.analyzer.NormalSmooksModelBuilder;
import org.jboss.tools.smooks.analyzer.NormalSmooksModelPackage;
@@ -53,7 +52,7 @@
public class SmooksFormEditor extends FormEditor implements
ITabbedPropertySheetPageContributor {
- private StructuredTextEditor xmlTextEditor;
+ private SmooksTextEdtor xmlTextEditor;
private SmooksGraphicalFormPage graphicalPage = null;
@@ -109,6 +108,7 @@
// Set a default NormalPacakge to Normal Page
MappingResourceConfigList mappingResourceConfig = graphicalPage
.getMappingResourceConfigList();
+ normalPage.setDisableGUI(this.showTextEditorReason != null);
if (mappingResourceConfig != null) {
refreshNormalPage(mappingResourceConfig
.getRelationgResourceConfigList());
@@ -116,7 +116,7 @@
}
private void createXMLTextEditor() throws PartInitException {
- this.xmlTextEditor = new StructuredTextEditor();
+ this.xmlTextEditor = new SmooksTextEdtor(this.showTextEditorReason);
xmlTextEditor.setEditorPart(this);
int index = this.addPage(xmlTextEditor, getEditorInput());
this.setPageText(index, "Source");
@@ -128,17 +128,20 @@
createGraphicalEditor();
createConfigurationEditor();
createXMLTextEditor();
- if (onlyShowTextEditor) {
- removeGraphicalFormPage();
- }
+ assosiateEditors();
+ if (showTextEditorReason != null)
+ this.setActiveEditor(xmlTextEditor);
} catch (Exception e) {
UIUtils.showErrorDialog(getSite().getShell(), UIUtils
.createErrorStatus(e));
}
}
+
+ protected void assosiateEditors(){
+ xmlTextEditor.addSaveListener(graphicalPage);
+ }
- public void setOnlyShowTextEditor(boolean onlyShowTextEditor,
- Throwable reason) {
+ public void setParseException(boolean onlyShowTextEditor, Throwable reason) {
this.onlyShowTextEditor = onlyShowTextEditor;
this.showTextEditorReason = reason;
}
@@ -234,15 +237,12 @@
@Override
public void doSave(IProgressMonitor monitor) {
- if (onlyShowTextEditor) {
- if (textEdtior != null) {
- textEdtior.doSave(monitor);
- fireEditorDirty(false);
- return;
- }
- }
- graphicalPage.doSave(monitor);
- fireEditorDirty(false);
+ this.graphicalPage.doSave(monitor);
+// IEditorPart activeEditor = this.getEditor(this.getCurrentPage());
+// if (activeEditor != normalPage && activeEditor != null) {
+// activeEditor.doSave(monitor);
+// fireEditorDirty(false);
+// }
}
public void fireEditorDirty(boolean dirty) {
@@ -252,19 +252,12 @@
@Override
public void doSaveAs() {
- if (onlyShowTextEditor) {
- if (textEdtior != null) {
- textEdtior.doSaveAs();
- }
- }
}
@Override
public boolean isSaveAsAllowed() {
- // TODO Auto-generated method stub
return false;
}
-
@Override
protected IEditorSite createSite(IEditorPart editor) {
@@ -272,16 +265,18 @@
}
public Object getAdapter(Class adapter) {
- if(adapter == IPropertySheetPage.class){
+ if (adapter == IPropertySheetPage.class) {
System.out.println();
}
- if (adapter == IPropertySheetPage.class && this.getActiveEditor() == graphicalPage) {
+ if (adapter == IPropertySheetPage.class
+ && this.getActiveEditor() == graphicalPage) {
tabbedPropertySheetPage = new TabbedPropertySheetPage(this);
return tabbedPropertySheetPage;
}
- if (adapter == IContentOutlinePage.class && this.getActiveEditor() == xmlTextEditor){
+ if (adapter == IContentOutlinePage.class
+ && this.getActiveEditor() == xmlTextEditor) {
return super.getAdapter(adapter);
- }else{
+ } else {
}
return super.getAdapter(adapter);
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-11-11 09:29:54 UTC (rev 11655)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksGraphicalFormPage.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -86,6 +86,7 @@
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IWorkbenchActionConstants;
@@ -99,6 +100,7 @@
import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;
+import org.eclipse.wst.sse.ui.StructuredTextEditor;
import org.jboss.tools.smooks.analyzer.AnalyzerFactory;
import org.jboss.tools.smooks.analyzer.DesignTimeAnalyzeResult;
import org.jboss.tools.smooks.analyzer.IMappingAnalyzer;
@@ -146,8 +148,10 @@
*/
public class SmooksGraphicalFormPage extends FormPage implements
ISelectionChangedListener, ISelectionProvider,
- org.eclipse.emf.common.command.CommandStackListener {
+ org.eclipse.emf.common.command.CommandStackListener, ISaveListener {
+ protected boolean disableMappingGUI = false;
+
private List<DesignTimeAnalyzeResult> analyzeResultList = new ArrayList<DesignTimeAnalyzeResult>();
private static final String REFERENCE_MODEL = "__reference_model";
@@ -163,6 +167,7 @@
protected Hyperlink sourceLink = null;
protected Hyperlink targetLink = null;
protected String sourceDataTypeID = null;
+
public String getSourceDataTypeID() {
return sourceDataTypeID;
}
@@ -192,7 +197,7 @@
private List selectionChangeListener = new ArrayList();
private ISelection selection;
protected MappingResourceConfigList mappingResourceConfigList;
-
+
public MappingResourceConfigList getMappingResourceConfigList() {
return mappingResourceConfigList;
}
@@ -202,6 +207,8 @@
private Composite designTimeAnalyzeResultRegion;
+ private Section mappingGUISection;
+
public ISelection getSelection() {
return selection;
}
@@ -279,13 +286,13 @@
form.getBody().setLayout(gridLayout);
Composite rootMainControl = form.getBody();
form.setText("Data Mapping Page");
- Section section = this.createPageSectionHeader(rootMainControl,
+ mappingGUISection = this.createPageSectionHeader(rootMainControl,
Section.TITLE_BAR | Section.DESCRIPTION,
"Mapping Graph Edit Panel",
"Edit the source and target assosiation");
- Composite mainComposite = toolkit.createComposite(section);
- section.setClient(mainComposite);
+ Composite mainComposite = toolkit.createComposite(mappingGUISection);
+ mappingGUISection.setClient(mainComposite);
GridLayout mainLayout = new GridLayout();
mainComposite.setLayout(mainLayout);
@@ -306,7 +313,7 @@
// under the eclipse3.3
// mappingMainComposite.setSashWidth(1);
GridData sgd = new GridData(GridData.FILL_BOTH);
- section.setLayoutData(sgd);
+ mappingGUISection.setLayoutData(sgd);
{
Composite composite1 = toolkit
.createComposite(mappingMainComposite);
@@ -434,8 +441,50 @@
}
this.hookGraphicalViewer();
this.initGraphicalViewer();
+ initMappingGUIStates();
}
+ public void refreshAllGUI() {
+ sourceTreeViewerInputModel = null;
+ targetTreeViewerInputModel = null;
+ Throwable throwable = null;
+ try {
+ this.getSmooksResource().unload();
+ this.initTransformViewerModel((IEditorSite) getSite(),
+ getEditorInput());
+ } catch (IOWrappedException ex) {
+ MessageDialog.openWarning(getSite().getShell(), "Waring",
+ "Exceptions occurd during parsing Smooks file, no worries");
+ } catch (Throwable e) {
+ throwable = e;
+ }
+ if (throwable == null) {
+ this.disableMappingGUI = false;
+ if (mappingGUISection != null)
+ mappingGUISection.setEnabled(true);
+ if (initSourceTreeViewerProviders()) {
+ initSourceTreeViewer();
+ expandSourceConnectionModel();
+ }
+ if (initTargetTreeViewerProviders()) {
+ initTargetTreeViewer();
+ expandTargetConnectionModel();
+ }
+
+ this.redrawMappingPanel();
+ } else {
+ cleanMappingPanel();
+ this.disableMappingGUI = true;
+ mappingGUISection.setEnabled(false);
+ }
+ }
+
+ protected void initMappingGUIStates() {
+ if (this.disableMappingGUI) {
+ mappingGUISection.setEnabled(false);
+ }
+ }
+
protected void createOtherSmooksGUI(Composite parent, FormToolkit tool) {
Composite mainComposite = tool.createComposite(parent);
GridLayout gridLayout = new GridLayout();
@@ -610,6 +659,11 @@
}
}
+ /**
+ *
+ * @param clazz
+ * SourceModel/TargetModel
+ */
private void clearExsitingGraphModels(Class<? extends Object> clazz) {
if (rootModel != null) {
List children = rootModel.getChildren();
@@ -671,8 +725,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.forms.editor.FormPage#doSave(org.eclipse.core.runtime.
- * IProgressMonitor)
+ * @see
+ * org.eclipse.ui.forms.editor.FormPage#doSave(org.eclipse.core.runtime.
+ * IProgressMonitor)
*/
@Override
public void doSave(IProgressMonitor monitor) {
@@ -966,8 +1021,7 @@
}
smooksResource = this.getSmooksResource();
if (smooksResource != null) {
- if (!smooksResource.isLoaded())
- smooksResource.load(Collections.EMPTY_MAP);
+ smooksResource.load(Collections.EMPTY_MAP);
if (smooksResource.getContents().isEmpty())
return;
SmooksResourceListType listType = ((DocumentRoot) smooksResource
@@ -994,8 +1048,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite,
- * org.eclipse.ui.IEditorInput)
+ * @see
+ * org.eclipse.ui.forms.editor.FormPage#init(org.eclipse.ui.IEditorSite,
+ * org.eclipse.ui.IEditorInput)
*/
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
@@ -1017,9 +1072,9 @@
try {
this.initTransformViewerModel((IEditorSite) getSite(),
getEditorInput());
-// if (mappingResourceConfigList != null)
-// callParentRefillNormalModelInfor(mappingResourceConfigList
-// .getRelationgResourceConfigList());
+ // if (mappingResourceConfigList != null)
+ // callParentRefillNormalModelInfor(mappingResourceConfigList
+ // .getRelationgResourceConfigList());
} catch (IOWrappedException ex) {
MessageDialog.openWarning(getSite().getShell(), "Waring",
"Exceptions occurd during parsing Smooks file, no worries");
@@ -1027,8 +1082,8 @@
throwable = e;
}
if (throwable != null) {
- ((SmooksFormEditor) getEditor()).setOnlyShowTextEditor(true,
- throwable);
+ this.disableMappingGUI = true;
+ ((SmooksFormEditor) getEditor()).setParseException(true, throwable);
}
}
@@ -1080,7 +1135,8 @@
try {
if (viewer == this.sourceViewer) {
this.createSourceGraphModels();
- this.getSmooksConfigurationFileGenerateContext()
+ this
+ .getSmooksConfigurationFileGenerateContext()
.getProperties()
.setProperty(
SmooksConfigFileNewWizard.PRO_SOURCE_DATA_PATH,
@@ -1090,11 +1146,12 @@
if (viewer == this.targetViewer) {
this.createTargetGraphModels();
targetDataTypeID = typeID;
- this.getSmooksConfigurationFileGenerateContext()
- .getProperties()
- .setProperty(
- SmooksConfigFileNewWizard.PRO_TARGET_DATA_PATH,
- cw.getStructuredDataSourcePath());
+ this
+ .getSmooksConfigurationFileGenerateContext()
+ .getProperties()
+ .setProperty(
+ SmooksConfigFileNewWizard.PRO_TARGET_DATA_PATH,
+ cw.getStructuredDataSourcePath());
}
commandStackChanged = true;
firePropertyChange(PROP_DIRTY);
@@ -1110,6 +1167,19 @@
}
}
+ public void cleanMappingPanel() {
+ sourceViewer.setInput(Collections.EMPTY_LIST);
+ targetViewer.setInput(Collections.EMPTY_LIST);
+ clearExsitingGraphModels(SourceModel.class);
+ clearExsitingGraphModels(TargetModel.class);
+ }
+
+ public void redrawMappingPanel() {
+ this.createSourceGraphModels();
+ this.createTargetGraphModels();
+ createConnectionModels();
+ }
+
protected void createActions() {
ActionRegistry registry = getActionRegistry();
IAction action;
@@ -1142,8 +1212,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkActivated(org.
- * eclipse.ui.forms.events.HyperlinkEvent)
+ * @see
+ * org.eclipse.ui.forms.events.IHyperlinkListener#linkActivated(org.
+ * eclipse.ui.forms.events.HyperlinkEvent)
*/
public void linkActivated(HyperlinkEvent e) {
showCreationWizard(viewer);
@@ -1152,8 +1223,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkEntered(org.eclipse
- * .ui.forms.events.HyperlinkEvent)
+ * @see
+ * org.eclipse.ui.forms.events.IHyperlinkListener#linkEntered(org.eclipse
+ * .ui.forms.events.HyperlinkEvent)
*/
public void linkEntered(HyperlinkEvent e) {
@@ -1162,8 +1234,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.ui.forms.events.IHyperlinkListener#linkExited(org.eclipse
- * .ui.forms.events.HyperlinkEvent)
+ * @see
+ * org.eclipse.ui.forms.events.IHyperlinkListener#linkExited(org.eclipse
+ * .ui.forms.events.HyperlinkEvent)
*/
public void linkExited(HyperlinkEvent e) {
@@ -1195,8 +1268,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets
- * .Event)
+ * @see
+ * org.eclipse.swt.widgets.Listener#handleEvent(org.eclipse.swt.widgets
+ * .Event)
*/
public void handleEvent(Event event) {
TreeItem item = (TreeItem) event.item;
@@ -1229,8 +1303,9 @@
/*
* (non-Javadoc)
*
- * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt
- * .events.PaintEvent)
+ * @see
+ * org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt
+ * .events.PaintEvent)
*/
public void paintControl(PaintEvent e) {
Tree tree = (Tree) e.getSource();
@@ -1418,4 +1493,15 @@
this.editingDomain = editingDomain;
}
+ public void endSave(SaveResult result) {
+ IEditorPart editor = result.getSourceEdtior();
+ if (editor instanceof StructuredTextEditor) {
+ this.refreshAllGUI();
+ }
+ }
+
+ public void preSave(SaveResult result) {
+
+ }
+
}
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java 2008-11-11 09:29:54 UTC (rev 11655)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksNormalContentEditFormPage.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -59,6 +59,19 @@
private List hidenResourceConfigs;
+ private boolean disableGUI = false;
+
+ public boolean isDisableGUI() {
+ return disableGUI;
+ }
+
+ public void setDisableGUI(boolean disableGUI) {
+ this.disableGUI = disableGUI;
+ setGUIStates();
+ }
+
+ private Section parseTypeSection;
+
public SmooksNormalContentEditFormPage(FormEditor editor, String id,
String title, NormalSmooksModelPackage modelPacakge) {
super(editor, id, title);
@@ -98,8 +111,20 @@
form.pack();
this.initTransformTypeResourceConfig();
resourceBlock.initViewers(transformType);
+
+ setGUIStates();
}
+ public void setGUIStates() {
+ if(resourceBlock != null){
+ resourceBlock.setSectionStates(!disableGUI);
+ }
+
+ if(this.parseTypeSection != null && !parseTypeSection.isDisposed()){
+ parseTypeSection.setEnabled(!disableGUI);
+ }
+ }
+
private ResourceConfigType createTransformType() {
ResourceConfigType transformType = SmooksFactory.eINSTANCE
.createResourceConfigType();
@@ -151,12 +176,12 @@
protected void createSmooksTypeGUI(Composite mainComposite, FormToolkit tool) {
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- Section section = tool.createSection(mainComposite, Section.TITLE_BAR
+ parseTypeSection = tool.createSection(mainComposite, Section.TITLE_BAR
| Section.DESCRIPTION | Section.TWISTIE);
- section.setLayoutData(gd);
- Composite typeSelectComposite = tool.createComposite(section);
- section.setClient(typeSelectComposite);
- section.setText("Smooks Parse Type");
+ parseTypeSection.setLayoutData(gd);
+ Composite typeSelectComposite = tool.createComposite(parseTypeSection);
+ parseTypeSection.setClient(typeSelectComposite);
+ parseTypeSection.setText("Smooks Parse Type");
GridLayout layout1 = new GridLayout();
typeSelectComposite.setLayout(layout1);
Modified: trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java
===================================================================
--- trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-11-11 09:29:54 UTC (rev 11655)
+++ trunk/smooks/plugins/org.jboss.tools.smooks.ui/src/org/jboss/tools/smooks/ui/editors/SmooksResourceConfigFormBlock.java 2008-11-11 09:50:46 UTC (rev 11656)
@@ -86,6 +86,8 @@
private Button downButton;
+ private Section configurationSection;
+
public SmooksResourceConfigFormBlock() {
super();
}
@@ -213,14 +215,14 @@
protected void createDataTypeGUI(Composite rootMainControl,
FormToolkit tool, final IManagedForm managedForm) {
- Section section = tool.createSection(rootMainControl, Section.TITLE_BAR
+ configurationSection = tool.createSection(rootMainControl, Section.TITLE_BAR
| Section.DESCRIPTION);
- section.setText("Data Type");
- sectionPart = new SectionPart(section);
+ configurationSection.setText("Data Type");
+ sectionPart = new SectionPart(configurationSection);
managedForm.addPart(sectionPart);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
- Composite dataTypeComposite = tool.createComposite(section);
- section.setClient(dataTypeComposite);
+ Composite dataTypeComposite = tool.createComposite(configurationSection);
+ configurationSection.setClient(dataTypeComposite);
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.marginHeight = 0;
@@ -263,6 +265,12 @@
hookButtons();
}
+
+ public void setSectionStates(boolean state){
+ if(configurationSection != null && !configurationSection.isDisposed()){
+ configurationSection.setEnabled(state);
+ }
+ }
private void hookButtons() {
addButton.addSelectionListener(new SelectionAdapter() {
17 years, 5 months
JBoss Tools SVN: r11654 - in trunk/jsf: tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: yradtsevich
Date: 2008-11-11 03:14:35 -0500 (Tue, 11 Nov 2008)
New Revision: 11654
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
Log:
RESOLVED - issue JBIDE-2984: Wrap <rich:*Table> in <tbody>
https://jira.jboss.org/jira/browse/JBIDE-2984
Tests for rich:column, :dataTable, :extendedDataTable, :orderingList and :scrollableDataTable have been rewritten.
Some minor bugs have been fixed.
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesDataTableChildrenEncoder.java 2008-11-11 08:14:35 UTC (rev 11654)
@@ -18,6 +18,7 @@
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeChildrenInfo;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
+import org.jboss.tools.vpe.editor.template.VpeCreatorUtil;
import org.jboss.tools.vpe.editor.template.VpeTemplate;
import org.jboss.tools.vpe.editor.util.HTML;
import org.mozilla.interfaces.nsIDOMDocument;
@@ -51,6 +52,16 @@
* @author yradtsevich
* */
class RichFacesDataTableChildrenEncoder {
+ private String firstRowClass = "dr-table-firstrow rich-table-firstrow";
+ private String nonFirstRowClass = "dr-table-row rich-table-row";
+
+ /**@param firstRowClass the class of the first row in the table
+ * @param nonFirstRowClass the class of all rows in the table except the first one*/
+ public void setRowClasses(final String firstRowClass, final String nonFirstRowClass) {
+ this.firstRowClass = firstRowClass;
+ this.nonFirstRowClass = nonFirstRowClass;
+ }
+
/**Non-HTML tag that is used to create temporary containers for {@code rich:subTable} and {@code rich:columnGroup}.*/
private static final String TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER = "subTableOrColumnGroup-container"; //$NON-NLS-1$
private final VpeCreationData creationData;
@@ -89,7 +100,7 @@
|| nodeName.endsWith(RichFaces.TAG_COLUMN_GROUP)) {
addSubTableOrColumnGroupToTable(child);
createNewRow = true;
- } else {
+ } else if (!VpeCreatorUtil.isFacet(child)) {
addElementToTable(child);
createNewRow = true;
}
@@ -137,9 +148,9 @@
creationData.addChildrenInfo(currentRowChildrenInfo);
rowNumber++;
if (rowNumber == 1) {
- currentRow.setAttribute(HTML.ATTR_CLASS, "dr-table-firstrow rich-table-firstrow"); //$NON-NLS-1$
+ currentRow.setAttribute(HTML.ATTR_CLASS, firstRowClass); //$NON-NLS-1$
} else {
- currentRow.setAttribute(HTML.ATTR_CLASS, "dr-table-row rich-table-row"); //$NON-NLS-1$
+ currentRow.setAttribute(HTML.ATTR_CLASS, nonFirstRowClass); //$NON-NLS-1$
}
}
@@ -168,7 +179,7 @@
* Replaces all occurencies of {@link #TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER} tag in
* the {@code visualNode} by the tag's child.
* @see #addSubTableOrColumnGroupToTable(Node)
- * */
+ */
private static void fixSubTables(final nsIDOMNode visualNode) {
final nsIDOMElement element = (nsIDOMElement) visualNode;
final nsIDOMNodeList subTableContainers = element.getElementsByTagName(TAG_SUB_TABLE_OR_COLUMN_GROUP_CONTAINER);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.richfaces/src/org/jboss/tools/jsf/vpe/richfaces/template/RichFacesOrderingList.java 2008-11-11 08:14:35 UTC (rev 11654)
@@ -547,8 +547,10 @@
// ---------- FINALIZING and children encoding -----------
contentTable.appendChild(thead);
- new RichFacesDataTableChildrenEncoder(creationData, visualDocument,
- sourceElement, contentTable).encodeChildren();
+ RichFacesDataTableChildrenEncoder childrenEncoder = new RichFacesDataTableChildrenEncoder(creationData, visualDocument,
+ sourceElement, contentTable);
+ childrenEncoder.setRowClasses(CSS_LIST_ROW_CLASS, CSS_LIST_ROW_CLASS);
+ childrenEncoder.encodeChildren();
//contentTable.appendChild(tfoot);
contentDiv.appendChild(contentTable);
//outputDiv.appendChild(contentDiv);
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/column.xhtml.xml 2008-11-11 08:14:35 UTC (rev 11654)
@@ -1,23 +1,21 @@
<tests>
<test id="column1">
- <TD CLASS="dr-table-headercell rich-table-headercell" COLSPAN="3"
- ID="column1">
+ <TD COLSPAN="3" CLASS="dr-table-headercell rich-table-headercell">
<SPAN> FIELDS</SPAN>
</TD>
</test>
<test id="column2">
- <TD CLASS="dr-table-headercell rich-table-headercell" BREAKBEFORE="true"
- ID="column2">
- <SPAN > field1</SPAN>
+ <TD BREAKBEFORE="true" CLASS="dr-table-headercell rich-table-headercell">
+ <SPAN> field1</SPAN>
</TD>
</test>
<test id="column3">
- <TD CLASS="dr-table-cell rich-table-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell" ID="column3">
+ <TD CLASS="dr-table-cell rich-table-cell">
<SPAN> #{row.field1}</SPAN>
</TD>
</test>
<test id="column4">
- <TD CLASS="dr-table-footercell rich-table-footercell" ID="column4">
+ <TD CLASS="dr-table-footercell rich-table-footercell">
<SPAN> footer1</SPAN>
</TD>
</test>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/dataTable.xhtml.xml 2008-11-11 08:14:35 UTC (rev 11654)
@@ -8,8 +8,8 @@
<TR CLASS="dr-table-header rich-table-header"
STYLE="/background-image: url\(.*resources/common/background.gif\);/">
<TD ROWSPAN="2" CLASS="dr-table-headercell rich-table-headercell">
- <IMG WIDTH="1" HEIGHT="1"
- SRC="/.*resources/spacer/spacer.gif/"/>
+ <IMG WIDTH="1" HEIGHT="1" SRC="/.*resources/spacer/spacer.gif/"
+ STYLE="" />
</TD>
<TD COLSPAN="3" CLASS="dr-table-headercell rich-table-headercell">
<SPAN> FIELDS</SPAN>
@@ -30,7 +30,7 @@
<TFOOT>
<TR CLASS="dr-table-footer rich-table-footer">
<TD CLASS="dr-table-footercell rich-table-footercell">
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
<TD CLASS="dr-table-footercell rich-table-footercell">
<SPAN> footer1</SPAN>
@@ -45,20 +45,16 @@
</TFOOT>
<TBODY>
<TR CLASS="dr-subtable-cell rich-subtable-cell">
- <TD
- CLASS="dr-table-cell rich-table-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell">
+ <TD CLASS="dr-table-cell rich-table-cell">
<SPAN> #{rowKey}</SPAN>
</TD>
- <TD
- CLASS="dr-table-cell rich-table-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell">
+ <TD CLASS="dr-table-cell rich-table-cell">
<SPAN> #{row.field1}</SPAN>
</TD>
- <TD
- CLASS="dr-table-cell rich-table-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell">
+ <TD CLASS="dr-table-cell rich-table-cell">
<SPAN> #{row.field2}</SPAN>
</TD>
- <TD
- CLASS="dr-table-cell rich-table-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell dr-subtable-cell rich-subtable-cell">
+ <TD CLASS="dr-table-cell rich-table-cell">
<SPAN> #{row.field3}</SPAN>
</TD>
</TR>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml
===================================================================
(Binary files differ)
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/extendedDataTable.xhtml.xml 2008-11-11 08:14:35 UTC (rev 11654)
@@ -1,205 +1,118 @@
<tests>
<test id="extendedDataTable">
- <TABLE>
- <TR>
- <TD>
- <DIV CLASS="dr-table-hidden" STYLE="width: 100%; height: 500px;">
- <TABLE WIDTH="580" ID="table" VALUE="#{capitalsBean.capitals}"
- VAR="cap" SORTMODE="#{extendedTableBean.sortMode}" SELECTIONMODE="#{extendedTableBean.selectionMode}"
- CLASS="dr-table rich-table">
- <COLGROUP SPAN="4">
- </COLGROUP>
- <THEAD>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
- <TR>
- <TD>
- <SPAN> Flag</SPAN>
- </TD>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- </TABLE>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
- <TR>
- <TD>
- <SPAN> State Name</SPAN>
- </TD>
- <TD>
- <IMG
- SRC="/.*resources/extendedDataTable/sortable.gif/"/>
- </TD>
- </TR>
- </TABLE>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
- <TR>
- <TD>
- <SPAN> State Capital</SPAN>
- </TD>
- <TD>
- <IMG
- SRC="/.*resources/extendedDataTable/sortable.gif/"/>
- </TD>
- </TR>
- </TABLE>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0">
- <TR>
- <TD>
- <SPAN> Time Zone</SPAN>
- </TD>
- <TD>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <TR CLASS="dr-table-subheader rich-table-subheader">
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <DIV STYLE="padding: 4px;">
- <INPUT TYPE="text" CLASS="extendedTable-input"/>
- </DIV>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <DIV STYLE="padding: 4px;">
- <INPUT TYPE="text" CLASS="extendedTable-input"/>
- </DIV>
- </TD>
- <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
- SCOP="col">
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- </THEAD>
- <TBODY>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;"/>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.state}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.name}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;"/>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.state}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.name}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;"/>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.state}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.name}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;"/>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.state}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.name}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <IMG
- SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
- STYLE="-moz-user-modify: read-write;"/>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.state}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.state}</SPAN>
- </TD>
- <TD WIDTH="170" CLASS="dr-table-cell rich-table-cell"
- SORTABLE="true" SORTBY="#{cap.name}" FILTERBY="#{cap.state}"
- FILTEREVENT="onkeyup">
- <SPAN> #{cap.name}</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" SORTABLE="false">
- <SPAN> #{cap.timeZone}</SPAN>
- </TD>
- </TR>
- </TBODY>
- </TABLE>
- </DIV>
- </TD>
- <TD STYLE="height: 100%; width: 17px;">
- <DIV STYLE="height: 100%; overflow-y: scroll;">
- </DIV>
- <BR _MOZ_DIRTY="" TYPE="_moz"/>
- </TD>
- </TR>
- </TABLE>
+ <DIV STYLE="width: 580px; height: 400px;">
+ <TABLE WIDTH="100%" HEIGHT="100%" CELLSPACING="0" CELLPADDING="0"
+ BORDER="0">
+ <COLGROUP>
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ </COLGROUP>
+ <THEAD>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN> Flag</SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN> State Name</SPAN>
+ </SPAN>
+ <IMG STYLE="vertical-align: middle;"
+ SRC="/.*resources/extendedDataTable/sortable.gif/"/>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN> State Capital</SPAN>
+ </SPAN>
+ <IMG STYLE="vertical-align: middle;"
+ SRC="/.*resources/extendedDataTable/sortable.gif/"/>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <SPAN>
+ <SPAN> Time Zone</SPAN>
+ </SPAN>
+ </TH>
+ <TH CLASS="dr-table-subheadercell rich-table-subheadercell">
+ </TH>
+ </TR>
+ <TR CLASS="dr-table-subheader rich-table-subheader">
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <DIV STYLE="padding: 4px;">
+ <INPUT TYPE="text" CLASS="extendedTable-input" />
+ </DIV>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ <DIV STYLE="padding: 4px;">
+ <INPUT TYPE="text" CLASS="extendedTable-input" />
+ </DIV>
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell"
+ SCOP="col">
+ </TD>
+ <TD CLASS="dr-table-subheadercell rich-table-subheadercell">
+ </TD>
+ </TR>
+ </THEAD>
+ <TFOOT>
+ <TR CLASS="dr-table-subfooter rich-table-subfooter">
+ <TD>
+ </TD>
+ </TR>
+ </TFOOT>
+ <TBODY>
+ <TR>
+ <TD VALIGN="top" COLSPAN="4" STYLE="padding: 0px;">
+ <TABLE WIDTH="100%" HEIGHT="100%">
+ <COLGROUP>
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ <COL WIDTH="100" />
+ <COL />
+ </COLGROUP>
+ <TBODY>
+ <TR>
+ <TD SORTABLE="false" CLASS="dr-table-cell rich-table-cell">
+ <IMG
+ SRC="/.*org.jboss.tools.vpe/ve/unresolved_image.gif/"
+ STYLE="-moz-user-modify: read-write;" />
+ </TD>
+ <TD WIDTH="170" SORTABLE="true" SORTBY="#{cap.state}"
+ FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
+ CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{cap.state}</SPAN>
+ </TD>
+ <TD WIDTH="170" SORTABLE="true" SORTBY="#{cap.name}"
+ FILTERBY="#{cap.state}" FILTEREVENT="onkeyup"
+ CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{cap.name}</SPAN>
+ </TD>
+ <TD SORTABLE="false" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{cap.timeZone}</SPAN>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </TD>
+ <TD WIDTH="17" ALIGN="right">
+ <DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
+ </DIV>
+ </TD>
+ </TR>
+ </TBODY>
+ </TABLE>
+ </DIV>
</test>
</tests>
\ No newline at end of file
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/orderingList.xhtml.xml 2008-11-11 08:14:35 UTC (rev 11654)
@@ -28,16 +28,14 @@
</TD>
</TR>
</THEAD>
- <TBODY>
- <TR CLASS="rich-ordering-list-row">
- <TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
- <SPAN> You must be evil</SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell">
- <SPAN> Chris Rea</SPAN>
- </TD>
- </TR>
- </TBODY>
+ <TR CLASS="rich-ordering-list-row">
+ <TD WIDTH="180" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> You must be evil</SPAN>
+ </TD>
+ <TD CLASS="dr-table-cell rich-table-cell">
+ <SPAN> Chris Rea</SPAN>
+ </TD>
+ </TR>
</TABLE>
</DIV>
</TD>
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2008-11-11 08:12:16 UTC (rev 11653)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/resources/richFacesTest/WebContent/pages/components/scrollableDataTable.xhtml.xml 2008-11-11 08:14:35 UTC (rev 11654)
@@ -4,155 +4,157 @@
<TR>
<TD>
<DIV CLASS="dr-table-hidden" STYLE="width: 700px; height: 400px;">
- <TABLE WIDTH="700" ROWKEYVAR="rkv" FROZENCOLCOUNT="1" ID="carList"
- ROWS="40" COLUMNCLASSES="col" VALUE="#{dataTableScrollerBean.allCars}"
- VAR="category" SORTMODE="single" BINDING="#{dataTableScrollerBean.table}"
- SORTORDER="#{dataTableScrollerBean.order}" SELECTION="#{dataTableScrollerBean.selection}"
- CLASS="dr-table rich-table">
+ <TABLE WIDTH="700" ID="carList" ROWKEYVAR="rkv"
+ FROZENCOLCOUNT="1" ROWS="40" COLUMNCLASSES="col"
+ VALUE="#{dataTableScrollerBean.allCars}" VAR="category" SORTMODE="single"
+ BINDING="#{dataTableScrollerBean.table}" SORTORDER="#{dataTableScrollerBean.order}"
+ SELECTION="#{dataTableScrollerBean.selection}" CLASS="dr-table rich-table">
<COLGROUP SPAN="6">
</COLGROUP>
<THEAD>
<TR CLASS="dr-table-subheader rich-table-subheader">
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> Make </SPAN>
+ <SPAN CLASS="headerText"> Make</SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> Model </SPAN>
+ <SPAN CLASS="headerText"> Model</SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> Price </SPAN>
+ <SPAN CLASS="headerText"> Price</SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> Mileage </SPAN>
+ <SPAN CLASS="headerText"> Mileage</SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> VIN </SPAN>
+ <SPAN CLASS="headerText"> VIN</SPAN>
</TD>
<TD CLASS="dr-table-subheadercell rich-table-subheadercell"
SCOP="col">
- <SPAN CLASS="headerText"> Stock </SPAN>
+ <SPAN CLASS="headerText"> Stock</SPAN>
</TD>
</TR>
</THEAD>
<TBODY>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" ID="make">
- <SPAN> #{category.make} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="model">
- <SPAN> #{category.model} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="price">
- <SPAN> #{category.price} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
- <SPAN> #{category.mileage} </SPAN>
- </TD>
- <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
- <SPAN> #{category.vin} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
- <SPAN> #{category.stock} </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" ID="make">
- <SPAN> #{category.make} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="model">
- <SPAN> #{category.model} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="price">
- <SPAN> #{category.price} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
- <SPAN> #{category.mileage} </SPAN>
- </TD>
- <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
- <SPAN> #{category.vin} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
- <SPAN> #{category.stock} </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" ID="make">
- <SPAN> #{category.make} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="model">
- <SPAN> #{category.model} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="price">
- <SPAN> #{category.price} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
- <SPAN> #{category.mileage} </SPAN>
- </TD>
- <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
- <SPAN> #{category.vin} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
- <SPAN> #{category.stock} </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" ID="make">
- <SPAN> #{category.make} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="model">
- <SPAN> #{category.model} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="price">
- <SPAN> #{category.price} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
- <SPAN> #{category.mileage} </SPAN>
- </TD>
- <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
- <SPAN> #{category.vin} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
- <SPAN> #{category.stock} </SPAN>
- </TD>
- </TR>
- <TR CLASS="dr-table-firstrow rich-table-firstrow">
- <TD CLASS="dr-table-cell rich-table-cell" ID="make">
- <SPAN> #{category.make} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="model">
- <SPAN> #{category.model} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="price">
- <SPAN> #{category.price} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="mileage">
- <SPAN> #{category.mileage} </SPAN>
- </TD>
- <TD WIDTH="200" CLASS="dr-table-cell rich-table-cell" ID="vin">
- <SPAN> #{category.vin} </SPAN>
- </TD>
- <TD CLASS="dr-table-cell rich-table-cell" ID="stock">
- <SPAN> #{category.stock} </SPAN>
- </TD>
- </TR>
</TBODY>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.make}</SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.model}</SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.price}</SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.mileage}</SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.vin}</SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.stock}</SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.make}</SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.model}</SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.price}</SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.mileage}</SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.vin}</SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.stock}</SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.make}</SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.model}</SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.price}</SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.mileage}</SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.vin}</SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.stock}</SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.make}</SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.model}</SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.price}</SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.mileage}</SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.vin}</SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.stock}</SPAN>
+ </TD>
+ </TR>
+ <TR CLASS="dr-table-firstrow rich-table-firstrow">
+ <TD ID="make" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.make}</SPAN>
+ </TD>
+ <TD ID="model" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.model}</SPAN>
+ </TD>
+ <TD ID="price" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.price}</SPAN>
+ </TD>
+ <TD ID="mileage" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.mileage}</SPAN>
+ </TD>
+ <TD WIDTH="200" ID="vin" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.vin}</SPAN>
+ </TD>
+ <TD ID="stock" CLASS="dr-table-cell rich-table-cell">
+ <SPAN> #{category.stock}</SPAN>
+ </TD>
+ </TR>
</TABLE>
</DIV>
</TD>
<TD>
<DIV STYLE="overflow: scroll; width: 17px; height: 100%;">
</DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
<TR>
<TD>
<DIV STYLE="overflow: scroll; width: 100%; height: 17px;">
</DIV>
+ <BR _MOZ_DIRTY="" TYPE="_moz" />
</TD>
</TR>
</TABLE>
17 years, 5 months
JBoss Tools SVN: r11653 - in trunk/ws/plugins/org.jboss.tools.ws.core: src/org/jboss/tools/ws/core/classpath and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-11-11 03:12:16 -0500 (Tue, 11 Nov 2008)
New Revision: 11653
Modified:
trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java
Log:
JBIDE-3157: WS classpath container should allow modification for source and JavaDoc locations
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-11-11 08:12:08 UTC (rev 11652)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/META-INF/MANIFEST.MF 2008-11-11 08:12:16 UTC (rev 11653)
@@ -21,7 +21,8 @@
org.eclipse.jst.jsf.ui,
org.eclipse.jdt.launching,
org.eclipse.jst.j2ee,
- org.eclipse.jst.ws.consumption.ui
+ org.eclipse.jst.ws.consumption.ui,
+ org.jboss.ide.eclipse.as.classpath.core
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %PLUGIN_PROVIDER
Export-Package: org.jboss.tools.ws.core,
Modified: trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java 2008-11-11 08:12:08 UTC (rev 11652)
+++ trunk/ws/plugins/org.jboss.tools.ws.core/src/org/jboss/tools/ws/core/classpath/JBossWSRuntimeClassPathInitializer.java 2008-11-11 08:12:16 UTC (rev 11653)
@@ -17,20 +17,24 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.ClasspathContainerInitializer;
+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.eclipse.jdt.launching.JavaRuntime;
+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.ws.core.messages.JBossWSCoreMessages;
/**
* @author Grid Qian
*/
public class JBossWSRuntimeClassPathInitializer extends
- ClasspathContainerInitializer {
-
+AbstractClasspathContainerInitializer {
+ public final static String JBOSS_WS_RUNTIME_CLASSPATH_CONTAINER_ID = "org.jboss.ws.runtime.classpath";
public JBossWSRuntimeClassPathInitializer() {
}
@@ -55,12 +59,13 @@
return new JBossWSRuntimeClasspathContainer(path).getClasspathEntries();
}
- public class JBossWSRuntimeClasspathContainer implements
- IClasspathContainer {
+ public class JBossWSRuntimeClasspathContainer extends
+ AbstractClasspathContainer {
private IPath path;
private IClasspathEntry[] entries = null;
public JBossWSRuntimeClasspathContainer(IPath path) {
+ super(path,JBossWSCoreMessages.JBossWS_Runtime_Lib,null);
this.path = path;
}
@@ -75,7 +80,52 @@
public IPath getPath() {
return path;
}
+
+ public IClasspathEntry[] computeEntries() {
+ ArrayList<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();
+ JBossWSRuntime jbws = JBossWSRuntimeManager.getInstance()
+ .findRuntimeByName(segment);
+
+ List<String> jars = null;
+ if (jbws != null) {
+ jars = JBossWSRuntimeManager.getInstance().getAllRuntimeJars(jbws);
+ for (String jar : jars) {
+ entryList.add(getEntry(new Path(jar)));
+ }
+ }
+ if(jars == null){
+ return new IClasspathEntry[0];
+ }
+
+ for (String jar : jars) {
+ IPath entryPath = new Path(jar);
+
+ 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();
+ }
+
+ IAccessRule[] access = {};
+ IClasspathEntry entry = JavaCore.newLibraryEntry(entryPath,
+ sourceAttachementPath, sourceAttachementRootPath,
+ access, attrs, false);
+ entryList.add(entry);
+ }
+ entries = entryList.toArray(new IClasspathEntry[entryList.size()]);
+ return entries;
+ }
+
public IClasspathEntry[] getClasspathEntries() {
if (entries == null) {
ArrayList<IClasspathEntry> entryList = new ArrayList<IClasspathEntry>();
@@ -90,8 +140,35 @@
}
entries = entryList.toArray(new IClasspathEntry[entryList
.size()]);
- if (entries == null)
+ if(entryList.size() == 0){
return new IClasspathEntry[0];
+ }
+
+ for (String jar : jars) {
+
+ IPath entryPath = new Path(jar);
+
+ 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();
+ }
+
+ IAccessRule[] access = {};
+ IClasspathEntry entry = JavaCore.newLibraryEntry(entryPath,
+ sourceAttachementPath, sourceAttachementRootPath,
+ access, attrs, false);
+ entryList.add(entry);
+ }
}
}
return entries;
@@ -134,4 +211,14 @@
return true;
}
+ @Override
+ protected AbstractClasspathContainer createClasspathContainer(IPath path) {
+ return new JBossWSRuntimeClasspathContainer(path);
+ }
+
+ @Override
+ protected String getClasspathContainerID() {
+ return JBOSS_WS_RUNTIME_CLASSPATH_CONTAINER_ID;
+ }
+
}
17 years, 5 months
JBoss Tools SVN: r11652 - trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF.
by jbosstools-commits@lists.jboss.org
Author: Grid.Qian
Date: 2008-11-11 03:12:08 -0500 (Tue, 11 Nov 2008)
New Revision: 11652
Modified:
trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
Log:
JBIDE-3157: WS classpath container should allow modification for source and JavaDoc locations
Modified: trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-11-11 07:03:47 UTC (rev 11651)
+++ trunk/ws/plugins/org.jboss.tools.ws.creation.core/META-INF/MANIFEST.MF 2008-11-11 08:12:08 UTC (rev 11652)
@@ -29,7 +29,8 @@
org.eclipse.jdt.ui,
org.eclipse.wst.common.project.facet.core,
org.eclipse.wst.server.core,
- org.jboss.tools.common
+ org.jboss.tools.common,
+ org.jboss.ide.eclipse.as.classpath.core;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.tools.ws.creation.core,
org.jboss.tools.ws.creation.core.commands,
17 years, 5 months
JBoss Tools SVN: r11651 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-11-11 02:03:47 -0500 (Tue, 11 Nov 2008)
New Revision: 11651
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java
Log:
JBIDE-3079: Deployment does not work for the ESB project which is imported from other workspace
Added: 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 (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2008-11-11 07:03:47 UTC (rev 11651)
@@ -0,0 +1,143 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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;
+import java.util.Iterator;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.ModuleCoreNature;
+import org.eclipse.wst.common.componentcore.internal.StructureEdit;
+import org.eclipse.wst.common.componentcore.internal.util.IModuleConstants;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.ModuleDelegate;
+import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+import org.jboss.tools.esb.core.ESBProjectCorePlugin;
+import org.jboss.tools.esb.core.StatusUtils;
+
+public class JBossESBModuleFactory extends ProjectModuleFactoryDelegate {
+
+ private static final String ID = "org.jboss.tools.esb.project.core.moduleFactory"; //$NON-NLS-1$
+ protected ArrayList moduleDelegates = new ArrayList();
+
+ /*
+ * @see DeployableProjectFactoryDelegate#getFactoryID()
+ */
+ public static String getFactoryId() {
+ return ID;
+ }
+ protected IModule[] createModules(ModuleCoreNature nature) {
+
+ IProject project = nature.getProject();
+ try {
+ IVirtualComponent comp = ComponentCore.createComponent(project);
+ return createModuleDelegates(comp);
+ } catch (Exception e) {
+ ESBProjectCorePlugin.getDefault().getLog().log(StatusUtils.errorStatus(e));
+ }
+ return null;
+ }
+ /**
+ * Returns true if the project represents a deployable project of this type.
+ *
+ * @param project
+ * org.eclipse.core.resources.IProject
+ * @return boolean
+ */
+ protected boolean isValidModule(IProject project) {
+ try {
+ IFacetedProject facetedProject = ProjectFacetsManager.create(project);
+ if (facetedProject == null)
+ return false;
+ IProjectFacet webFacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
+ return facetedProject.hasProjectFacet(webFacet);
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.wst.server.core.model.ModuleFactoryDelegate#getModuleDelegate(org.eclipse.wst.server.core.IModule)
+ */
+ public ModuleDelegate getModuleDelegate(IModule module) {
+ for (Iterator iter = moduleDelegates.iterator(); iter.hasNext();) {
+ ModuleDelegate element = (ModuleDelegate) iter.next();
+ if (module == element.getModule())
+ return element;
+ }
+ return null;
+
+ }
+
+ protected IModule[] createModules(IProject project) {
+ try {
+ if (project.exists()) {
+ ModuleCoreNature nature = (ModuleCoreNature) project.getNature(IModuleConstants.MODULE_NATURE_ID);
+ if (nature != null)
+ return createModules(nature);
+ }
+ } catch (CoreException e) {
+ ESBProjectCorePlugin.getDefault().getLog().log(StatusUtils.errorStatus(e));
+ }
+ return null;
+ }
+
+ protected IModule[] createModuleDelegates(IVirtualComponent component) throws CoreException {
+ JBossESBModuleDeployable moduleDelegate = null;
+ IModule module = null;
+ try {
+ if(isValidModule(component.getProject())) {
+ moduleDelegate = new JBossESBModuleDeployable(component.getProject(),component);
+ module = createModule(component.getName(), component.getName(),ESBProjectConstant.ESB_PROJECT_FACET, moduleDelegate.getVersion(), moduleDelegate.getProject());
+ moduleDelegate.initialize(module);
+ }
+ } catch (Exception e) {
+ ESBProjectCorePlugin.getDefault().getLog().log(StatusUtils.errorStatus(e));
+ } finally {
+ if (module != null) {
+ if (getModuleDelegate(module) == null)
+ moduleDelegates.add(moduleDelegate);
+ }
+ }
+ if (module == null)
+ return null;
+ return new IModule[] {module};
+ }
+
+ /**
+ * Returns the list of resources that the module should listen to
+ * for state changes. The paths should be project relative paths.
+ * Subclasses can override this method to provide the paths.
+ *
+ * @return a possibly empty array of paths
+ */
+ protected IPath[] getListenerPaths() {
+ return new IPath[] {
+ new Path(".project"), // nature //$NON-NLS-1$
+ new Path(StructureEdit.MODULE_META_FILE_NAME), // component
+ new Path(".settings/org.eclipse.wst.common.project.facet.core.xml") // facets //$NON-NLS-1$
+ };
+ }
+
+}
17 years, 5 months
JBoss Tools SVN: r11650 - in trunk/esb/plugins/org.jboss.tools.esb.project.core: src/org/jboss/tools/esb/core/module and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-11-11 02:02:33 -0500 (Tue, 11 Nov 2008)
New Revision: 11650
Added:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDeployable.java
Removed:
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
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF
Log:
JBIDE-3079: Deployment does not work for the ESB project which is imported from other workspace
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 2008-11-11 05:22:54 UTC (rev 11649)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/META-INF/MANIFEST.MF 2008-11-11 07:02:33 UTC (rev 11650)
@@ -25,7 +25,10 @@
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.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"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Export-Package: org.jboss.tools.esb.core,
Deleted: 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 2008-11-11 05:22:54 UTC (rev 11649)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDelegate.java 2008-11-11 07:02:33 UTC (rev 11650)
@@ -1,162 +0,0 @@
-package org.jboss.tools.esb.core.module;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jdt.core.IJavaProject;
-import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.IModuleFile;
-import org.eclipse.wst.server.core.model.IModuleResource;
-import org.eclipse.wst.server.core.util.ModuleFile;
-import org.eclipse.wst.server.core.util.ModuleFolder;
-import org.eclipse.wst.server.core.util.ProjectModule;
-import org.jboss.tools.esb.core.ESBProjectConstant;
-import org.jboss.tools.esb.core.facet.IJBossESBFacetDataModelProperties;
-
-public class JBossESBModuleDelegate extends ProjectModule {
-
- public JBossESBModuleDelegate(IProject project){
- super(project);
- }
- @Override
- public IModule[] getChildModules() {
- return null;
- }
-
- public IModuleResource[] members() throws CoreException {
- IProject project = getProject();
- String esbFolder = (String)project.getPersistentProperty(IJBossESBFacetDataModelProperties.QNAME_ESB_CONTENT_FOLDER);
- if(esbFolder == null || "".equals(esbFolder)){
- esbFolder = ESBProjectConstant.DEFAULT_ESB_CONFIG_RESOURCE_FOLDER;
- }
- IFolder configFolder = project.getFolder(esbFolder);
- IJavaProject javaPrj = JavaCore.create(project);
- IPath output = javaPrj.getOutputLocation();
- // if the jboss-esb.xml file is not in META-INF folder, try to get it from other folder of the project
- // block this logic as Max's suggestion
- //List<IModuleResource> mrs = getConfigModuleFile(project, configFolder);
-
- List<IModuleResource> mrs = new ArrayList<IModuleResource>();
-
- IModuleResource[] esbContent = getModuleResources(Path.EMPTY, configFolder);
- IModuleResource[] classes = getModuleResources(Path.EMPTY, project.getWorkspace().getRoot().getFolder(output));
- IModuleResource[] allResource = new IModuleResource[esbContent.length + classes.length + mrs.size()];
- System.arraycopy(esbContent, 0, allResource, 0, esbContent.length);
- System.arraycopy(classes, 0, allResource, esbContent.length, classes.length);
- if(mrs.size() > 0){
- IModuleResource[] mr = mrs.toArray(new IModuleResource[]{});
- System.arraycopy(mr, 0, allResource, esbContent.length + classes.length, mr.length);
- }
- return allResource;
- }
-
- private List<IModuleResource> getConfigModuleFile(IProject project, IFolder configFolder) throws CoreException {
- List<IModuleResource> mrs = new ArrayList<IModuleResource>();
- IFolder metainf = configFolder.getFolder(ESBProjectConstant.META_INF);
- IResource res = metainf.findMember(ESBProjectConstant.ESB_CONFIG_JBOSSESB);
- IModuleFile tmpmf;
- if(res == null){
- tmpmf = getModuleResourcesOutofESBContent(new Path(ESBProjectConstant.META_INF), project, ESBProjectConstant.ESB_CONFIG_JBOSSESB);
- if( tmpmf != null){
- mrs.add(tmpmf);
- }
- }
-
- //check the deployment.xml just like jboss-esb.xml
- res = metainf.findMember(ESBProjectConstant.ESB_CONFIG_DEPLOYMENT);
- if(res == null){
- tmpmf = getModuleResourcesOutofESBContent(new Path(ESBProjectConstant.META_INF), project, ESBProjectConstant.ESB_CONFIG_DEPLOYMENT);
- if(tmpmf != null){
- mrs.add(tmpmf);
- }
- }
-
- res = configFolder.findMember(ESBProjectConstant.ESB_CONFIG_QUEUE_SERVICE_JBM);
- if(res == null){
- tmpmf = getModuleResourcesOutofESBContent(Path.EMPTY, project, ESBProjectConstant.ESB_CONFIG_QUEUE_SERVICE_JBM);
- if(tmpmf != null){
- mrs.add(tmpmf);
- }
- }
- res = configFolder.findMember(ESBProjectConstant.ESB_CONFIG_QUEUE_SERVICE_JBMQ);
- if(res == null){
- tmpmf = getModuleResourcesOutofESBContent(Path.EMPTY, project, ESBProjectConstant.ESB_CONFIG_QUEUE_SERVICE_JBMQ);
- if( tmpmf != null ){
- mrs.add(tmpmf);
- }
- }
-
- return mrs;
- }
-
-
- @Override
- public IStatus validate() {
- return null;
- }
-
- @Override
- protected IModuleResource[] getModuleResources(IPath path, IContainer container) throws CoreException {
-
- IResource[] resources = container.members();
- if (resources != null) {
- int size = resources.length;
- List<IModuleResource> list = new ArrayList<IModuleResource>(size);
- for (int i = 0; i < size; i++) {
- IResource resource = resources[i];
- if (resource != null && resource.exists()) {
- String name = resource.getName();
- if (resource instanceof IContainer) {
- IContainer container2 = (IContainer) resource;
- ModuleFolder mf = new ModuleFolder(container2, name, path);
- mf.setMembers(getModuleResources(path.append(name), container2));
- list.add(mf);
- } else if (resource instanceof IFile) {
- list.add(new ModuleFile((IFile) resource, name, path));
- }
- }
- }
- IModuleResource[] moduleResources = new IModuleResource[list.size()];
- list.toArray(moduleResources);
- return moduleResources;
- }
- return new IModuleResource[0];
- }
-
- // create moduleresource for a name specified resource
- protected IModuleFile getModuleResourcesOutofESBContent(IPath path, IContainer container, String fileName) throws CoreException {
-
- IResource file = container.findMember(fileName, false);
- if(file != null){
- return new ModuleFile((IFile)file, file.getName(), path);
- }
-
- IResource[] resources = container.members();
- if (resources != null) {
- int size = resources.length;
- for (int i = 0; i < size; i++) {
- IResource resource = resources[i];
- if (resource != null && resource.exists()) {
- if (resource instanceof IContainer) {
- IModuleFile mf = getModuleResourcesOutofESBContent(path, (IContainer)resource, fileName);
-
- if(mf != null) return mf;
- }
- }
- }
-
- }
-
- return null;
- }
-}
Added: trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDeployable.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDeployable.java (rev 0)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleDeployable.java 2008-11-11 07:02:33 UTC (rev 11650)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2008 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;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.web.internal.deployables.ComponentDeployable;
+import org.jboss.tools.esb.core.ESBProjectConstant;
+
+public class JBossESBModuleDeployable extends ComponentDeployable {
+
+ public JBossESBModuleDeployable(IProject project, IVirtualComponent component) {
+ super(project);
+ }
+
+
+ public String getURI(IModule module) {
+ IVirtualComponent comp = ComponentCore.createComponent(module.getProject());
+ String aURI = null;
+ if (comp !=null) {
+ if (!comp.isBinary() && isProjectOfType(module.getProject(),ESBProjectConstant.ESB_PROJECT_FACET)) {
+ IVirtualReference ref = component.getReference(comp.getName());
+ aURI = ref.getRuntimePath().append(comp.getName()+".esb").toString(); //$NON-NLS-1$
+ }
+ }
+
+ if (aURI !=null && aURI.length()>1 && aURI.startsWith("/")) //$NON-NLS-1$
+ aURI = aURI.substring(1);
+ return aURI;
+ }
+
+ public String getVersion() {
+ IFacetedProject facetedProject = null;
+ try {
+ facetedProject = ProjectFacetsManager.create(component.getProject());
+ if (facetedProject !=null && ProjectFacetsManager.isProjectFacetDefined(ESBProjectConstant.ESB_PROJECT_FACET)) {
+ IProjectFacet projectFacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
+ return facetedProject.getInstalledVersion(projectFacet).getVersionString();
+ }
+ } catch (Exception e) {
+ //Ignore
+ }
+ return "4.2"; //$NON-NLS-1$
+ }
+
+
+}
Deleted: 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 2008-11-11 05:22:54 UTC (rev 11649)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/module/JBossESBModuleFactory.java 2008-11-11 07:02:33 UTC (rev 11650)
@@ -1,48 +0,0 @@
-package org.jboss.tools.esb.core.module;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.model.ModuleDelegate;
-import org.eclipse.wst.server.core.util.ProjectModuleFactoryDelegate;
-import org.jboss.tools.esb.core.ESBProjectConstant;
-import org.jboss.tools.esb.core.ESBProjectCorePlugin;
-
-public class JBossESBModuleFactory extends ProjectModuleFactoryDelegate {
-
- public JBossESBModuleFactory() {
- }
-
- @Override
- public ModuleDelegate getModuleDelegate(IModule module) {
- if(module instanceof JBossESBModule){
- IProject project = module.getProject();
- return new JBossESBModuleDelegate(project);
- }
- return null;
- }
-
- protected IModule[] createModules(IProject project) {
- IFacetedProject facetProject;
- try {
- facetProject = ProjectFacetsManager.create(project);
- if (facetProject == null) {
- return null;
- }
- IProjectFacet esbFacet = ProjectFacetsManager.getProjectFacet(ESBProjectConstant.ESB_PROJECT_FACET);
-
- if(facetProject.hasProjectFacet(esbFacet)){
- JBossESBModule module = new JBossESBModule(project, this, this.getId());
- return new IModule[]{ module };
- }
- } catch (CoreException e) {
- ESBProjectCorePlugin.getDefault().getLog().log(e.getStatus());
- }
- return null;
-
- }
-
-}
17 years, 5 months
JBoss Tools SVN: r11649 - trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2008-11-11 00:22:54 -0500 (Tue, 11 Nov 2008)
New Revision: 11649
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java
Log:
remove some useless code
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 2008-11-11 05:13:42 UTC (rev 11648)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.core/src/org/jboss/tools/esb/core/runtime/JBossRuntimeClassPathInitializer.java 2008-11-11 05:22:54 UTC (rev 11649)
@@ -83,7 +83,6 @@
private IPath path;
private boolean isFromServer = false;
private IClasspathEntry[] entries = null;
- private IJavaProject jproject;
private List<String> jars;
public JBossRuntimeClasspathContainer(IPath path, IJavaProject project,
@@ -91,7 +90,6 @@
super(path, JBossFacetCoreMessages.JBoss_Runtime, null);
this.path = path;
this.isFromServer = isFromServer;
- this.jproject = project;
}
public String getDescription() {
@@ -163,30 +161,8 @@
return entries;
}
- public void removeEntry(String jarName) {
- if (entries == null) {
- return;
- }
- IClasspathEntry[] newEntries = new IClasspathEntry[entries.length - 1];
- int i = 0;
- for (IClasspathEntry entry : entries) {
- if (!entry.toString().contains(jarName)) {
- newEntries[i++] = entry;
- }
- }
- entries = newEntries;
- }
-
}
- public boolean filterJars(String jarName, ArrayList<IClasspathEntry> list) {
- for (IClasspathEntry entry : list) {
- if (entry.getPath().lastSegment().equals(jarName)) {
- return false;
- }
- }
- return true;
- }
@Override
protected AbstractClasspathContainer createClasspathContainer(IPath path) {
17 years, 5 months