JBoss Tools SVN: r30795 - in cdi/plugins/org.jboss.tools.cdi.seam.text.ext: .settings and 10 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-04-22 20:44:15 -0400 (Fri, 22 Apr 2011)
New Revision: 30795
Added:
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.project
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/org.eclipse.jdt.core.prefs
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/about.html
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/build.properties
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtPlugin.java
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlink.java
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlinkDetector.java
cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-8202
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,7 @@
+<?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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.project
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.project (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.project 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.cdi.seam.text.ext</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/org.eclipse.jdt.core.prefs 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,12 @@
+#Tue Apr 19 15:15:09 PDT 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+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.6
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/.settings/org.eclipse.jdt.core.prefs
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Bundle-ActivationPolicy: lazy
+Bundle-Name: %Bundle-Name.0
+Bundle-Activator: org.jboss.tools.cdi.seam.text.ext.CDISeamExtPlugin
+Bundle-ManifestVersion: 2
+Bundle-Vendor: %providerName
+Bundle-SymbolicName: org.jboss.tools.cdi.seam.text.ext;singleton:=true
+Bundle-Localization: plugin
+Export-Package: org.jboss.tools.cdi.seam.text.ext,
+ org.jboss.tools.cdi.seam.text.ext.hyperlink
+Require-Bundle: org.eclipse.ui;bundle-version="3.5.0",
+ org.jboss.tools.common.text.ext;bundle-version="2.0.0",
+ org.eclipse.jface.text;bundle-version="3.5.0",
+ org.eclipse.jdt.ui;bundle-version="3.5.0",
+ org.jboss.tools.cdi.ui;bundle-version="1.2.0",
+ org.jboss.tools.jst.web;bundle-version="3.2.0"
+Bundle-Version: 1.2.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/about.html
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/about.html (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/about.html 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/about.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/build.properties
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/build.properties (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/build.properties 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,11 @@
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html
+src.includes = plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ META-INF/,\
+ src/
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,2 @@
+providerName=JBoss by Red Hat
+Bundle-Name.0 = CDI Seam Text Editors Extensions
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+<plugin>
+
+ <extension
+ point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
+ <hyperlinkDetector
+ class="org.jboss.tools.cdi.seam.text.ext.hyperlink.CDISeamResourceLoadingHyperlinkDetector"
+ id="org.jboss.tools.cdi.seam.text.ext.hyperlink.CDISeamResourceLoadingHyperlinkDetector"
+ name="%CDISeamResourceLoadingHyperlinkDetector"
+ targetId="org.eclipse.jdt.ui.javaCode">
+ </hyperlinkDetector>
+ </extension>
+
+</plugin>
\ No newline at end of file
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/plugin.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ </parent>
+ <groupId>org.jboss.tools.cdi.plugins</groupId>
+ <artifactId>org.jboss.tools.cdi.seam.text.ext</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.text.ext;
+
+import org.eclipse.osgi.util.NLS;
+
+public class CDISeamExtMessages extends NLS{
+ private static final String BUNDLE_NAME = "org.jboss.tools.cdi.seam.text.ext.messages"; //$NON-NLS-1$
+
+ static {
+ NLS.initializeMessages(BUNDLE_NAME, CDISeamExtMessages.class);
+ }
+ public static String CDI_SEAM_EXT_PLUGIN_NO_MESSAGE;
+ public static String CDI_SEAM_RESOURCE_LOADING_HYPERLINK;
+}
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtMessages.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtPlugin.java
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtPlugin.java (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtPlugin.java 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.text.ext;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+public class CDISeamExtPlugin extends AbstractUIPlugin{
+ //The shared instance.
+ private static CDISeamExtPlugin plugin;
+ //Resource bundle.
+ private ResourceBundle resourceBundle;
+
+ public static final String PLUGIN_ID = "org.jboss.tools.cdi.seam.text.ext"; //$NON-NLS-1$
+
+
+ /**
+ * The constructor.
+ */
+ public CDISeamExtPlugin() {
+ plugin = this;
+ }
+
+ /**
+ * Returns the shared instance.
+ */
+ public static CDISeamExtPlugin getDefault() {
+ return plugin;
+ }
+
+ /**
+ * Returns the workspace instance.
+ */
+ public static IWorkspace getWorkspace() {
+ return ResourcesPlugin.getWorkspace();
+ }
+
+ /**
+ * Returns the string from the plugin's resource bundle,
+ * or 'key' if not found.
+ */
+ public static String getResourceString(String key) {
+ ResourceBundle bundle= CDISeamExtPlugin.getDefault().getResourceBundle();
+ try {
+ return bundle.getString(key);
+ } catch (MissingResourceException e) {
+ return key;
+ }
+ }
+
+ /**
+ * Returns the plugin's resource bundle,
+ */
+ public ResourceBundle getResourceBundle() {
+ return resourceBundle;
+ }
+
+ static public void log(String msg) {
+ CDISeamExtPlugin.getDefault().getLog().log(new Status(Status.INFO, PLUGIN_ID, Status.OK, msg, null));
+ }
+
+ public static void log(IStatus status) {
+ CDISeamExtPlugin.getDefault().getLog().log(status);
+ }
+ public static void log(String message, Exception exception) {
+ CDISeamExtPlugin.getDefault().getLog().log(new Status(Status.ERROR, CDISeamExtPlugin.PLUGIN_ID, Status.OK, message, exception));
+ }
+ static public void log(Exception ex) {
+ CDISeamExtPlugin.getDefault().getLog().log(new Status(Status.ERROR, CDISeamExtPlugin.PLUGIN_ID, Status.OK, CDISeamExtMessages.CDI_SEAM_EXT_PLUGIN_NO_MESSAGE, ex));
+ }
+
+
+
+}
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/CDISeamExtPlugin.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlink.java
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlink.java (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlink.java 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.text.ext.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IEditorPart;
+import org.jboss.tools.cdi.seam.text.ext.CDISeamExtMessages;
+import org.jboss.tools.common.text.ext.hyperlink.AbstractHyperlink;
+
+public class CDISeamResourceLoadingHyperlink extends AbstractHyperlink{
+ private IRegion region;
+ private String path;
+ private IFile file;
+
+ public CDISeamResourceLoadingHyperlink(IFile file, IDocument document, IRegion region, String path){
+ super();
+ this.file = file;
+ this.region = region;
+ this.path = path;
+ setDocument(document);
+ }
+
+ protected IFile getFile(){
+ return file;
+ }
+
+ @Override
+ protected IRegion doGetHyperlinkRegion(int offset) {
+ return region;
+ }
+
+ @Override
+ protected void doHyperlink(IRegion region) {
+ IFile file = getFile().getProject().getFile(path);
+ IEditorPart part = openFileInEditor(file);
+ if(part == null)
+ openFileFailed();
+ }
+
+ @Override
+ public String getHyperlinkText() {
+ return NLS.bind(CDISeamExtMessages.CDI_SEAM_RESOURCE_LOADING_HYPERLINK, path);
+ }
+
+}
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlink.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlinkDetector.java
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlinkDetector.java (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlinkDetector.java 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,126 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.text.ext.hyperlink;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.IMemberValuePair;
+import org.eclipse.jdt.core.ISourceRange;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.ui.javaeditor.EditorUtility;
+import org.eclipse.jdt.internal.ui.javaeditor.JavaEditor;
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.ui.texteditor.ITextEditor;
+import org.jboss.tools.cdi.seam.text.ext.CDISeamExtPlugin;
+import org.jboss.tools.cdi.ui.marker.MarkerResolutionUtils;
+import org.jboss.tools.common.EclipseUtil;
+
+public class CDISeamResourceLoadingHyperlinkDetector extends AbstractHyperlinkDetector{
+ public static final String RESOURCE_ANNOTATION = "org.jboss.seam.solder.resourceLoader.Resource";
+ public static final String VALUE = "value";
+
+ @Override
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer,
+ IRegion region, boolean canShowMultipleHyperlinks) {
+ ITextEditor textEditor= (ITextEditor)getAdapter(ITextEditor.class);
+ if (region == null || !canShowMultipleHyperlinks || !(textEditor instanceof JavaEditor))
+ return null;
+
+ int offset = region.getOffset();
+
+ IJavaElement input= EditorUtility.getEditorInputJavaElement(textEditor, false);
+ if (input == null)
+ return null;
+
+ if (input.getResource() == null)
+ return null;
+
+ IDocument document= textEditor.getDocumentProvider().getDocument(textEditor.getEditorInput());
+
+ IFile file = null;
+
+ try {
+ IResource resource = input.getCorrespondingResource();
+ if (resource instanceof IFile)
+ file = (IFile) resource;
+ } catch (JavaModelException e) {
+ CDISeamExtPlugin.log(e);
+ }
+
+ if(file == null)
+ return null;
+
+ try {
+
+ ICompilationUnit cu = EclipseUtil.getCompilationUnit(file);
+
+ IJavaElement element = cu.getElementAt(offset);
+ if(element != null){
+ if(element instanceof IField){
+ IAnnotation annotation = MarkerResolutionUtils.getAnnotation(element, RESOURCE_ANNOTATION);
+ if(annotation != null && annotation.exists()){
+ IRegion annotationRegion = getAnnotationRegion(document, annotation);
+ String text = getValue(annotation);
+ if(text != null){
+ return new IHyperlink[]{new CDISeamResourceLoadingHyperlink(file, document, annotationRegion, text)};
+ }
+ }
+ }
+ }
+ }catch(CoreException ex){
+ CDISeamExtPlugin.log(ex);
+ }catch(BadLocationException ex){
+ CDISeamExtPlugin.log(ex);
+ }
+
+ return null;
+ }
+
+ private IRegion getAnnotationRegion(IDocument document, IAnnotation annotation) throws BadLocationException, JavaModelException{
+ ISourceRange sourceRange = annotation.getSourceRange();
+ String annotationText = document.get(sourceRange.getOffset(), sourceRange.getLength());
+ int offset = sourceRange.getOffset();
+ int length = sourceRange.getLength();
+ int first = annotationText.indexOf("\"");
+ if(first >= 0){
+ int last = annotationText.lastIndexOf("\"");
+ if(last > 0 && last != first){
+ offset += first + 1;
+ length = last - first - 1;
+ }
+ }
+
+ IRegion region = new Region(offset, length);
+ return region;
+ }
+
+ private String getValue(IAnnotation annotation) throws JavaModelException{
+ IMemberValuePair[] pairs = annotation.getMemberValuePairs();
+ for(IMemberValuePair pair : pairs){
+ if(pair.getMemberName().equals(VALUE) && pair.getValueKind() == IMemberValuePair.K_STRING){
+ return (String)pair.getValue();
+ }
+ }
+ return null;
+ }
+
+}
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/hyperlink/CDISeamResourceLoadingHyperlinkDetector.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties
===================================================================
--- cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties (rev 0)
+++ cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties 2011-04-23 00:44:15 UTC (rev 30795)
@@ -0,0 +1,2 @@
+CDI_SEAM_EXT_PLUGIN_NO_MESSAGE=No message
+CDI_SEAM_RESOURCE_LOADING_HYPERLINK=Open Resource ''{0}''
\ No newline at end of file
Property changes on: cdi/plugins/org.jboss.tools.cdi.seam.text.ext/src/org/jboss/tools/cdi/seam/text/ext/messages.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 11 months
JBoss Tools SVN: r30793 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core: definition and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-22 20:34:35 -0400 (Fri, 22 Apr 2011)
New Revision: 30793
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java
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/ConfigDefinitionContext.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SAXParser.java
trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java
Log:
JBIDE-3120
https://issues.jboss.org/browse/JBIDE-3120
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java 2011-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigConstants.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -16,4 +16,12 @@
public static String SEAM_BEANS_XML = "seam-beans.xml";
+ public static String URI_PREFIX = "urn:java:";
+
+ //Problem id: node name was not resolved to Java type
+ public static String UNRESOLVED_TYPE = "Unresolved type";
+
+ //Problem id: node was expected to be resolved to annotation type
+ public static String ANNOTATION_EXPECTED = "Annotation expected";
+
}
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-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/CDISeamConfigExtension.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -14,6 +14,7 @@
import java.util.Set;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IPackageFragmentRoot;
import org.eclipse.jface.text.Document;
@@ -41,10 +42,6 @@
ConfigFileSet fileSet = new ConfigFileSet();
- public Object getAdapter(Class adapter) {
- return null;
- }
-
public void setProject(CDICoreNature n) {
project = n;
}
@@ -88,10 +85,11 @@
}
if(o instanceof FileAnyImpl) {
String text = ((FileAnyImpl)o).getAsText();
+ IResource resource = (IResource)o.getAdapter(IResource.class);
IDocument document = new Document();
SeamDefinitionBuilder builder = new SeamDefinitionBuilder();
document.set(text);
- SeamBeansDefinition def = builder.createDefinition(document, project);
+ SeamBeansDefinition def = builder.createDefinition(resource, document, project, context.getWorkingCopy());
if(isSeamBeans) {
context.getWorkingCopy().addSeamBeanXML(p, def);
} else {
@@ -103,7 +101,7 @@
}
public void buildDefinitions(FileSet fileSet) {
- //nothing to do
+ //nothing to do since we visited all resources.
}
public void buildBeans() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/ConfigDefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/ConfigDefinitionContext.java 2011-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/ConfigDefinitionContext.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -16,7 +16,10 @@
import java.util.Set;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.extension.AbstractDefinitionContextExtension;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.cdi.internal.core.impl.definition.DefinitionContext;
import org.jboss.tools.cdi.seam.config.core.definition.SeamBeansDefinition;
/**
@@ -28,6 +31,8 @@
private Map<IPath, SeamBeansDefinition> beanXMLs = new HashMap<IPath, SeamBeansDefinition>();
private Map<IPath, SeamBeansDefinition> seambeanXMLs = new HashMap<IPath, SeamBeansDefinition>();
+ private Map<String, AnnotationDefinition> annotations = new HashMap<String, AnnotationDefinition>();
+
public ConfigDefinitionContext getWorkingCopy() {
return (ConfigDefinitionContext)super.getWorkingCopy();
}
@@ -38,6 +43,7 @@
if(!clean) {
copy.beanXMLs.putAll(beanXMLs);
copy.seambeanXMLs.putAll(seambeanXMLs);
+ copy.annotations.putAll(annotations);
//TODO
}
@@ -45,8 +51,20 @@
}
protected void doApplyWorkingCopy() {
- beanXMLs = ((ConfigDefinitionContext)workingCopy).beanXMLs;
- seambeanXMLs = ((ConfigDefinitionContext)workingCopy).seambeanXMLs;
+ ConfigDefinitionContext copy = (ConfigDefinitionContext)workingCopy;
+ beanXMLs = copy.beanXMLs;
+ seambeanXMLs = copy.seambeanXMLs;
+
+ for (String s: annotations.keySet()) {
+ if(!copy.annotations.containsKey(s)) {
+ //Remove from root and reload it in root.
+ AnnotationDefinition d = annotations.get(s);
+ IType type = d.getType();
+ root.clean(type.getFullyQualifiedName());
+ root.getAnnotationKind(type);
+ }
+ }
+ annotations = copy.annotations;
}
public void clean() {
@@ -56,6 +74,9 @@
synchronized (seambeanXMLs) {
seambeanXMLs.clear();
}
+ synchronized (annotations) {
+ annotations.clear();
+ }
}
public void clean(IPath path) {
@@ -67,6 +88,12 @@
}
}
+ public void clean(String typeName) {
+ synchronized(annotations) {
+ annotations.remove(typeName);
+ }
+ }
+
public void addBeanXML(IPath path, SeamBeansDefinition def) {
synchronized (beanXMLs) {
beanXMLs.put(path, def);
@@ -92,4 +119,11 @@
return result;
}
+ public void addAnnotation(String typeName, AnnotationDefinition def) {
+ IPath path = def.getResource().getFullPath();
+// root.clean(typeName);
+ annotations.put(typeName, def);
+ ((DefinitionContext)root).addType(path, typeName, def);
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java 2011-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/definition/SeamBeansDefinition.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -10,11 +10,30 @@
******************************************************************************/
package org.jboss.tools.cdi.seam.config.core.definition;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.tools.cdi.seam.config.core.scanner.SAXElement;
+import org.jboss.tools.cdi.seam.config.core.scanner.SAXNode;
+
/**
*
* @author Viacheslav Kabanovich
*
*/
public class SeamBeansDefinition {
+ Map<SAXNode, String> unresolvedNodes = new HashMap<SAXNode, String>();
+
+ public SeamBeansDefinition() {}
+ public Map<SAXNode, String> getUnresolvedNodes() {
+ return unresolvedNodes;
+ }
+
+ public void addUnresolvedNode(SAXNode node, String problem) {
+ unresolvedNodes.put(node, problem);
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SAXParser.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SAXParser.java 2011-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SAXParser.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -134,6 +134,7 @@
current = element;
currentText = new StringBuffer();
currentTextLocation = null;
+ if(root == null) root = element;
}
public void characters (char ch[], int start, int length) throws SAXException {
@@ -160,13 +161,17 @@
current.setTextNode(text);
text.setLocation(currentTextLocation);
}
+
+ if(current.getParent() != null) {
+ current.getParent().addChildElement(current);
+ }
current = current.getParent();
}
public void error(SAXParseException e) throws SAXException {
- String message = e.getException().getMessage();
+ String message = e.getMessage();
errors.add(message);
}
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-04-23 00:33:40 UTC (rev 30792)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/scanner/SeamDefinitionBuilder.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -1,21 +1,134 @@
package org.jboss.tools.cdi.seam.config.core.scanner;
import java.io.ByteArrayInputStream;
+import java.util.List;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.text.IDocument;
import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.core.IJavaAnnotation;
+import org.jboss.tools.cdi.internal.core.impl.AnnotationLiteral;
+import org.jboss.tools.cdi.internal.core.impl.definition.AnnotationDefinition;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigConstants;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigCorePlugin;
+import org.jboss.tools.cdi.seam.config.core.ConfigDefinitionContext;
import org.jboss.tools.cdi.seam.config.core.definition.SeamBeansDefinition;
+import org.jboss.tools.cdi.seam.config.core.util.Util;
public class SeamDefinitionBuilder {
+ static int IN_ANNOTATION_TYPE = 1;
- public SeamBeansDefinition createDefinition(IDocument document, CDICoreNature project) {
- SAXParser parser = new SAXParser();
- String text = document.get();
- ByteArrayInputStream s = new ByteArrayInputStream(text.getBytes());
- SAXElement element = parser.parse(s, document);
- SeamBeansDefinition result = new SeamBeansDefinition();
- //TODO
+ CDICoreNature project;
+ ConfigDefinitionContext context;
+ IResource resource;
+ SeamBeansDefinition result;
+ SAXElement root;
+
+ public SeamBeansDefinition createDefinition(IResource resource, IDocument document, CDICoreNature project, ConfigDefinitionContext context) {
+ this.project = project;
+ this.context = context;
+ this.resource = resource;
+
+ result = new SeamBeansDefinition();
+ if(document.get().indexOf("<") >= 0) { // file can be empty
+ SAXParser parser = new SAXParser();
+ String text = document.get();
+ ByteArrayInputStream s = new ByteArrayInputStream(text.getBytes());
+ root = parser.parse(s, document);
+ scanRoot();
+ }
+
return result;
}
+ private void scanRoot() {
+ if(root == null) return;
+ List<SAXElement> es = root.getChildElements();
+ for (SAXElement element: es) {
+ scanElement(element);
+ }
+ }
+
+ private void scanElement(SAXElement element) {
+ if(!Util.isConfigRelevant(element)) return;
+
+ IType type = Util.resolveType(element, project);
+ if(type == null) {
+ result.addUnresolvedNode(element, CDISeamConfigConstants.UNRESOLVED_TYPE);
+ return;
+ }
+ boolean isAnnnotation = false;
+ try {
+ isAnnnotation = type.isAnnotation();
+ } catch (JavaModelException e) {
+ CDISeamConfigCorePlugin.getDefault().logError(e);
+ result.addUnresolvedNode(element, CDISeamConfigConstants.UNRESOLVED_TYPE);
+ return;
+ }
+ if(isAnnnotation) {
+ scanAnnotation(element, type);
+ } else {
+ scanBean(element, type);
+ }
+ }
+
+ private void scanAnnotation(SAXElement element, IType type) {
+ context.getRootContext().getAnnotationKind(type); // kick it
+ AnnotationDefinition old = context.getRootContext().getAnnotation(type.getFullyQualifiedName());
+ AnnotationDefinition def = new AnnotationDefinition();
+ def.setType(type, context.getRootContext());
+
+ List<SAXElement> es = element.getChildElements();
+ //children should be annotation declarations.
+ for (SAXElement c: es) {
+ IJavaAnnotation a = loadAnnotationDeclaration(c, IN_ANNOTATION_TYPE);
+ if(a != null) {
+ def.addAnnotation(a, context.getRootContext());
+ }
+ }
+
+ def.revalidateKind(context.getRootContext());
+
+ context.addAnnotation(type.getFullyQualifiedName(), def);
+
+ }
+
+ private void scanBean(SAXElement element, IType type) {
+ List<SAXElement> es = element.getChildElements();
+ //TODO
+ }
+
+ private IJavaAnnotation loadAnnotationDeclaration(SAXElement element, int contextKind) {
+ if(!Util.isConfigRelevant(element)) return null;
+
+ IType type = Util.resolveType(element, project);
+ if(type == null) {
+ if(contextKind == IN_ANNOTATION_TYPE) {
+ result.addUnresolvedNode(element, CDISeamConfigConstants.UNRESOLVED_TYPE);
+ }
+ return null;
+ }
+ boolean isAnnnotation = false;
+ try {
+ isAnnnotation = type.isAnnotation();
+ } catch (JavaModelException e) {
+ CDISeamConfigCorePlugin.getDefault().logError(e);
+ result.addUnresolvedNode(element, CDISeamConfigConstants.UNRESOLVED_TYPE);
+ return null;
+ }
+ if(isAnnnotation) {
+ context.getRootContext().getAnnotationKind(type); // kick it
+ AnnotationLiteral literal = new AnnotationLiteral(resource,
+ element.getLocation().getStartPosition(), element.getLocation().getLength(),
+ null, 0, type);
+ //TODO read and add member values.
+ return literal;
+ } else if(contextKind == IN_ANNOTATION_TYPE) {
+ result.addUnresolvedNode(element, CDISeamConfigConstants.ANNOTATION_EXPECTED);
+ }
+ return null;
+ }
+
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java 2011-04-23 00:34:35 UTC (rev 30793)
@@ -0,0 +1,107 @@
+package org.jboss.tools.cdi.seam.config.core.util;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.jdt.core.IField;
+import org.eclipse.jdt.core.IMember;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.IType;
+import org.eclipse.jdt.core.JavaModelException;
+import org.jboss.tools.cdi.core.CDICoreNature;
+import org.jboss.tools.cdi.seam.config.core.CDISeamConfigConstants;
+import org.jboss.tools.cdi.seam.config.core.scanner.SAXElement;
+
+public class Util {
+ public static Map<String, String> EE_TYPES = new HashMap<String, String>();
+
+ static {
+ String[] JAVA_LANG = {"Integer", "Short", "Long", "String", "Character", "Byte", "Boolean"};
+ for (String s: JAVA_LANG) EE_TYPES.put(s, "java.lang." + s);
+
+ String[] JAVA_UTIL = {"List", "Map", "Set"};
+ for (String s: JAVA_UTIL) EE_TYPES.put(s, "java.util." + s);
+
+ String[] JAVAX_ANNOTATION = {"Generated", "PostConstruct", "PreDestroy", "Resource", "Resources"};
+ for (String s: JAVAX_ANNOTATION) EE_TYPES.put(s, "javax.annotation." + s);
+
+ String[] JAVAX_INJECT = {"Inject", "Named", "Provider", "Qualifier", "Scope", "Singleton"};
+ for (String s: JAVAX_INJECT) EE_TYPES.put(s, "javax.inject." + s);
+
+ String[] JAVAX_ENTERPRISE_INJECT = {"Alternative", "AmbiguousResolutionException", "Any", "CreationException",
+ "Default", "Disposes", "IllegalProductException", "InjectionException", "Instance", "Model", "New",
+ "Produces", "ResolutionException", "Specializes", "Stereotype", "Typed",
+ "UnproxyableResolutionException", "UnsatisfiedResolutionException"};
+ for (String s: JAVAX_ENTERPRISE_INJECT) EE_TYPES.put(s, "javax.enterprise.inject." + s);
+
+ String[] JAVAX_ENTERPRISE_CONTEXT = {"ApplicationScoped", "BusyConversationException", "ContextException",
+ "ContextNotActiveException", "Conversation", "ConversationScoped", "Dependent",
+ "NonexistentConversationException", "NormalScope", "RequestScoped", "SessionScoped"};
+ for (String s: JAVAX_ENTERPRISE_CONTEXT) EE_TYPES.put(s, "javax.enterprise.context." + s);
+
+ String[] JAVAX_ENTERPRISE_EVENT = {"Event", "ObserverException", "Observes", "Reception", "TransactionPhase"};
+ for (String s: JAVAX_ENTERPRISE_EVENT) EE_TYPES.put(s, "javax.enterprise.event." + s);
+
+ String[] JAVAX_DECORAROR = {"Decorator", "Delegate"};
+ for (String s: JAVAX_DECORAROR) EE_TYPES.put(s, "javax.decorator." + s);
+
+ String[] JAVAX_INTERCEPTOR = {"AroundInvoke", "AroundTimeout", "ExcludeClassInterceptors", "ExcludeDefaultInterceptors",
+ "Interceptor", "InterceptorBinding", "Interceptors", "InvocationContext"};
+ for (String s: JAVAX_INTERCEPTOR) EE_TYPES.put(s, "javax.interceptor." + s);
+
+ }
+
+ public static boolean isConfigRelevant(SAXElement element) {
+ String uri = element.getURI();
+ return (uri != null && uri.startsWith(CDISeamConfigConstants.URI_PREFIX));
+ }
+
+ public static IType resolveType(SAXElement element, CDICoreNature project) {
+ String uri = element.getURI();
+ if(uri == null || !uri.startsWith(CDISeamConfigConstants.URI_PREFIX)) {
+ return null;
+ }
+ String name = element.getLocalName();
+ String[] packages = getPackages(uri);
+ for (String pkg: packages) {
+ if(pkg.length() == 0) continue;
+ String typeName = null;
+ if(pkg.equals("ee")) {
+ typeName = Util.EE_TYPES.get(name);
+ } else {
+ typeName = pkg + "." + name;
+ }
+ IType type = project.getType(typeName);
+ if(type != null) {
+ return type;
+ }
+ }
+ return null;
+ }
+
+ public static IMember resolveMember(IType type, SAXElement element) throws JavaModelException {
+ String name = element.getLocalName();
+ IField f = type.getField(name);
+ if(f != null && f.exists()) {
+ return f;
+ }
+ IMethod[] ms = type.getMethods();
+ for (IMethod m: ms) {
+ if(name.equals(m.getElementName())) {
+ //do more checks
+ return m;
+ }
+ }
+
+ return null;
+ }
+
+ public static String[] getPackages(String uri) {
+ if(uri == null || !uri.startsWith(CDISeamConfigConstants.URI_PREFIX)) {
+ return new String[0];
+ }
+ uri = uri.substring(CDISeamConfigConstants.URI_PREFIX.length());
+ return uri.split(":");
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.seam.config.core/src/org/jboss/tools/cdi/seam/config/core/util/Util.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 11 months
JBoss Tools SVN: r30792 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: core/extension and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-22 20:33:40 -0400 (Fri, 22 Apr 2011)
New Revision: 30792
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDefinitionContext.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
Log:
JBIDE-3120
https://issues.jboss.org/browse/JBIDE-3120
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDefinitionContext.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDefinitionContext.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -50,4 +50,11 @@
*/
public void clean(IPath path);
+ /**
+ * Removes definitions loaded from type
+ *
+ * @param typeName
+ */
+ public void clean(String typeName);
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/extension/IDefinitionContextExtension.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -23,13 +23,6 @@
*/
public interface IDefinitionContextExtension extends IDefinitionContext {
- /**
- * Removes definitions loaded from type
- *
- * @param typeName
- */
- public void clean(String typeName);
-
public void setRootContext(IRootDefinitionContext context);
/**
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/AnnotationDeclaration.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -30,6 +30,10 @@
public AnnotationDeclaration() {}
+ public AnnotationDeclaration(AnnotationDeclaration d) {
+ d.copyTo(this);
+ }
+
protected void copyTo(AnnotationDeclaration other) {
other.project = project;
other.annotation = annotation;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -12,6 +12,7 @@
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -91,6 +92,10 @@
AnnotationDeclaration a = new AnnotationDeclaration();
a.setProject(context.getProject());
a.setDeclaration(ja);
+ addAnnotation(a, context);
+ }
+
+ private void addAnnotation(AnnotationDeclaration a, IRootDefinitionContext context) {
AnnotationDeclaration b = null;
int kind = context.getAnnotationKind(a.getType());
if(kind > 0 && (kind & AnnotationDefinition.STEREOTYPE) > 0) {
@@ -120,6 +125,20 @@
}
}
+ public void annotationKindChanged(String typeName, IRootDefinitionContext context) {
+ AnnotationDeclaration a = annotationsByType.get(typeName);
+ if(a == null) return;
+ Iterator<IAnnotationDeclaration> it = annotations.iterator();
+ while(it.hasNext()) {
+ IAnnotationDeclaration a1 = it.next();
+ IType t = a1.getType();
+ if(t != null && typeName.equals(t.getFullyQualifiedName())) it.remove();
+ }
+ //Make sure that a is non-specific annotation.
+ addAnnotation(new AnnotationDeclaration(a), context);
+
+ }
+
public void removeAnnotation(IAnnotationDeclaration a) {
String name = ((AnnotationDeclaration)a).getTypeName();
IAnnotationDeclaration b = annotationsByType.get(name);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -20,6 +20,7 @@
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.cdi.core.CDIConstants;
+import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.IAnnotationDeclaration;
import org.jboss.tools.cdi.core.IRootDefinitionContext;
import org.jboss.tools.cdi.core.extension.IDefinitionContextExtension;
@@ -77,6 +78,13 @@
//TODO check super ?
return;
}
+ revalidateKind(context);
+ }
+
+ public void revalidateKind(IRootDefinitionContext context) {
+ boolean hasMembers = (kind & QUALIFIER) > 0 || (kind & INTERCEPTOR_BINDING) > 0;
+ kind = NON_RELEVANT;
+
Map<String, AnnotationDeclaration> ds = new HashMap<String, AnnotationDeclaration>();
for (IAnnotationDeclaration a: annotations) {
@@ -115,8 +123,14 @@
}
}
- if((kind & QUALIFIER) > 0 || (kind & INTERCEPTOR_BINDING) > 0) {
- initMemberDefinitions(contextType, context);
+ boolean newHasMembers = (kind & QUALIFIER) > 0 || (kind & INTERCEPTOR_BINDING) > 0;
+ if(newHasMembers != hasMembers) {
+ methods.clear();
+ try {
+ initMemberDefinitions(type, context);
+ } catch (CoreException e) {
+ CDICorePlugin.getDefault().logError(e);
+ }
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -121,9 +121,14 @@
addType(file, typeName);
if(def != null) {
if(def instanceof AnnotationDefinition) {
+ AnnotationDefinition newD = (AnnotationDefinition)def;
+ AnnotationDefinition oldD = annotations.get(def.getQualifiedName());
synchronized (annotations) {
- annotations.put(def.getQualifiedName(), (AnnotationDefinition)def);
+ annotations.put(def.getQualifiedName(), newD);
}
+ if(oldD != null && oldD.getKind() != newD.getKind()) {
+ annotationKindChanged(typeName);
+ }
} else {
synchronized (typeDefinitions) {
typeDefinitions.put(def.getQualifiedName(), (TypeDefinition)def);
@@ -208,18 +213,7 @@
public void clean(IPath path) {
Set<String> ts = resources.remove(path);
if(ts != null) for (String t: ts) {
- types.remove(t);
- synchronized (typeDefinitions) {
- typeDefinitions.remove(t);
- }
- synchronized (annotations) {
- annotations.remove(t);
- }
- packages.remove(t);
- synchronized (packageDefinitions) {
- packageDefinitions.remove(t);
- }
- for (IDefinitionContextExtension e: extensions) e.clean(t);
+ clean(t);
}
synchronized (beanXMLs) {
beanXMLs.remove(path);
@@ -238,6 +232,21 @@
for (IDefinitionContextExtension e: extensions) e.clean(path);
}
+ public void clean(String typeName) {
+ types.remove(typeName);
+ synchronized (typeDefinitions) {
+ typeDefinitions.remove(typeName);
+ }
+ synchronized (annotations) {
+ annotations.remove(typeName);
+ }
+ packages.remove(typeName);
+ synchronized (packageDefinitions) {
+ packageDefinitions.remove(typeName);
+ }
+ for (IDefinitionContextExtension e: extensions) e.clean(typeName);
+ }
+
void removeFromParents(IPath file) {
if(file == null) return;
IPath q = file;
@@ -297,7 +306,7 @@
d.setType(annotationType, this);
int kind = d.getKind();
if(kind <= AnnotationDefinition.CDI) {
- d = null;
+// d = null; //We need it to compare kind if extensions change it.
}
addType(annotationType.getPath(), name, d);
underConstruction.remove(name);
@@ -427,6 +436,13 @@
public TypeDefinition getTypeDefinition(String fullyQualifiedName) {
return typeDefinitions.get(fullyQualifiedName);
}
+
+ private void annotationKindChanged(String typeName) {
+ List<TypeDefinition> ds = getTypeDefinitions();
+ for (TypeDefinition d: ds) {
+ d.annotationKindChanged(typeName, this);
+ }
+ }
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2011-04-22 23:54:51 UTC (rev 30791)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2011-04-23 00:33:40 UTC (rev 30792)
@@ -88,6 +88,12 @@
// }
}
+ public void annotationKindChanged(String typeName, IRootDefinitionContext context) {
+ super.annotationKindChanged(typeName, context);
+ for (FieldDefinition f: fields) f.annotationKindChanged(typeName, context);
+ for (FieldDefinition m: fields) m.annotationKindChanged(typeName, context);
+ }
+
public ParametedType getSuperType() {
return parametedType == null ? null : parametedType.getSuperType();
}
14 years, 11 months
JBoss Tools SVN: r30791 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test: META-INF and 9 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-22 19:54:51 -0400 (Fri, 22 Apr 2011)
New Revision: 30791
Added:
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.classpath
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.project
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/about.html
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/build.properties
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.properties
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java
trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java
Log:
Share project "org.jboss.tools.cdi.seam.faces.core.test" into "https://svn.jboss.org/repos/jbosstools" https://issues.jboss.org/browse/JBIDE-8572
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.classpath
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.classpath (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.classpath 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.classpath
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.project
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.project (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.project 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.cdi.seam.faces.core.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/.project
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Seam Faces Test
+Bundle-SymbolicName: org.jboss.tools.cdi.seam.faces.core.test;singleton:=true
+Bundle-Version: 1.0.0.qualifier
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.jboss.tools.cdi.seam.faces.core,
+ org.eclipse.jdt.core,
+ org.junit
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/META-INF/MANIFEST.MF
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/about.html
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/about.html (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/about.html 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<HTML>
+
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+
+<BODY lang="EN-US">
+
+<H3>About This Content</H3>
+
+<P>©2007 Red Hat, Inc. All rights reserved</P>
+
+<H3>License</H3>
+
+<P>Red Hat Inc., through its JBoss division, makes available all content in this plug-in
+("Content"). Unless otherwise indicated below, the Content is provided to you
+under the terms and conditions of the Eclipse Public License Version 1.0
+("EPL"). A copy of the EPL is available at
+<A href="http://www.eclipse.org/org/documents/epl-v10.php">http://www.eclipse.org/org/documents/epl-v10.php</A>.
+For purposes of the EPL, "Program" will mean the Content.</P>
+
+<P>If you did not receive this Content directly from Red Hat Inc., the
+Content is being redistributed by another party ("Redistributor") and different
+terms and conditions may apply to your use of any object code in the Content.
+Check the Redistributor's license that was provided with the Content. If no such
+license exists, contact the Redistributor. Unless otherwise indicated below, the
+terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at
+ <A href="http://www.jboss.org/tools">http://www.jboss.org/tools</A>.</P>
+
+</BODY>
+</HTML>
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/about.html
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/build.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/build.properties (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/build.properties 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html,\
+ plugin.xml
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/build.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.properties
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.xml
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.xml (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.xml 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?>
+<plugin>
+</plugin>
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/plugin.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: 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 (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+ </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>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.sonatype.tycho</groupId>
+ <artifactId>maven-osgi-test-plugin</artifactId>
+ <configuration>
+ <explodedBundles>
+ <bundle>org.jboss.tools.cdi.seam.faces.core.test</bundle>
+ </explodedBundles>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/pom.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.faces.core.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+import org.eclipse.jdt.internal.core.JavaModelManager;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class CDISeamFacesCoreAllTests {
+
+ public static Test suite() {
+ JavaModelManager.getIndexManager().disable();
+
+ TestSuite suite = new TestSuite("Seam Solder Faces Tests");
+
+ suite.addTestSuite(SeamFacesTagLibTest.class);
+ return suite;
+ }
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/CDISeamFacesCoreAllTests.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java 2011-04-22 23:54:51 UTC (rev 30791)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 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.seam.faces.core.test;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Alexey Kazakov
+ */
+public class SeamFacesTagLibTest extends TestCase {
+
+}
\ No newline at end of file
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.seam.faces.core.test/src/org/jboss/tools/cdi/seam/faces/core/test/SeamFacesTagLibTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
14 years, 11 months
JBoss Tools SVN: r30789 - trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-22 19:35:50 -0400 (Fri, 22 Apr 2011)
New Revision: 30789
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
Log:
Changed the plugin name.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-04-22 23:05:07 UTC (rev 30788)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-04-22 23:35:50 UTC (rev 30789)
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Contexts and Dependency Injection Test
+Bundle-Name: Seam Solder Test
Bundle-SymbolicName: org.jboss.tools.cdi.seam.solder.core.test;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: JBoss by Red Hat
14 years, 11 months
JBoss Tools SVN: r30788 - in trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-22 19:05:07 -0400 (Fri, 22 Apr 2011)
New Revision: 30788
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml
Log:
Fixed plug-in version.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-04-22 22:59:28 UTC (rev 30787)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/META-INF/MANIFEST.MF 2011-04-22 23:05:07 UTC (rev 30788)
@@ -2,7 +2,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: Contexts and Dependency Injection Test
Bundle-SymbolicName: org.jboss.tools.cdi.seam.solder.core.test;singleton:=true
-Bundle-Version: 1.2.0.qualifier
+Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: JBoss by Red Hat
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.jboss.tools.tests,
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-04-22 22:59:28 UTC (rev 30787)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.solder.core.test/pom.xml 2011-04-22 23:05:07 UTC (rev 30788)
@@ -8,7 +8,7 @@
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
<artifactId>org.jboss.tools.cdi.seam.solder.core.test</artifactId>
- <version>1.2.0-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
14 years, 11 months
JBoss Tools SVN: r30787 - in trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-22 18:59:28 -0400 (Fri, 22 Apr 2011)
New Revision: 30787
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/META-INF/MANIFEST.MF
trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/build.properties
Log:
https://issues.jboss.org/browse/JBIDE-8577
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/META-INF/MANIFEST.MF 2011-04-22 22:54:25 UTC (rev 30786)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/META-INF/MANIFEST.MF 2011-04-22 22:59:28 UTC (rev 30787)
@@ -7,6 +7,8 @@
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
- org.jboss.tools.common
+ org.jboss.tools.common,
+ org.jboss.tools.jst.web.kb
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.jboss.tools.cdi.seam.faces.core
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/build.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/build.properties 2011-04-22 22:54:25 UTC (rev 30786)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.faces.core/build.properties 2011-04-22 22:59:28 UTC (rev 30787)
@@ -1,6 +1,7 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
+ taglibs/,\
.,\
plugin.xml,\
plugin.properties,\
14 years, 11 months
JBoss Tools SVN: r30786 - trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-22 18:54:25 -0400 (Fri, 22 Apr 2011)
New Revision: 30786
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/build.properties
Log:
Added plugin.xml into build.properties
Modified: trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/build.properties
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/build.properties 2011-04-22 22:53:05 UTC (rev 30785)
+++ trunk/cdi/tests/org.jboss.tools.cdi.seam.config.core.test/build.properties 2011-04-22 22:54:25 UTC (rev 30786)
@@ -1,5 +1,6 @@
source.. = src/
bin.includes = META-INF/,\
projects/,\
- .
+ .,\
+ plugin.xml
jars.compile.order = .
14 years, 11 months