summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaren Butzke2012-11-16 13:57:33 (EST)
committerKaren Butzke2012-11-16 13:57:33 (EST)
commited69637beb55726410fc6a7845a0f5c2b22d4944 (patch)
tree9bb94e63f4ab678b5dd4c87e73e3e6659a88e77c
parent3c99707a8404b3a49bc9b1b8b2c35352eda65f8a (diff)
downloadwebtools.dali-ed69637beb55726410fc6a7845a0f5c2b22d4944.zip
webtools.dali-ed69637beb55726410fc6a7845a0f5c2b22d4944.tar.gz
webtools.dali-ed69637beb55726410fc6a7845a0f5c2b22d4944.tar.bz2
cleaning up some warnings
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java4
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java2
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java2
9 files changed, 18 insertions, 16 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
index fa74878..2f98fe1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/context/orm/AbstractOrmTable.java
@@ -524,10 +524,10 @@ public abstract class AbstractOrmTable<X extends AbstractXmlTable>
}
protected Iterable<String> getCandidateSchemata() {
- if (this.getDbSchemaContainer() == null)
+ if (this.getDbSchemaContainer() == null) {
return EmptyIterable.<String>instance();
- else
- return this.getDbSchemaContainer().getSortedSchemaIdentifiers();
+ }
+ return this.getDbSchemaContainer().getSortedSchemaIdentifiers();
}
// ********* content assist : catalog
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java
index 9b3c1b5..a0e70b3 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProperties.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009, 2010 Oracle.
+ * Copyright (c) 2009, 2012 Oracle.
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
@@ -12,6 +12,7 @@ package org.eclipse.jpt.jpa.core.internal.facet;
import org.eclipse.wst.common.frameworks.datamodel.IDataModelProperties;
+@SuppressWarnings("nls")
public interface JpaFacetDataModelProperties
extends IDataModelProperties
{
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java
index 15306e0..2736744 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetDataModelProvider.java
@@ -212,7 +212,7 @@ public abstract class JpaFacetDataModelProvider
this.defaultLibraryProvider.dispose();
this.defaultLibraryProvider = buildDefaultLibraryProvider();
}
- return defaultLibraryProvider;
+ return this.defaultLibraryProvider;
}
protected LibraryInstallDelegate buildDefaultLibraryProvider() {
@@ -227,7 +227,7 @@ public abstract class JpaFacetDataModelProvider
Map<String, Object> customEnablementVariables = new HashMap<String, Object>();
JpaPlatformConfig jpaPlatformConfig = getPlatformConfig();
- String jpaPlatformId = (jpaPlatformConfig == null) ? "" : jpaPlatformConfig.getId();
+ String jpaPlatformId = (jpaPlatformConfig == null) ? "" : jpaPlatformConfig.getId(); //$NON-NLS-1$
customEnablementVariables.put(
JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, jpaPlatformId);
customEnablementVariables.put(
@@ -391,7 +391,7 @@ public abstract class JpaFacetDataModelProvider
if (lid != null) {
JpaPlatformConfig jpaPlatformConfig = getPlatformConfig();
- String jpaPlatformId = (jpaPlatformConfig == null) ? "" : jpaPlatformConfig.getId();
+ String jpaPlatformId = (jpaPlatformConfig == null) ? "" : jpaPlatformConfig.getId(); //$NON-NLS-1$
lid.setEnablementContextVariable(
JpaLibraryProviderInstallOperationConfig.JPA_PLATFORM_ENABLEMENT_EXP, jpaPlatformId);
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java
index 5771999..bc1d821 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/facet/JpaFacetInstallDataModelProvider.java
@@ -132,8 +132,8 @@ public class JpaFacetInstallDataModelProvider
IProduct product = Platform.getProduct();
String discoverAnnotatedClassesDefaultPreference = (product == null) ? null : product.getProperty(DISCOVER_ANNOTATED_CLASSES_DEFAULT);
//if no product preference is defined check the runtime for support, otherwise check the preference to determine override
- return (discoverAnnotatedClassesDefaultPreference == null) ?
- Boolean.valueOf(this.runtimeSupportsEjb30()) : discoverAnnotatedClassesDefaultPreference.equals("true");
+ return Boolean.valueOf((discoverAnnotatedClassesDefaultPreference == null) ?
+ this.runtimeSupportsEjb30() : discoverAnnotatedClassesDefaultPreference.equals("true")); //$NON-NLS-1$
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java
index eb78834..210c245 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/AbstractJpaFileCreationOperation.java
@@ -17,6 +17,7 @@ import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
@@ -105,12 +106,12 @@ public abstract class AbstractJpaFileCreationOperation
protected void createContainer(IProgressMonitor monitor) throws ExecutionException {
IContainer container = getContainer();
if (! container.exists()) {
- if (container.getType() == IContainer.PROJECT) {
+ if (container.getType() == IResource.PROJECT) {
throw new ExecutionException("Project does not exist"); //$NON-NLS-1$
}
- else if (container.getType() == IContainer.FOLDER) {
+ else if (container.getType() == IResource.FOLDER) {
try {
- ((IFolder) container).create(true, true, null);
+ ((IFolder) container).create(true, true, monitor);
}
catch (CoreException e) {
throw new ExecutionException("Could not create folder", e); //$NON-NLS-1$
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java
index ba4c555..df416a1 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/operations/OrmFileCreationOperation.java
@@ -67,7 +67,7 @@ public class OrmFileCreationOperation
return pUnit;
}
}
- throw new ExecutionException("persistence.xml does not have persistence unit named \'" + pUnitName + "\'"); //$NON-NLS-1$
+ throw new ExecutionException("persistence.xml does not have persistence unit named \'" + pUnitName + "\'"); //$NON-NLS-1$ //$NON-NLS-2$
}
protected void addMappingFileToPersistenceXml() throws ExecutionException {
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java
index 290d30e..470d41b 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceMapKeyAnnotation.java
@@ -106,7 +106,7 @@ public final class SourceMapKeyAnnotation
}
public boolean nameTouches(int pos) {
- return this.textRangeTouches(nameTextRange, pos);
+ return this.textRangeTouches(this.nameTextRange, pos);
}
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java
index 2db2e98..60f5875 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToManyAnnotation.java
@@ -137,7 +137,7 @@ public final class SourceOneToManyAnnotation
}
public boolean mappedByTouches(int pos) {
- return this.textRangeTouches(mappedByTextRange, pos);
+ return this.textRangeTouches(this.mappedByTextRange, pos);
}
// ********** OneToMany2_0Annotation implementation **********
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java
index c7d4d5a..9b8ab0e 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.core/src/org/eclipse/jpt/jpa/core/internal/resource/java/source/SourceOneToOneAnnotation.java
@@ -153,7 +153,7 @@ public final class SourceOneToOneAnnotation
}
public boolean mappedByTouches(int pos) {
- return this.textRangeTouches(mappedByTextRange, pos);
+ return this.textRangeTouches(this.mappedByTextRange, pos);
}
// ***** optional