JBoss Tools SVN: r31312 - in trunk/runtime: plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-05-13 19:26:18 -0400 (Fri, 13 May 2011)
New Revision: 31312
Added:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.xml
Modified:
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties
trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
Log:
JBIDE-8730 JBoss Tools Runtime Detection doesn't work
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
import org.osgi.framework.BundleContext;
import org.osgi.service.prefs.BackingStoreException;
@@ -113,7 +114,8 @@
detector = (IRuntimeDetector) configurationElement.createExecutableExtension("class");
} catch (CoreException e) {
log(e);
- continue;
+ detector = new InvalidRuntimeDetector();
+ detector.setValid(false);
}
String name = configurationElement.getAttribute(NAME);
String preferenceId = configurationElement.getAttribute(PREFERENCE_ID);
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -24,6 +24,7 @@
private String name;
private String preferenceId;
private boolean enabled;
+ private boolean valid = true;
private int priority;
@Override
@@ -67,6 +68,9 @@
}
public boolean isEnabled() {
+ if (!isValid()) {
+ return false;
+ }
return enabled;
}
@@ -131,4 +135,11 @@
}
+ public boolean isValid() {
+ return valid;
+ }
+
+ public void setValid(boolean valid) {
+ this.valid = valid;
+ }
}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -49,4 +49,8 @@
void setPriority(int priority);
void computeIncludedServerDefinition(ServerDefinition serverDefinition);
+
+ boolean isValid();
+
+ void setValid(boolean valid);
}
Added: trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java (rev 0)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -0,0 +1,41 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.core.model;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public class InvalidRuntimeDetector extends AbstractRuntimeDetector {
+
+ @Override
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+
+ }
+
+ @Override
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ return null;
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ return false;
+ }
+
+}
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -20,6 +20,7 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
@@ -214,7 +215,7 @@
}
private TableViewer createDetectorViewer(Composite parent) {
- CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER
+ final CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER
| SWT.V_SCROLL | SWT.SINGLE);
Table table = tableViewer.getTable();
GridData gd = new GridData(GridData.FILL_BOTH);
@@ -243,7 +244,13 @@
public void checkStateChanged(CheckStateChangedEvent event) {
IRuntimeDetector detector = (IRuntimeDetector) event.getElement();
- detector.setEnabled(!detector.isEnabled());
+ if (detector.isValid()) {
+ detector.setEnabled(!detector.isEnabled());
+ } else {
+ MessageDialog.openWarning(getShell(), "Information", "The '" + detector.getName() + "' detector is invalid.");
+ tableViewer.setChecked(detector, false);
+ }
+
}
});
for (int i=0; i<runtimeDetectors.size(); i++) {
@@ -255,6 +262,7 @@
if (preferenceId != null && preferenceId.trim().length() > 0) {
Link link = new Link(table, SWT.NONE);
link.setText(" <a>Link</a>");
+ link.setEnabled(detector.isValid());
TableEditor editor = new TableEditor (table);
editor.grabHorizontal = editor.grabVertical = true;
editor.setEditor (link, item, 1);
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/build.properties 2011-05-13 23:26:18 UTC (rev 31312)
@@ -2,4 +2,5 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.properties
+ plugin.properties,\
+ plugin.xml
Added: trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.xml
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.xml (rev 0)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/plugin.xml 2011-05-13 23:26:18 UTC (rev 31312)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.jboss.tools.runtime.core.runtimeDetectors">
+ <runtimeDetector
+ id="org.jboss.tools.runtime.handlers.InvalidHandler"
+ name="Invalid"
+ class="org.jboss.tools.runtime.handlers.InvalidHandler"
+ preferenceId="org.jboss.tools.runtime.handlers.InvalidHandler"
+ priority="9999"/>
+ </extension>
+
+</plugin>
Modified: trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java
===================================================================
--- trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2011-05-13 23:17:27 UTC (rev 31311)
+++ trunk/runtime/tests/org.jboss.tools.runtime.test/src/org/jboss/tools/runtime/test/RuntimeDetectionTest.java 2011-05-13 23:26:18 UTC (rev 31312)
@@ -10,6 +10,7 @@
************************************************************************************/
package org.jboss.tools.runtime.test;
+import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.File;
@@ -41,6 +42,7 @@
import org.jboss.tools.runtime.core.JBossRuntimeLocator;
import org.jboss.tools.runtime.core.RuntimeCoreActivator;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
import org.jboss.tools.runtime.core.model.RuntimePath;
import org.jboss.tools.runtime.core.model.ServerDefinition;
import org.jboss.tools.runtime.ui.RuntimeUIActivator;
@@ -376,6 +378,18 @@
}
}
+ @Test
+ public void testInvalidDetectors() {
+ Set<IRuntimeDetector> detectors = RuntimeCoreActivator.getDeclaredRuntimeDetectors();
+ IRuntimeDetector invalidDetector = null;
+ for (IRuntimeDetector detector:detectors) {
+ if (detector instanceof InvalidRuntimeDetector) {
+ invalidDetector = detector;
+ }
+ }
+ assertFalse("Invalid detector is enabled.", invalidDetector.isEnabled());
+ }
+
private String serialize(Document doc) throws TransformerException {
StringWriter stringWriter = new StringWriter();
Transformer serializer = TransformerFactory.newInstance().newTransformer();
13 years, 6 months
JBoss Tools SVN: r31311 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-13 19:17:27 -0400 (Fri, 13 May 2011)
New Revision: 31311
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/FileSet.java
Log:
Removed unnecessary checks for null.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/FileSet.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/FileSet.java 2011-05-13 23:01:00 UTC (rev 31310)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/FileSet.java 2011-05-13 23:17:27 UTC (rev 31311)
@@ -26,7 +26,7 @@
public void add(IPath path, IType[] types) throws CoreException {
allpaths.add(path);
- if(types == null || types.length == 0) {
+ if(types.length == 0) {
nonmodel.add(path);
} else {
for (IType type: types) {
@@ -35,10 +35,10 @@
}
}
public void add(IPath path, IType type) throws CoreException {
- if(type == null) return;
allpaths.add(path);
- if(!checkType(type, path)) return;
- if(type.isAnnotation()) {
+ if(!checkType(type, path)) {
+ //do nothing, bug JDT
+ } else if(type.isAnnotation()) {
add(annotations, path, type);
} else if(type.isInterface()) {
add(interfaces, path, type);
@@ -46,8 +46,7 @@
add(classes, path, type);
IType[] ts = type.getTypes();
for (IType t: ts) {
- if(!checkType(t, path)) continue;
- if(Flags.isStatic(t.getFlags())) {
+ if(checkType(t, path) && Flags.isStatic(t.getFlags())) {
add(path, t);
}
}
@@ -87,7 +86,6 @@
}
public void add(IPath path, IPackageDeclaration pkg) throws CoreException {
- if(pkg == null) return;
allpaths.add(path);
packages.put(path, pkg);
}
13 years, 6 months
JBoss Tools SVN: r31310 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-13 19:01:00 -0400 (Fri, 13 May 2011)
New Revision: 31310
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java
Log:
Removed unnecessary check for null.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java 2011-05-13 22:45:22 UTC (rev 31309)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/BeansXMLDefinition.java 2011-05-13 23:01:00 UTC (rev 31310)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2009-2011 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.cdi.internal.core.impl.definition;
import java.util.HashSet;
@@ -7,6 +17,11 @@
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.text.INodeReference;
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
public class BeansXMLDefinition {
static String NODE_INTERCEPTORS = "Interceptors";
static String NODE_DECORATORS = "Decorators";
@@ -23,31 +38,34 @@
public BeansXMLDefinition() {}
public void setBeansXML(XModelObject beansXML) {
- if(beansXML == null || !beansXML.getModelEntity().getName().startsWith("FileCDIBeans")) return;
- XModelObject interceptorsObject = beansXML.getChildByPath(NODE_INTERCEPTORS);
- if(interceptorsObject != null) {
- XModelObject[] cs = interceptorsObject.getChildren();
- for (XModelObject o: cs) {
- interceptors.add(new XMLNodeReference(o, ATTR_CLASS));
+ if(beansXML.getModelEntity().getName().startsWith("FileCDIBeans")) {
+
+ XModelObject interceptorsObject = beansXML.getChildByPath(NODE_INTERCEPTORS);
+ if(interceptorsObject != null) {
+ XModelObject[] cs = interceptorsObject.getChildren();
+ for (XModelObject o: cs) {
+ interceptors.add(new XMLNodeReference(o, ATTR_CLASS));
+ }
}
- }
- XModelObject decoratorsObject = beansXML.getChildByPath(NODE_DECORATORS);
- if(decoratorsObject != null) {
- XModelObject[] cs = decoratorsObject.getChildren();
- for (XModelObject o: cs) {
- decorators.add(new XMLNodeReference(o, ATTR_CLASS));
+ XModelObject decoratorsObject = beansXML.getChildByPath(NODE_DECORATORS);
+ if(decoratorsObject != null) {
+ XModelObject[] cs = decoratorsObject.getChildren();
+ for (XModelObject o: cs) {
+ decorators.add(new XMLNodeReference(o, ATTR_CLASS));
+ }
}
- }
- XModelObject alternativesObject = beansXML.getChildByPath(NODE_ALTERNATIVES);
- if(alternativesObject != null) {
- XModelObject[] cs = alternativesObject.getChildren("CDIClass");
- for (XModelObject o: cs) {
- typeAlternatives.add(new XMLNodeReference(o, ATTR_CLASS));
+ XModelObject alternativesObject = beansXML.getChildByPath(NODE_ALTERNATIVES);
+ if(alternativesObject != null) {
+ XModelObject[] cs = alternativesObject.getChildren("CDIClass");
+ for (XModelObject o: cs) {
+ typeAlternatives.add(new XMLNodeReference(o, ATTR_CLASS));
+ }
+ cs = alternativesObject.getChildren("CDIStereotype");
+ for (XModelObject o: cs) {
+ stereotypeAlternatives.add(new XMLNodeReference(o, ATTR_STEREOTYPE));
+ }
}
- cs = alternativesObject.getChildren("CDIStereotype");
- for (XModelObject o: cs) {
- stereotypeAlternatives.add(new XMLNodeReference(o, ATTR_STEREOTYPE));
- }
+
}
}
13 years, 6 months
JBoss Tools SVN: r31309 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core: scanner and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-05-13 18:45:22 -0400 (Fri, 13 May 2011)
New Revision: 31309
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java
Log:
JBIDE-8941
https://issues.jboss.org/browse/JBIDE-8941
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-05-13 22:18:50 UTC (rev 31308)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-05-13 22:45:22 UTC (rev 31309)
@@ -41,6 +41,7 @@
import org.jboss.tools.cdi.seam.config.core.xml.SAXNode;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.filesystems.impl.FileAnyImpl;
+import org.jboss.tools.common.model.filesystems.impl.FolderImpl;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
/**
@@ -105,7 +106,11 @@
isSeamBeans = true;
}
if(o instanceof FileAnyImpl) {
- String text = ((FileAnyImpl)o).getAsText();
+ FileAnyImpl f = (FileAnyImpl)o;
+ if(f.getParent() instanceof FolderImpl) {
+ ((FolderImpl)f.getParent()).update();
+ }
+ String text = f.getAsText();
IResource resource = (IResource)o.getAdapter(IResource.class);
IDocument document = new Document();
SeamDefinitionBuilder builder = new SeamDefinitionBuilder();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java 2011-05-13 22:18:50 UTC (rev 31308)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java 2011-05-13 22:45:22 UTC (rev 31309)
@@ -351,7 +351,7 @@
if(pd != null) def.addParameter(pd);
}
IJavaAnnotation inject = createInject(element);
- def.addAnnotation(inject);
+ if(inject != null) def.addAnnotation(inject);
IMethod method = null;
try {
method = Util.findMethod(def, type, null, context.getRootContext());
13 years, 6 months
JBoss Tools SVN: r31308 - in branches/jbosstools-3.2.x/runtime/plugins: org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-05-13 18:18:50 -0400 (Fri, 13 May 2011)
New Revision: 31308
Added:
branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
Modified:
branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
Log:
JBIDE-8730 JBoss Tools Runtime Detection doesn't work
Modified: branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java
===================================================================
--- branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-05-13 21:53:20 UTC (rev 31307)
+++ branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/RuntimeCoreActivator.java 2011-05-13 22:18:50 UTC (rev 31308)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.jboss.tools.runtime.core.model.IRuntimeDetector;
+import org.jboss.tools.runtime.core.model.InvalidRuntimeDetector;
import org.osgi.framework.BundleContext;
import org.osgi.service.prefs.BackingStoreException;
@@ -113,7 +114,8 @@
detector = (IRuntimeDetector) configurationElement.createExecutableExtension("class");
} catch (CoreException e) {
log(e);
- continue;
+ detector = new InvalidRuntimeDetector();
+ detector.setValid(false);
}
String name = configurationElement.getAttribute(NAME);
String preferenceId = configurationElement.getAttribute(PREFERENCE_ID);
Modified: branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java
===================================================================
--- branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-05-13 21:53:20 UTC (rev 31307)
+++ branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/AbstractRuntimeDetector.java 2011-05-13 22:18:50 UTC (rev 31308)
@@ -24,6 +24,7 @@
private String name;
private String preferenceId;
private boolean enabled;
+ private boolean valid = true;
private int priority;
@Override
@@ -67,6 +68,9 @@
}
public boolean isEnabled() {
+ if (!isValid()) {
+ return false;
+ }
return enabled;
}
@@ -123,5 +127,13 @@
int p1 = this.getPriority();
int p2 = o.getPriority();
return p1 - p2;
+ }
+
+ public boolean isValid() {
+ return valid;
+ }
+
+ public void setValid(boolean valid) {
+ this.valid = valid;
}
}
Modified: branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java
===================================================================
--- branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-05-13 21:53:20 UTC (rev 31307)
+++ branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/IRuntimeDetector.java 2011-05-13 22:18:50 UTC (rev 31308)
@@ -47,4 +47,8 @@
int getPriority();
void setPriority(int priority);
+
+ boolean isValid();
+
+ void setValid(boolean valid);
}
Added: branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java
===================================================================
--- branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java (rev 0)
+++ branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.core/src/org/jboss/tools/runtime/core/model/InvalidRuntimeDetector.java 2011-05-13 22:18:50 UTC (rev 31308)
@@ -0,0 +1,41 @@
+/*************************************************************************************
+ * Copyright (c) 2011 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.runtime.core.model;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ *
+ * @author snjeza
+ *
+ */
+public class InvalidRuntimeDetector extends AbstractRuntimeDetector {
+
+ @Override
+ public void initializeRuntimes(List<ServerDefinition> serverDefinitions) {
+
+ }
+
+ @Override
+ public ServerDefinition getServerDefinition(File root,
+ IProgressMonitor monitor) {
+ return null;
+ }
+
+ @Override
+ public boolean exists(ServerDefinition serverDefinition) {
+ return false;
+ }
+
+}
Modified: branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java
===================================================================
--- branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2011-05-13 21:53:20 UTC (rev 31307)
+++ branches/jbosstools-3.2.x/runtime/plugins/org.jboss.tools.runtime.ui/src/org/jboss/tools/runtime/ui/preferences/RuntimePreferencePage.java 2011-05-13 22:18:50 UTC (rev 31308)
@@ -20,6 +20,7 @@
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
@@ -214,7 +215,7 @@
}
private TableViewer createDetectorViewer(Composite parent) {
- CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER
+ final CheckboxTableViewer tableViewer = CheckboxTableViewer.newCheckList(parent, SWT.BORDER
| SWT.V_SCROLL | SWT.SINGLE);
Table table = tableViewer.getTable();
GridData gd = new GridData(GridData.FILL_BOTH);
@@ -243,7 +244,13 @@
public void checkStateChanged(CheckStateChangedEvent event) {
IRuntimeDetector detector = (IRuntimeDetector) event.getElement();
- detector.setEnabled(!detector.isEnabled());
+ if (detector.isValid()) {
+ detector.setEnabled(!detector.isEnabled());
+ } else {
+ MessageDialog.openWarning(getShell(), "Information", "The '" + detector.getName() + "' detector is invalid.");
+ tableViewer.setChecked(detector, false);
+ }
+
}
});
for (int i=0; i<runtimeDetectors.size(); i++) {
@@ -255,6 +262,7 @@
if (preferenceId != null && preferenceId.trim().length() > 0) {
Link link = new Link(table, SWT.NONE);
link.setText(" <a>Link</a>");
+ link.setEnabled(detector.isValid());
TableEditor editor = new TableEditor (table);
editor.grabHorizontal = editor.grabVertical = true;
editor.setEditor (link, item, 1);
13 years, 6 months
JBoss Tools SVN: r31307 - in trunk/cdi: features and 23 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-05-13 17:53:20 -0400 (Fri, 13 May 2011)
New Revision: 31307
Modified:
trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml
trunk/cdi/features/org.jboss.tools.cdi.seam.feature/pom.xml
trunk/cdi/features/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml
trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml
trunk/cdi/plugins/pom.xml
trunk/cdi/pom.xml
trunk/cdi/site/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml
trunk/cdi/tests/pom.xml
Log:
https://issues.jboss.org/browse/JBIDE-8518 fix pom.xml files in JBT and JBDS repo such that only component root poms reference parent pom (all others just look up to .. for parent)
cdi components fix
left only one reference to parent pom in <module>/pom.xml
fixed relativePath to ../build/parent/pom.xml
Modified: trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml
===================================================================
--- trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/features/org.jboss.tools.cdi.feature/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.features</groupId>
<artifactId>org.jboss.tools.cdi.feature</artifactId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/features/org.jboss.tools.cdi.seam.feature/pom.xml
===================================================================
--- trunk/cdi/features/org.jboss.tools.cdi.seam.feature/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/features/org.jboss.tools.cdi.seam.feature/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>features</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.features</groupId>
<artifactId>org.jboss.tools.cdi.seam.feature</artifactId>
Modified: trunk/cdi/features/pom.xml
===================================================================
--- trunk/cdi/features/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/features/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -1,6 +1,11 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>cdi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
<groupId>org.jboss.tools.cdi</groupId>
<artifactId>features</artifactId>
<name>cdi.features</name>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.core</artifactId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.config.core</artifactId>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.ui/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.config.ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.faces.core</artifactId>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.solder.core/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.solder.core</artifactId>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.seam.text.ext</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.text.ext</artifactId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.ui</artifactId>
<version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.xml/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.xml</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.xml.ui/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.plugins</groupId>
<artifactId>org.jboss.tools.cdi.xml.ui</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/plugins/pom.xml
===================================================================
--- trunk/cdi/plugins/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/plugins/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -1,6 +1,11 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>cdi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
<groupId>org.jboss.tools.cdi</groupId>
<artifactId>plugins</artifactId>
<name>cdi.plugins</name>
Modified: trunk/cdi/pom.xml
===================================================================
--- trunk/cdi/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -1,6 +1,12 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>org.jboss.tools.parent.pom</artifactId>
+ <version>0.0.2-SNAPSHOT</version>
+ <relativePath>../build/parent/pom.xml</relativePath>
+ </parent>
<groupId>org.jboss.tools</groupId>
<artifactId>cdi</artifactId>
<name>cdi.all</name>
Modified: trunk/cdi/site/pom.xml
===================================================================
--- trunk/cdi/site/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/site/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,14 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
-
<groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <artifactId>cdi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi</groupId>
<artifactId>cdi.site</artifactId>
<name>cdi.site</name>
<version>0.0.1-SNAPSHOT</version>
<packaging>eclipse-update-site</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.bot.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,13 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
-
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.bot.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.core.test</artifactId>
@@ -29,4 +29,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.config.core.test</artifactId>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,12 +2,12 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.faces.core.test</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.solder.core.test</artifactId>
@@ -24,14 +24,6 @@
<configuration>
<explodedBundles>
<bundle>org.jboss.tools.cdi.core.test</bundle>
- </explodedBundles>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.sonatype.tycho</groupId>
- <artifactId>maven-osgi-test-plugin</artifactId>
- <configuration>
- <explodedBundles>
<bundle>org.jboss.tools.cdi.seam.solder.core.test</bundle>
</explodedBundles>
</configuration>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.text.ext.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.text.ext.test</artifactId>
@@ -29,4 +29,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.text.ext.test</artifactId>
@@ -29,4 +29,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.jboss.tools</groupId>
- <artifactId>org.jboss.tools.parent.pom</artifactId>
- <version>0.0.2-SNAPSHOT</version>
+ <groupId>org.jboss.tools.cdi</groupId>
+ <artifactId>tests</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.ui.test</artifactId>
@@ -29,4 +29,4 @@
</plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
Modified: trunk/cdi/tests/pom.xml
===================================================================
--- trunk/cdi/tests/pom.xml 2011-05-13 21:49:20 UTC (rev 31306)
+++ trunk/cdi/tests/pom.xml 2011-05-13 21:53:20 UTC (rev 31307)
@@ -1,6 +1,11 @@
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.tools</groupId>
+ <artifactId>cdi</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
<groupId>org.jboss.tools.cdi</groupId>
<artifactId>tests</artifactId>
<name>cdi.tests</name>
13 years, 6 months
JBoss Tools SVN: r31306 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-05-13 17:49:20 -0400 (Fri, 13 May 2011)
New Revision: 31306
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
Log:
removed var == null conditions where it doesn't make sense, like
if(param = null) return null;
or check for null for values from functions that never returns null
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-13 20:37:06 UTC (rev 31305)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/CDIProject.java 2011-05-13 21:49:20 UTC (rev 31306)
@@ -22,6 +22,7 @@
import java.util.TreeMap;
import java.util.TreeSet;
+import org.apache.xerces.util.SynchronizedSymbolTable;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
@@ -32,6 +33,7 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.core.dom.CatchClause;
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICoreNature;
import org.jboss.tools.cdi.core.CDICorePlugin;
@@ -114,7 +116,7 @@
* @see org.jboss.tools.cdi.core.IBeanManager#getBeans()
*/
public IBean[] getBeans() {
- if(allBeans == null || allBeans.isEmpty()) {
+ if(allBeans.isEmpty()) {
return new IBean[0];
}
IBean[] result = new IBean[allBeans.size()];
@@ -173,12 +175,14 @@
synchronized (beansByPath) {
bs = beansByPath.get(path);
}
- if(bs != null) synchronized(bs) {
- for (IBean b: bs) {
- if(b instanceof IClassBean) {
- IClassBean result = (IClassBean)b;
- if(type.getFullyQualifiedName().equals(result.getBeanClass().getFullyQualifiedName())) {
- return result;
+ if(bs != null) {
+ synchronized(bs) {
+ for (IBean b: bs) {
+ if(b instanceof IClassBean) {
+ IClassBean result = (IClassBean)b;
+ if(type.getFullyQualifiedName().equals(result.getBeanClass().getFullyQualifiedName())) {
+ return result;
+ }
}
}
}
@@ -298,7 +302,7 @@
if(type.getType() != null && CDIConstants.EVENT_TYPE_NAME.equals(type.getType().getFullyQualifiedName())) {
List<? extends IParametedType> ps = type.getParameters();
- if(ps != null && ps.size() == 1) {
+ if(ps.size() == 1) {
EventBean eventBean = new EventBean(type, injectionPoint);
eventBean.setParent(this);
eventBean.setSourcePath(injectionPoint.getSourcePath());
@@ -309,7 +313,7 @@
if(type.getType() != null && CDIConstants.INSTANCE_TYPE_NAME.equals(type.getType().getFullyQualifiedName())) {
List<? extends IParametedType> ps = type.getParameters();
- if(ps != null && ps.size() == 1) {
+ if(ps.size() == 1) {
type = ps.get(0);
}
}
@@ -348,11 +352,14 @@
} else {
rslt = getBeans(attemptToResolveAmbiguousDependency, type, qs.toArray(new IQualifierDeclaration[0]));
}
- if(rslt != null && !rslt.isEmpty()) return rslt;
- BuiltInBean builtInBean = new BuiltInBean(type);
- builtInBean.setParent(this);
- builtInBean.setSourcePath(injectionPoint.getSourcePath());
- result.add(builtInBean);
+ if(rslt.isEmpty()) {
+ BuiltInBean builtInBean = new BuiltInBean(type);
+ builtInBean.setParent(this);
+ builtInBean.setSourcePath(injectionPoint.getSourcePath());
+ result.add(builtInBean);
+ } else {
+ result = rslt;
+ }
return result;
}
@@ -438,14 +445,14 @@
}
public static boolean areMatchingQualifiers(Set<IQualifierDeclaration> beanQualifiers, Set<IQualifierDeclaration> injectionQualifiers) throws CoreException {
- if(beanQualifiers == null || beanQualifiers.isEmpty()) {
- if(injectionQualifiers == null || injectionQualifiers.isEmpty()) {
+ if(beanQualifiers.isEmpty()) {
+ if(injectionQualifiers.isEmpty()) {
return true;
}
}
TreeSet<String> injectionKeys = new TreeSet<String>();
- if(injectionQualifiers != null) for (IQualifierDeclaration d: injectionQualifiers) {
+ for (IQualifierDeclaration d: injectionQualifiers) {
injectionKeys.add(getAnnotationDeclarationKey(d));
}
@@ -457,7 +464,7 @@
}
TreeSet<String> beanKeys = new TreeSet<String>();
- if(beanQualifiers == null || beanQualifiers.isEmpty()) {
+ if(beanQualifiers.isEmpty()) {
beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
} else for (IQualifierDeclaration d: beanQualifiers) {
beanKeys.add(getAnnotationDeclarationKey(d));
@@ -480,64 +487,61 @@
* @throws CoreException
*/
public static boolean areMatchingQualifiers(Set<IQualifierDeclaration> beanQualifiers, IType... injectionQualifiers) throws CoreException {
- if(beanQualifiers == null || beanQualifiers.isEmpty()) {
- if(injectionQualifiers == null || injectionQualifiers.length == 0) {
- return true;
+ if(!beanQualifiers.isEmpty() || injectionQualifiers.length != 0) {
+
+ TreeSet<String> injectionKeys = new TreeSet<String>();
+ for (IType d: injectionQualifiers) {
+ injectionKeys.add(d.getFullyQualifiedName());
}
+
+ if(!injectionKeys.contains(CDIConstants.ANY_QUALIFIER_TYPE_NAME)) {
+ if(injectionKeys.isEmpty()) {
+ injectionKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
+ }
+
+ TreeSet<String> beanKeys = new TreeSet<String>();
+ if(beanQualifiers.isEmpty()) {
+ beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
+ } else {
+ for (IAnnotationDeclaration d: beanQualifiers) {
+ beanKeys.add(d.getType().getFullyQualifiedName());
+ }
+ }
+ if(beanKeys.size() == 1 && beanKeys.iterator().next().startsWith(CDIConstants.NAMED_QUALIFIER_TYPE_NAME)) {
+ beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
+ }
+
+ for(String k: injectionKeys) {
+ if(!beanKeys.contains(k)) {
+ return false;
+ }
+ }
+ }
}
-
- TreeSet<String> injectionKeys = new TreeSet<String>();
- if(injectionQualifiers != null) for (IType d: injectionQualifiers) {
- injectionKeys.add(d.getFullyQualifiedName());
- }
-
- if(injectionKeys.contains(CDIConstants.ANY_QUALIFIER_TYPE_NAME)) {
- return true;
- }
- if(injectionKeys.isEmpty()) {
- injectionKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
- }
-
- TreeSet<String> beanKeys = new TreeSet<String>();
- if(beanQualifiers == null || beanQualifiers.isEmpty()) {
- beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
- } else for (IAnnotationDeclaration d: beanQualifiers) {
- beanKeys.add(d.getType().getFullyQualifiedName());
- }
- if(beanKeys.size() == 1 && beanKeys.iterator().next().startsWith(CDIConstants.NAMED_QUALIFIER_TYPE_NAME)) {
- beanKeys.add(CDIConstants.DEFAULT_QUALIFIER_TYPE_NAME);
- }
-
- for(String k: injectionKeys) {
- if(!beanKeys.contains(k)) return false;
- }
return true;
}
public static boolean areMatchingEventQualifiers(Set<IQualifierDeclaration> eventQualifiers, IType... paramQualifiers) throws CoreException {
- if(eventQualifiers == null || eventQualifiers.isEmpty()) {
- if(paramQualifiers == null || paramQualifiers.length == 0) {
- return true;
+ if(!eventQualifiers.isEmpty() || paramQualifiers.length != 0) {
+
+ TreeSet<String> paramKeys = new TreeSet<String>();
+ for (IType d: paramQualifiers) {
+ paramKeys.add(d.getFullyQualifiedName());
}
+
+ TreeSet<String> eventKeys = new TreeSet<String>();
+ for (IAnnotationDeclaration d: eventQualifiers) {
+ eventKeys.add(d.getType().getFullyQualifiedName());
+ }
+
+ if(!eventKeys.contains(CDIConstants.ANY_QUALIFIER_TYPE_NAME)) {
+ eventKeys.add(CDIConstants.ANY_QUALIFIER_TYPE_NAME);
+ }
+
+ for(String k: paramKeys) {
+ if(!eventKeys.contains(k)) return false;
+ }
}
-
- TreeSet<String> paramKeys = new TreeSet<String>();
- if(paramQualifiers != null) for (IType d: paramQualifiers) {
- paramKeys.add(d.getFullyQualifiedName());
- }
-
- TreeSet<String> eventKeys = new TreeSet<String>();
- if(eventQualifiers != null) for (IAnnotationDeclaration d: eventQualifiers) {
- eventKeys.add(d.getType().getFullyQualifiedName());
- }
-
- if(!eventKeys.contains(CDIConstants.ANY_QUALIFIER_TYPE_NAME)) {
- eventKeys.add(CDIConstants.ANY_QUALIFIER_TYPE_NAME);
- }
-
- for(String k: paramKeys) {
- if(!eventKeys.contains(k)) return false;
- }
return true;
}
@@ -553,47 +557,45 @@
IMethod[] ms = type.getMethods();
StringBuffer result = new StringBuffer();
result.append(type.getFullyQualifiedName());
- if(ms != null && ms.length > 0) {
+ if(ms.length > 0) {
TreeMap<String, String> values = new TreeMap<String, String>();
IMemberValuePair[] ps = d.getMemberValuePairs();
if (ps != null) for (IMemberValuePair p: ps) {
String n = p.getMemberName();
Object o = p.getValue();
- if(o != null) {
- int k = p.getValueKind();
- if(k == IMemberValuePair.K_QUALIFIED_NAME || k == IMemberValuePair.K_SIMPLE_NAME) {
- String s = o.toString();
- int dot = s.lastIndexOf('.');
- //We reduce value to simple name. That makes it not precise
- //and there must be a test that display limit of this approach.
- if(dot >= 0) {
- String s1 = s.substring(dot + 1);
- if(!"class".equals(s1)) {
- o = s1;
- }
+ int k = p.getValueKind();
+ if(k == IMemberValuePair.K_QUALIFIED_NAME || k == IMemberValuePair.K_SIMPLE_NAME) {
+ String s = o.toString();
+ int dot = s.lastIndexOf('.');
+ //We reduce value to simple name. That makes it not precise
+ //and there must be a test that display limit of this approach.
+ if(dot >= 0) {
+ String s1 = s.substring(dot + 1);
+ if(!"class".equals(s1)) {
+ o = s1;
}
}
- values.put(n, o.toString());
}
+ values.put(n, o.toString());
+
}
for (IMethod m: ms) {
String n = m.getElementName();
if(nb.contains(m)) {
values.remove(n);
- continue;
+ } else if(!values.containsKey(n)) {
+ IMemberValuePair p = m.getDefaultValue();
+ if (p != null) {
+ n = p.getMemberName();
+ Object o = p.getValue();
+ if(!values.containsKey(n)) {
+ values.put(n, o.toString());
+ }
+ }
}
- if(values.containsKey(n)) {
- continue;
- }
- IMemberValuePair p = m.getDefaultValue();
- n = p.getMemberName();
- Object o = p.getValue();
- if(values.containsKey(n) || o == null) continue;
- values.put(n, o.toString());
}
for (String n: values.keySet()) {
- String v = values.get(n);
- result.append(';').append(n).append('=').append(v);
+ result.append(';').append(n).append('=').append(values.get(n));
}
}
return result.toString();
@@ -739,80 +741,83 @@
}
public boolean isNormalScope(IType annotationType) {
- if(annotationType == null) return false;
try {
- if(!annotationType.isAnnotation()) return false;
+ if(annotationType.isAnnotation()) {
+ AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
+ List<IAnnotationDeclaration> ds = d.getAnnotations();
+ for (IAnnotationDeclaration a: ds) {
+ if(a instanceof AnnotationDeclaration) {
+ AnnotationDeclaration aa = (AnnotationDeclaration)a;
+ if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(aa.getTypeName())) {
+ return true;
+ }
+ }
+ }
+ }
} catch (CoreException e) {
- return false;
+ CDICorePlugin.getDefault().logError(e);
}
- AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
- List<IAnnotationDeclaration> ds = d.getAnnotations();
- for (IAnnotationDeclaration a: ds) {
- if(a instanceof AnnotationDeclaration) {
- AnnotationDeclaration aa = (AnnotationDeclaration)a;
- if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(aa.getTypeName())) {
- return true;
- }
- }
- }
return false;
}
public boolean isPassivatingScope(IType annotationType) {
- if(annotationType == null) return false;
try {
- if(!annotationType.isAnnotation()) return false;
- } catch (CoreException e) {
- return false;
- }
- AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
- List<IAnnotationDeclaration> ds = d.getAnnotations();
- for (IAnnotationDeclaration a: ds) {
- if(a instanceof AnnotationDeclaration) {
- AnnotationDeclaration aa = (AnnotationDeclaration)a;
- if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(aa.getTypeName())) {
- Object o = a.getMemberValue("passivating");
- return o != null && "true".equalsIgnoreCase(o.toString());
+ if(annotationType.isAnnotation()) {
+ AnnotationDefinition d = n.getDefinitions().getAnnotation(annotationType);
+ List<IAnnotationDeclaration> ds = d.getAnnotations();
+ for (IAnnotationDeclaration a: ds) {
+ if(a instanceof AnnotationDeclaration) {
+ AnnotationDeclaration aa = (AnnotationDeclaration)a;
+ if(CDIConstants.NORMAL_SCOPE_ANNOTATION_TYPE_NAME.equals(aa.getTypeName())) {
+ Object o = a.getMemberValue("passivating");
+ return o != null && "true".equalsIgnoreCase(o.toString());
+ }
+ }
}
}
- }
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
return false;
}
public boolean isQualifier(IType annotationType) {
- if(annotationType == null) return false;
+ boolean result = false;
try {
- if(!annotationType.isAnnotation()) return false;
+ if(annotationType.isAnnotation()) {
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+ result = k > 0 && (k & AnnotationDefinition.QUALIFIER) > 0;
+ }
} catch (CoreException e) {
- return false;
+ CDICorePlugin.getDefault().logError(e);
}
- int k = n.getDefinitions().getAnnotationKind(annotationType);
-
- return k > 0 && (k & AnnotationDefinition.QUALIFIER) > 0;
+ return result;
}
public boolean isScope(IType annotationType) {
- if(annotationType == null) return false;
+ boolean result = false;
try {
- if(!annotationType.isAnnotation()) return false;
+ if(annotationType.isAnnotation()) {
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+ result = k > 0 && (k & AnnotationDefinition.SCOPE) > 0;
+ }
} catch (CoreException e) {
- return false;
+ CDICorePlugin.getDefault().logError(e);
}
- int k = n.getDefinitions().getAnnotationKind(annotationType);
-
- return k > 0 && (k & AnnotationDefinition.SCOPE) > 0;
+ return result;
}
public boolean isStereotype(IType annotationType) {
- if(annotationType == null) return false;
+ boolean result = false;
try {
- if(!annotationType.isAnnotation()) return false;
+ if(annotationType.isAnnotation()) {
+ int k = n.getDefinitions().getAnnotationKind(annotationType);
+ result= k > 0 && (k & AnnotationDefinition.STEREOTYPE) > 0;
+ }
} catch (CoreException e) {
- return false;
+ CDICorePlugin.getDefault().logError(e);
}
- int k = n.getDefinitions().getAnnotationKind(annotationType);
-
- return k > 0 && (k & AnnotationDefinition.STEREOTYPE) > 0;
+ return result;
}
public Set<IBean> resolve(Set<IBean> beans) {
@@ -834,29 +839,26 @@
IParametedType eventType = getEventType(injectionPoint.getType());
- if(eventType == null) {
- return result;
- }
-
- for (IClassBean b: classBeans.values()) {
- Set<IBeanMethod> ms = b.getObserverMethods();
- for (IBeanMethod m: ms) {
- if(m instanceof IObserverMethod) {
- IObserverMethod om = (IObserverMethod)m;
- Set<IParameter> params = om.getObservedParameters();
- if(params.isEmpty()) continue;
- IParameter param = params.iterator().next();
- IParametedType paramType = param.getType();
- if(!((ParametedType)eventType).isAssignableTo((ParametedType)paramType, true)) {
- continue;
+ if(eventType != null) {
+ for (IClassBean b: classBeans.values()) {
+ Set<IBeanMethod> ms = b.getObserverMethods();
+ for (IBeanMethod m: ms) {
+ if(m instanceof IObserverMethod) {
+ IObserverMethod om = (IObserverMethod)m;
+ Set<IParameter> params = om.getObservedParameters();
+ if(params.isEmpty()) continue;
+ IParameter param = params.iterator().next();
+ IParametedType paramType = param.getType();
+ if(!((ParametedType)eventType).isAssignableTo((ParametedType)paramType, true)) {
+ continue;
+ }
+ if(areMatchingEventQualifiers(param, injectionPoint)) {
+ result.add(om);
+ }
}
- if(areMatchingEventQualifiers(param, injectionPoint)) {
- result.add(om);
- }
- }
- }
+ }
+ }
}
-
return result;
}
@@ -868,7 +870,7 @@
* @return
*/
private IParametedType getEventType(IParametedType t) {
- if(t == null || t.getType() == null || !CDIConstants.EVENT_TYPE_NAME.equals(t.getType().getFullyQualifiedName())) {
+ if(t.getType() == null || !CDIConstants.EVENT_TYPE_NAME.equals(t.getType().getFullyQualifiedName())) {
return null;
}
List<? extends IParametedType> ps = t.getParameters();
@@ -917,40 +919,41 @@
public Set<IBeanMethod> resolveDisposers(IProducerMethod producer) {
Set<IBeanMethod> result = new HashSet<IBeanMethod>();
IClassBean cb = producer.getClassBean();
- if(cb == null) return result;
+ if(cb != null) {
- Set<IParametedType> types = producer.getLegalTypes();
- Set<IQualifierDeclaration> qs = producer.getQualifierDeclarations(true);
-
- Set<IBeanMethod> ds = cb.getDisposers();
- for (IBeanMethod m: ds) {
- List<IParameter> ps = m.getParameters();
- IParameter match = null;
- for (IParameter p: ps) {
- if(!p.isAnnotationPresent(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME)) continue;
- IParametedType type = p.getType();
- if(!containsType(types, type)) continue;
- Set<IType> qts = new HashSet<IType>();
- Set<String> ts = ((Parameter)p).getAnnotationTypes();
- for (String t: ts) {
- QualifierElement q = getQualifier(t);
- if(q != null && q.getSourceType() != null) {
- qts.add(q.getSourceType());
+ Set<IParametedType> types = producer.getLegalTypes();
+ Set<IQualifierDeclaration> qs = producer.getQualifierDeclarations(true);
+
+ Set<IBeanMethod> ds = cb.getDisposers();
+ for (IBeanMethod m: ds) {
+ List<IParameter> ps = m.getParameters();
+ IParameter match = null;
+ for (IParameter p: ps) {
+ if(!p.isAnnotationPresent(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME)) continue;
+ IParametedType type = p.getType();
+ if(!containsType(types, type)) continue;
+ Set<IType> qts = new HashSet<IType>();
+ Set<String> ts = ((Parameter)p).getAnnotationTypes();
+ for (String t: ts) {
+ QualifierElement q = getQualifier(t);
+ if(q != null && q.getSourceType() != null) {
+ qts.add(q.getSourceType());
+ }
}
- }
- IType[] qtsa = qts.toArray(new IType[0]);
- try {
- if(areMatchingQualifiers(qs, qtsa)) {
- match = p;
- break;
+ IType[] qtsa = qts.toArray(new IType[0]);
+ try {
+ if(areMatchingQualifiers(qs, qtsa)) {
+ match = p;
+ break;
+ }
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
}
- } catch (CoreException e) {
- CDICorePlugin.getDefault().logError(e);
}
+ if(match != null) {
+ result.add(m);
+ }
}
- if(match != null) {
- result.add(m);
- }
}
return result;
}
@@ -1305,16 +1308,15 @@
if(attemptToResolveAmbiguousNames) {
Set<String> names = new HashSet<String>();
for (IBean bean : namedBeans) {
- if(names.contains(bean.getName())) {
- continue;
+ if(!names.contains(bean.getName())) {
+ Set<IBean> beans = getBeans(bean.getName(), attemptToResolveAmbiguousNames);
+ if(beans.isEmpty()) {
+ result.add(bean);
+ } else {
+ result.addAll(beans);
+ names.add(bean.getName());
+ }
}
- Set<IBean> beans = getBeans(bean.getName(), attemptToResolveAmbiguousNames);
- if(beans.isEmpty()) {
- result.add(bean);
- } else {
- result.addAll(beans);
- names.add(bean.getName());
- }
}
} else {
result.addAll(namedBeans);
@@ -1331,10 +1333,6 @@
IParametedType beanType, IType... qualifiers) {
Set<IBean> result = new HashSet<IBean>();
IParametedType type = beanType;
- if(type == null) {
- return result;
- }
-
Set<IBean> beans = new HashSet<IBean>();
synchronized(allBeans) {
beans.addAll(allBeans);
@@ -1364,9 +1362,6 @@
String fullyQualifiedBeanType,
String... fullyQualifiedQualifiersTypes) {
IType type = getNature().getType(fullyQualifiedBeanType);
- if(type == null) {
- return Collections.emptySet();
- }
IParametedType beanType = getNature().getTypeFactory().newParametedType(type);
List<IType> qualifiers = new ArrayList<IType>();
if(fullyQualifiedQualifiersTypes != null) for (String s : fullyQualifiedQualifiersTypes) {
13 years, 6 months
JBoss Tools SVN: r31305 - in branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user: doc and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2011-05-13 16:37:06 -0400 (Fri, 13 May 2011)
New Revision: 31305
Removed:
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/Toc.html
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/helpContexts.xml
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/toc.xml
Modified:
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/ModeShapeHelpContexts.xml
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc.zip
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/images/GeneralPreferencePage.png
branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/toc.xml
Log:
JBIDE-6656 Split out ModeShape documentation into separate plug-in. Removed the "doc/" part of the html refs.
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/ModeShapeHelpContexts.xml
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/ModeShapeHelpContexts.xml 2011-05-13 20:20:51 UTC (rev 31304)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/ModeShapeHelpContexts.xml 2011-05-13 20:37:06 UTC (rev 31305)
@@ -12,27 +12,27 @@
<contexts>
<context id="serverViewHelpContext" title="ModeShape View">
<description>The ModeShape View shows all registered servers and their repositories and workspaces.</description>
- <topic href="doc/ServerView.html" label="ModeShape View"/>
- <topic href="doc/ServerDialog.html" label="Server Dialog"/>
+ <topic href="ServerView.html" label="ModeShape View"/>
+ <topic href="ServerDialog.html" label="Server Dialog"/>
</context>
<context id="serverDialogHelpContext" title="Server Dialog">
<description>The ModeShape Server Dialog allows you to edit or create a server that hosts one or more repositories.</description>
- <topic href="doc/ServerDialog.html" label="Server Dialog"/>
- <topic href="doc/ServerView.html" label="ModeShape View"/>
+ <topic href="ServerDialog.html" label="Server Dialog"/>
+ <topic href="ServerView.html" label="ModeShape View"/>
</context>
<context id="publishDialogHelpContext" title="ModeShape Publishing Operations Dialog Help">
<description>The Publishing Operations Dialog uploads or removes selected resources from the selected server.</description>
- <topic href="doc/PublishDialog.html" label="Publishing Operations Dialog"/>
- <topic href="doc/ServerDialog.html" label="Create a new server"/>
- <topic href="doc/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
+ <topic href="PublishDialog.html" label="Publishing Operations Dialog"/>
+ <topic href="ServerDialog.html" label="Create a new server"/>
+ <topic href="ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
</context>
<context id="preferencesHelpContext" title="ModeShape Preference Pages Help">
<description>The ModeShape Preferences Dialog allows you to identify file and folder name patterns that should not be involved in publishing operations.</description>
- <topic href="doc/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
- <topic href="doc/PublishDialog.html" label="Publishing Operations Dialog"/>
+ <topic href="ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
+ <topic href="PublishDialog.html" label="Publishing Operations Dialog"/>
</context>
<context id="messageConsoleHelpContext" title="ModeShape Message Console">
<description>The ModeShape Message Console contains the output from the publishing and unpublishing operations.</description>
- <topic href="doc/ModeShapeMessageConsole.html" label="ModeShape Message Console"/>
+ <topic href="ModeShapeMessageConsole.html" label="ModeShape Message Console"/>
</context>
</contexts>
Deleted: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/Toc.html
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/Toc.html 2011-05-13 20:20:51 UTC (rev 31304)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/Toc.html 2011-05-13 20:37:06 UTC (rev 31305)
@@ -1,22 +0,0 @@
-<!--
- - See the COPYRIGHT.txt file distributed with this work for information
- - regarding copyright ownership.
- -
- - This software is made available by Red Hat, Inc. 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.
- -
- - See the AUTHORS.txt file in the distribution for a full listing of
- - individual contributors.
- -->
-<h2>ModeShape Publishing</h2>
-
-<ul>
-<li><a href="PublishDialog.html">Publishing Operations Dialog</a></li>
-<li><a href="ServerDialog.html">Server Dialog</a></li>
-<li><a href="ServerView.html">ModeShape View</a></li>
-<li><a href="ModeShapeMessageConsole.html">ModeShape Message Console</a></li>
-<li><a href="PublishedLocationsDialog.html">Published Locations Dialog</a></li>
-<li><a href="ResourceContextMenu.html">ModeShape Context Menu</a></li>
-<li><a href="ModeShapePreferencesDialog.html">ModeShape Preference Pages</a></li>
-</ul>
\ No newline at end of file
Deleted: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/helpContexts.xml
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/helpContexts.xml 2011-05-13 20:20:51 UTC (rev 31304)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/helpContexts.xml 2011-05-13 20:37:06 UTC (rev 31305)
@@ -1,38 +0,0 @@
-<!--
- - See the COPYRIGHT.txt file distributed with this work for information
- - regarding copyright ownership.
- -
- - This software is made available by Red Hat, Inc. 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.
- -
- - See the AUTHORS.txt file in the distribution for a full listing of
- - individual contributors.
- -->
-<contexts>
- <context id="serverViewHelpContext" title="ModeShape View">
- <description>The ModeShape View shows all registered servers and their repositories and workspaces.</description>
- <topic href="docs/ServerView.html" label="ModeShape View"/>
- <topic href="docs/ServerDialog.html" label="Server Dialog"/>
- </context>
- <context id="serverDialogHelpContext" title="Server Dialog">
- <description>The ModeShape Server Dialog allows you to edit or create a server that hosts one or more repositories.</description>
- <topic href="docs/ServerDialog.html" label="Server Dialog"/>
- <topic href="docs/ServerView.html" label="ModeShape View"/>
- </context>
- <context id="publishDialogHelpContext" title="ModeShape Publish and Unpublish Dialog Help">
- <description>The Publish/Unpublish Dialog uploads or removes selected resources from the selected server.</description>
- <topic href="docs/PublishDialog.html" label="Publish/Unpublish Dialog"/>
- <topic href="docs/ServerDialog.html" label="Create a new server"/>
- <topic href="docs/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
- </context>
- <context id="preferencesHelpContext" title="ModeShape Preferences Dialog Help">
- <description>The ModeShape Preferences Dialog allows you to identify file and folder name patterns that should not be involved in publishing operations.</description>
- <topic href="docs/ModeShapePreferencesDialog.html" label="ModeShape Preferences"/>
- <topic href="docs/PublishDialog.html" label="Publishing Operations Dialog"/>
- </context>
- <context id="messageConsoleHelpContext" title="ModeShape Message Console">
- <description>The ModeShape Message Console contains the output from the publishing and unpublishing operations.</description>
- <topic href="docs/ModeShapeMessageConsole.html" label="ModeShape Message Console"/>
- </context>
-</contexts>
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/images/GeneralPreferencePage.png
===================================================================
(Binary files differ)
Deleted: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/toc.xml
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/toc.xml 2011-05-13 20:20:51 UTC (rev 31304)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc/toc.xml 2011-05-13 20:37:06 UTC (rev 31305)
@@ -1,20 +0,0 @@
-<!--
- - See the COPYRIGHT.txt file distributed with this work for information
- - regarding copyright ownership.
- -
- - This software is made available by Red Hat, Inc. 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.
- -
- - See the AUTHORS.txt file in the distribution for a full listing of
- - individual contributors.
- -->
-<toc label="ModeShape Publishing">
- <topic label="Publishing Operations Dialog" href="docs/PublishDialog.html"/>
- <topic label="ModeShape View" href="docs/ServerView.html"/>
- <topic label="Server Dialog" href="docs/ServerDialog.html"/>
- <topic label="ModeShape Message Console" href="docs/ModeShapeMessageConsole.html"/>
- <topic label="Published Locations Dialog" href="docs/PublishedLocationsDialog.html"/>
- <topic label="ModeShape Context Menu" href="docs/ResourceContextMenu.html"/>
- <topic label="ModeShape Preference Pages" href="docs/ModeShapePreferencesDialog.html"/>
-</toc>
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/doc.zip
===================================================================
(Binary files differ)
Modified: branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/toc.xml
===================================================================
--- branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/toc.xml 2011-05-13 20:20:51 UTC (rev 31304)
+++ branches/jbosstools-3.2.x/modeshape/plugins/org.jboss.tools.modeshape.rest.doc.user/toc.xml 2011-05-13 20:37:06 UTC (rev 31305)
@@ -10,11 +10,11 @@
- individual contributors.
-->
<toc label="ModeShape Publishing">
- <topic label="Publishing Operations Dialog" href="doc/PublishDialog.html"/>
- <topic label="ModeShape View" href="doc/ServerView.html"/>
- <topic label="Server Dialog" href="doc/ServerDialog.html"/>
- <topic label="ModeShape Message Console" href="doc/ModeShapeMessageConsole.html"/>
- <topic label="Published Locations Dialog" href="doc/PublishedLocationsDialog.html"/>
- <topic label="ModeShape Context Menu" href="doc/ResourceContextMenu.html"/>
- <topic label="ModeShape Preferences Dialog" href="doc/ModeShapePreferencesDialog.html"/>
+ <topic label="Publishing Operations Dialog" href="PublishDialog.html"/>
+ <topic label="ModeShape View" href="ServerView.html"/>
+ <topic label="Server Dialog" href="ServerDialog.html"/>
+ <topic label="ModeShape Message Console" href="ModeShapeMessageConsole.html"/>
+ <topic label="Published Locations Dialog" href="PublishedLocationsDialog.html"/>
+ <topic label="ModeShape Context Menu" href="ResourceContextMenu.html"/>
+ <topic label="ModeShape Preferences Dialog" href="ModeShapePreferencesDialog.html"/>
</toc>
13 years, 6 months
JBoss Tools SVN: r31304 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-05-13 16:20:51 -0400 (Fri, 13 May 2011)
New Revision: 31304
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
Log:
https://issues.jboss.org/browse/JBIDE-8949
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2011-05-13 20:20:15 UTC (rev 31303)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationContext.java 2011-05-13 20:20:51 UTC (rev 31304)
@@ -84,9 +84,11 @@
// Init context for given project.
for (IValidator validator : ALL_VALIDATORS) {
if(validator.shouldValidate(project)) {
- validators.add(validator);
IValidatingProjectTree prTree = validator.getValidatingProjects(project);
- projectTree.put(validator, prTree);
+ if(prTree!=null) {
+ validators.add(validator);
+ projectTree.put(validator, prTree);
+ }
}
}
}
13 years, 6 months
JBoss Tools SVN: r31303 - in trunk/jst: tests/org.jboss.tools.jst.web.kb.test and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-05-13 16:20:15 -0400 (Fri, 13 May 2011)
New Revision: 31303
Added:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/JavaSource/demo/ui.taglib.xml
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/duplicateLibs.xhtml
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/template.xhtml
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java
Log:
https://issues.jboss.org/browse/JBIDE-8926
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2011-05-13 17:07:21 UTC (rev 31302)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/JspContextImpl.java 2011-05-13 20:20:15 UTC (rev 31303)
@@ -11,16 +11,16 @@
package org.jboss.tools.jst.web.kb.internal;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.jboss.tools.common.el.core.resolver.ELContext;
-import org.jboss.tools.common.el.core.resolver.Var;
import org.jboss.tools.jst.web.kb.ICSSContainerSupport;
import org.jboss.tools.jst.web.kb.IIncludedContextSupport;
import org.jboss.tools.jst.web.kb.IPageContext;
import org.jboss.tools.jst.web.kb.IResourceBundle;
-import org.jboss.tools.jst.web.kb.IXmlContext;
import org.jboss.tools.jst.web.kb.PageContextFactory.CSSStyleSheetDescriptor;
import org.jboss.tools.jst.web.kb.internal.taglib.NameSpace;
import org.jboss.tools.jst.web.kb.taglib.INameSpace;
@@ -103,8 +103,8 @@
*/
public ITagLibrary[] getLibraries() {
- List<ITagLibrary> libraries = new ArrayList<ITagLibrary>();
-
+ Set<ITagLibrary> libraries = new HashSet<ITagLibrary>();
+
for (Map<String, INameSpace> nsMap : nameSpaces.values()) {
for (INameSpace ns : nsMap.values()) {
if (ns instanceof INameSpaceExtended) {
@@ -146,7 +146,7 @@
}
public IResourceBundle[] getResourceBundles() {
- List<IResourceBundle> resourceBundles = new ArrayList<IResourceBundle>();
+ Set<IResourceBundle> resourceBundles = new HashSet<IResourceBundle>();
if (bundles != null) {
resourceBundles.addAll(bundles);
}
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml 2011-05-13 17:07:21 UTC (rev 31302)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.xml 2011-05-13 20:20:15 UTC (rev 31303)
@@ -20,4 +20,12 @@
</require>
</extension>
+ <extension point="org.jboss.tools.jst.web.kb.KbIncludeContext">
+ <include uri="http://java.sun.com/jsf/facelets">
+ <tag name="composition">
+ <attribute name="template" />
+ </tag>
+ </include>
+ </extension>
+
</plugin>
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/JavaSource/demo/ui.taglib.xml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/JavaSource/demo/ui.taglib.xml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/JavaSource/demo/ui.taglib.xml 2011-05-13 20:20:15 UTC (rev 31303)
@@ -0,0 +1,1026 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the GNU
+ General Public License Version 2 only ("GPL") or the Common Development
+ and Distribution License("CDDL") (collectively, the "License"). You
+ may not use this file except in compliance with the License. You can obtain
+ a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
+ or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
+ language governing permissions and limitations under the License.
+
+ When distributing the software, include this License Header Notice in each
+ file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
+ Sun designates this particular file as subject to the "Classpath" exception
+ as provided by Sun in the GPL Version 2 section of the License file that
+ accompanied this code. If applicable, add the following below the License
+ Header, with the fields enclosed by brackets [] replaced by your own
+ identifying information: "Portions Copyrighted [year]
+ [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the CDDL or
+ only the GPL Version 2, indicate your decision by adding "[Contributor]
+ elects to include this software in this distribution under the [CDDL or GPL
+ Version 2] license." If you don't indicate a single choice of license, a
+ recipient has the option to distribute your version of this file under
+ either the CDDL, the GPL Version 2 or to extend the choice of license to
+ its licensees as provided above. However, if you add GPL Version 2 code
+ and therefore, elected the GPL Version 2 license, then the option applies
+ only if the new code is made subject to such option by the copyright
+ holder.
+-->
+
+<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
+ version="2.0">
+ <description>
+
+ </pre>
+
+ <div class="changed_added_2_0">
+
+ <p>The tags in this library add templating&#8212;a powerful
+ view composition technique&#8212;to JSF.
+ Templating is so useful that there are entire frameworks, such as Tiles
+ and SiteMesh, that are built
+ around the concept of templating. So what is templating, how can you
+ benefit from it, and how does
+ this tag library implement it?
+ </p>
+
+ <p>If you've used JSP before, you've probably used <code>jsp:include</code>.
+ The prototypical example for
+ <code>jsp:include</code> is a header on each page in a web
+ application. One JSP page, say header.jsp,
+ encapsulates the header content, and the header is included by each
+ page. You <em>encapsulate and reuse
+ content</em>, so that changes to one file, header.jsp, affect the
+ header on every page.
+ </p>
+
+ <p>This tab library contains a tag&#8212<code>ui:include</code>&#8212
+ that's analagous to <code>jsp:include</code>,
+ but encapsulating and reusing content is only half the templating story,
+ because templating also lets you
+ <em>encapsulate and reuse <b>layout</b></em>.
+ You define a single <em>template</em> (meaning layout), and
+ you reuse
+ that template with multiple <em>compositions</em>. So now
+ you can control the layout of many pages with a single
+ template (layout). Let's take a look at an example.
+ </p>
+
+ <h3>A Templating Example</h3>
+
+ <p>
+ First, we define a template:
+ </p>
+ <div class="syntax"><div class="html4strict"
+ style="font-family: monospace;"><ol><li class="li1"><div
+ class="de1"><span class="sc0">&lt;!DOCTYPE html PUBLIC
+ &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp; &nbsp; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;html</span> <span class="re0">xmlns</span>=<span
+ class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp; xmlns:<span class="re0">ui</span>=<span
+ class="st0">&quot;http://java.sun.com/jsf/facelets&quot;</span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;head<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;link</span>
+ <span class="re0">href</span>=<span class="st0">&quot;styles.css&quot;</span>
+ <span class="re0">rel</span>=<span class="st0">&quot;stylesheet&quot;</span>
+ <span class="re0">type</span>=<span class="st0">&quot;text/css&quot;</span><span
+ class="re2">/&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;title<span
+ class="re2">&gt;</span></span></span><span
+ class="sc3"><span class="re1">&lt;ui</span>:insert
+ <span class="re0">name</span>=<span class="st0">&quot;title&quot;</span><span
+ class="re2">&gt;</span></span>Default Title<span
+ class="sc3"><span class="re1">&lt;/ui</span>:insert<span
+ class="re2">&gt;</span></span><span class="sc3"><span
+ class="re1">&lt;/title<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;/head<span class="re2">&gt;</span></span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:debug<span
+ class="re2">/&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;div</span>
+ <span class="re0">class</span>=<span class="st0">&quot;heading&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:insert
+ <span class="re0">name</span>=<span class="st0">&quot;heading&quot;</span><span
+ class="re2">/&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;/div<span
+ class="re2">&gt;</span></span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;div</span>
+ <span class="re0">class</span>=<span class="st0">&quot;content&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:insert
+ <span class="re0">name</span>=<span class="st0">&quot;content&quot;</span><span
+ class="re2">/&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;/div<span
+ class="re2">&gt;</span></span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;/body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;/html<span class="re2">&gt;</span></span></span>
+ </div></li></ol></div></div>
+
+ <p>
+ In the preceeding listing, we've defined a layout, also known as a
+ template. That template uses the
+ <code>ui:insert</code> tag to insert pieces of a page &#8212namely,
+ title, heading, and content&#8212
+ defined in a <em>composition</em>. Notice that on line 8, we
+ define a default title, in case one isn't provided
+ by the composition. Also note that on line 12 we have the <code>ui:debug</code>
+ tag, which lets the user activate
+ a popup window with debugging information by typing CTRL + Shift + d.
+ </p>
+
+ <p>
+ The title, heading, and content pieces of the page referenced in the
+ template are defined in a separate XHTML
+ file in a composition, like this:
+ </p>
+
+ <div class="syntax"><div class="html4strict"
+ style="font-family: monospace;"><ol><li class="li1"><div
+ class="de1"><span class="sc0">&lt;!DOCTYPE html PUBLIC
+ &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;html</span> <span class="re0">xmlns</span>=<span
+ class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;xmlns:<span
+ class="re0">ui</span>=<span class="st0">&quot;http://java.sun.com/jsf/facelets&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; <span
+ class="sc3"><span class="re1">&lt;body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;ui</span>:composition
+ <span class="re0">template</span>=<span class="st0">&quot;/layout.xhtml&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;title&quot;</span><span
+ class="re2">&gt;</span></span>A List of Contacts<span
+ class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;heading&quot;</span><span
+ class="re2">&gt;</span></span>Contacts<span
+ class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;content&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:include
+ <span class="re0">src</span>=<span class="st0">&quot;contactsTable.xhtml&quot;</span>
+ <span class="re2">/&gt;</span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;/ui</span>:composition<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc3"><span class="re1">&lt;/body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li1"><div class="de1"><span class="sc3"><span
+ class="re1">&lt;/html<span class="re2">&gt;</span></span></span>
+ </div></li></ol></div></div>
+
+ <p>
+ At runtime, JSF synthesizes the two previous XHTML pages to create a
+ single JSF view by inserting the
+ pieces defined in the composition into the template (that template is
+ layout.xhtml, which is the first
+ listing above). JSF also disregards everything outside of the <code>composition</code>
+ tag so that we don't
+ wind up with two <code>body</code> elements in the view.
+ Also, note that we use the <code>ui:include</code>
+ tag on line 14 to include content (which happens to be a table) from
+ another XHTML page, so that we can reuse
+ that table in other views.
+ </p>
+
+ <p>
+ So why do we have two XHTML pages to define a single view? Why not
+ simply take the pieces and manually insert
+ them into the layout so that we have only a single XHTML page? The
+ answer is simple: we have separated layout
+ from the content so that we can <em>reuse that layout</em>
+ among multiple compositions. For example, now we can
+ define another composition that uses the same layout:
+ </p>
+
+ <div class="syntax"><div class="html4strict"
+ style="font-family: monospace;"><ol><li class="li1"><div
+ class="de1"><span class="sc0">&lt;!DOCTYPE html PUBLIC
+ &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;html</span> <span class="re0">xmlns</span>=<span
+ class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ xmlns:<span class="re0">ui</span>=<span class="st0">&quot;http://java.sun.com/jsf/facelets&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; <span
+ class="sc3"><span class="re1">&lt;body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;ui</span>:composition
+ <span class="re0">template</span>=<span class="st0">&quot;/layout.xhtml&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;title&quot;</span><span
+ class="re2">&gt;</span></span>Create a Contact<span
+ class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;heading&quot;</span><span
+ class="re2">&gt;</span></span>Create Contact&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;content&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:include
+ <span class="re0">src</span>=<span class="st0">&quot;createContactForm.xhtml&quot;</span><span
+ class="re2">/&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp; <span
+ class="sc3"><span class="re1">&lt;/ui</span>:composition<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; <span
+ class="sc3"><span class="re1">&lt;/body<span class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;/html<span class="re2">&gt;</span></span></span>
+ </div></li></ol></div></div>
+
+ <p>
+ By encapsulating the layout, we can reuse that layout among multiple
+ compositions. Just like
+ <code>ui:include</code> lets us encapsulate and reuse
+ conent, JSF compositions let us encapsulate and reuse
+ layout, so that changes to a single layout can affect multiple views.
+ Fundamentally, that's what this
+ tag library is all about.
+ </p>
+
+ </div>
+ <pre>
+
+ </description>
+ <namespace>http://java.sun.com/jsf/facelets</namespace>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ This tag is the same as the <code>ui:composition</code>,
+ except for two things:
+ JSF creates a component and adds it directly to the tree, and
+ there's no associated
+ template.
+ </p>
+
+ <p>
+ Use this tag to create a component and specify a filename for the
+ component as either the source of a <code>ui:include</code>,
+ or the source of a Facelets tag.
+ </p>
+ </div>
+
+ </description>
+ <tag-name>component</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.ComponentRefHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ The identifier of the component that JSF inserts into the
+ component tree. If an identifier is
+ not explicitly specified by the page author, JSF will assign an
+ identifier based on the algorithm
+ that it uses for all components.
+ </p>
+ </div>
+
+ </description>
+ <name>id</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ Binds the component to a backing bean property, as specified in
+ the JSF specification.
+ </p>
+ </div>
+
+ </description>
+ <name>binding</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ Defines a composition that optionally uses a template, as outlined
+ in the description of the ui tag library. Multiple
+ compositions can use the same template, thus encapsulating and
+ reusing layout. JSF disregards everything outside of the
+ composition, which lets developers embed compositions in well-formed
+ XHTML pages that can be viewed in an XHTML viewer,
+ such as Dreamweaver or a browser, without including extraneous
+ elements such as <code>head</code> and <code>body</code>.
+ </p>
+ <div class="syntax"><div class="html4strict"
+ style="font-family: monospace;"><ol><li class="li1"><div
+ class="de1"><span class="sc0">&lt;!DOCTYPE html PUBLIC
+ &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;</div></li>
+
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ &nbsp; &nbsp; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2"><span class="sc3"><span
+ class="re1">&lt;html</span> <span class="re0">xmlns</span>=<span
+ class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;xmlns:<span
+ class="re0">ui</span>=<span class="st0">&quot;http://java.sun.com/jsf/facelets&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; <span
+ class="sc3"><span class="re1">&lt;body<span
+ class="re2">&gt;</span></span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ THIS LINE, AND EVERYTHING ABOVE IT IS DISREGARDED BY JSF</div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;ui</span>:composition
+ <span class="re0">template</span>=<span class="st0">&quot;/layout.xhtml&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;title&quot;</span><span
+ class="re2">&gt;</span></span>#{msgs.contactsWindowTitle}<span
+ class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;heading&quot;</span><span
+ class="re2">&gt;</span></span>#{msgs.contactsHeading}<span
+ class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+
+ <li class="li2"><div class="de2">&nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:define
+ <span class="re0">name</span>=<span class="st0">&quot;content&quot;</span><span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;ui</span>:include
+ <span class="re0">src</span>=<span class="st0">&quot;contactsTable.xhtml&quot;</span>
+ <span class="re2">/&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ &nbsp; <span class="sc3"><span class="re1">&lt;/ui</span>:define<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp;</div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ <span class="sc3"><span class="re1">&lt;/ui</span>:composition<span
+ class="re2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; &nbsp;
+ THIS LINE, AND EVERYTHING BELOW IT IS DISREGARDED BY JSF</div></li>
+
+ <li class="li1"><div class="de1">&nbsp;</div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc3"><span class="re1">&lt;/body<span
+ class="re2">&gt;</span></span></span></div></li>
+ <li class="li1"><div class="de1"><span class="sc3"><span
+ class="re1">&lt;/html<span class="re2">&gt;</span></span></span>
+ </div></li></ol></div></div>
+
+ </div>
+
+ </description>
+ <tag-name>composition</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.CompositionHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ A URI that points to a template, also known as a layout, that
+ inserts pieces of the page defined in the composition.
+ </p>
+ </div>
+
+ </description>
+ <name>template</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ When the <code>ui:debug</code> tag is placed in an XHTML
+ page, it creates a component and adds it to the
+ component tree. That debug component captures debugging information,
+ namely the current state of the component
+ tree and the scoped variables in the application, when the component
+ is rendered. If the user presses CTRL + SHIFT + d,
+ JSF opens a window that shows the debugging information captured by
+ the debug component.
+ </p>
+
+ <p>
+ Typically, the best place to put the <code>ui:debug</code>
+ tag is in an application's main template, which
+ lets developers enable or disable viewing of debugging information
+ in one central location. Additionally, page
+ authors can change the hotkey (which by default is CTRL + SHIFT + d,
+ where the d stands for debug) to CTRL + SHIFT + ?,
+ where ? represents the key specified as the value of the <code>hotkey</code>
+ attribute.
+ </p>
+
+ <p>
+ You can use the <code>rendered</code> attribute to
+ control whether the debug component is rendered.
+ Using an EL expression as the value for the <code>rendered</code>
+ attribute lets you control whether
+ debug output is enabled for multiple views based on a single bean
+ property.
+ </p>
+ </div>
+
+ </description>
+ <tag-name>debug</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.UIDebug</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ Defines a single character, that, pressed in conjunction with
+ CTRL and SHIFT, will display the JSF debug window.
+ By default, the hotkey is 'd'. <em>The value for the
+ hotkey attribute cannot be an EL expression.</em>
+ </p>
+
+ </div>
+
+ </description>
+ <name>hotkey</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>
+ Controls whether the debug component is rendered. Valid values
+ for this attribute are either the strings "true" or "false" or
+ an EL expression that evaluates to either "true" or "false".<p>If
+ this attribute's value is "false" or the value is an EL
+ expression that evaluates to "false", the debug component is not
+ rendered in the page, the hotkey attribute is disregarded, and
+ users cannot open the debugging information window with a
+ hotkey.</p>
+ </p>
+
+ </div>
+
+ </description>
+ <name>rendered</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>The <code>define</code> tag defines content
+ that is inserted into a page by a template. The <code>define</code>
+ tag can be used inside <code>ui:composition</code>, <code>ui:component</code>,
+ <code>ui:decorate</code>, and <code>ui:fragment</code>
+ tags.</p>
+
+ <p>Content defined by the <code>define</code> tag
+ can be inserted into a page by using <code>ui:insert</code>.
+ </p>
+
+ </div>
+
+ </description>
+ <tag-name>define</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.DefineHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>Assigns a name to the content inside a <code>define</code>
+ tag. That name is used by corresponding <code>ui:insert</code>
+ tags in a template that insert the named content into a page.</p>
+ </div>
+
+ </description>
+ <name>name</name>
+ <required>true</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>
+ The <code>decorate</code> tag is identical to the <code>composition</code>
+ tag, except that <code>ui:decorate</code>, unlike <code>ui:composition</code>,
+ does not disregard all content outside of the tag. The <code>decorate</code>
+ is useful when you want to decorate some content in a page, for
+ example, you might want to decorate a list of items, like this:
+
+ <div class="syntax"><div class="html4strict"
+ style="font-family: monospace;"><ol><li class="li1"><div
+ class="de1">
+
+ <span class="sc2">&lt;ui:decorate template=<span
+ class="st0">&quot;/layout.xhtml&quot;</span><span
+ class="kw2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc2">&lt;ui:define <span class="kw3">name</span>=<span
+ class="st0">&quot;listHeading&quot;</span><span
+ class="kw2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ <span class="sc2">&lt;ui:include <span class="kw3">src</span>="shared/listHeading.xhtml"/<span
+ class="kw2">&gt;</span></span></div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc2"><span class="kw2">&lt;</span>/ui:define&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ &nbsp; &nbsp; </div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc2">&lt;c:forEach items="#<span class="br0">&#123;</span>items<span
+ class="br0">&#125;"</span> var="item"<span
+ class="kw2">&gt;</span></span></div></li>
+
+ <li class="li1"><div class="de1">&nbsp; &nbsp;
+ ...</div></li>
+ <li class="li2"><div class="de2">&nbsp; <span
+ class="sc2"><span class="kw2">&lt;</span>/c:forEach&gt;</span></div></li>
+ <li class="li1"><div class="de1">&nbsp; ...</div></li>
+ <li class="li2"><div class="de2"><span class="sc2"><span
+ class="kw2">&lt;</span>/ui:decorate&gt;</span>
+ </div></li></ol></div></div>
+ </p>
+
+ Because JSF does not disregard everything outside of the <code>ui:decorate</code>
+ tag, <code>ui:decorate</code> can
+ be used to decorate pieces of a page.
+
+ </div>
+
+ </description>
+ <tag-name>decorate</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.DecorateHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ A URI that points to a template, also known as a layout, that
+ inserts pieces of the page defined in the decorator.
+
+ </div>
+
+ </description>
+ <name>template</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>The <code>fragment</code> tag is identical to
+ the <code>component</code> tag, except that <code>ui:fragment</code>,
+ unlike <code>ui:component</code>, JSF does not disregard
+ all content outside of the tag.</p>
+ </div>
+
+ </description>
+ <tag-name>fragment</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.ComponentRefHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ The identifier of the component that JSF inserts into the
+ component tree. If an identifier is
+ not explicitly specified by the page author, JSF will assign an
+ identifier based on the algorithm
+ that it uses for all components.
+ </div>
+
+ </description>
+ <name>id</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ Binds the component to a backing bean property, as specified in
+ the JSF specification.
+ </div>
+
+ </description>
+ <name>binding</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>Use this tag&#8212which is very similar to JSP's <code>jsp:include</code>&#8212to
+ encapsulate and reuse content among
+ multiple XHTML pages. There are three things this tag can include:
+ plain XHTML, and XHTML pages that have either a <code>composition</code>
+ tag or a <code>component</code> tag.
+ </p>
+ <p>You supply a filename, through <code>ui:include</code>'s
+ <code>src</code> attribute for JSF to include. That
+ filename is relative to the XHTML file that was rendered as a result
+ of the last request. So, for example, if JSF loaded
+ the view <code>login.xhtml</code>, and that file
+ included <code>pageDecorations/header.xhtml</code>, and
+ <code>
+ pageDecorations/header.xhtml</code> included <code>companyLogo.xhtml</code>,
+ then <code>companyLogo.xhtml</code> will
+ not be found if it's in the <code>pageDecorations</code>
+ directory, because <code>companyLogo.xhtml</code> has to
+ be
+ in the same directory as <code>login.xhtml</code>.
+ </p>
+
+ </div>
+
+ </description>
+ <tag-name>include</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.IncludeHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ The filename of an XHTML page to include. The filename is
+ relative to the XHTML page that was originally loaded.
+ </div>
+
+ </description>
+ <name>src</name>
+ <required>true</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>Inserts content into a template. That content is defined&#8212with
+ the <code>ui:define</code> tag&#8212 in either a
+ <code>ui:composition</code>, <code>ui:component</code>,
+ <code>ui:decorate</code>, or <code>ui:fragment</code>.</p>
+ </div>
+
+ </description>
+ <tag-name>insert</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.IncludeHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ The optional name attribute matches the associated &lt;ui:define/&gt;
+ tag in this template's client. If no name is specified, it's
+ expected
+ that the whole template client will be inserted.
+
+ </div>
+
+ </description>
+ <name>name</name>
+ <required>false</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>Use this tag to pass parameters to an included file (using
+ <code>ui:include</code>), or a template
+ (linked to either a composition or decorator). Embed <code>ui:param</code>
+ tags in either <code>ui:include</code>,
+ <code>ui:composition</code>, or <code>ui:decorate</code>
+ to pass the parameters.
+ </div>
+
+ </description>
+ <tag-name>param</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.ParamHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ The name of the parameter.
+ </div>
+
+ </description>
+ <name>name</name>
+ <required>true</required>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ The value of the parameter. Notice that this attribute's value
+ can be an EL expression, which
+ means that you can pass objects to either an included file or a
+ template.
+ </div>
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <type>java.lang.String</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>Use this tag as an alternative to <code>h:dataTable</code>
+ or
+ <code>c:forEach</code>, especially when you are using
+ the
+ <code>jsfc</code> feature of Facelets. You can specify
+ this component as
+ the value of the <code>jsfc</code> attribute, like this:
+ &lt;div... jsfc="ui:repeat" value="#{contacts}" var="contact"&gt;...
+ </p>
+ </div>
+
+ </description>
+ <tag-name>repeat</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.RepeatHandler</handler-class>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>Read-write property setting the offset from the
+ beginning of the
+ collection from which to start the iteration. If not set, this
+ offset
+ is not considered and iteration will start at the beginning of
+ the
+ collection.</p>
+
+ </div>
+
+ </description>
+ <name>offset</name>
+ <required>false</required>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>Read-write property setting the size of the collection
+ to iterate.
+ If this value is less than the actual size of the collection, a
+ <code>FacesException</code> must be thrown.</p>
+
+ </div>
+
+ </description>
+ <name>size</name>
+ <required>false</required>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+
+ <div class="changed_added_2_0"><p>Iteration
+ will only process every step items of the collection,
+ starting with the first one.</p></div>
+
+ </description>
+ <name>step</name>
+ <required>false</required>
+ <type>int</type>
+ </attribute>
+ <attribute>
+ <description>
+
+
+ <div class="changed_added_2_0">
+
+ <p>The name of a collection of items that this tag
+ iterates over. The
+ collection may be a <code>List</code>, <code>array</code>,
+ <code>java.sql.ResultSet</code>, or an individual
+ java Object. If the
+ collection is null, this tag does nothing.</p>
+
+ </div>
+
+ </description>
+ <name>value</name>
+ <required>true</required>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <description>
+
+ <div class="changed_added_2_0"><p>Name of the
+ exported scoped variable for the current item of the
+ iteration. This scoped variable has nested
+ visibility. Its type depends on the object of the
+ underlying collection</p></div>
+
+ </description>
+ <name>var</name>
+ <required>true</required>
+ <type>java.lang.Object</type>
+ </attribute>
+ <attribute>
+ <description>
+
+ <div class="changed_added_2_0"><p>Name of the
+ exported request scoped variable for the status of the
+ iteration. Object is a POJO with the following read-only
+ JavaBeans properties. This scoped variable has nested
+ visibility.</p>
+
+ <p><code>begin</code> of type Integer</p>
+
+ <p><code>end</code> of type Integer</p>
+
+ <p><code>index</code> of type int</p>
+
+ <p><code>step</code> of type Integer</p>
+
+ <p><code>even</code> of type boolean</p>
+
+ <p><code>odd</code> of type boolean</p>
+
+ <p><code>first</code> of type boolean</p>
+
+ <p><code>last</code> of type boolean</p>
+
+ </div>
+
+ </description>
+ <name>varStatus</name>
+ <required>false</required>
+ <type>java.lang.Object</type>
+ </attribute>
+ </tag>
+ <tag>
+ <description>
+
+
+ <div class="changed_added_2_0">
+ <p>Remove content from a page. This tag is often used in
+ conjunction with the <code>jsfc</code> feature of
+ Facelets,
+ to wrap additional markup. When Facelets removes markup from a page
+ by substituting markup items that have
+ a <code>jsfc</code> attribute with the specified
+ component, Facelets also removes anything in the page that
+ is contained in a <code>ui:remove</code> tag.</p>
+ </div>
+
+ </description>
+ <tag-name>remove</tag-name>
+ <handler-class>com.sun.faces.facelets.tag.ui.SchemaCompliantRemoveHandler</handler-class>
+
+ </tag>
+</facelet-taglib>
Property changes on: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/JavaSource/demo/ui.taglib.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/duplicateLibs.xhtml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/duplicateLibs.xhtml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/duplicateLibs.xhtml 2011-05-13 20:20:15 UTC (rev 31303)
@@ -0,0 +1,16 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich"
+ template="template.xhtml">
+
+ <ui:define name="body">
+ <rich:page>
+ </rich:page>
+ </ui:define>
+
+</ui:composition>
\ No newline at end of file
Added: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/template.xhtml
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/template.xhtml (rev 0)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/projects/TestKbModel/WebContent/pages/template.xhtml 2011-05-13 20:20:15 UTC (rev 31303)
@@ -0,0 +1,10 @@
+<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:s="http://jboss.com/products/seam/taglib"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:rich="http://richfaces.org/rich">
+ <ui:insert name="body"/>
+</html>
\ No newline at end of file
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java 2011-05-13 17:07:21 UTC (rev 31302)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/WebKbTest.java 2011-05-13 20:20:15 UTC (rev 31303)
@@ -12,11 +12,16 @@
import junit.framework.TestCase;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.jboss.tools.common.el.core.resolver.ELContext;
+import org.jboss.tools.jst.web.kb.IPageContext;
+import org.jboss.tools.jst.web.kb.PageContextFactory;
import org.jboss.tools.jst.web.kb.internal.taglib.CustomTagLibAttribute;
import org.jboss.tools.jst.web.kb.taglib.CustomTagLibManager;
import org.jboss.tools.jst.web.kb.taglib.ICustomTagLibrary;
+import org.jboss.tools.jst.web.kb.taglib.ITagLibrary;
/**
* @author Alexey Kazakov
@@ -52,4 +57,27 @@
assertNotNull("Can't load component extensions.", attributes);
assertFalse("Can't load component extensions.", attributes.length==0);
}
+
+ /**
+ * JBIDE-8926
+ */
+ public void testDuplicateLibs() {
+ IFile f = testProject.getFile("WebContent/pages/template.xhtml");
+ assertNotNull(f);
+
+ ELContext context = PageContextFactory.createPageContext(f);
+
+ assertTrue(context instanceof IPageContext);
+
+ ITagLibrary[] templateLibs = ((IPageContext)context).getLibraries();
+
+ f = testProject.getFile("WebContent/pages/duplicateLibs.xhtml");
+ context = PageContextFactory.createPageContext(f);
+
+ assertTrue(context instanceof IPageContext);
+
+ ITagLibrary[] pageLibs = ((IPageContext)context).getLibraries();
+
+ assertEquals(templateLibs.length, pageLibs.length);
+ }
}
\ No newline at end of file
13 years, 6 months