JBoss Tools SVN: r30980 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi: internal/core/impl/definition and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-29 16:37:39 -0400 (Fri, 29 Apr 2011)
New Revision: 30980
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.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/AbstractTypeDefinition.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/AnnotationMemberDefinition.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/FieldDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/PackageDefinition.java
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/scanner/CDIBuilderDelegate.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.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/IAnnotationDeclaration.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.IAnnotation;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMemberValuePair;
@@ -66,4 +67,10 @@
* @return underlying Java annotation if it exists
*/
IAnnotation getJavaAnnotation();
+
+ /**
+ * Returns resource which contains this declaration
+ * @return
+ */
+ IResource getResource();
}
\ No newline at end of file
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-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractMemberDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -43,6 +43,9 @@
*
*/
public abstract class AbstractMemberDefinition implements IAnnotated {
+ public static int FLAG_NO_ANNOTATIONS = 1;
+ public static int FLAG_ALL_MEMBERS = 2;
+
CDICoreNature project;
protected List<IAnnotationDeclaration> annotations = new ArrayList<IAnnotationDeclaration>();
protected IAnnotatable member;
@@ -51,10 +54,10 @@
public AbstractMemberDefinition() {}
- protected void setAnnotatable(IAnnotatable member, IType contextType, IRootDefinitionContext context) {
+ protected void setAnnotatable(IAnnotatable member, IType contextType, IRootDefinitionContext context, int flags) {
this.member = member;
try {
- init(contextType, context);
+ init(contextType, context, flags);
} catch (CoreException e) {
CDICorePlugin.getDefault().logError(e);
}
@@ -78,13 +81,15 @@
return project.getDefinitions().getPackageDefinition(packageName);
}
- protected void init(IType contextType, IRootDefinitionContext context) throws CoreException {
+ protected void init(IType contextType, IRootDefinitionContext context, int flags) throws CoreException {
project = context.getProject();
resource = ((IJavaElement)member).getResource();
- IAnnotation[] ts = member.getAnnotations();
- for (int i = 0; i < ts.length; i++) {
- IJavaAnnotation ja = new JavaAnnotation(ts[i], contextType);
- addAnnotation(ja, context);
+ if((flags & FLAG_NO_ANNOTATIONS) == 0) {
+ IAnnotation[] ts = member.getAnnotations();
+ for (int i = 0; i < ts.length; i++) {
+ IJavaAnnotation ja = new JavaAnnotation(ts[i], contextType);
+ addAnnotation(ja, context);
+ }
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -65,14 +65,14 @@
return type;
}
- public void setType(IType type, IRootDefinitionContext context) {
- super.setAnnotatable(type, type, context);
+ public void setType(IType type, IRootDefinitionContext context, int flags) {
+ super.setAnnotatable(type, type, context, flags);
}
@Override
- protected void init(IType contextType, IRootDefinitionContext context) throws CoreException {
+ protected void init(IType contextType, IRootDefinitionContext context, int flags) throws CoreException {
this.type = contextType;
- super.init(contextType, context);
+ super.init(contextType, context, flags);
qualifiedName = getType().getFullyQualifiedName();
parametedType = context.getProject().getDelegate().getNature().getTypeFactory().newParametedType(type);
if(type != null && !type.isBinary()) {
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-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -72,8 +72,8 @@
}
@Override
- protected void init(IType contextType, IRootDefinitionContext context) throws CoreException {
- super.init(contextType, context);
+ protected void init(IType contextType, IRootDefinitionContext context, int flags) throws CoreException {
+ super.init(contextType, context, flags);
if(annotations.isEmpty()) {
//TODO check super ?
return;
@@ -139,7 +139,7 @@
for (int i = 0; i < ms.length; i++) {
AnnotationMemberDefinition m = new AnnotationMemberDefinition();
m.setAnnotationDefinition(this);
- m.setMethod(ms[i], context);
+ m.setMethod(ms[i], context, 0);
if(m.isCDIAnnotated()) {
methods.add(m);
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationMemberDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationMemberDefinition.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AnnotationMemberDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -34,9 +34,9 @@
return annotationDefinition;
}
- public void setMethod(IMethod method, IRootDefinitionContext context) {
+ public void setMethod(IMethod method, IRootDefinitionContext context, int flags) {
this.method = method;
- setAnnotatable(method, method.getDeclaringType(), context);
+ setAnnotatable(method, method.getDeclaringType(), context, flags);
}
public IMethod getMethod() {
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-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/DefinitionContext.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -303,7 +303,7 @@
private int createAnnotation(IType annotationType, String name) {
underConstruction.add(name);
AnnotationDefinition d = new AnnotationDefinition();
- d.setType(annotationType, this);
+ d.setType(annotationType, this, 0);
int kind = d.getKind();
if(kind <= AnnotationDefinition.CDI) {
// d = null; //We need it to compare kind if extensions change it.
@@ -447,6 +447,17 @@
d.annotationKindChanged(typeName, this);
}
}
+
+ public void veto(IType type) {
+ TypeDefinition d = typeDefinitions.get(type.getFullyQualifiedName());
+ if(d != null) d.veto();
+
+ }
+ public void unveto(IType type) {
+ TypeDefinition d = typeDefinitions.get(type.getFullyQualifiedName());
+ if(d != null) d.unveto();
+ }
+
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/FieldDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/FieldDefinition.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/FieldDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -25,9 +25,9 @@
public FieldDefinition() {}
- public void setField(IField field, IRootDefinitionContext context) {
+ public void setField(IField field, IRootDefinitionContext context, int flags) {
this.field = field;
- setAnnotatable(field, field.getDeclaringType(), context);
+ setAnnotatable(field, field.getDeclaringType(), context, flags);
}
public IField getField() {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/MethodDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -46,9 +46,9 @@
public MethodDefinition() {}
- public void setMethod(IMethod method, IRootDefinitionContext context) {
+ public void setMethod(IMethod method, IRootDefinitionContext context, int flags) {
this.method = method;
- setAnnotatable(method, method.getDeclaringType(), context);
+ setAnnotatable(method, method.getDeclaringType(), context, flags);
}
public IMethod getMethod() {
@@ -59,8 +59,9 @@
return isConstructor;
}
- protected void init(IType contextType, IRootDefinitionContext context) throws CoreException {
- super.init(contextType, context);
+ @Override
+ protected void init(IType contextType, IRootDefinitionContext context, int flags) throws CoreException {
+ super.init(contextType, context, flags);
isConstructor = method.isConstructor();
//TODO process parameters for disposers and observers
loadParamDefinitions(contextType, context);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/PackageDefinition.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/PackageDefinition.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/PackageDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -35,7 +35,7 @@
public void setBinaryType(IType pkg, IRootDefinitionContext context) {
binaryType = pkg;
- setAnnotatable(pkg, pkg, context);
+ setAnnotatable(pkg, pkg, context, 0);
qualifiedName = pkg.getPackageFragment().getElementName();
}
@@ -51,7 +51,7 @@
}
}
- super.setAnnotatable(pkg, contextType, context);
+ super.setAnnotatable(pkg, contextType, context, 0);
if (u != null) {
try {
u.discardWorkingCopy();
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-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/TypeDefinition.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -41,8 +41,9 @@
}
@Override
- protected void init(IType contextType, IRootDefinitionContext context) throws CoreException {
- super.init(contextType, context);
+ protected void init(IType contextType, IRootDefinitionContext context, int flags) throws CoreException {
+ super.init(contextType, context, flags);
+ boolean allMembers = (flags & FLAG_ALL_MEMBERS) > 0;
isAbstract = Flags.isAbstract(type.getFlags());
for (IAnnotationDeclaration a: annotations) {
//provide initialization
@@ -53,11 +54,11 @@
for (int i = 0; i < fs.length; i++) {
FieldDefinition f = new FieldDefinition();
f.setTypeDefinition(this);
- f.setField(fs[i], context);
+ f.setField(fs[i], context, flags);
for (IProcessAnnotatedMemberFeature e: extensions) {
e.processAnnotatedMember(f, context);
}
- if(f.isCDIAnnotated()) {
+ if(allMembers || f.isCDIAnnotated()) {
fields.add(f);
}
}
@@ -66,11 +67,11 @@
for (int i = 0; i < ms.length; i++) {
MethodDefinition m = new MethodDefinition();
m.setTypeDefinition(this);
- m.setMethod(ms[i], context);
+ m.setMethod(ms[i], context, flags);
for (IProcessAnnotatedMemberFeature e: extensions) {
e.processAnnotatedMember(m, context);
}
- if(m.isCDIAnnotated() || (ms[i].isConstructor() && ms[i].getNumberOfParameters()==0)) {
+ if(allMembers || m.isCDIAnnotated() || (ms[i].isConstructor() && ms[i].getNumberOfParameters()==0)) {
methods.add(m);
}
if(ms[i].isConstructor()) {
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/CDIBuilderDelegate.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -64,7 +64,7 @@
Set<IType> ts = cs.get(f);
for (IType type: ts) {
TypeDefinition def = new TypeDefinition();
- def.setType(type, context);
+ def.setType(type, context, 0);
context.addType(f, type.getFullyQualifiedName(), def);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-04-29 20:29:40 UTC (rev 30979)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-04-29 20:37:39 UTC (rev 30980)
@@ -1089,7 +1089,7 @@
*/
IAnnotationDeclaration inject = producer.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
if (inject != null) {
- addError(CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, CDIPreferences.PRODUCER_ANNOTATED_INJECT, inject, producer.getResource());
+ addError(CDIValidationMessages.PRODUCER_ANNOTATED_INJECT, CDIPreferences.PRODUCER_ANNOTATED_INJECT, inject, inject.getResource() != null ? inject.getResource() : producer.getResource());
}
if (producer instanceof IProducerField) {
13 years, 8 months
JBoss Tools SVN: r30979 - in trunk/forge/plugins/org.jboss.tools.seam.forge: src/org/jboss/tools/seam/forge/console and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: koen.aers(a)jboss.com
Date: 2011-04-29 16:29:40 -0400 (Fri, 29 Apr 2011)
New Revision: 30979
Modified:
trunk/forge/plugins/org.jboss.tools.seam.forge/META-INF/MANIFEST.MF
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/CommandRecorder.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsolePage.java
trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java
Log:
- support for "entity" command
- maintain the focus in the forge console after the commands
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/META-INF/MANIFEST.MF
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/META-INF/MANIFEST.MF 2011-04-29 19:04:47 UTC (rev 30978)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/META-INF/MANIFEST.MF 2011-04-29 20:29:40 UTC (rev 30979)
@@ -12,7 +12,8 @@
org.eclipse.ui.editors,
org.eclipse.ui.ide,
org.eclipse.m2e.core;bundle-version="0.13.0",
- org.eclipse.m2e.maven.runtime;bundle-version="0.13.0"
+ org.eclipse.m2e.maven.runtime;bundle-version="0.13.0",
+ org.eclipse.jdt.core
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.jboss.tools.seam.forge.ForgePlugin
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/CommandRecorder.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/CommandRecorder.java 2011-04-29 19:04:47 UTC (rev 30978)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/console/CommandRecorder.java 2011-04-29 20:29:40 UTC (rev 30979)
@@ -5,6 +5,10 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.IJavaElement;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocumentListener;
import org.eclipse.jface.viewers.StructuredSelection;
@@ -15,6 +19,7 @@
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.part.ISetSelectionTarget;
+import org.jboss.tools.seam.forge.ForgePlugin;
import org.jboss.tools.seam.forge.importer.ProjectImporter;
public class CommandRecorder implements IDocumentListener {
@@ -73,12 +78,23 @@
return "new-project";
} else if ("persistence".equals(candidateCommand)) {
return "persistence";
+ } else if ("entity".equals(candidateCommand)) {
+ return "entity";
} else {
return null;
}
}
private void postProcessCurrentCommand() {
+ IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
+ String projectName = currentPrompt.substring(1, currentPrompt.indexOf(']'));
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ try {
+ project.refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (CoreException e) {
+ ForgePlugin.log(e);
+ }
if ("pwd".equals(currentCommand)) {
// do nothing
} else if ("new-project".equals(currentCommand)) {
@@ -100,30 +116,73 @@
} else if ("persistence".equals(currentCommand)) {
int index = beforePrompt.lastIndexOf("***SUCCESS*** Installed [forge.spec.jpa] successfully.\nWrote ");
if (index == -1) return;
- String projectName = currentPrompt.substring(1, currentPrompt.indexOf(']'));
- IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+// String projectName = currentPrompt.substring(1, currentPrompt.indexOf(']'));
+// IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+// try {
+// project.refreshLocal(IResource.DEPTH_INFINITE, null);
+// } catch (CoreException e) {
+// ForgePlugin.log(e);
+// }
try {
- project.refreshLocal(IResource.DEPTH_INFINITE, null);
- } catch (CoreException e1) {
- // TODO Auto-generated catch block
- e1.printStackTrace();
+ IFile file = project.getFile("/src/main/resources/META-INF/persistence.xml");
+ if (file == null) return;
+ Object objectToSelect = file;
+ IDE.openEditor(workbenchPage, file);
+ IViewPart packageExplorer = workbenchPage.showView("org.eclipse.jdt.ui.PackageExplorer");
+ if (packageExplorer instanceof ISetSelectionTarget) {
+ ((ISetSelectionTarget)packageExplorer).selectReveal(new StructuredSelection(objectToSelect));
+ }
+ IViewPart outlineViewer = workbenchPage.showView("org.eclipse.ui.views.ContentOutline");
+ if (outlineViewer instanceof ISetSelectionTarget) {
+ ((ISetSelectionTarget)outlineViewer).selectReveal(new StructuredSelection(objectToSelect));
+ }
+ } catch (PartInitException e) {
+ ForgePlugin.log(e);
}
+ } else if ("entity".equals(currentCommand)) {
+ int index = beforePrompt.lastIndexOf("Picked up type <JavaResource>: ");
+ if (index == -1) return;
+// String projectName = currentPrompt.substring(1, currentPrompt.indexOf(']'));
+// IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
+ if (index + 31 > beforePrompt.length() -1) return;
+ String entityName = beforePrompt.substring(index + 31, beforePrompt.length() - 1).replace('.', '/');
+// try {
+// project.refreshLocal(IResource.DEPTH_INFINITE, null);
+// } catch (CoreException e) {
+// ForgePlugin.log(e);
+// }
try {
- IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- IWorkbenchPage workbenchPage = workbenchWindow.getActivePage();
- IFile file = project.getFile("/src/main/resources/META-INF/persistence.xml");
+ IFile file = project.getFile("/src/main/java/" + entityName + ".java");
+ if (file == null) return;
+ Object objectToSelect = file;
IDE.openEditor(workbenchPage, file);
+ IJavaElement javaElement = JavaCore.create(file);
+ if (javaElement != null && javaElement.getElementType() == IJavaElement.COMPILATION_UNIT) {
+ try {
+ objectToSelect = ((ICompilationUnit)javaElement).getTypes()[0];
+ } catch (JavaModelException e) {
+ ForgePlugin.log(e);
+ }
+ }
IViewPart packageExplorer = workbenchPage.showView("org.eclipse.jdt.ui.PackageExplorer");
if (packageExplorer instanceof ISetSelectionTarget) {
- ((ISetSelectionTarget)packageExplorer).selectReveal(new StructuredSelection(file));
+ ((ISetSelectionTarget)packageExplorer).selectReveal(new StructuredSelection(objectToSelect));
}
+ IViewPart outlineViewer = workbenchPage.showView("org.eclipse.ui.views.ContentOutline");
+ if (outlineViewer instanceof ISetSelectionTarget) {
+ ((ISetSelectionTarget)outlineViewer).selectReveal(new StructuredSelection(objectToSelect));
+ }
} catch (PartInitException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ForgePlugin.log(e);
}
} else {
}
+ try {
+ workbenchPage.showView("org.jboss.tools.seam.forge.console").setFocus();
+ } catch (PartInitException e) {
+ ForgePlugin.log(e);
+ }
}
}
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsolePage.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsolePage.java 2011-04-29 19:04:47 UTC (rev 30978)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsolePage.java 2011-04-29 20:29:40 UTC (rev 30979)
@@ -26,6 +26,7 @@
@Override
public void setFocus() {
+ viewer.getControl().setFocus();
}
public Console getConsole() {
Modified: trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java
===================================================================
--- trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java 2011-04-29 19:04:47 UTC (rev 30978)
+++ trunk/forge/plugins/org.jboss.tools.seam.forge/src/org/jboss/tools/seam/forge/view/ConsoleView.java 2011-04-29 20:29:40 UTC (rev 30979)
@@ -67,7 +67,11 @@
}
@Override
- public void setFocus() {}
+ public void setFocus() {
+ if (ForgeRuntime.STATE_RUNNING.equals(ForgeRuntime.INSTANCE.getRuntimeState())) {
+ forgeIsRunningPage.setFocus();
+ }
+ }
@Override
public void propertyChange(PropertyChangeEvent evt) {
13 years, 8 months
JBoss Tools SVN: r30978 - branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-04-29 15:04:47 -0400 (Fri, 29 Apr 2011)
New Revision: 30978
Modified:
branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
Commented unstable test.
Modified: branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2011-04-29 18:04:51 UTC (rev 30977)
+++ branches/jbosstools-3.2.x/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2011-04-29 19:04:47 UTC (rev 30978)
@@ -71,7 +71,7 @@
}
}
- public void testRevalidationUnresolvedELs() throws CoreException, ValidationException{
+ public void _testRevalidationUnresolvedELs() throws CoreException, ValidationException{
IPreferenceStore store = WebKbPlugin.getDefault().getPreferenceStore();
store.setValue(ELSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, ELSeverityPreferences.DISABLE);
store.setValue(ELSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, ELSeverityPreferences.ERROR);
13 years, 8 months
JBoss Tools SVN: r30977 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/helpers/context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-29 14:04:51 -0400 (Fri, 29 Apr 2011)
New Revision: 30977
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java
Log:
JBIDE-8620
https://issues.jboss.org/browse/JBIDE-8620
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java 2011-04-29 17:37:43 UTC (rev 30976)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java 2011-04-29 18:04:51 UTC (rev 30977)
@@ -95,16 +95,12 @@
IPackageFragmentRoot library = findLibrary(project, jarName);
if(library instanceof JarPackageFragmentRoot) {
ZipFile zip = ((JarPackageFragmentRoot)library).getJar();
- try {
- ZipEntry entry = zip.getEntry("META-INF/MANIFEST.MF");
- if(entry != null) {
- InputStream is = zip.getInputStream(entry);
- if(is != null) {
- return FileUtil.readStream(is);
- }
+ ZipEntry entry = zip.getEntry("META-INF/MANIFEST.MF");
+ if(entry != null) {
+ InputStream is = zip.getInputStream(entry);
+ if(is != null) {
+ return FileUtil.readStream(is);
}
- } finally {
- zip.close();
}
}
return null;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java 2011-04-29 17:37:43 UTC (rev 30976)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java 2011-04-29 18:04:51 UTC (rev 30977)
@@ -239,9 +239,10 @@
void modifyWebXML() throws XModelException {
IProject project = EclipseResourceUtil.getProject(model.getRoot());
- boolean isJSF2 = isJSF2a();
- if(!isJSF2) try {
- isJSF2 = JSF2Util.isJSF2FacetedProject(project);
+ boolean isJSF2 = false;
+ try {
+ isJSF2 = JSF2Util.isJSF2(project);
+ if(!isJSF2) isJSF2 = isJSF2a();
} catch (CoreException e) {
JSFModelPlugin.getPluginLog().logError(e);
return;
13 years, 8 months
JBoss Tools SVN: r30976 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf: web/helpers/context and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-04-29 13:37:43 -0400 (Fri, 29 Apr 2011)
New Revision: 30976
Added:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java
Log:
JBIDE-8620
https://issues.jboss.org/browse/JBIDE-8620
Added: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java (rev 0)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java 2011-04-29 17:37:43 UTC (rev 30976)
@@ -0,0 +1,159 @@
+/*******************************************************************************
+ * 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.jsf.project;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragmentRoot;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.jdt.internal.core.JarPackageFragmentRoot;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IProjectFacet;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jsf.JSFModelPlugin;
+
+/**
+ *
+ * @author Viacheslav Kabanovich
+ *
+ */
+public class JSF2Util {
+
+ /**
+ * Returns true if either project has in class path jsf-api.jar with implementation version 2
+ * or it is faceted project with jst.jsf facet of version 2.
+ *
+ * @param project
+ * @return
+ * @throws CoreException
+ */
+ public static boolean isJSF2(IProject project) throws CoreException {
+ int v = getJSFImplementationVersion(project);
+ return (v > 1) || isJSF2FacetedProject(project);
+ }
+
+ /**
+ * Returns implementation version of 'jsf-api.jar' if it is included into class path;
+ * returns -1 if 'jsf-api.jar' is not found in the class path.
+ *
+ * @param project
+ * @return
+ * @throws CoreException
+ */
+ public static int getJSFImplementationVersion(IProject project) throws CoreException {
+ try {
+ String content = readManifest(project, "jsf-api.jar");
+ if(content != null) {
+ String attr = "Implementation-Version";
+ int i = content.indexOf(attr);
+ if(i < 0) return -1;
+ i += attr.length();
+ for (int j = i; j < content.length(); j++) {
+ char ch = content.charAt(j);
+ if(Character.isDigit(ch)) {
+ return (int)ch - (int)'0';
+ }
+ }
+ }
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, JSFModelPlugin.PLUGIN_ID, "Failed to read manifest in jsf-api.jar in project " + project.getName(), e));
+ }
+ return -1;
+ }
+
+ /**
+ * Returns text content of META-INF/MANIFEST.MF of selected jar file;
+ * returns null if jar file is not found in the class path.
+ *
+ * @param project
+ * @param jarName
+ * @return
+ * @throws CoreException
+ * @throws IOException
+ */
+ public static String readManifest(IProject project, String jarName) throws CoreException, IOException {
+ IPackageFragmentRoot library = findLibrary(project, jarName);
+ if(library instanceof JarPackageFragmentRoot) {
+ ZipFile zip = ((JarPackageFragmentRoot)library).getJar();
+ try {
+ ZipEntry entry = zip.getEntry("META-INF/MANIFEST.MF");
+ if(entry != null) {
+ InputStream is = zip.getInputStream(entry);
+ if(is != null) {
+ return FileUtil.readStream(is);
+ }
+ }
+ } finally {
+ zip.close();
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns root object of Java Model for selected jar file;
+ * returns null if jar file is not found in the class path. *
+ *
+ * @param project
+ * @param jarName
+ * @return
+ * @throws JavaModelException
+ */
+ public static IPackageFragmentRoot findLibrary(IProject project, String jarName) throws JavaModelException {
+ if(project == null || !project.isAccessible()) {
+ return null;
+ }
+ IJavaProject javaProject = JavaCore.create(project);
+ if(javaProject == null || !javaProject.exists()) {
+ return null;
+ }
+ for (IPackageFragmentRoot fragmentRoot : javaProject.getAllPackageFragmentRoots()) {
+ IPath resource = fragmentRoot.getPath();
+ if(resource != null && resource.lastSegment().equals(jarName)) {
+ return fragmentRoot;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns true if selected project is a faceted project with jst.jsf fact of version 2.
+ *
+ * @param project
+ * @return
+ * @throws CoreException
+ */
+ public static boolean isJSF2FacetedProject(IProject project) throws CoreException {
+ IProjectFacet facet = ProjectFacetsManager.getProjectFacet("jst.jsf");
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ if(fp != null) {
+ IProjectFacetVersion v = fp.getProjectFacetVersion(facet);
+ if(v != null) {
+ String vs = v.getVersionString();
+ return vs != null && vs.startsWith("2.");
+ }
+ }
+ return false;
+ }
+
+}
Property changes on: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/project/JSF2Util.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java 2011-04-29 17:22:34 UTC (rev 30975)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/helpers/context/AdoptJSFProjectFinisher.java 2011-04-29 17:37:43 UTC (rev 30976)
@@ -19,10 +19,6 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacet;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.common.meta.action.impl.handlers.DefaultCreateHandler;
import org.jboss.tools.common.model.XModel;
import org.jboss.tools.common.model.XModelConstants;
@@ -36,6 +32,7 @@
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.model.FacesProcessImpl;
import org.jboss.tools.jsf.model.JSFConstants;
+import org.jboss.tools.jsf.project.JSF2Util;
import org.jboss.tools.jst.web.context.IImportWebProjectContext;
import org.jboss.tools.jst.web.model.helpers.WebAppHelper;
import org.jboss.tools.jst.web.project.WebModuleConstants;
@@ -241,6 +238,15 @@
}
void modifyWebXML() throws XModelException {
+ IProject project = EclipseResourceUtil.getProject(model.getRoot());
+ boolean isJSF2 = isJSF2a();
+ if(!isJSF2) try {
+ isJSF2 = JSF2Util.isJSF2FacetedProject(project);
+ } catch (CoreException e) {
+ JSFModelPlugin.getPluginLog().logError(e);
+ return;
+ }
+ if(isJSF2) return;
XModelObject webxml = WebAppHelper.getWebApp(model);
XModelObject servlet = WebAppHelper.findServlet(webxml,
JSFConstants.FACES_SERVLET_CLASS, "Faces Config");
@@ -258,12 +264,6 @@
XModelObject facesConfig = model.getByPath("/faces-config.xml");
if (facesConfig == null) {
XModelObject webinf = FileSystemsHelper.getWebInf(model);
- boolean isJSF2 = isJSF2a();
- if(!isJSF2) try {
- isJSF2 = isJSF2();
- } catch (CoreException e) {
- JSFModelPlugin.getPluginLog().logError(e);
- }
if (webinf != null && !isJSF2) {
facesConfig = XModelObjectLoaderUtil.createValidObject(model, JSFConstants.ENT_FACESCONFIG_12);
DefaultCreateHandler.addCreatedObject(webinf, facesConfig, -1);
@@ -274,19 +274,7 @@
}
- boolean isJSF2() throws CoreException {
- IProject project = EclipseResourceUtil.getProject(model.getRoot());
- IProjectFacet facet = ProjectFacetsManager.getProjectFacet("jst.jsf");
- IFacetedProject fp = ProjectFacetsManager.create(project);
- if(fp == null) return false;
- IProjectFacetVersion v = fp.getProjectFacetVersion(facet);
- if(v == null) return false;
- String vs = v.getVersionString();
- if(vs.startsWith("2.")) return true;
- return false;
- }
-
- boolean isJSF2a() {
+ private boolean isJSF2a() {
XModelObject fs = model.getByPath("FileSystems/lib-jsf-api.jar");
if(fs == null) return false;
XModelObject m = fs.getChildByPath("META-INF/MANIFEST.MF");
13 years, 8 months
JBoss Tools SVN: r30975 - in branches/jbosstools-3.2.x/bpel/plugins: org.jboss.tools.bpel.runtimes/icons/wizban and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: bbrodt
Date: 2011-04-29 13:22:34 -0400 (Fri, 29 Apr 2011)
New Revision: 30975
Modified:
branches/jbosstools-3.2.x/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/palette/PaletteFactory.java
branches/jbosstools-3.2.x/bpel/plugins/org.jboss.tools.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
Log:
Cosmetic - changed New Project wizard banner and toolpalette drawer name to "Controls"
Modified: branches/jbosstools-3.2.x/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/palette/PaletteFactory.java
===================================================================
--- branches/jbosstools-3.2.x/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/palette/PaletteFactory.java 2011-04-29 15:55:31 UTC (rev 30974)
+++ branches/jbosstools-3.2.x/bpel/plugins/org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/palette/PaletteFactory.java 2011-04-29 17:22:34 UTC (rev 30975)
@@ -84,7 +84,7 @@
.getFactoryFor(bpelPackage.getValidate())));
palette.add(basicActionsCategory);
- PaletteCategory controlCategory = new PaletteCategory("Control2"); //$NON-NLS-1$
+ PaletteCategory controlCategory = new PaletteCategory("Controls"); //$NON-NLS-1$
controlCategory.setOrder(20);
controlCategory.setCategoryId("bpel.control");
Modified: branches/jbosstools-3.2.x/bpel/plugins/org.jboss.tools.bpel.runtimes/icons/wizban/newprj_bpel_wiz_banner.gif
===================================================================
(Binary files differ)
13 years, 8 months
JBoss Tools SVN: r30974 - branches/jbosstools-3.2.x/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-29 11:55:31 -0400 (Fri, 29 Apr 2011)
New Revision: 30974
Modified:
branches/jbosstools-3.2.x/build/parent/pom.xml
Log:
add local.composite profile to allow hudson-local mirror of http://download.jboss.org/jbosstools/builds/staging/_composite_/3.2_stabl... to be used
Modified: branches/jbosstools-3.2.x/build/parent/pom.xml
===================================================================
--- branches/jbosstools-3.2.x/build/parent/pom.xml 2011-04-29 15:20:45 UTC (rev 30973)
+++ branches/jbosstools-3.2.x/build/parent/pom.xml 2011-04-29 15:55:31 UTC (rev 30974)
@@ -30,13 +30,23 @@
<target.platform.classifier.local>local
</target.platform.classifier.local>
+ <!-- 1a. URL of latest JBT target platform site -->
+ <jbosstools-target-platform-repo>http://download.jboss.org/jbosstools/updates/target-platform/latest/</jbosstools-target-platform-repo>
+
+ <!-- 1b. or, use -Dtarget.platform.site=file://home/$user/trunk/build/target-platform/REPO/ -->
<!-- Set this to a path on your own machine, or use remote URL like http://download.jboss.org/jbosstools/updates/target-platform/latest/
Can also generate a local.target file which will always point to your local
repo w/o having to edit here. See local.target profile below for more information. -->
- <target.platform.site>file://home/hudson/static_build_env/jbds/target-platform/e362-wtp323.target/
- </target.platform.site>
+ <target.platform.site>file://home/hudson/static_build_env/jbds/target-platform/e362-wtp323.target/</target.platform.site>
+
+ <!-- 2a. URL of latest JBT nightly staging composite site (all the components in once place) -->
+ <jbosstools-nightly-staging-composite>http://download.jboss.org/jbosstools/builds/staging/_composite_/3.2_stabl...</jbosstools-nightly-staging-composite>
+
+ <!-- 2b., or, use -Plocal.comp -Dlocal.comp=file://path/to/mirror/of/composite/staging/site/ -->
+ <local.composite>file://home/hudson/static_build_env/jbds/builds/staging/_composite_/3.2_stable_branch/</local.composite>
+
+ <!-- 3. published aggregate update site goes here, for consumption by QE and downstream JBDS builds -->
<jbosstools.update.site>http://download.jboss.org/jbosstools/updates/nightly/3.2_stable_branch/</jbosstools.update.site>
- <jbosstools-target-platform-repo>http://download.jboss.org/jbosstools/updates/target-platform/latest/</jbosstools-target-platform-repo>
</properties>
<build>
@@ -793,8 +803,8 @@
</releases>
</repository>
<repository>
- <id>jbosstools-nightly-staging-composite-trunk</id>
- <url>http://download.jboss.org/jbosstools/builds/staging/_composite_/3.2_stabl...</url>
+ <id>jbosstools-nightly-staging-composite</id>
+ <url>${jbosstools-nightly-staging-composite}</url>
<layout>p2</layout>
<snapshots>
<enabled>true</enabled>
@@ -813,7 +823,28 @@
</repositories>
</profile>
+ <!-- same contents as jbosstools-nightly-staging-composite, but locally available (to improve network lag) -->
<profile>
+ <id>local.composite</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <repositories>
+ <repository>
+ <id>local.composite</id>
+ <url>${local.composite}</url>
+ <layout>p2</layout>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ </repository>
+ </repositories>
+ </profile>
+
+ <profile>
<!-- this plugin is available from https://github.com/nickboldt/maven-plugins/tree/master/unique-GAV-plugin/ -->
<id>GAV</id>
<build>
13 years, 8 months
JBoss Tools SVN: r30973 - trunk/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-29 11:20:45 -0400 (Fri, 29 Apr 2011)
New Revision: 30973
Modified:
trunk/build/aggregate/site/build.xml
Log:
one more wget to swap for a copy if working from local
Modified: trunk/build/aggregate/site/build.xml
===================================================================
--- trunk/build/aggregate/site/build.xml 2011-04-29 15:20:39 UTC (rev 30972)
+++ trunk/build/aggregate/site/build.xml 2011-04-29 15:20:45 UTC (rev 30973)
@@ -62,15 +62,12 @@
<if>
<contains string="${location.cleaned}" substring=":/" />
<then>
-
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber --tries=3" />
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="zip.list.txt" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/zip.list.txt" />
</else>
</if>
@@ -84,9 +81,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.txt" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/SVN_REVISION.txt" />
</else>
</if>
@@ -100,9 +95,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.xml" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/SVN_REVISION.xml" />
</else>
</if>
@@ -116,9 +109,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="build.properties" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/build.properties" />
</else>
</if>
@@ -173,17 +164,26 @@
<echo file="${aggregate.zips.dir}/@{zipPath}">${aggregate.zips.dir}/@{zipPath}</echo>
</then>
<else>
- <var name="wget.return" unset="true" />
- <exec executable="wget" dir="${aggregate.zips.dir}/${relativePath}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/@{zipPath} -q --no-clobber --tries=3" />
- </exec>
<if>
- <not>
- <equals arg1="${wget.return}" arg2="0" />
- </not>
+ <contains string="${location.cleaned}" substring=":/" />
<then>
- <echo> ** Error(@{i}) [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
+
+ <var name="wget.return" unset="true" />
+ <exec executable="wget" dir="${aggregate.zips.dir}/${relativePath}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/@{zipPath} -q --no-clobber --tries=3" />
+ </exec>
+ <if>
+ <not>
+ <equals arg1="${wget.return}" arg2="0" />
+ </not>
+ <then>
+ <echo> ** Error [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
+ </then>
+ </if>
</then>
+ <else>
+ <copy todir="${aggregate.zips.dir}/${relativePath}" failonerror="false" file="${location.cleaned}/@{zipPath}" />
+ </else>
</if>
</else>
</if>
13 years, 8 months
JBoss Tools SVN: r30972 - branches/jbosstools-3.2.x/build/aggregate/site.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-04-29 11:20:39 -0400 (Fri, 29 Apr 2011)
New Revision: 30972
Modified:
branches/jbosstools-3.2.x/build/aggregate/site/build.xml
Log:
one more wget to swap for a copy if working from local
Modified: branches/jbosstools-3.2.x/build/aggregate/site/build.xml
===================================================================
--- branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-04-29 15:15:32 UTC (rev 30971)
+++ branches/jbosstools-3.2.x/build/aggregate/site/build.xml 2011-04-29 15:20:39 UTC (rev 30972)
@@ -62,15 +62,12 @@
<if>
<contains string="${location.cleaned}" substring=":/" />
<then>
-
<exec executable="wget" dir="${aggregate.zips.dir}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
<arg line="${location.cleaned}/logs/zip.list.txt -q --no-clobber --tries=3" />
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="zip.list.txt" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/zip.list.txt" />
</else>
</if>
@@ -84,9 +81,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.txt" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/SVN_REVISION.txt" />
</else>
</if>
@@ -100,9 +95,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="SVN_REVISION.xml" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/SVN_REVISION.xml" />
</else>
</if>
@@ -116,9 +109,7 @@
</exec>
</then>
<else>
- <copy todir="${aggregate.zips.dir}" failonerror="false">
- <fileset dir="${location.cleaned}/logs" includes="build.properties" />
- </copy>
+ <copy todir="${aggregate.zips.dir}" failonerror="false" file="${location.cleaned}/logs/build.properties" />
</else>
</if>
@@ -173,17 +164,26 @@
<echo file="${aggregate.zips.dir}/@{zipPath}">${aggregate.zips.dir}/@{zipPath}</echo>
</then>
<else>
- <var name="wget.return" unset="true" />
- <exec executable="wget" dir="${aggregate.zips.dir}/${relativePath}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
- <arg line="${location.cleaned}/@{zipPath} -q --no-clobber --tries=3" />
- </exec>
<if>
- <not>
- <equals arg1="${wget.return}" arg2="0" />
- </not>
+ <contains string="${location.cleaned}" substring=":/" />
<then>
- <echo> ** Error(@{i}) [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
+
+ <var name="wget.return" unset="true" />
+ <exec executable="wget" dir="${aggregate.zips.dir}/${relativePath}" failonerror="false" failifexecutionfails="false" resultproperty="wget.return" outputproperty="null">
+ <arg line="${location.cleaned}/@{zipPath} -q --no-clobber --tries=3" />
+ </exec>
+ <if>
+ <not>
+ <equals arg1="${wget.return}" arg2="0" />
+ </not>
+ <then>
+ <echo> ** Error [${wget.return}] ** Could not wget ${location.cleaned}/@{zipPath}</echo>
+ </then>
+ </if>
</then>
+ <else>
+ <copy todir="${aggregate.zips.dir}/${relativePath}" failonerror="false" file="${location.cleaned}/@{zipPath}" />
+ </else>
</if>
</else>
</if>
13 years, 8 months
JBoss Tools SVN: r30971 - in trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner: browser and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dmaliarevich
Date: 2011-04-29 11:15:32 -0400 (Fri, 29 Apr 2011)
New Revision: 30971
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/VpeXulrunnerMessages.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/messages.properties
Log:
https://issues.jboss.org/browse/JBIDE-7308, updated
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/VpeXulrunnerMessages.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/VpeXulrunnerMessages.java 2011-04-29 14:19:47 UTC (rev 30970)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/VpeXulrunnerMessages.java 2011-04-29 15:15:32 UTC (rev 30971)
@@ -9,6 +9,7 @@
public static String XulRunnerBrowser_cannotGetPathToXulrunner;
public static String XulRunnerBrowser_notAvailable;
public static String XulRunnerBrowser_wrongVersion;
+ public static String CURRENT_PLATFORM_IS_NOT_SUPPORTED;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, VpeXulrunnerMessages.class);
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-04-29 14:19:47 UTC (rev 30970)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/XulRunnerBrowser.java 2011-04-29 15:15:32 UTC (rev 30971)
@@ -228,7 +228,15 @@
Bundle xulRunnerBundle = Platform.getBundle(getXulRunnerBundle());
if (xulRunnerBundle == null) {
- throw new XulRunnerException(MessageFormat.format(VpeXulrunnerMessages.XulRunnerBrowser_bundleNotFound,getXulRunnerBundle())); //$NON-NLS-2$
+ if (!XulRunnerBrowser.isCurrentPlatformOfficiallySupported()) {
+ throw new XulRunnerException(MessageFormat.format(
+ VpeXulrunnerMessages.CURRENT_PLATFORM_IS_NOT_SUPPORTED,
+ XulRunnerBrowser.CURRENT_PLATFORM_ID));
+ } else {
+ throw new XulRunnerException(MessageFormat.format(
+ VpeXulrunnerMessages.XulRunnerBrowser_bundleNotFound,
+ getXulRunnerBundle()));
+ }
}
String xulRunnerVersion = (String) xulRunnerBundle.getHeaders().get("Bundle-Version"); //$NON-NLS-1$
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/messages.properties
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/messages.properties 2011-04-29 14:19:47 UTC (rev 30970)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/messages.properties 2011-04-29 15:15:32 UTC (rev 30971)
@@ -3,3 +3,4 @@
XulRunnerBrowser_cannotGetPathToXulrunner=Cannot get path to XULRunner from bundle {0}
XulRunnerBrowser_notAvailable=nsIWebBrowser is not available
XulRunnerBrowser_wrongVersion=the version of the bundled XULRunner {0} must be >= {1} and <= {2}
+CURRENT_PLATFORM_IS_NOT_SUPPORTED=Current platform ''{0}'' is not supported.
13 years, 8 months