JBoss Tools SVN: r20229 - trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-10 15:28:46 -0500 (Wed, 10 Feb 2010)
New Revision: 20229
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 18:59:21 UTC (rev 20228)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 20:28:46 UTC (rev 20229)
@@ -33,16 +33,20 @@
import org.jboss.tools.common.text.ext.util.AxisUtil;
public class InjectedPointHyperlinkDetectorTest extends TCKTest {
+ private static final String PROJECT_NAME = "/lookup/injectionpoint";
private static final String FILE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
public static Test suite() {
return new TestSuite(InjectedPointHyperlinkDetectorTest.class);
}
-
-
+
public void testInjectedPointHyperlinkDetector() throws Exception {
- IProject project = importPreparedProject("/lookup/injectionpoint");
+ IProject project = importPreparedProject(PROJECT_NAME);
+ doTest(project);
+ cleanProject(PROJECT_NAME);
+ }
+ private void doTest(IProject project) throws Exception {
IFile javaFile = project.getFile(FILE_NAME);
assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile != null));
14 years, 8 months
JBoss Tools SVN: r20227 - in trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test: src/org/jboss/tools/cdi/text/ext/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-10 13:58:54 -0500 (Wed, 10 Feb 2010)
New Revision: 20227
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2010-02-10 18:22:50 UTC (rev 20226)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2010-02-10 18:58:54 UTC (rev 20227)
@@ -16,7 +16,8 @@
org.eclipse.core.runtime;bundle-version="3.5.0",
org.jboss.tools.cdi.text.ext;bundle-version="2.0.0",
org.eclipse.jdt.ui;bundle-version="3.5.0",
- org.eclipse.core.commands;bundle-version="3.5.0"
+ org.eclipse.core.commands;bundle-version="3.5.0",
+ org.jboss.tools.cdi.core.test;bundle-version="1.0.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.text.ext.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 18:22:50 UTC (rev 20226)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 18:58:54 UTC (rev 20227)
@@ -3,14 +3,11 @@
import java.util.ArrayList;
import junit.framework.Test;
-import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
import org.eclipse.jface.text.IDocument;
@@ -30,46 +27,22 @@
import org.eclipse.wst.sse.core.StructuredModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.jboss.tools.cdi.core.test.tck.TCKTest;
import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlinkDetector;
-import org.jboss.tools.common.test.util.TestProjectProvider;
import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
import org.jboss.tools.common.text.ext.util.AxisUtil;
-import org.jboss.tools.test.util.JobUtils;
-public class InjectedPointHyperlinkDetectorTest extends TestCase {
- TestProjectProvider provider = null;
- IProject project = null;
- boolean makeCopy = false;
- private static final String PROJECT_NAME = "test_cdi_project";
- private static final String FILE_NAME = "/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
+public class InjectedPointHyperlinkDetectorTest extends TCKTest {
+ private static final String FILE_NAME = "JavaSource/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
public static Test suite() {
return new TestSuite(InjectedPointHyperlinkDetectorTest.class);
}
- public void setUp() throws Exception {
- provider = new TestProjectProvider("org.jboss.tools.cdi.text.ext.test", null, PROJECT_NAME, makeCopy);
- project = provider.getProject();
- project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
- Throwable exception = null;
-
- assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
- }
- protected void tearDown() throws Exception {
- if(provider != null) {
- provider.dispose();
- }
- }
+ public void testInjectedPointHyperlinkDetector() throws Exception {
+ IProject project = importPreparedProject("/lookup/injectionpoint");
- public void testInjectedPointHyperlinkDetector() {
- try {
- JobUtils.waitForIdle(3000);
- } catch (Exception e) {
- assertNull("An exception caught: " + e.getMessage(), e);
- }
- assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
-
IFile javaFile = project.getFile(FILE_NAME);
assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile != null));
@@ -106,9 +79,9 @@
ArrayList<Region> regionList = new ArrayList<Region>();
regionList.add(new Region(115, 6)); // Inject
- regionList.add(new Region(145, 6)); // logger
- regionList.add(new Region(201, 6)); // logger
- regionList.add(new Region(255, 6)); // logger
+ regionList.add(new Region(140, 6)); // logger
+ regionList.add(new Region(196, 6)); // logger
+ regionList.add(new Region(250, 6)); // logger
IEditorPart part = openFileInEditor(javaFile);
@@ -134,7 +107,7 @@
}else{
for(Region region : regionList){
if(i >= region.getOffset() && i <= region.getOffset()+region.getLength())
- fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength());
+ fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength()+region.getLength()+" region - "+i);
}
}
}
14 years, 8 months
JBoss Tools SVN: r20226 - in trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test: META-INF and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-10 13:22:50 -0500 (Wed, 10 Feb 2010)
New Revision: 20226
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/build.properties
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2010-02-10 18:21:33 UTC (rev 20225)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/META-INF/MANIFEST.MF 2010-02-10 18:22:50 UTC (rev 20226)
@@ -3,7 +3,20 @@
Bundle-Name: %Bundle-Name.0
Bundle-SymbolicName: org.jboss.tools.cdi.text.ext.test
Bundle-Version: 2.0.0
-Require-Bundle: org.junit;bundle-version="3.8.2"
+Require-Bundle: org.junit;bundle-version="3.8.2",
+ org.eclipse.core.resources;bundle-version="3.5.0",
+ org.eclipse.jface.text;bundle-version="3.5.0",
+ org.eclipse.ui.editors;bundle-version="3.5.0",
+ org.eclipse.ui.ide;bundle-version="3.5.0",
+ org.eclipse.wst.sse.ui;bundle-version="1.1.100",
+ org.eclipse.wst.sse.core;bundle-version="1.1.400",
+ org.jboss.tools.common.test;bundle-version="2.0.0",
+ org.jboss.tools.common.text.ext;bundle-version="2.0.0",
+ org.jboss.tools.tests;bundle-version="2.0.0",
+ org.eclipse.core.runtime;bundle-version="3.5.0",
+ org.jboss.tools.cdi.text.ext;bundle-version="2.0.0",
+ org.eclipse.jdt.ui;bundle-version="3.5.0",
+ org.eclipse.core.commands;bundle-version="3.5.0"
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.text.ext.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/build.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/build.properties 2010-02-10 18:21:33 UTC (rev 20225)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/build.properties 2010-02-10 18:22:50 UTC (rev 20226)
@@ -1,3 +1,9 @@
-source.. = src/
+output.. = bin/
bin.includes = META-INF/,\
- .
+ cdi-text-ext-tests.jar,\
+ plugin.properties
+src.includes = test.xml,\
+ src/,\
+ META-INF/,\
+ build.properties
+source.cdi-text-ext-tests.jar = src/
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2010-02-10 18:21:33 UTC (rev 20225)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/CdiTextExtAllTests.java 2010-02-10 18:22:50 UTC (rev 20226)
@@ -1,9 +1,13 @@
package org.jboss.tools.cdi.text.ext.test;
+
import junit.framework.Test;
+import junit.framework.TestSuite;
public class CdiTextExtAllTests {
public static Test suite() {
- return null;
+ TestSuite suite = new TestSuite(CdiTextExtAllTests.class.getName());
+ suite.addTest(InjectedPointHyperlinkDetectorTest.suite());
+ return suite;
}
}
Modified: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 18:21:33 UTC (rev 20225)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/src/org/jboss/tools/cdi/text/ext/test/InjectedPointHyperlinkDetectorTest.java 2010-02-10 18:22:50 UTC (rev 20226)
@@ -1,15 +1,263 @@
package org.jboss.tools.cdi.text.ext.test;
+import java.util.ArrayList;
+
+import junit.framework.Test;
import junit.framework.TestCase;
+import junit.framework.TestSuite;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jdt.internal.ui.text.JavaWordFinder;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.source.ISourceViewer;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.ui.texteditor.DocumentProviderRegistry;
+import org.eclipse.ui.texteditor.IDocumentProvider;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.eclipse.wst.sse.core.StructuredModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IModelManager;
+import org.eclipse.wst.sse.core.internal.provisional.IStructuredModel;
+import org.jboss.tools.cdi.text.ext.hyperlink.InjectedPointHyperlinkDetector;
+import org.jboss.tools.common.test.util.TestProjectProvider;
+import org.jboss.tools.common.text.ext.hyperlink.IHyperlinkRegion;
+import org.jboss.tools.common.text.ext.util.AxisUtil;
+import org.jboss.tools.test.util.JobUtils;
+
public class InjectedPointHyperlinkDetectorTest extends TestCase {
+ TestProjectProvider provider = null;
+ IProject project = null;
+ boolean makeCopy = false;
+ private static final String PROJECT_NAME = "test_cdi_project";
+ private static final String FILE_NAME = "/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java";
+
+ public static Test suite() {
+ return new TestSuite(InjectedPointHyperlinkDetectorTest.class);
+ }
+
public void setUp() throws Exception {
+ provider = new TestProjectProvider("org.jboss.tools.cdi.text.ext.test", null, PROJECT_NAME, makeCopy);
+ project = provider.getProject();
+ project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
+ Throwable exception = null;
+
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
}
protected void tearDown() throws Exception {
+ if(provider != null) {
+ provider.dispose();
+ }
}
public void testInjectedPointHyperlinkDetector() {
+ try {
+ JobUtils.waitForIdle(3000);
+ } catch (Exception e) {
+ assertNull("An exception caught: " + e.getMessage(), e);
+ }
+ assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
+
+ IFile javaFile = project.getFile(FILE_NAME);
+
+ assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile != null));
+ assertTrue("The file \"" + FILE_NAME + "\" is not found", (javaFile.exists()));
+
+ FileEditorInput editorInput = new FileEditorInput(javaFile);
+ IDocumentProvider documentProvider = null;
+ Throwable exception = null;
+ try {
+ documentProvider = DocumentProviderRegistry.getDefault().getDocumentProvider(editorInput);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+
+ assertNotNull("The document provider for the file \"" + FILE_NAME + "\" is not loaded", documentProvider);
+
+ try {
+ documentProvider.connect(editorInput);
+ } catch (Exception x) {
+ exception = x;
+ x.printStackTrace();
+ assertTrue("The document provider is not able to be initialized with the editor input", false);
+ }
+ assertNull("An exception caught: " + (exception != null? exception.getMessage() : ""), exception);
+
+ IDocument document = documentProvider.getDocument(editorInput);
+
+ assertNotNull("The document for the file \"" + FILE_NAME + "\" is not loaded", document);
+
+ InjectedPointHyperlinkDetector elPartitioner = new InjectedPointHyperlinkDetector();
+
+ ArrayList<Region> regionList = new ArrayList<Region>();
+ regionList.add(new Region(115, 6)); // Inject
+ regionList.add(new Region(145, 6)); // logger
+ regionList.add(new Region(201, 6)); // logger
+ regionList.add(new Region(255, 6)); // logger
+
+
+ IEditorPart part = openFileInEditor(javaFile);
+ ISourceViewer viewer = null;
+ if(part instanceof JavaEditor){
+ viewer = ((JavaEditor)part).getViewer();
+ }
+
+ elPartitioner.setContext(new TestContext((ITextEditor)part));
+
+ int counter = 0;
+ for (int i = 0; i < document.getLength(); i++) {
+ TestData testData = new TestData(document, i);
+ IHyperlink[] links = elPartitioner.detectHyperlinks(viewer, testData.getHyperlinkRegion(), true);
+
+ boolean recognized = links != null;
+
+ if (recognized) {
+ counter++;
+ if(!findOffsetInRegions(i, regionList)){
+ fail("Wrong detection for offset - "+i);
+ }
+ }else{
+ for(Region region : regionList){
+ if(i >= region.getOffset() && i <= region.getOffset()+region.getLength())
+ fail("Wrong detection for region - "+region.getOffset()+" : "+region.getLength());
+ }
+ }
+ }
+
+ assertEquals("Wrong recognized region count: ", 28, counter);
+
+ documentProvider.disconnect(editorInput);
}
+
+ private boolean findOffsetInRegions(int offset, ArrayList<Region> regionList){
+ for(Region region : regionList){
+ if(offset >= region.getOffset() && offset <= region.getOffset()+region.getLength())
+ return true;
+ }
+ return false;
+ }
+
+ private IEditorPart openFileInEditor(IFile input) {
+ if (input != null && input.exists()) {
+ try {
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ return IDE.openEditor(page, input, true);
+ } catch (PartInitException pie) {
+
+ }
+ }
+ return null;
+ }
+
+ class TestData {
+ IDocument document;
+ int offset;
+ IRegion region;
+ String contentType;
+ private IHyperlinkRegion hyperlinkRegion = null;
+
+ TestData (IDocument document, int offset) {
+ this.document = document;
+ this.offset = offset;
+ init();
+ }
+
+ private void init() {
+ this.region = getDocumentRegion();
+ this.contentType = getContentType();
+ this.hyperlinkRegion = getHyperlinkRegion();
+ }
+
+ private IRegion getDocumentRegion() {
+ IRegion region = null;
+ try {
+ region = JavaWordFinder.findWord(document, offset);
+ } catch (Exception x) {}
+
+ return region;
+ }
+
+ public IHyperlinkRegion getHyperlinkRegion() {
+ if (hyperlinkRegion != null)
+ return hyperlinkRegion;
+
+ return new IHyperlinkRegion() {
+ public String getAxis() {
+ return AxisUtil.getAxis(document, region.getOffset());
+ }
+ public String getContentType() {
+ return contentType;
+ }
+ public String getType() {
+ return region.toString();
+ }
+ public int getLength() {
+ return region.getLength();
+ }
+ public int getOffset() {
+ return region.getOffset();
+ }
+ public String toString() {
+ return "[" + getOffset() + "-" + (getOffset() + getLength() - 1) + ":" + getType() + ":" + getContentType() + "]";
+ }
+ };
+ }
+
+
+ /**
+ * Returns the content type of document
+ *
+ * @param document -
+ * assumes document is not null
+ * @return String content type of given document
+ */
+ private String getContentType() {
+ String type = null;
+
+ IModelManager mgr = StructuredModelManager.getModelManager();
+ IStructuredModel model = null;
+ try {
+ model = mgr.getExistingModelForRead(document);
+ if (model != null) {
+ type = model.getContentTypeIdentifier();
+ }
+ } finally {
+ if (model != null) {
+ model.releaseFromRead();
+ }
+ }
+ return type;
+ }
+ }
+
+ class TestContext implements IAdaptable{
+ ITextEditor editor;
+
+ public TestContext(ITextEditor editor){
+ this.editor = editor;
+ }
+
+ public Object getAdapter(Class adapter) {
+ if(adapter.equals(ITextEditor.class))
+ return editor;
+ return null;
+ }
+ }
+
}
14 years, 8 months
JBoss Tools SVN: r20225 - in trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test: projects and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-10 13:21:33 -0500 (Wed, 10 Feb 2010)
New Revision: 20225
Added:
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.project
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/org.eclipse.jdt.core.prefs
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/bin/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Abc.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BasicLogger.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Logger.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MethodInjectionPointBean.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MyLogger.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TimestampLogger.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TransientFieldInjectionPointBean.java
trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.classpath 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="lib" path="WebContent/WEB-INF/lib/javax.inject.jar"/>
+ <classpathentry kind="lib" path="WebContent/WEB-INF/lib/cdi-api.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.classpath
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.project 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>test_cdi_project</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.cdi.core.cdibuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.jboss.tools.jst.web.kb.kbbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.jboss.tools.cdi.core.cdinature</nature>
+ <nature>org.jboss.tools.jst.web.kb.kbnature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.project
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/org.eclipse.jdt.core.prefs 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,12 @@
+#Wed Feb 10 14:29:04 MSK 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Abc.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Abc.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Abc.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,15 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import javax.inject.Qualifier;
+
+@Qualifier
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target({ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.TYPE})
+public @interface Abc {
+ boolean value() default true;
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Abc.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+interface Animal
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Animal.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.enterprise.context.RequestScoped;
+import javax.enterprise.inject.Stereotype;
+
+@Stereotype
+@Target( { TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+@RequestScoped
+@interface AnimalStereotype
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotype.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,8 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.enterprise.util.AnnotationLiteral;
+
+class AnimalStereotypeAnnotationLiteral extends AnnotationLiteral<AnimalStereotype> implements AnimalStereotype
+{
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/AnimalStereotypeAnnotationLiteral.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BasicLogger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BasicLogger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BasicLogger.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,21 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.decorator.Decorator;
+
+@Decorator
+class BasicLogger implements Logger
+{
+
+ private static String message;
+
+ public String getMessage()
+ {
+ return message;
+ }
+
+ public void log(String message)
+ {
+ BasicLogger.message = message;
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BasicLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Inject;
+
+/**
+ * Test bean with injection point on the constructor of the bean
+ *
+ * @author David Allen
+ *
+ */
+class BeanWithInjectionPointMetadata
+{
+ @Inject
+ private InjectionPoint injectedMetadata;
+
+ public InjectionPoint getInjectedMetadata()
+ {
+ return injectedMetadata;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/BeanWithInjectionPointMetadata.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,25 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionPoint;
+import javax.inject.Inject;
+
+class Cat
+{
+ @Inject private InjectionPoint injectionPoint;
+
+ @Inject private BeanManager beanManager;
+
+ public String hello() {
+ return "hello";
+ }
+
+ public InjectionPoint getInjectionPoint() {
+ return injectionPoint;
+ }
+
+ public BeanManager getBeanManager()
+ {
+ return beanManager;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Cat.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,17 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+@Decorator
+class CatDecorator extends Cat
+{
+ @Inject @Delegate Cat bean;
+
+ @Override
+ public String hello()
+ {
+ return bean.hello() + " world!";
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/CatDecorator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.inject.Inject;
+
+/**
+ * Test bean to inject a bean using injection point metadata into a constructor
+ *
+ * @author David Allen
+ *
+ */
+class ConstructorInjectionPointBean
+{
+ private BeanWithInjectionPointMetadata injectedBean;
+
+ @Inject
+ public ConstructorInjectionPointBean(BeanWithInjectionPointMetadata injectedBean)
+ {
+ this.injectedBean = injectedBean;
+ }
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/ConstructorInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+
+/**
+ * Test bean to inject another bean which uses injection point metadata in a
+ * field
+ *
+ * @author David Allen
+ *
+ */
+@RequestScoped
+class FieldInjectionPointBean
+{
+ @Inject @AnimalStereotype
+ private BeanWithInjectionPointMetadata injectedBean;
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/FieldInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Logger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Logger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Logger.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,6 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+interface Logger
+{
+ public void log(String message);
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/Logger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,19 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.inject.Inject;
+
+class LoggerConsumer
+{
+ @Inject @Abc
+ private Logger logger;
+
+ public Logger getLogger()
+ {
+ return logger;
+ }
+
+ public void doSomething()
+ {
+ logger.log("Test message");
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/LoggerConsumer.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MethodInjectionPointBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MethodInjectionPointBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MethodInjectionPointBean.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.inject.Inject;
+
+/**
+ * Test bean to inject a bean using injection point metadata into a constructor
+ *
+ * @author David Allen
+ *
+ */
+public class MethodInjectionPointBean
+{
+ private BeanWithInjectionPointMetadata injectedBean;
+
+ @Inject
+ public void methodWithInjectedMetadata(BeanWithInjectionPointMetadata injectedBean)
+ {
+ this.injectedBean = injectedBean;
+ }
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MethodInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MyLogger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MyLogger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MyLogger.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,9 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+@Abc
+public class MyLogger implements Logger {
+
+ public void log(String message) {
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/MyLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TimestampLogger.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TimestampLogger.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TimestampLogger.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,45 @@
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import java.util.Date;
+
+import javax.decorator.Decorator;
+import javax.decorator.Delegate;
+import javax.inject.Inject;
+
+
+class TimestampLogger implements Logger
+{
+ @Inject @Delegate
+ private Logger logger;
+
+ private static Logger staticLogger;
+
+ private static String loggedMessage;
+
+ public void log(String message)
+ {
+ staticLogger = logger;
+ loggedMessage = message;
+ logger.log(new Date().toString() + ": " + message);
+ }
+
+ public static Logger getLogger()
+ {
+ return staticLogger;
+ }
+
+ /**
+ * @return the loggedMessage
+ */
+ public static String getLoggedMessage()
+ {
+ return loggedMessage;
+ }
+
+ public static void reset()
+ {
+ loggedMessage = null;
+ staticLogger = null;
+ }
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TimestampLogger.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TransientFieldInjectionPointBean.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TransientFieldInjectionPointBean.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TransientFieldInjectionPointBean.java 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.jsr299.tck.tests.lookup.injectionpoint;
+
+import javax.enterprise.context.RequestScoped;
+import javax.inject.Inject;
+
+/**
+ * Test bean to inject another bean which uses injection point metadata in a
+ * field
+ *
+ * @author David Allen
+ *
+ */
+@RequestScoped
+class TransientFieldInjectionPointBean
+{
+ @Inject @AnimalStereotype
+ private transient BeanWithInjectionPointMetadata injectedBean;
+
+ public BeanWithInjectionPointMetadata getInjectedBean()
+ {
+ return injectedBean;
+ }
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/TransientFieldInjectionPointBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml 2010-02-10 18:21:33 UTC (rev 20225)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.TimestampLogger</class>
+ <class>org.jboss.jsr299.tck.tests.lookup.injectionpoint.CatDecorator</class>
+ </decorators>
+</beans>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.text.ext.test/projects/test_cdi_project/src/org/jboss/jsr299/tck/tests/lookup/injectionpoint/beans.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
14 years, 8 months
JBoss Tools SVN: r20224 - in trunk/cdi/plugins/org.jboss.tools.cdi.text.ext: src/org/jboss/tools/cdi/text/ext/hyperlink and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-02-10 12:59:29 -0500 (Wed, 10 Feb 2010)
New Revision: 20224
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-3125
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2010-02-10 17:51:34 UTC (rev 20223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/META-INF/MANIFEST.MF 2010-02-10 17:59:29 UTC (rev 20224)
@@ -18,6 +18,7 @@
org.eclipse.ui.ide;bundle-version="3.5.0",
org.jboss.tools.cdi.core;bundle-version="1.0.0",
org.jboss.tools.common;bundle-version="2.0.0",
- org.jboss.tools.common.el.core;bundle-version="2.0.0"
+ org.jboss.tools.common.el.core;bundle-version="2.0.0",
+ org.jboss.tools.common.model;bundle-version="2.0.0"
Bundle-Version: 2.0.0
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-02-10 17:51:34 UTC (rev 20223)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.text.ext/src/org/jboss/tools/cdi/text/ext/hyperlink/InjectedPointHyperlinkDetector.java 2010-02-10 17:59:29 UTC (rev 20224)
@@ -19,6 +19,7 @@
import org.eclipse.jdt.core.ICodeAssist;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IType;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
@@ -33,6 +34,7 @@
import org.jboss.tools.cdi.core.CDIConstants;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.text.ext.CDIExtensionsPlugin;
+import org.jboss.tools.common.model.util.EclipseJavaUtil;
public class InjectedPointHyperlinkDetector extends AbstractHyperlinkDetector{
@@ -92,11 +94,10 @@
}
}
- if (element instanceof IAnnotatable) {
+ if (element instanceof IAnnotatable && element instanceof IMember) {
IAnnotatable annotatable = (IAnnotatable)element;
- IAnnotation annotation = annotatable.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
- if (annotation == null)
+ if(!findAnnotation(annotatable, ((IMember)element).getDeclaringType()))
continue;
hyperlinks.add(new InjectedPointListHyperlink(file, textViewer, wordRegion, element, document));
@@ -112,6 +113,18 @@
return null;
}
-
+ private boolean findAnnotation(IAnnotatable annotatable, IType type){
+ try{
+ IAnnotation[] annotations = annotatable.getAnnotations();
+ for(IAnnotation annotation : annotations){
+ if(annotation != null && annotation.getElementName() != null && CDIConstants.INJECT_ANNOTATION_TYPE_NAME.equals(EclipseJavaUtil.resolveType(type, annotation.getElementName())))
+ return true;
+ }
+ }catch (JavaModelException jme) {
+ CDIExtensionsPlugin.log(jme);
+ }
+ return false;
+
+ }
}
14 years, 8 months
JBoss Tools SVN: r20223 - 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: 2010-02-10 12:51:34 -0500 (Wed, 10 Feb 2010)
New Revision: 20223
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ContextValidationHelper.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5826
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ContextValidationHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ContextValidationHelper.java 2010-02-10 16:26:17 UTC (rev 20222)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ContextValidationHelper.java 2010-02-10 17:51:34 UTC (rev 20223)
@@ -36,10 +36,20 @@
protected IValidationContext validationContext;
protected TextFileDocumentProvider documentProvider = new TextFileDocumentProvider();
- protected Map<IProject, IValidationContext> contexts = new HashMap<IProject, IValidationContext>();
+ protected Map<IProject, IValidationContext> contexts;
/*
* (non-Javadoc)
+ * @see org.eclipse.wst.validation.internal.operations.WorkbenchContext#initialize()
+ */
+ @Override
+ public void initialize() {
+ validationContext = null;
+ contexts = new HashMap<IProject, IValidationContext>();
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.eclipse.wst.validation.internal.operations.WorkbenchContext#registerResource(org.eclipse.core.resources.IResource)
*/
@Override
14 years, 8 months
JBoss Tools SVN: r20222 - in trunk/drools/docs/reference/en: modules and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: ochikvina
Date: 2010-02-10 11:26:17 -0500 (Wed, 10 Feb 2010)
New Revision: 20222
Added:
trunk/drools/docs/reference/en/images/editors/editors1d.png
trunk/drools/docs/reference/en/images/editors/editors1e.png
trunk/drools/docs/reference/en/images/editors/editors1f.png
trunk/drools/docs/reference/en/images/editors/editors1g.png
trunk/drools/docs/reference/en/images/editors/editors9.png
trunk/drools/docs/reference/en/images/editors/icon1.png
trunk/drools/docs/reference/en/images/editors/icon2.png
trunk/drools/docs/reference/en/images/editors/icon3.png
trunk/drools/docs/reference/en/images/editors/icon4.png
trunk/drools/docs/reference/en/images/editors/icon5.png
trunk/drools/docs/reference/en/images/editors/icon6.png
trunk/drools/docs/reference/en/images/editors/icon7.png
trunk/drools/docs/reference/en/images/editors/icon8.png
trunk/drools/docs/reference/en/images/editors/icon9.png
Modified:
trunk/drools/docs/reference/en/modules/editors.xml
trunk/drools/docs/reference/en/modules/introduction.xml
Log:
<html><head><meta name="qrichtext" content="1" /></head><body style="font-size:9pt;font-family:Sans Serif">
<p>https://jira.jboss.org/jira/browse/JBDS-1058 - Added a section describing Flow Editor to Doc-Drools. </p>
</body></html>
Added: trunk/drools/docs/reference/en/images/editors/editors1d.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/editors1d.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/editors1e.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/editors1e.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/editors1f.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/editors1f.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/editors1g.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/editors1g.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/editors9.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/editors9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon1.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon2.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon3.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon3.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon4.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon4.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon5.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon5.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon6.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon6.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon7.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon7.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon8.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon8.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/drools/docs/reference/en/images/editors/icon9.png
===================================================================
(Binary files differ)
Property changes on: trunk/drools/docs/reference/en/images/editors/icon9.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/drools/docs/reference/en/modules/editors.xml
===================================================================
--- trunk/drools/docs/reference/en/modules/editors.xml 2010-02-10 16:05:54 UTC (rev 20221)
+++ trunk/drools/docs/reference/en/modules/editors.xml 2010-02-10 16:26:17 UTC (rev 20222)
@@ -8,7 +8,7 @@
</chapterinfo>
<title>Editors</title>
- <section>
+ <section id="dsl_editor">
<title>DSL Editor</title>
<para>A domain-specific language is a set of custom rules,
that is created specifically to solve problems in a particular domain
@@ -129,7 +129,229 @@
</figure>
</section>
</section>
+ <section id="ruleflow_editor">
+ <title>Flow Editor</title>
+ <para>Drools tools also provide some functionality to define the order in
+ which rules should be executed.Ruleflow file allows you to specify
+ the order in which rule sets should be evaluated using a flow chart.
+ So you can define which rule sets should be evaluated in sequence or in parallel as well as
+ specify conditions under which rule sets should be evaluated.</para>
+ <para>Ruleflows can be set only by using the graphical flow editor which is part of the Drools plugin for Eclipse.
+ Once you have set up a Drools project,you can start adding ruleflows.
+ Add a ruleflow file(.rf) by clicking on the project and selecting "<emphasis>New -> Other...->Flow File</emphasis>":</para>
+ <figure>
+ <title>RuleFlow file creation</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/editors1f.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>By default these ruleflow files (.rf) are opened in the graphical Flow editor.
+ You can see it on the picture below.</para>
+ <figure>
+ <title>Flow Editor</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/editors1g.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>The Flow editor consists of a <emphasis>palette</emphasis>, a <emphasis>canvas</emphasis>
+ and an <emphasis>outline</emphasis> view. To add new elements to the canvas, select the
+ element you would like to create in the palette and then add it to the canvas by clicking on the preferred location.
+ </para>
+ <figure>
+ <title>Adding an element to the canvas</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/editors1e.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Clicking on the Select option in the palette and
+ then on the element in your ruleflow allows you to
+ view and set the properties of that element in the properies view.</para>
+ <figure>
+ <title>Properties view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/editors1d.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>Outline View is useful for big complex schemata where not all nodes are seen at one time.
+ So using your Outline view you can easly navigate between parts of a schema. </para>
+ <figure>
+ <title>Outline view usage</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/editors9.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <section>
+ <title>Different types of control elements in Flow Palette</title>
+ <para>Flow editor supports three types of control elements.
+ They are:</para>
+ <table> <title>Flow Palette Components.Part 1</title>
+ <tgroup cols="3">
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" align="left" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="3*"/>
+
+ <thead>
+ <row>
+ <entry>Component Picture</entry>
+ <entry>Component Name</entry>
+ <entry>Description</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon7.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Select</entry>
+ <entry>Select a node on the canvas</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon8.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Marquee</entry>
+ <entry>Is used for selecting a group of elements</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon9.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Sequence Flow</entry>
+ <entry>Use this element to join two elements on the canvas</entry>
+ </row>
+ </tbody>
+
+ </tgroup>
+ </table>
+ </section>
+ <section>
+ <title>Different types of nodes in Flow Palette</title>
+
+ <para>Currently, ruleflow supports seven types of nodes.
+ In the table below you can find information about them:</para>
+ <table> <title>Flow Palette Components.Part 2.</title>
+ <tgroup cols="3">
+ <colspec colnum="1" align="left" colwidth="1*"/>
+ <colspec colnum="2" align="left" colwidth="1*"/>
+ <colspec colnum="3" align="left" colwidth="3*"/>
+
+ <thead>
+ <row>
+ <entry>Component Picture</entry>
+ <entry>Component Name</entry>
+ <entry>Description</entry>
+ </row>
+
+ </thead>
+ <tbody>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon1.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Start Event</entry>
+ <entry>The start of the ruleflow. A ruleflow should have exactly
+ one start node. The <property>Start Event</property> can not have incoming
+ connections and should have one outgoing connection. Whenever the ruleflow process is started,
+ the executing is started here and is automatically proceeded to the first node
+ linked to this <property>Start Event</property></entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon2.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>End Event</entry>
+ <entry>A ruleflow file can have one or more <property>End Events</property>.
+ The <property>End Event</property> node should have one incoming connection
+ and can not have outgoing connections. When an end node is reached in the ruleflow,
+ the ruleflow is terminated (including other remaining active nodes when parallelism
+ is used).</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon3.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Rule Task</entry>
+ <entry>represents a set of rules. A <emphasis>Rule Task</emphasis> node should have one
+ incoming connection and one outgoing connection.
+ The <property>RuleFlowGroup</property> property which is used to specify the name of the
+ ruleflow-group that represents the set of rules of this <emphasis>Rule Task</emphasis> node.
+ When a <emphasis>Rule Task</emphasis> node is reached in the ruleflow, the engine will start
+ executing rules that are a part of the corresponding ruleflow-group.
+ Execution automatically continues to the next node when there are no
+ more active rules in this ruleflow-group.
+ </entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon4.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Gateway[diverge]</entry>
+ <entry>allows you to create branches in your ruleflow.
+ A <property>Gateway[diverge]</property> node should have one incoming connection and two or more
+ outgoing connections.</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon4.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Gateway[converge]</entry>
+ <entry>allows you to synchronize multiple branches.
+ A <property>Gateway[diverge]</property>node should have two or more incoming connections and one
+ outgoing connection.</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon5.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Reusable Sup-Process</entry>
+ <entry>represents the invocation of another ruleflow from this ruleflow.
+ A subflow node should have one incoming connection and one outgoing connection.
+ It contains the property "processId" which specifies the id of the process that should be executed.
+ When a <property>Reusable Sup-Process</property> node is reached in the ruleflow, the engine will start the process with the given id.
+ The subflow node will only continue if that subflow process has terminated its execution.
+ Note that the subflow process is started as an independent process,
+ which means that the subflow process will not be terminated if this process reaches an end node.</entry>
+ </row>
+ <row>
+ <entry><inlinemediaobject>
+ <imageobject>
+ <imagedata fileref="images/editors/icon6.png"/>
+ </imageobject></inlinemediaobject></entry>
+ <entry>Script Task</entry>
+ <entry>represents an action that should be executed in this ruleflow.
+ An <property>Script Task</property> node should have one incoming connection and one outgoing
+ connection. It contains the property "action" which specifies the action that should be executed.
+ When a <property>Script Task</property> node is reached in the ruleflow, it will execute the action and
+ continue with the next node. An action should be specified as a piece of (valid)
+ MVEL code. </entry>
+ </row>
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ </section>
+
<section id="textual_rule_editor">
<title>The Rule Editor</title>
Modified: trunk/drools/docs/reference/en/modules/introduction.xml
===================================================================
--- trunk/drools/docs/reference/en/modules/introduction.xml 2010-02-10 16:05:54 UTC (rev 20221)
+++ trunk/drools/docs/reference/en/modules/introduction.xml 2010-02-10 16:26:17 UTC (rev 20222)
@@ -104,7 +104,7 @@
language to the rule language</para>
</entry>
<entry>
- <!--link linkend="dsl_editor">The Domain Specific Language Editor</link-->
+ <link linkend="dsl_editor">The Domain Specific Language Editor</link>
</entry>
</row>
@@ -130,7 +130,7 @@
process (a rule flow)</para>
</entry>
<entry>
- <!--link linkend="ruleflow_editor">The Rule Flow Graphical Editor</link-->
+ <link linkend="ruleflow_editor">The Rule Flow Graphical Editor</link>
</entry>
</row>
14 years, 8 months
JBoss Tools SVN: r20221 - in trunk/hibernatetools/plugins: org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vyemialyanchyk
Date: 2010-02-10 11:05:54 -0500 (Wed, 10 Feb 2010)
New Revision: 20221
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5825 - fixed
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/AbstractQueryPage.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -44,6 +44,7 @@
protected boolean sticky = true;
private List<Throwable> exceptions = new ArrayList<Throwable>();
protected String tabName;
+ protected QueryInputModel model;
/**
* @param i
@@ -60,8 +61,9 @@
}
}
- public AbstractQueryPage(ConsoleConfiguration cfg) {
+ public AbstractQueryPage(ConsoleConfiguration cfg, QueryInputModel model) {
this.cfg = cfg;
+ this.model = model;
}
/**
*
@@ -153,4 +155,8 @@
this.tabName = tabName;
pcs.firePropertyChange("tabName", oldValue, tabName); //$NON-NLS-1$
}
+
+ public void setModel(QueryInputModel model) {
+ this.model = model;
+ }
}
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/HQLQueryPage.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -36,7 +36,6 @@
private Query query;
private String queryString;
- private QueryInputModel model;
public List<Object> getList() {
if (query==null) return Collections.emptyList();
@@ -95,10 +94,9 @@
* @param queryParameters
*/
public HQLQueryPage(ConsoleConfiguration cfg, String string, QueryInputModel model) {
- super(cfg);
+ super(cfg, model);
queryString = string;
setTabName(getQueryString().replace('\n', ' ').replace('\r', ' '));
- this.model = model;
}
public void setSession(Session s) {
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/JavaPage.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -48,17 +48,14 @@
private Interpreter ip;
- private QueryInputModel model;
-
/**
* @param model
* @param session2
*/
public JavaPage(ConsoleConfiguration cfg, String criteriaCode, QueryInputModel model) {
- super(cfg);
+ super(cfg, model);
this.criteriaCode = criteriaCode;
setTabName(getQueryString().replace('\n', ' ').replace('\r', ' '));
- this.model = model;
}
@SuppressWarnings("unchecked")
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/src/org/hibernate/console/QueryPage.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -92,4 +92,6 @@
/** Return result size if known, -1 if not */
public int getResultSize();
+
+ public void setModel(QueryInputModel model);
}
\ No newline at end of file
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/criteriaeditor/CriteriaEditor.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -150,6 +150,7 @@
public Object execute() {
KnownConfigurations.getInstance().getQueryPageModel().remove(queryPage);
Session session = cfg0.getSessionFactory().openSession();
+ queryPage.setModel(getQueryInputModel().getCopyForQuery());
queryPage.setQueryString(getQueryString());
queryPage.setSession(session);
KnownConfigurations.getInstance().getQueryPageModel().add(queryPage);
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2010-02-10 15:02:06 UTC (rev 20220)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/hqleditor/HQLEditor.java 2010-02-10 16:05:54 UTC (rev 20221)
@@ -420,13 +420,14 @@
// ignore
}
if (queryPage == null || !getPinToOneResTab()) {
- queryPage = cfg.executeHQLQuery(getQueryString(), getQueryInputModel().getCopyForQuery() );
+ queryPage = cfg.executeHQLQuery(getQueryString(), getQueryInputModel().getCopyForQuery());
} else {
final ConsoleConfiguration cfg0 = cfg;
cfg.execute(new Command() {
public Object execute() {
KnownConfigurations.getInstance().getQueryPageModel().remove(queryPage);
Session session = cfg0.getSessionFactory().openSession();
+ queryPage.setModel(getQueryInputModel().getCopyForQuery());
queryPage.setQueryString(getQueryString());
queryPage.setSession(session);
KnownConfigurations.getInstance().getQueryPageModel().add(queryPage);
14 years, 8 months
JBoss Tools SVN: r20220 - trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2010-02-10 10:02:06 -0500 (Wed, 10 Feb 2010)
New Revision: 20220
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-5824
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java 2010-02-10 15:01:56 UTC (rev 20219)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.mapper/src/org/hibernate/eclipse/mapper/editors/reveng/ColumnDetailsPage.java 2010-02-10 15:02:06 UTC (rev 20220)
@@ -42,7 +42,7 @@
public class ColumnDetailsPage extends RevEngDetailsPage implements IDetailsPage, PropertyChangeListener {
- private Button excluded;
+ //private Button excluded;
private FormTextEntry nameEntry;
private FormTextEntry jdbcTypeEntry;
private FormTextEntry propertyEntry;
@@ -61,17 +61,17 @@
}
});
- excluded = toolkit.createButton(client, MapperMessages.ColumnDetailsPage_exclude_columns_from_reverse_engineering, SWT.CHECK);
+ //excluded = toolkit.createButton(client, MapperMessages.ColumnDetailsPage_exclude_columns_from_reverse_engineering, SWT.CHECK);
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true,false);
gridData.horizontalSpan = 3;
- excluded.setLayoutData(gridData);
+ /*excluded.setLayoutData(gridData);
excluded.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
column.setExcluded(excluded.getSelection());
}
- });
+ });*/
jdbcTypeEntry = new FormTextEntry(client, toolkit, MapperMessages.ColumnDetailsPage_jdbc_type, SWT.NULL);
jdbcTypeEntry.setDescription(MapperMessages.ColumnDetailsPage_which_jdbc_type_this_column_should_have);
@@ -115,7 +115,7 @@
jdbcTypeEntry.setValue(column.getJDBCType());
propertyEntry.setValue(column.getPropertyName());
typeEntry.setValue(column.getType());
- excluded.setSelection(column.getExclude());
+ //excluded.setSelection(column.getExclude());
nameEntry.setEditable(!column.getExclude());
}
14 years, 8 months