JBoss Tools SVN: r37883 - in trunk/maven/plugins: org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-01-16 18:20:03 -0500 (Mon, 16 Jan 2012)
New Revision: 37883
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
Log:
JBIDE-10638 InvocationTargetException while importing Java EE Project from Central
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2012-01-16 22:45:32 UTC (rev 37882)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2012-01-16 23:20:03 UTC (rev 37883)
@@ -15,7 +15,8 @@
org.eclipse.wst.web.ui;bundle-version="1.1.400",
org.eclipse.ui.forms,
org.jboss.ide.eclipse.as.core;bundle-version="2.3.0",
- org.eclipse.wst.server.core
+ org.eclipse.wst.server.core,
+ org.jboss.tools.maven.ui;bundle-version="1.3.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2012-01-16 22:45:32 UTC (rev 37882)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenArchetypeProjectExample.java 2012-01-16 23:20:03 UTC (rev 37883)
@@ -47,8 +47,8 @@
final IProgressMonitor monitor) throws Exception {
List<Project> projects = new ArrayList<Project>();
projects.add(projectDescription);
- final IPath location = getLocation();
- final File destination = new File(location.toOSString());
+ //IPath location = getLocation();
+ //final File destination = new File(location.toOSString());
final boolean[] ret = new boolean[1];
ret[0] = true;
@@ -56,7 +56,7 @@
@Override
public void run() {
- ArchetypeExamplesWizard wizard = new ArchetypeExamplesWizard(destination, projectDescription);
+ ArchetypeExamplesWizard wizard = new ArchetypeExamplesWizard(projectDescription);
WizardDialog wizardDialog = new WizardDialog(getActiveShell(), wizard);
int ok = wizardDialog.open();
if (ok != Window.OK) {
@@ -72,6 +72,7 @@
String projectName = wizard.getProjectName();
includedProjects.add(projectName);
String artifactId = wizard.getArtifactId();
+ IPath location = wizard.getLocationPath();
String projectFolder = location.append(artifactId).toFile()
.getAbsolutePath();
MavenModelManager mavenModelManager = MavenPlugin
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2012-01-16 22:45:32 UTC (rev 37882)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2012-01-16 23:20:03 UTC (rev 37883)
@@ -28,6 +28,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.m2e.core.MavenPlugin;
@@ -44,6 +45,7 @@
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkingSet;
import org.jboss.tools.maven.project.examples.MavenProjectExamplesActivator;
+import org.jboss.tools.maven.ui.Activator;
import org.jboss.tools.project.examples.ProjectExamplesActivator;
import org.jboss.tools.project.examples.model.Project;
@@ -61,8 +63,9 @@
protected List<IWorkingSet> workingSets = new ArrayList<IWorkingSet>();
private String projectName;
private String artifactId;
+ private IPath locationPath;
- public ArchetypeExamplesWizard(File location, Project projectDescription) {
+ public ArchetypeExamplesWizard(Project projectDescription) {
super();
setWindowTitle("New JBoss Project");
setDefaultPageImageDescriptor(MavenProjectExamplesActivator.getNewWizardImageDescriptor());
@@ -87,6 +90,7 @@
final String javaPackage = wizardPage.getJavaPackage();
final Properties properties = wizardPage.getProperties();
final Archetype archetype = wizardPage.getArchetype();
+ locationPath = simplePage.getLocationPath();
projectName = configuration.getProjectName(model);
final IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
final IPath location = simplePage.getLocationPath();
@@ -124,7 +128,25 @@
}
};
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ boolean configureSeam = store.getBoolean(Activator.CONFIGURE_SEAM);
+ boolean configureJSF = store.getBoolean(Activator.CONFIGURE_JSF);
+ boolean configurePortlet = store.getBoolean(Activator.CONFIGURE_PORTLET);
+ boolean configureJSFPortlet = store.getBoolean(Activator.CONFIGURE_JSFPORTLET);
+ boolean configureSeamPortlet = store.getBoolean(Activator.CONFIGURE_SEAMPORTLET);
+ boolean configureCDI = store.getBoolean(Activator.CONFIGURE_CDI);
+ boolean configureHibernate = store.getBoolean(Activator.CONFIGURE_HIBERNATE);
+ boolean configureJaxRs = store.getBoolean(Activator.CONFIGURE_JAXRS);
+
try {
+ store.setValue(Activator.CONFIGURE_SEAM, false);
+ store.setValue(Activator.CONFIGURE_JSF, false);
+ store.setValue(Activator.CONFIGURE_PORTLET, false);
+ store.setValue(Activator.CONFIGURE_JSFPORTLET, false);
+ store.setValue(Activator.CONFIGURE_SEAMPORTLET, false);
+ store.setValue(Activator.CONFIGURE_CDI, false);
+ store.setValue(Activator.CONFIGURE_HIBERNATE, false);
+ store.setValue(Activator.CONFIGURE_JAXRS, false);
getContainer().run(true, false, op);
} catch (InterruptedException e) {
ProjectExamplesActivator.log(e);
@@ -139,6 +161,15 @@
}
MessageDialog.openError(getShell(), "Error", message);
return true;
+ } finally {
+ store.setValue(Activator.CONFIGURE_SEAM, configureSeam);
+ store.setValue(Activator.CONFIGURE_JSF, configureJSF);
+ store.setValue(Activator.CONFIGURE_PORTLET, configurePortlet);
+ store.setValue(Activator.CONFIGURE_JSFPORTLET, configureJSFPortlet);
+ store.setValue(Activator.CONFIGURE_SEAMPORTLET, configureSeamPortlet);
+ store.setValue(Activator.CONFIGURE_CDI, configureCDI);
+ store.setValue(Activator.CONFIGURE_HIBERNATE, configureHibernate);
+ store.setValue(Activator.CONFIGURE_JAXRS, configureJaxRs);
}
return true;
@@ -216,4 +247,8 @@
super.createPageControls(pageContainer);
simplePage.setUseDefaultWorkspaceLocation(ProjectExamplesActivator.getDefault().getPreferenceStore().getBoolean(ProjectExamplesActivator.PROJECT_EXAMPLES_DEFAULT));
}
+
+ public IPath getLocationPath() {
+ return locationPath;
+ }
}
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2012-01-16 22:45:32 UTC (rev 37882)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2012-01-16 23:20:03 UTC (rev 37883)
@@ -79,7 +79,7 @@
public static final boolean CONFIGURE_HIBERNATE_VALUE = true;
- public static final String CONFIGURE_JAXRS = "configureJAX-RS";
+ public static final String CONFIGURE_JAXRS = "configureJAX-RS"; //$NON-NLS-1$
public static final boolean CONFIGURE_JAXRS_VALUE = true;
// The shared instance
12 years, 12 months
JBoss Tools SVN: r37882 - in trunk/cdi/plugins: org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-01-16 17:45:32 -0500 (Mon, 16 Jan 2012)
New Revision: 37882
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteOtherAnnotationsFromParametersProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllOtherAnnotationsFromParametersMarkerResolution.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllDisposerAnnotationsProcessor.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllInjectedConstructorsProcessor.java
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/CDIValidationErrorManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java
Log:
Quick fix for "Method has more than one parameter annotated @Disposes/@Observes https://issues.jboss.org/browse/JBIDE-7670
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllDisposerAnnotationsProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllDisposerAnnotationsProcessor.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllDisposerAnnotationsProcessor.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -56,11 +56,6 @@
for (IBeanMethod disposerMethod : disposerMethods) {
if(!disposerMethod.getMethod().isSimilar(method)){
CDIMarkerResolutionUtils.deleteAnnotation(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME, compilationUnit, disposerMethod.getMethod().getParameters()[0], (MultiTextEdit)change.getEdit());
-// Set<ITextSourceReference> disposerDeclarations = CDIUtil.getAnnotationPossitions(disposerMethod, CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME);
-// for (ITextSourceReference declaration : disposerDeclarations) {
-// TextEdit edit = new ReplaceEdit(declaration.getStartPosition(), declaration.getLength(), "");
-// change.addEdit(edit);
-// }
}
}
compilationUnit.discardWorkingCopy();
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllInjectedConstructorsProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllInjectedConstructorsProcessor.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteAllInjectedConstructorsProcessor.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -38,23 +38,14 @@
private void changeConstructors(IClassBean bean) throws JavaModelException {
Set<IBeanMethod> constructors = bean.getBeanConstructors();
if(constructors.size()>1) {
- //Set<IAnnotationDeclaration> injects = new HashSet<IAnnotationDeclaration>();
ICompilationUnit original = constructors.iterator().next().getMethod().getCompilationUnit();
ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
for (IBeanMethod constructor : constructors) {
if(!constructor.getMethod().isSimilar(method)){
CDIMarkerResolutionUtils.deleteAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME, compilationUnit, constructor.getMethod(), (MultiTextEdit)change.getEdit());
- //IAnnotationDeclaration inject = constructor.getAnnotation(CDIConstants.INJECT_ANNOTATION_TYPE_NAME);
- //if(inject!=null) {
- // injects.add(inject);
- //}
}
}
compilationUnit.discardWorkingCopy();
- //for (IAnnotationDeclaration inject : injects) {
- // TextEdit edit = new ReplaceEdit(inject.getStartPosition(), inject.getLength(), "");
- // change.addEdit(edit);
- //}
}
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteOtherAnnotationsFromParametersProcessor.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteOtherAnnotationsFromParametersProcessor.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteOtherAnnotationsFromParametersProcessor.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * 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.internal.core.refactoring;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jdt.core.ICompilationUnit;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.jdt.core.IMethod;
+import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.ltk.core.refactoring.RefactoringStatus;
+import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext;
+import org.eclipse.text.edits.MultiTextEdit;
+
+public class DeleteOtherAnnotationsFromParametersProcessor extends CDIRefactoringProcessor {
+ private ILocalVariable parameter;
+ private String annotationName;
+
+ public DeleteOtherAnnotationsFromParametersProcessor(IFile file, String annotationName, ILocalVariable parameter, String label){
+ super(file, label);
+ this.parameter = parameter;
+ this.annotationName = annotationName;
+ }
+
+ private void change() throws JavaModelException {
+ if(parameter.getParent() instanceof IMethod){
+ IMethod method = (IMethod)parameter.getParent();
+ ICompilationUnit original = method.getCompilationUnit();
+ ICompilationUnit compilationUnit = original.getWorkingCopy(new NullProgressMonitor());
+ for (ILocalVariable param : method.getParameters()) {
+ if(!param.getTypeSignature().equals(parameter.getTypeSignature()) || !param.getElementName().equals(parameter.getElementName())){
+ CDIMarkerResolutionUtils.deleteAnnotation(annotationName, compilationUnit, param, (MultiTextEdit)change.getEdit());
+ }
+ }
+ compilationUnit.discardWorkingCopy();
+ }
+ }
+
+ @Override
+ public RefactoringStatus checkFinalConditions(IProgressMonitor pm,
+ CheckConditionsContext context) throws CoreException,
+ OperationCanceledException {
+
+ createRootChange();
+
+ change();
+
+ return status;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/refactoring/DeleteOtherAnnotationsFromParametersProcessor.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
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 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -997,7 +997,7 @@
*/
if(declarations.size()>1) {
for (ITextSourceReference declaration : declarations) {
- addError(CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, CDIPreferences.MULTIPLE_OBSERVING_PARAMETERS, declaration, bean.getResource());
+ addError(CDIValidationMessages.MULTIPLE_OBSERVING_PARAMETERS, CDIPreferences.MULTIPLE_OBSERVING_PARAMETERS, declaration, bean.getResource(), MULTIPLE_OBSERVING_PARAMETERS_ID);
}
}
/*
@@ -1086,7 +1086,7 @@
}
if (disposerDeclarations.size() > 1) {
for (ITextSourceReference declaration : disposerDeclarations) {
- addError(CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, declaration, bean.getResource());
+ addError(CDIValidationMessages.MULTIPLE_DISPOSING_PARAMETERS, CDIPreferences.MULTIPLE_DISPOSING_PARAMETERS, declaration, bean.getResource(), MULTIPLE_DISPOSING_PARAMETERS_ID);
}
}
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -70,6 +70,8 @@
public static final int ILLEGAL_DECORATOR_BEAN_CLASS_ID = 49;
public static final int ILLEGAL_INTERCEPTOR_CLASS_ID = 50;
public static final int PARAM_INJECTION_DECLARES_EMPTY_NAME_ID = 51;
+ public static final int MULTIPLE_DISPOSING_PARAMETERS_ID = 52;
+ public static final int MULTIPLE_OBSERVING_PARAMETERS_ID = 53;
/*
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -114,6 +114,7 @@
public static String CREATE_INTERCEPTOR_TITLE;
public static String CREATE_DECORATOR_TITLE;
public static String ADD_NAME_MARKER_RESOLUTION_TITLE;
+ public static String DELETE_ALL_OTHER_ANNOTATIONS_MARKER_RESOLUTION_TITLE;
public static String CDI_QUICK_FIXES_ANNOTATION;
public static String CDI_QUICK_FIXES_INTERFACE;
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/CDIUIMessages.properties 2012-01-16 22:45:32 UTC (rev 37882)
@@ -98,6 +98,7 @@
CREATE_INTERCEPTOR_TITLE=Create CDI Interceptor ''{0}''
CREATE_DECORATOR_TITLE=Create CDI Decorator ''{0}''
ADD_NAME_MARKER_RESOLUTION_TITLE=Add name ''{0}'' to annotation @Named
+DELETE_ALL_OTHER_ANNOTATIONS_MARKER_RESOLUTION_TITLE=Delete annotations {0} from all parameters except parameter ''{1}''
CDI_QUICK_FIXES_ANNOTATION=annotation
CDI_QUICK_FIXES_INTERFACE=interface
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -486,6 +486,20 @@
}else if(messageId == CDIValidationErrorManager.PARAM_INJECTION_DECLARES_EMPTY_NAME_ID){
List<IMarkerResolution> resolutions = getAddNameResolutions(file, start);
return resolutions.toArray(new IMarkerResolution[]{});
+ }else if(messageId == CDIValidationErrorManager.MULTIPLE_DISPOSING_PARAMETERS_ID){
+ ILocalVariable parameter = findParameter(file, start);
+ if(parameter != null){
+ return new IMarkerResolution[] {
+ new DeleteAllOtherAnnotationsFromParametersMarkerResolution(CDIConstants.DISPOSES_ANNOTATION_TYPE_NAME, parameter, file)
+ };
+ }
+ }else if(messageId == CDIValidationErrorManager.MULTIPLE_OBSERVING_PARAMETERS_ID){
+ ILocalVariable parameter = findParameter(file, start);
+ if(parameter != null){
+ return new IMarkerResolution[] {
+ new DeleteAllOtherAnnotationsFromParametersMarkerResolution(CDIConstants.OBSERVERS_ANNOTATION_TYPE_NAME, parameter, file)
+ };
+ }
}
}else if (XML_EXTENSION.equals(file.getFileExtension())){
FileEditorInput input = new FileEditorInput(file);
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java 2012-01-16 21:10:16 UTC (rev 37881)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllInjectedConstructorsMarkerResolution.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -59,7 +59,6 @@
DeleteAllInjectedConstructorsProcessor processor = new DeleteAllInjectedConstructorsProcessor(file, method, label);
ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(processor);
DeletePreviewWizard wizard = new DeletePreviewWizard(refactoring);
- //RefactoringWizardOpenOperation op = new RefactoringWizardOpenOperation(wizard);
wizard.showWizard();
}
Added: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllOtherAnnotationsFromParametersMarkerResolution.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllOtherAnnotationsFromParametersMarkerResolution.java (rev 0)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllOtherAnnotationsFromParametersMarkerResolution.java 2012-01-16 22:45:32 UTC (rev 37882)
@@ -0,0 +1,74 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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.ui.marker;
+
+import java.text.MessageFormat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.jdt.core.ILocalVariable;
+import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring;
+import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IMarkerResolution2;
+import org.jboss.tools.cdi.core.CDIImages;
+import org.jboss.tools.cdi.internal.core.refactoring.CDIMarkerResolutionUtils;
+import org.jboss.tools.cdi.internal.core.refactoring.DeleteOtherAnnotationsFromParametersProcessor;
+import org.jboss.tools.cdi.ui.CDIUIMessages;
+import org.jboss.tools.cdi.ui.wizard.DeletePreviewWizard;
+
+/**
+ * @author Daniel Azarov
+ */
+public class DeleteAllOtherAnnotationsFromParametersMarkerResolution implements IMarkerResolution2, TestableResolutionWithRefactoringProcessor {
+ private String label;
+ private String annotationName;
+ private ILocalVariable parameter;
+ private IFile file;
+
+ public DeleteAllOtherAnnotationsFromParametersMarkerResolution(String annotationName, ILocalVariable parameter, IFile file){
+ String shortName = CDIMarkerResolutionUtils.AT + CDIMarkerResolutionUtils.getShortName(annotationName);
+ this.label = MessageFormat.format(CDIUIMessages.DELETE_ALL_OTHER_ANNOTATIONS_MARKER_RESOLUTION_TITLE, new Object[]{shortName, parameter.getElementName()});
+ this.annotationName = annotationName;
+ this.parameter = parameter;
+ this.file = file;
+ }
+
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+
+ @Override
+ public void run(IMarker marker) {
+ DeleteOtherAnnotationsFromParametersProcessor processor = new DeleteOtherAnnotationsFromParametersProcessor(file, annotationName, parameter, label);
+ ProcessorBasedRefactoring refactoring = new ProcessorBasedRefactoring(processor);
+ DeletePreviewWizard wizard = new DeletePreviewWizard(refactoring);
+ wizard.showWizard();
+ }
+
+ @Override
+ public RefactoringProcessor getRefactoringProcessor(){
+ return new DeleteOtherAnnotationsFromParametersProcessor(file, annotationName, parameter, label);
+ }
+
+ @Override
+ public String getDescription() {
+ return label;
+ }
+
+ @Override
+ public Image getImage() {
+ return CDIImages.QUICKFIX_REMOVE;
+ }
+
+}
Property changes on: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/DeleteAllOtherAnnotationsFromParametersMarkerResolution.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
12 years, 12 months
JBoss Tools SVN: r37879 - trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-16 16:06:21 -0500 (Mon, 16 Jan 2012)
New Revision: 37879
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java
Log:
fix for coverage errors in jsf.vpe.seam.test plugin
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java 2012-01-16 21:05:50 UTC (rev 37878)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/template/SeamFormattedTextTemplate.java 2012-01-16 21:06:21 UTC (rev 37879)
@@ -12,9 +12,9 @@
import java.io.StringReader;
-import org.jboss.seam.text.xpl.SeamTextLexer;
-import org.jboss.seam.text.xpl.SeamTextParser;
import org.jboss.tools.jsf.vpe.seam.SeamTemplatesActivator;
+import org.jboss.tools.jsf.vpe.seam.text.xpl.SeamTextLexer;
+import org.jboss.tools.jsf.vpe.seam.text.xpl.SeamTextParser;
import org.jboss.tools.vpe.editor.context.VpePageContext;
import org.jboss.tools.vpe.editor.template.VpeAbstractTemplate;
import org.jboss.tools.vpe.editor.template.VpeCreationData;
12 years, 12 months
JBoss Tools SVN: r37878 - in trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss: tools/jsf/vpe/seam and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-01-16 16:05:50 -0500 (Mon, 16 Jan 2012)
New Revision: 37878
Added:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/
Removed:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextLexer.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParser.java
trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParserTokenTypes.java
Log:
fix for coverage errors in jsf.vpe.seam.test plugin
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextLexer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextLexer.java 2012-01-13 16:30:26 UTC (rev 37833)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextLexer.java 2012-01-16 21:05:50 UTC (rev 37878)
@@ -1,6 +1,6 @@
// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
-package org.jboss.seam.text.xpl;
+package org.jboss.tools.jsf.vpe.seam.text.xpl;
import java.io.InputStream;
import antlr.TokenStreamException;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParser.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParser.java 2012-01-13 16:30:26 UTC (rev 37833)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParser.java 2012-01-16 21:05:50 UTC (rev 37878)
@@ -1,6 +1,6 @@
// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextParser.java"$
-package org.jboss.seam.text.xpl;
+package org.jboss.tools.jsf.vpe.seam.text.xpl;
import antlr.TokenBuffer;
import antlr.TokenStreamException;
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParserTokenTypes.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/seam/text/xpl/SeamTextParserTokenTypes.java 2012-01-13 16:30:26 UTC (rev 37833)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.vpe.seam/src/org/jboss/tools/jsf/vpe/seam/text/xpl/SeamTextParserTokenTypes.java 2012-01-16 21:05:50 UTC (rev 37878)
@@ -1,6 +1,6 @@
// $ANTLR 2.7.6 (2005-12-22): "seam-text.g" -> "SeamTextLexer.java"$
-package org.jboss.seam.text.xpl;
+package org.jboss.tools.jsf.vpe.seam.text.xpl;
public interface SeamTextParserTokenTypes {
int EOF = 1;
12 years, 12 months
JBoss Tools SVN: r37877 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-16 15:00:53 -0500 (Mon, 16 Jan 2012)
New Revision: 37877
Modified:
trunk/build/aggregate/build.xml
trunk/build/aggregate/site.properties.xsl
trunk/build/aggregate/site.xsl
Log:
JBIDE-10640 link generated file from index.html; remove xsl files from target folder
Modified: trunk/build/aggregate/build.xml
===================================================================
--- trunk/build/aggregate/build.xml 2012-01-16 19:51:50 UTC (rev 37876)
+++ trunk/build/aggregate/build.xml 2012-01-16 20:00:53 UTC (rev 37877)
@@ -45,7 +45,7 @@
</condition>
<property file="${associate.properties}" />
<echo level="verbose">Loaded associate sites from ${associate.properties}</echo>
- <property name="web.content.files" value="index.html, web/*.css, README*, *directory.xml, site.*" />
+ <property name="web.content.files" value="index.html, web/*.css, README*, *directory.xml, site.xml, site.properties" />
<target name="init">
<ant antfile="${build.xml}" target="init" />
@@ -501,6 +501,8 @@
<!-- get site.xml as HTML, then load into ${site.contents} in order to merge into index.html -->
<antcallback target="transform.site.xml" return="site.contents" />
+ <antcallback target="generate.site.properties" return="site.properties.html"/>
+
<antcallback target="generate.directory.xml" return="directory.xml.html"/>
<copy todir="${output.dir}" overwrite="true">
@@ -510,6 +512,7 @@
<expandproperties />
<replacetokens>
<token key="DIRECTORY.XML" value="${directory.xml.html}"/>
+ <token key="SITE.PROPERTIES" value="${site.properties.html}"/>
</replacetokens>
</filterchain>
</copy>
@@ -522,6 +525,15 @@
</copy>
</target>
+ <target name="generate.site.properties">
+ <!-- turn site.xml into site.properties -->
+ <delete quiet="true" file="${update.site.source.dir}/site.properties" />
+ <xslt style="site.properties.xsl" in="${update.site.source.dir}/site.xml" out="${update.site.source.dir}/site.properties" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+ <var name="site.properties.html" value=":: <a href="site.properties" style="font-size:x-small">site.properties</a>"/>
+ </target>
+
<target name="generate.directory.xml">
<!-- get filename matching org.jboss.tools.central.discovery_1.0.0.v20111013-0511-M4.jar, then generate replacement directory.xml file -->
<path id="central.discovery.jar.id">
@@ -558,13 +570,6 @@
<loadfile property="site.contents" srcfile="${update.site.source.dir}/site.html" failonerror="false" />
<property name="site.contents" value="" />
<delete file="${update.site.source.dir}/site.html" quiet="true" />
-
- <!-- turn site.xml into site.properties -->
- <delete quiet="true" file="${update.site.source.dir}/site.properties" />
- <xslt style="site.properties.xsl" in="${update.site.source.dir}/site.xml" out="${update.site.source.dir}/site.properties" force="true">
- <classpath location="${COMMON_TOOLS}/saxon.jar" />
- </xslt>
-
</target>
<!-- look for http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.*/logs/z...;
Modified: trunk/build/aggregate/site.properties.xsl
===================================================================
--- trunk/build/aggregate/site.properties.xsl 2012-01-16 19:51:50 UTC (rev 37876)
+++ trunk/build/aggregate/site.properties.xsl 2012-01-16 20:00:53 UTC (rev 37877)
@@ -8,7 +8,7 @@
<xsl:sort select="@name" />
<xsl:variable name="catg"><xsl:value-of select="@name"/></xsl:variable>
#
-<xsl:value-of select="$catg" /> = \
+<xsl:value-of select="$catg" />.category.features = \
<xsl:for-each select="//feature">
<xsl:sort select="@id" />
<xsl:if test="count(./category[contains(@name,$catg)])>0"><xsl:value-of select="@id" />,
Modified: trunk/build/aggregate/site.xsl
===================================================================
--- trunk/build/aggregate/site.xsl 2012-01-16 19:51:50 UTC (rev 37876)
+++ trunk/build/aggregate/site.xsl 2012-01-16 20:00:53 UTC (rev 37877)
@@ -119,6 +119,7 @@
</td>
<td class="rowLine" colspan="1">
@DIRECTORY.XML@
+ @SITE.PROPERTIES@
</td>
</tr>
</table>
12 years, 12 months
JBoss Tools SVN: r37876 - trunk/build/parent.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-16 14:51:50 -0500 (Mon, 16 Jan 2012)
New Revision: 37876
Modified:
trunk/build/parent/pom.xml
Log:
add win32 and cocoa x86_64 environment targets; remove dead nexus URL
Modified: trunk/build/parent/pom.xml
===================================================================
--- trunk/build/parent/pom.xml 2012-01-16 19:51:41 UTC (rev 37875)
+++ trunk/build/parent/pom.xml 2012-01-16 19:51:50 UTC (rev 37876)
@@ -84,11 +84,21 @@
<arch>x86</arch>
</environment>
<environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
<os>linux</os>
<ws>gtk</ws>
<arch>x86</arch>
@@ -765,11 +775,6 @@
</snapshots> </pluginRepository> </pluginRepositories -->
<distributionManagement>
- <repository>
- <id>jboss-releases-repository</id>
- <name>JBoss Releases Repository</name>
- <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
- </repository>
<snapshotRepository>
<id>jboss-snapshots-repository</id>
<name>JBoss Snapshots Repository</name>
12 years, 12 months
JBoss Tools SVN: r37875 - trunk/build/aggregate.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2012-01-16 14:51:41 -0500 (Mon, 16 Jan 2012)
New Revision: 37875
Added:
trunk/build/aggregate/site.properties.xsl
Modified:
trunk/build/aggregate/build.xml
Log:
add method to generate site.properties file from site.xml via new xslt (JBIDE-10640)
Modified: trunk/build/aggregate/build.xml
===================================================================
--- trunk/build/aggregate/build.xml 2012-01-16 19:39:35 UTC (rev 37874)
+++ trunk/build/aggregate/build.xml 2012-01-16 19:51:41 UTC (rev 37875)
@@ -2,6 +2,9 @@
<!--
To test output, run maven in this folder:
$ mvn install -DJOB_NAME=jbosstools-3.3_trunk.aggregate -DBUILD_ID=2011-09-19_19-10-45 -DBUILD_NUMBER=6969 -DJBT_VERSION=3.3.99 -DBUILD_ALIAS=M7 -Dupdate.site.description="Stable Milestone"
+
+ Or, to run just the ant script:
+ $ cd ~/tru/build/aggregate/webtools-site; ant basic.build -f ../build.xml -Doutput.dir=`pwd`
-->
<!-- if ${WORKSPACE}/site folder exists, target that folder; else generate here. -->
@@ -42,7 +45,7 @@
</condition>
<property file="${associate.properties}" />
<echo level="verbose">Loaded associate sites from ${associate.properties}</echo>
- <property name="web.content.files" value="index.html, web/*.css, README*, *directory.xml" />
+ <property name="web.content.files" value="index.html, web/*.css, README*, *directory.xml, site.*" />
<target name="init">
<ant antfile="${build.xml}" target="init" />
@@ -555,6 +558,13 @@
<loadfile property="site.contents" srcfile="${update.site.source.dir}/site.html" failonerror="false" />
<property name="site.contents" value="" />
<delete file="${update.site.source.dir}/site.html" quiet="true" />
+
+ <!-- turn site.xml into site.properties -->
+ <delete quiet="true" file="${update.site.source.dir}/site.properties" />
+ <xslt style="site.properties.xsl" in="${update.site.source.dir}/site.xml" out="${update.site.source.dir}/site.properties" force="true">
+ <classpath location="${COMMON_TOOLS}/saxon.jar" />
+ </xslt>
+
</target>
<!-- look for http://download.jboss.org/jbosstools/builds/staging/jbosstools-3.*/logs/z...;
Added: trunk/build/aggregate/site.properties.xsl
===================================================================
--- trunk/build/aggregate/site.properties.xsl (rev 0)
+++ trunk/build/aggregate/site.properties.xsl 2012-01-16 19:51:41 UTC (rev 37875)
@@ -0,0 +1,20 @@
+<xsl:stylesheet version="2.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan"
+ xmlns:saxon="http://saxon.sf.net/" xmlns="http://www.w3.org/1999/xhtml"
+ extension-element-prefixes="saxon">
+ <xsl:output method="text" indent="yes" />
+ <xsl:template match="/site">
+ <xsl:for-each select="category-def">
+ <xsl:sort select="@name" />
+ <xsl:variable name="catg"><xsl:value-of select="@name"/></xsl:variable>
+#
+<xsl:value-of select="$catg" /> = \
+<xsl:for-each select="//feature">
+ <xsl:sort select="@id" />
+ <xsl:if test="count(./category[contains(@name,$catg)])>0"><xsl:value-of select="@id" />,
+</xsl:if>
+ </xsl:for-each>
+ </xsl:for-each>
+#
+ </xsl:template>
+</xsl:stylesheet>
12 years, 12 months