JBoss Tools SVN: r43279 - trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-28 21:16:29 -0400 (Tue, 28 Aug 2012)
New Revision: 43279
Modified:
trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java
Log:
JBIDE-12504
https://issues.jboss.org/browse/JBIDE-12504
Improve simplified type resolution by checking inner type names.
Modified: trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java 2012-08-29 00:43:12 UTC (rev 43278)
+++ trunk/common/plugins/org.jboss.tools.common.core/src/org/jboss/tools/common/util/TypeResolutionCache.java 2012-08-29 01:16:29 UTC (rev 43279)
@@ -61,6 +61,16 @@
CommonCorePlugin.getDefault().logError(e);
ds = new IImportDeclaration[0];
}
+
+ try {
+ IType[] ts = type.getTypes();
+ for (IType t: ts) {
+ types.put(t.getElementName(), t.getFullyQualifiedName('.'));
+ }
+ } catch (JavaModelException e) {
+ CommonCorePlugin.getDefault().logError(e);
+ }
+
IResource r = unit.getResource();
if(r instanceof IFile && r.exists()) {
12 years, 4 months
JBoss Tools SVN: r43278 - trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-08-28 20:43:12 -0400 (Tue, 28 Aug 2012)
New Revision: 43278
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
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-08-28 23:59:50 UTC (rev 43277)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2012-08-29 00:43:12 UTC (rev 43278)
@@ -13,7 +13,6 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
-import java.util.Set;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IMarker;
@@ -35,14 +34,8 @@
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.source.Annotation;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.DocumentProviderRegistry;
import org.eclipse.ui.texteditor.IDocumentProvider;
12 years, 4 months
JBoss Tools SVN: r43277 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-28 19:59:50 -0400 (Tue, 28 Aug 2012)
New Revision: 43277
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
Log:
JBIDE-12503
https://issues.jboss.org/browse/JBIDE-12503
Update of cached types of all beans at incremental build.
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 2012-08-28 23:59:00 UTC (rev 43276)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2012-08-28 23:59:50 UTC (rev 43277)
@@ -77,17 +77,21 @@
this.type = contextType;
super.init(contextType, context, flags);
qualifiedName = getType().getFullyQualifiedName();
- parametedType = context.getProject().getDelegate().getNature().getTypeFactory().newParametedType(type);
+ resetParametedType();
+ }
+
+ public ParametedType getParametedType() {
+ return parametedType;
+ }
+
+ public void resetParametedType() {
+ parametedType = project.getDelegate().getNature().getTypeFactory().newParametedType(type);
if(type != null && !type.isBinary()) {
parametedType.setPositionProvider(new PositionProviderImpl());
parametedType.getInheritedTypes();
}
}
- public ParametedType getParametedType() {
- return parametedType;
- }
-
public void setParametedType(IParametedType t) {
parametedType = (ParametedType)t;
}
12 years, 4 months
JBoss Tools SVN: r43276 - trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2012-08-28 19:59:00 -0400 (Tue, 28 Aug 2012)
New Revision: 43276
Modified:
trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
Log:
Make CDI Quick Fixes work for As-You-Type validator annotations https://issues.jboss.org/browse/JBIDE-12328
Modified: trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-08-28 20:08:39 UTC (rev 43275)
+++ trunk/common/plugins/org.jboss.tools.common.validation/src/org/jboss/tools/common/validation/TempMarkerManager.java 2012-08-28 23:59:00 UTC (rev 43276)
@@ -134,7 +134,7 @@
return addMessage(target, -1, location, preferenceKey, textMessage, messageArguments);
}
- public IMessage addMessage(IResource target, ITextSourceReference location, String preferenceKey, String textMessage, Integer quickFixId) {
+ public IMessage addMessage(IResource target, ITextSourceReference location, String preferenceKey, String textMessage, int quickFixId) {
IMessage message = addMessage(target, -1, location, preferenceKey, textMessage, null);
if(message!=null && quickFixId != -1) {
message.setAttribute(MESSAGE_ID_ATTRIBUTE_NAME, quickFixId);
@@ -149,7 +149,7 @@
int severity = getSeverity(preferenceKey, target);
try {
if(severity!=-1 && (severity!=IMessage.NORMAL_SEVERITY || !hasSuppressWarningsAnnotation(preferenceKey, location))) {
- message = addMesssage(target, lineNumber, location.getStartPosition(), location.getLength(), severity, preferenceKey, textMessage, messageArguments);
+ message = addMesssage(target, lineNumber, location.getStartPosition(), location.getLength(), severity, preferenceKey, textMessage, messageArguments, -1);
}
} catch (JavaModelException e) {
CommonPlugin.getDefault().logError(e);
@@ -168,10 +168,10 @@
public IMessage addMessage(IResource target, int lineNumber, int offset, int length, String preferenceKey, String message, String[] messageArguments, int quickFixId) {
int severity = getSeverity(preferenceKey, target);
- return severity!=-1?addMesssage(target, lineNumber, offset, length, severity, preferenceKey, message, messageArguments):null;
+ return severity!=-1?addMesssage(target, lineNumber, offset, length, severity, preferenceKey, message, messageArguments, quickFixId):null;
}
- private IMessage addMesssage(IResource target, int lineNumber, int offset, int length, int severity, String preferenceKey, String textMessage, String[] messageArguments) {
+ private IMessage addMesssage(IResource target, int lineNumber, int offset, int length, int severity, String preferenceKey, String textMessage, String[] messageArguments, int quickFixId) {
IMessage message = null;
if(messageCounter<=getMaxNumberOfMarkersPerFile(target.getProject())) {
if(lineNumber<0) {
@@ -182,6 +182,9 @@
}
}
message = addMesssage(validationManager, shouldCleanAllAnnotations(), this.reporter, offset, length, target, lineNumber, severity, textMessage, messageArguments, getMessageBundleName());
+ if(message!=null && quickFixId != -1) {
+ message.setAttribute(MESSAGE_ID_ATTRIBUTE_NAME, quickFixId);
+ }
messageCounter++;
String preferencePageId = getPreferencePageId();
if(preferencePageId != null && preferenceKey != null){
12 years, 4 months
JBoss Tools SVN: r43275 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-28 16:08:39 -0400 (Tue, 28 Aug 2012)
New Revision: 43275
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
Log:
JBIDE-12503
https://issues.jboss.org/browse/JBIDE-12503
Update of cached types of all beans at incremental build.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-28 20:07:57 UTC (rev 43274)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-28 20:08:39 UTC (rev 43275)
@@ -629,6 +629,12 @@
public synchronized void cleanCache() {
specializingClassBeans = null;
scope = null;
- getDefinition().getParametedType().cleanCache();
+ getDefinition().resetParametedType();
+ for (BeanMethod m: methods) {
+ m.setMethod(m.getMethod()); // type update
+ }
+ for (BeanField f: fields) {
+ f.setField(f.getField()); // type update
+ }
}
}
\ No newline at end of file
12 years, 4 months
JBoss Tools SVN: r43274 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-08-28 16:07:57 -0400 (Tue, 28 Aug 2012)
New Revision: 43274
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
Log:
https://issues.jboss.org/browse/JBIDE-12504 org.jboss.tools.seam.ui.test.ca.SeamELContentAssistTestCase.testVarAttributes() failure
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2012-08-28 19:18:57 UTC (rev 43273)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/ca/SeamELContentAssistTestCase.java 2012-08-28 20:07:57 UTC (rev 43274)
@@ -18,7 +18,9 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
@@ -31,13 +33,12 @@
import org.eclipse.wst.sse.core.internal.provisional.text.ITextRegionList;
import org.eclipse.wst.sse.ui.internal.contentassist.ContentAssistUtils;
import org.eclipse.wst.xml.core.internal.regions.DOMRegionContext;
+import org.jboss.tools.common.base.test.contentassist.CATestUtil;
import org.jboss.tools.common.el.core.ELCorePlugin;
import org.jboss.tools.common.el.core.ca.preferences.ELContentAssistPreferences;
-import org.jboss.tools.common.base.test.contentassist.CATestUtil;
import org.jboss.tools.common.util.FileUtil;
import org.jboss.tools.jst.jsp.contentassist.AutoContentAssistantProposal;
import org.jboss.tools.jst.jsp.test.ca.ContentAssistantTestCase;
-import org.jboss.tools.test.util.JUnitUtils;
import org.jboss.tools.test.util.JobUtils;
import org.jboss.tools.test.util.ProjectImportTestSetup;
@@ -284,8 +285,9 @@
/**
* Test for http://jira.jboss.com/jira/browse/JBIDE-1803
* http://jira.jboss.com/jira/browse/JBIDE-2007
+ * @throws CoreException
*/
- public void testVarAttributes() {
+ public void testVarAttributes() throws CoreException {
assertTrue("Test project \"" + PROJECT_NAME + "\" is not loaded", (project != null));
IFile component = project.getFile("src/action/demo/TestComponentForVarAttributes.java");
@@ -293,26 +295,17 @@
IFile emptyComponent = project.getFile("src/action/demo/TestComponentForVarAttributes.2");
try{
FileUtil.copyContent(newComponent, component, true, false, new NullProgressMonitor());
- }catch(Exception e){
- JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.1'", e);
- }
- JobUtils.waitForIdle(3000);
- checkProposals("/WebContent/varAttributes.xhtml", 458, new String[]{"test.name"}, false);
- checkProposals("/WebContent/varAttributes.xhtml", 640, new String[]{"item.name"}, false);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
- try{
+ checkProposals("/WebContent/varAttributes.xhtml", 458, new String[]{"test.name"}, false);
+ checkProposals("/WebContent/varAttributes.xhtml", 640, new String[]{"item.name"}, false);
+ } finally {
FileUtil.copyContent(emptyComponent, component, true, false, new NullProgressMonitor());
- }catch(Exception e){
- JUnitUtils.fail("Error during changing 'TestComponentForVarAttributes.java' content to 'TestComponentForVarAttributes.2'", e);
+ project.build(IncrementalProjectBuilder.INCREMENTAL_BUILD, null);
}
- JobUtils.waitForIdle();
}
-
-
-
-
/**
* Do not use this set as is because of colon used instead of dot to separate items of level 2 and more
* @return
12 years, 4 months
JBoss Tools SVN: r43273 - in branches/jbosstools-3.3.x/seam: plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-08-28 15:18:57 -0400 (Tue, 28 Aug 2012)
New Revision: 43273
Modified:
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam23FacetInstallDelegate.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetOnExistingProjectTest.java
Log:
https://issues.jboss.org/browse/JBIDE-12491 JBT Doesn't place the JDBC Driver correctly
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/ISeamFacetDataModelProperties.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -242,10 +242,15 @@
String HIBERNATE_HBM2DDL_AUTO = "hibernate.hbm2ddl.auto"; //$NON-NLS-1$
/**
- * Driver file name
+ * Driver file names
*/
- String JDBC_DRIVER_JAR_PATH = "driver.file"; //$NON-NLS-1$
+ String JDBC_DRIVER_JAR_PATHS_ARRAY = "driver.files.array"; //$NON-NLS-1$
+ /**
+ * Driver file name
+ */
+ String JDBC_DRIVER_JAR_NAME = "driver.file"; //$NON-NLS-1$
+
// TODO: should be moved to org.jboss.tools.seam.ui.wizard.IParameter
// why is this a property when it is always derivable from sesion_bean_package_name ?
String SESSION_BEAN_PACKAGE_PATH = "action.package.path"; //$NON-NLS-1$
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam23FacetInstallDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam23FacetInstallDelegate.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/Seam23FacetInstallDelegate.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -191,7 +191,7 @@
* @param destFolder
*/
public static void copyDBDriverToProject(IProject project, IDataModel model, File destFolder) {
- Object drvrs = model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH);
+ Object drvrs = model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY);
if(drvrs!=null) {
String[] drvrsStrings = (String[])drvrs;
if(drvrsStrings.length>0) {
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetAbstractInstallDelegate.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -882,8 +882,8 @@
if(serverRuntimeName!=null) {
ejbFilterSet.addFilter("runtimeName", serverRuntimeName); //$NON-NLS-1$
}
- if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH) != null) {
- File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
+ if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY) != null) {
+ File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY))[0]);
ejbFilterSet.addFilter("driverJar", " " + driver.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
viewFilterSetCollection.addFilterSet(getDriverFilterSet(model));
} else {
@@ -915,8 +915,8 @@
}
public static FilterSet getDriverFilterSet(IDataModel model) {
- if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH) != null) {
- File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
+ if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY) != null) {
+ File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY))[0]);
FilterSet dbTypeFilterSet = new FilterSet();
dbTypeFilterSet.addFilter("database.type", driver.getName());
return dbTypeFilterSet;
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetInstallDataModelProvider.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -72,7 +72,8 @@
names.add(ISeamFacetDataModelProperties.DB_ALREADY_EXISTS);
names.add(ISeamFacetDataModelProperties.RECREATE_TABLES_AND_DATA_ON_DEPLOY);
- names.add(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH);
+ names.add(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY);
+ names.add(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_NAME);
// Code generation group
names.add(ISeamFacetDataModelProperties.SESSION_BEAN_SOURCE_FOLDER);
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamFacetPreInstallDelegate.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -11,6 +11,7 @@
package org.jboss.tools.seam.internal.core.project.facet;
+import java.io.File;
import java.util.Properties;
import org.eclipse.core.resources.IProject;
@@ -99,8 +100,12 @@
DriverInstance i = DriverManager.getInstance().getDriverInstanceByID(props.get(
"org.eclipse.datatools.connectivity.driverDefinitionID").toString()); //$NON-NLS-1$
if(i != null) {
- model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH,
- i.getJarListAsArray());
+ String[] drivers = i.getJarListAsArray();
+ model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY, drivers);
+ if(drivers.length>0) {
+ File file = new File(drivers[0]);
+ model.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_NAME, file.getName());
+ }
}
}
}
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/project/facet/SeamProjectCreator.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -216,8 +216,8 @@
ejbFilterSet.addFilter("testProjectName", testProjectName); //$NON-NLS-1$
ejbFilterSet.addFilter("runtimeName", WtpUtils.getServerRuntimeName(seamWebProject)); //$NON-NLS-1$
- if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH) != null) {
- File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH))[0]);
+ if (model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY) != null) {
+ File driver = new File(((String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY))[0]);
ejbFilterSet.addFilter("driverJar", " " + driver.getName() + "\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} else {
ejbFilterSet.addFilter("driverJar", ""); //$NON-NLS-1$ //$NON-NLS-2$
Modified: branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -421,7 +421,7 @@
if (server != null) {
IDeployableServer jbs = (IDeployableServer) server.loadAdapter(IDeployableServer.class, new NullProgressMonitor());
if (jbs != null) {
- String[] driverJars = (String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH);
+ String[] driverJars = (String[]) model.getProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY);
if(driverJars!=null) {
String configFolder = jbs.getConfigDirectory();
if(model.getStringProperty(ISeamFacetDataModelProperties.SEAM_LIBRARY_PROVIDER).equals(SeamCoreMessages.SEAM_INSTALL_WIZARD_PAGE_COPY_LIBRARIES)){
Modified: branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java
===================================================================
--- branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.base.test/src/org/jboss/tools/seam/core/test/project/facet/AbstractSeamFacetTest.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -202,7 +202,8 @@
config.setStringProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.entity.beans");
config.setStringProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.test.beans");
config.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE, "noop-connection");
- config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH, new String[] { "noop-driver.jar" });
+ config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY, new String[] { "noop-driver.jar" });
+ config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_NAME, "noop-driver.jar");
config.setBooleanProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_LIBRARIES_COPYING, true);
config.setBooleanProperty(ISeamFacetDataModelProperties.SEAM_TEMPLATES_AND_LIBRARIES_COPYING, true);
return config;
Modified: branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetOnExistingProjectTest.java
===================================================================
--- branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetOnExistingProjectTest.java 2012-08-28 19:18:50 UTC (rev 43272)
+++ branches/jbosstools-3.3.x/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/project/facet/SeamFacetOnExistingProjectTest.java 2012-08-28 19:18:57 UTC (rev 43273)
@@ -75,7 +75,8 @@
config.setStringProperty(ISeamFacetDataModelProperties.ENTITY_BEAN_PACKAGE_NAME, "org.entity.beans");
config.setStringProperty(ISeamFacetDataModelProperties.TEST_CASES_PACKAGE_NAME, "org.test.beans");
config.setStringProperty(ISeamFacetDataModelProperties.SEAM_CONNECTION_PROFILE, "noop-connection");
- config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATH, new String[] { "noop-driver.jar" });
+ config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_PATHS_ARRAY, new String[] { "noop-driver.jar" });
+ config.setProperty(ISeamFacetDataModelProperties.JDBC_DRIVER_JAR_NAME, "noop-driver.jar");
config.setBooleanProperty(ISeamFacetDataModelProperties.SEAM_RUNTIME_LIBRARIES_COPYING, true);
return config;
}
12 years, 4 months
JBoss Tools SVN: r43272 - in trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl: definition and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-08-28 15:18:50 -0400 (Tue, 28 Aug 2012)
New Revision: 43272
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java
Log:
JBIDE-12503
https://issues.jboss.org/browse/JBIDE-12503
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-28 18:21:38 UTC (rev 43271)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/ClassBean.java 2012-08-28 19:18:50 UTC (rev 43272)
@@ -629,5 +629,6 @@
public synchronized void cleanCache() {
specializingClassBeans = null;
scope = null;
+ getDefinition().getParametedType().cleanCache();
}
}
\ No newline at end of file
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 2012-08-28 18:21:38 UTC (rev 43271)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/impl/definition/AbstractTypeDefinition.java 2012-08-28 19:18:50 UTC (rev 43272)
@@ -84,7 +84,7 @@
}
}
- public IParametedType getParametedType() {
+ public ParametedType getParametedType() {
return parametedType;
}
12 years, 4 months
JBoss Tools SVN: r43271 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-08-28 14:21:38 -0400 (Tue, 28 Aug 2012)
New Revision: 43271
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-12503 CDI Bean types are not updated
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-08-28 18:18:29 UTC (rev 43270)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-28 18:21:38 UTC (rev 43271)
@@ -829,21 +829,6 @@
return parametedType==null?null:parametedType.getType();
}
-// private void addLinkedBeanTypes(IBean bean) {
-// if(!isAsYouTypeValidation()) {
-// Collection<IParametedType> types = bean.getAllTypes();
-// for (IParametedType type : types) {
-// IType iType = type.getType();
-// if(iType!=null && !iType.isBinary()) {
-// IResource resource = iType.getResource();
-// if(resource!=null) {
-// getValidationContext().addLinkedCoreResource(SHORT_ID, beanPath, stereotype.getResource().getFullPath(), false);
-// }
-// }
-// }
-// }
-// }
-
private void addLinkedStereotypes(String beanPath, IStereotyped stereotyped) {
if(!isAsYouTypeValidation()) {
for (IStereotypeDeclaration stereotypeDeclaration : stereotyped.getStereotypeDeclarations()) {
12 years, 4 months
JBoss Tools SVN: r43270 - trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2012-08-28 14:18:29 -0400 (Tue, 28 Aug 2012)
New Revision: 43270
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
Log:
https://issues.jboss.org/browse/JBIDE-12503 CDI Bean types are not updated
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-08-28 16:34:33 UTC (rev 43269)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2012-08-28 18:18:29 UTC (rev 43270)
@@ -829,6 +829,21 @@
return parametedType==null?null:parametedType.getType();
}
+// private void addLinkedBeanTypes(IBean bean) {
+// if(!isAsYouTypeValidation()) {
+// Collection<IParametedType> types = bean.getAllTypes();
+// for (IParametedType type : types) {
+// IType iType = type.getType();
+// if(iType!=null && !iType.isBinary()) {
+// IResource resource = iType.getResource();
+// if(resource!=null) {
+// getValidationContext().addLinkedCoreResource(SHORT_ID, beanPath, stereotype.getResource().getFullPath(), false);
+// }
+// }
+// }
+// }
+// }
+
private void addLinkedStereotypes(String beanPath, IStereotyped stereotyped) {
if(!isAsYouTypeValidation()) {
for (IStereotypeDeclaration stereotypeDeclaration : stereotyped.getStereotypeDeclarations()) {
@@ -1542,7 +1557,7 @@
return false;
}
- private void saveAllSuperTypesAsLinkedResources(IClassBean bean) {
+ private void saveAllSuperTypesAsLinkedResources(IBean bean) {
if(!isAsYouTypeValidation()) {
for (IParametedType type : bean.getAllTypes()) {
IType superType = type.getType();
@@ -2398,7 +2413,8 @@
*/
private void validateTyped(IBean bean) {
Collection<ITypeDeclaration> typedDeclarations = bean.getRestrictedTypeDeclaratios();
- if (!typedDeclarations.isEmpty()) {
+ if (!typedDeclarations.isEmpty()) {
+ saveAllSuperTypesAsLinkedResources(bean);
Set<String> allTypeNames = new HashSet<String>();
for (IParametedType type : bean.getAllTypes()) {
if(type.getType() != null) allTypeNames.add(type.getType().getFullyQualifiedName());
12 years, 4 months