Skip to main content
summaryrefslogtreecommitdiffstats
path: root/jaxb
diff options
context:
space:
mode:
authorBrian Vosburgh2013-03-26 18:02:52 +0000
committerBrian Vosburgh2013-03-26 18:02:52 +0000
commita30076b576848997543e9a98da2f642f208b6120 (patch)
tree8ab6100e20202662e45367057ad3fcd6c96e4fe4 /jaxb
parent3c552473cb9129701368c2234f6df1187528fc70 (diff)
downloadwebtools.dali-a30076b576848997543e9a98da2f642f208b6120.tar.gz
webtools.dali-a30076b576848997543e9a98da2f642f208b6120.tar.xz
webtools.dali-a30076b576848997543e9a98da2f642f208b6120.zip
refactor common.core Tools classes
Diffstat (limited to 'jaxb')
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java12
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/GenericJaxbPlatformDefinition.java6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformConfig.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformManager.java6
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/JaxbPlatformImpl.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbindex/JaxbIndexResource.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbprops/JaxbPropertiesResource.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java10
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java3
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/InternalJaxbPlatformUiManager.java4
-rw-r--r--jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/JaxbPlatformUiConfig.java4
12 files changed, 33 insertions, 31 deletions
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
index f675f6b1bc..1a7126e9e2 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/AbstractJaxbProject.java
@@ -41,7 +41,7 @@ import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.JptResourceModelListener;
import org.eclipse.jpt.common.core.internal.resource.java.binary.BinaryTypeCache;
import org.eclipse.jpt.common.core.internal.resource.java.source.SourceTypeCompilationUnit;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.core.internal.utility.ValidationMessageTools;
import org.eclipse.jpt.common.core.resource.ProjectResourceLocator;
import org.eclipse.jpt.common.core.resource.java.JavaResourceAbstractType;
@@ -408,7 +408,7 @@ public abstract class AbstractJaxbProject
/* file is .java or .jar */
protected boolean isJavaFile(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
+ IContentType contentType = ContentTypeTools.contentType(file);
return contentType != null
&& (contentType.isKindOf(JavaResourceCompilationUnit.CONTENT_TYPE)
|| contentType.isKindOf(JavaResourcePackageFragmentRoot.JAR_CONTENT_TYPE));
@@ -577,7 +577,7 @@ public abstract class AbstractJaxbProject
return EmptyIterable.instance();
}
- IContentType contentType = PlatformTools.getContentType(file);
+ IContentType contentType = ContentTypeTools.contentType(file);
if (contentType == null) {
return EmptyIterable.instance();
}
@@ -1261,7 +1261,7 @@ public abstract class AbstractJaxbProject
return this.addJaxbFile(file);
}
- if (jaxbFile.getContentType().equals(PlatformTools.getContentType(file))) {
+ if (jaxbFile.getContentType().equals(ContentTypeTools.contentType(file))) {
// content has not changed - ignore
return false;
}
@@ -1327,7 +1327,7 @@ public abstract class AbstractJaxbProject
}
protected boolean externalFileAdded(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
+ IContentType contentType = ContentTypeTools.contentType(file);
if (contentType == null) {
return false;
}
@@ -1341,7 +1341,7 @@ public abstract class AbstractJaxbProject
}
protected boolean externalFileRemoved(IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
+ IContentType contentType = ContentTypeTools.contentType(file);
if (contentType == null) {
return false;
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/GenericJaxbPlatformDefinition.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/GenericJaxbPlatformDefinition.java
index 59fdd9825d..3503bb3bee 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/GenericJaxbPlatformDefinition.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/GenericJaxbPlatformDefinition.java
@@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.core.resource.java.AnnotationDefinition;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
import org.eclipse.jpt.common.core.resource.java.NestableAnnotationDefinition;
@@ -124,10 +124,10 @@ public abstract class GenericJaxbPlatformDefinition
public JptResourceType getMostRecentSupportedResourceType(IContentType contentType) {
if (contentType.equals(JavaResourceCompilationUnit.CONTENT_TYPE)) {
- return PlatformTools.getResourceType(JavaResourceCompilationUnit.CONTENT_TYPE);
+ return ContentTypeTools.getResourceType(JavaResourceCompilationUnit.CONTENT_TYPE);
}
if (contentType.equals(JavaResourceCompilationUnit.PACKAGE_INFO_CONTENT_TYPE)) {
- return PlatformTools.getResourceType(JavaResourceCompilationUnit.PACKAGE_INFO_CONTENT_TYPE);
+ return ContentTypeTools.getResourceType(JavaResourceCompilationUnit.PACKAGE_INFO_CONTENT_TYPE);
}
throw new IllegalArgumentException(contentType.toString());
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
index a25a3d27c0..0764bfdc4c 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/context/java/AbstractJavaContextNode.java
@@ -10,7 +10,7 @@
package org.eclipse.jpt.jaxb.core.internal.context.java;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
import org.eclipse.jpt.jaxb.core.JaxbNode;
import org.eclipse.jpt.jaxb.core.internal.context.AbstractJaxbContextNode;
@@ -28,6 +28,6 @@ public abstract class AbstractJavaContextNode
@Override
public JptResourceType getResourceType() {
- return PlatformTools.getResourceType(JavaResourceCompilationUnit.CONTENT_TYPE);
+ return ContentTypeTools.getResourceType(JavaResourceCompilationUnit.CONTENT_TYPE);
}
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformConfig.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformConfig.java
index c117791c51..d266e88f80 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformConfig.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformConfig.java
@@ -9,7 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.core.internal.platform;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ExtensionPointTools;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.jaxb.core.JaxbProject;
import org.eclipse.jpt.jaxb.core.platform.JaxbPlatformConfig;
@@ -107,7 +107,7 @@ class InternalJaxbPlatformConfig
}
private JaxbPlatformDefinitionFactory buildJaxbPlatformDefinitionFactory() {
- return PlatformTools.instantiate(this.pluginId, this.jaxbPlatformManager.getExtensionPointName(), this.factoryClassName, JaxbPlatformDefinitionFactory.class);
+ return ExtensionPointTools.instantiate(this.pluginId, this.jaxbPlatformManager.getExtensionPointName(), this.factoryClassName, JaxbPlatformDefinitionFactory.class);
}
@Override
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformManager.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformManager.java
index 04d3fa0922..8002cbc8d1 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformManager.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/InternalJaxbPlatformManager.java
@@ -19,7 +19,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.jpt.common.core.JptCommonCoreMessages;
-import org.eclipse.jpt.common.core.internal.utility.ConfigurationElementTools;
+import org.eclipse.jpt.common.core.internal.utility.ExtensionPointTools;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.common.utility.internal.iterable.IterableTools;
import org.eclipse.jpt.common.utility.internal.iterable.SuperIterableWrapper;
@@ -385,11 +385,11 @@ public class InternalJaxbPlatformManager
}
private void logMissingAttribute(IConfigurationElement element, String attributeName) {
- this.getPlugin().logError(ConfigurationElementTools.buildMissingAttributeMessage(element, attributeName));
+ this.getPlugin().logError(ExtensionPointTools.buildMissingAttributeMessage(element, attributeName));
}
private void logInvalidValue(IConfigurationElement element, String nodeName, String invalidValue) {
- this.getPlugin().logError(ConfigurationElementTools.buildInvalidValueMessage(element, nodeName, invalidValue));
+ this.getPlugin().logError(ExtensionPointTools.buildInvalidValueMessage(element, nodeName, invalidValue));
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/JaxbPlatformImpl.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/JaxbPlatformImpl.java
index 1d0b69e82d..bf0a00276c 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/JaxbPlatformImpl.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/internal/platform/JaxbPlatformImpl.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.AnnotationProvider;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.internal.SimpleAnnotationProvider;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.internal.utility.jdt.DefaultAnnotationEditFormatter;
import org.eclipse.jpt.common.core.utility.jdt.AnnotationEditFormatter;
@@ -63,7 +64,7 @@ public final class JaxbPlatformImpl
// ********** JAXB file/resource models **********
public JaxbFile buildJaxbFile(JaxbProject jaxbProject, IFile file) {
- IContentType contentType = PlatformTools.getContentType(file);
+ IContentType contentType = ContentTypeTools.contentType(file);
return (contentType == null) ? null : this.buildJaxbFile(jaxbProject, file, contentType);
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbindex/JaxbIndexResource.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbindex/JaxbIndexResource.java
index d0f3860461..c7e795d6a9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbindex/JaxbIndexResource.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbindex/JaxbIndexResource.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jaxb.core.resource.jaxbindex;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.utility.internal.transformer.TransformerAdapter;
import org.eclipse.jpt.common.utility.transformer.Transformer;
import org.eclipse.jpt.jaxb.core.internal.plugin.JptJaxbCorePlugin;
@@ -28,7 +28,7 @@ public interface JaxbIndexResource
/**
* The resource type for <code>jaxb.index</code> files.
*/
- JptResourceType RESOURCE_TYPE = PlatformTools.getResourceType(CONTENT_TYPE);
+ JptResourceType RESOURCE_TYPE = ContentTypeTools.getResourceType(CONTENT_TYPE);
String getPackageName();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbprops/JaxbPropertiesResource.java b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbprops/JaxbPropertiesResource.java
index 0cdd9bc4c1..120edbf90a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbprops/JaxbPropertiesResource.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.core/src/org/eclipse/jpt/jaxb/core/resource/jaxbprops/JaxbPropertiesResource.java
@@ -12,7 +12,7 @@ package org.eclipse.jpt.jaxb.core.resource.jaxbprops;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.JptResourceModel;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.jaxb.core.internal.plugin.JptJaxbCorePlugin;
@@ -27,7 +27,7 @@ public interface JaxbPropertiesResource
/**
* The resource type for <code>jaxb.properties</code> files.
*/
- JptResourceType RESOURCE_TYPE = PlatformTools.getResourceType(CONTENT_TYPE);
+ JptResourceType RESOURCE_TYPE = ContentTypeTools.getResourceType(CONTENT_TYPE);
String getPackageName();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
index 3235ec9b67..6fb1fc979a 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.eclipselink.core/src/org/eclipse/jpt/jaxb/eclipselink/core/resource/oxm/Oxm.java
@@ -11,7 +11,7 @@ package org.eclipse.jpt.jaxb.eclipselink.core.resource.oxm;
import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.jpt.common.core.JptResourceType;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.jaxb.eclipselink.core.internal.plugin.JptJaxbEclipseLinkCorePlugin;
public interface Oxm {
@@ -23,22 +23,22 @@ public interface Oxm {
String SCHEMA_VERSION_2_1 = "2.1";
String SCHEMA_LOCATION_2_1 = "http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_1.xsd";
- JptResourceType RESOURCE_TYPE_2_1 = PlatformTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_1);
+ JptResourceType RESOURCE_TYPE_2_1 = ContentTypeTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_1);
String SCHEMA_VERSION_2_2 = "2.2";
String SCHEMA_LOCATION_2_2 = "http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_2.xsd";
- JptResourceType RESOURCE_TYPE_2_2 = PlatformTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_2);
+ JptResourceType RESOURCE_TYPE_2_2 = ContentTypeTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_2);
String SCHEMA_VERSION_2_3 = "2.3";
String SCHEMA_LOCATION_2_3 = "http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_3.xsd";
- JptResourceType RESOURCE_TYPE_2_3 = PlatformTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_3);
+ JptResourceType RESOURCE_TYPE_2_3 = ContentTypeTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_3);
String SCHEMA_VERSION_2_4 = "2.4";
String SCHEMA_LOCATION_2_4 = "http://www.eclipse.org/eclipselink/xsds/eclipselink_oxm_2_4.xsd";
- JptResourceType RESOURCE_TYPE_2_4 = PlatformTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_4);
+ JptResourceType RESOURCE_TYPE_2_4 = ContentTypeTools.getResourceType(CONTENT_TYPE, SCHEMA_VERSION_2_4);
// Oxm specific nodes
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
index db35a1e76d..50930a6172 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/JaxbJavaCompletionProposalComputer.java
@@ -24,6 +24,7 @@ import org.eclipse.jdt.ui.text.java.IJavaCompletionProposalComputer;
import org.eclipse.jdt.ui.text.java.JavaContentAssistInvocationContext;
import org.eclipse.jface.text.contentassist.CompletionProposal;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
+import org.eclipse.jpt.common.core.internal.utility.ContentTypeTools;
import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
import org.eclipse.jpt.common.core.resource.java.JavaResourceCompilationUnit;
import org.eclipse.jpt.common.utility.internal.StringTools;
@@ -102,7 +103,7 @@ public class JaxbJavaCompletionProposalComputer
private List<ICompletionProposal> computeCompletionProposals_(JavaContentAssistInvocationContext context) {
ICompilationUnit cu = context.getCompilationUnit();
IFile file = (cu != null) ? getCorrespondingResource(cu) : null;
- IContentType contentType = (file != null) ? PlatformTools.getContentType(file) : null;
+ IContentType contentType = (file != null) ? ContentTypeTools.contentType(file) : null;
if (contentType == null || ! contentType.isKindOf(JavaResourceCompilationUnit.CONTENT_TYPE)) {
return Collections.emptyList();
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/InternalJaxbPlatformUiManager.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/InternalJaxbPlatformUiManager.java
index a5725fbe8f..b4e7a16eca 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/InternalJaxbPlatformUiManager.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/InternalJaxbPlatformUiManager.java
@@ -16,7 +16,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.RegistryFactory;
import org.eclipse.jpt.common.core.JptCommonCoreMessages;
-import org.eclipse.jpt.common.core.internal.utility.ConfigurationElementTools;
+import org.eclipse.jpt.common.core.internal.utility.ExtensionPointTools;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.common.utility.internal.StringTools;
import org.eclipse.jpt.jaxb.core.JaxbWorkspace;
@@ -182,7 +182,7 @@ public class InternalJaxbPlatformUiManager
}
private void logMissingAttribute(IConfigurationElement element, String attributeName) {
- this.getPlugin().logError(ConfigurationElementTools.buildMissingAttributeMessage(element, attributeName));
+ this.getPlugin().logError(ExtensionPointTools.buildMissingAttributeMessage(element, attributeName));
}
diff --git a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/JaxbPlatformUiConfig.java b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/JaxbPlatformUiConfig.java
index f8bc002d8e..00ca61c8e9 100644
--- a/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/JaxbPlatformUiConfig.java
+++ b/jaxb/plugins/org.eclipse.jpt.jaxb.ui/src/org/eclipse/jpt/jaxb/ui/internal/platform/JaxbPlatformUiConfig.java
@@ -9,7 +9,7 @@
******************************************************************************/
package org.eclipse.jpt.jaxb.ui.internal.platform;
-import org.eclipse.jpt.common.core.internal.utility.PlatformTools;
+import org.eclipse.jpt.common.core.internal.utility.ExtensionPointTools;
import org.eclipse.jpt.common.utility.internal.ObjectTools;
import org.eclipse.jpt.jaxb.ui.platform.JaxbPlatformUi;
@@ -64,7 +64,7 @@ class JaxbPlatformUiConfig {
}
private JaxbPlatformUi buildJaxbPlatformUi() {
- return PlatformTools.instantiate(this.pluginID, this.manager.getExtensionPointName(), this.className, JaxbPlatformUi.class);
+ return ExtensionPointTools.instantiate(this.pluginID, this.manager.getExtensionPointName(), this.className, JaxbPlatformUi.class);
}
@Override

Back to the top